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
diff --git i/conn.go w/conn.go | |
index ef701c8..f8cfb29 100644 | |
--- i/conn.go | |
+++ w/conn.go | |
@@ -5,7 +5,9 @@ import ( | |
"errors" | |
"io" | |
"net" | |
+ "os" | |
"time" |
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
# | |
# APT Configuration for EdgeRouter/EdgeOS 2.x | |
# | |
# Vanilla APT configuration can be problematic since VyattaOS is a fork | |
# of Debian with enhancements, but is not aggressively kept up to date | |
# with Debian releases. Not all mirrors have "old" packages and not all | |
# mirrors have all architectures (e.g. very few have older MIPS architecture | |
# platforms | |
# | |
# - AG |
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
#!/bin/bash | |
################################################################################ | |
### Install Quartus and ModelSim ### | |
################################################################################ | |
# Source code at https://github.com/arthurbeggs/scripts # | |
################################################################################ | |
# # | |
# Based on https://github.com/jessebarreto/ConfigureWorkspace script. # | |
# # |
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
# For very basic cases, you shouldn't need to worry about such an extensive / granular | |
# inclusion file, unless you're actually *using* the "template"; if you are, you should | |
# probably stop doing that :> | |
- __pycache__ | |
- *.py[cod] | |
- *$py.class | |
- *.pyc | |
- .git | |
- README.md | |
# Exclude template script itself... |
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
#!/bin/bash | |
# | |
# Function to roll files in the way that logrotate rolls log files | |
# Keeps up to the specified amount of files | |
# | |
# | |
# (C) 2022, AG | |
# | |
set -eu | |
# Globals, optional |
EDIT/NOTE: Please see the comment below from @oferchen, this is supported properly in the build system now
Get the patch file (python3-static-link-openssl.patch
) and put it in your working directory
$ wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz
$ tar -xvf Python-3.8.12.tar.xz && cd Python-3.8.12
$ patch -p1 < ../python3-static-link-openssl.patch
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
#!/bin/bash | |
# | |
# Install/Update Mozilla Firefox conveniently and repeatably, allowing version selection | |
# The ESR Firefox that ships with Debian 10/11 (and probably Ubuntu, etc) doesn't support | |
# containers, so I found myself installing the Mozilla distribution of Firefox. That had | |
# me a little concerned about keeping it up to date, so I run this out of cron. Maybe it's | |
# useful for someone ... | |
# | |
# This is intended for use with XFCE but I think most window managers use the .desktop style | |
# metadata files for launchers/menus/etc. Check /usr/share/applications/ on your system to |
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 | |
import pandas as pd | |
#### creating dataframes, adding and dropping columns | |
df = pd.DataFrame(np.arange(1,10).reshape(3,3),['A','B','C'],['w','x','y']) | |
df.columns = ['W','X','Y'] # change column names | |
df['Z']=df['X']+df['Y'] # new column with values X+Y | |
df['XX']=df.apply(lambda row: row['X']*2, axis=1) # new column with values twice of column X | |
df['YY']=1 # new column of ones |