Skip to content

Instantly share code, notes, and snippets.

View abrad1212's full-sized avatar
💭
School

abrad1212 abrad1212

💭
School
View GitHub Profile
@arainho
arainho / pwnagotchi_install.sh
Last active November 19, 2024 13:59
install pwnagotchi on rpi4
#!/usr/bin/env bash
# install pwnagotchi on rpi4
WIFI_DEV="wlan1"
AUTO_MODE=true
DEBUG=false
PWN_GRID=false
PWN_GRID_REPORT=false
HOME_NETWORK="YourHomeNetworkMaybe"
import sys
import pandas as pd
from PyQt5.QtWidgets import QApplication, QTableView
from PyQt5.QtCore import QAbstractTableModel, Qt
df = pd.DataFrame({'a': ['Mary', 'Jim', 'John'],
'b': [100, 200, 300],
'c': ['a', 'b', 'c']})
class pandasModel(QAbstractTableModel):
@jlebensold
jlebensold / baseline_models.py
Last active May 7, 2019 13:49
Baselines for MorphNet paper
from pathlib import Path
import torch
import torch.nn as nn
import torch.nn.functional as F
class TanhNet(nn.Module):
def __init__(self, in_features, h_units):
super(TanhNet, self).__init__()
self.fc1 = nn.Linear(in_features, h_units)
@chinmaygarde
chinmaygarde / Dockerfile
Created July 2, 2018 18:09
Flutter Android on Docker
# Flutter (https://flutter.io) Developement Environment for Linux
# ===============================================================
#
# This environment passes all Linux Flutter Doctor checks and is sufficient
# for building Android applications and running Flutter tests.
#
# To build iOS applications, a Mac development environment is necessary.
#
FROM debian:stretch
@tobiasraabe
tobiasraabe / python-downloader.py
Last active March 18, 2024 13:17
Script to download files, resume downloads and validate downloads. Everything wrapped with a beautiful progressbar.
import click
import hashlib
import requests
from pathlib import Path
from tqdm import tqdm
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@iskandr
iskandr / keras2-highway-network.py
Created April 17, 2017 20:24
Since Keras 2.0 removed the Highway Network layer, here's my attempt at implementing something equivalent using the functional API
import keras.backend as K
from keras.layers import Dense, Activation, Multiply, Add, Lambda
import keras.initializers
def highway_layers(value, n_layers, activation="tanh", gate_bias=-3):
dim = K.int_shape(value)[-1]
gate_bias_initializer = keras.initializers.Constant(gate_bias)
for i in range(n_layers):
gate = Dense(units=dim, bias_initializer=gate_bias_initializer)(value)
gate = Activation("sigmoid")(gate)
@FinlayDaG33k
FinlayDaG33k / gist:23a6134b1ad3e5f867a64219a374406e
Last active February 12, 2024 19:30
Minergate-cli ubuntu installation
Run this command to install MG-CLI:
sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb
to start miner (4 cores for BCN) use this command:
minergate-cli -user <[email protected]> -bcn 4
Feel free to send some of your earnings to me:
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j
@hidroh
hidroh / avd.sh
Last active May 6, 2024 02:31
Handy bash script to prompt for an Android virtual device (AVD) selection and launch it. Assuming that Android SDK has been set up and is in user PATH.
emulator -list-avds | cat -n
printf "Select AVD: "
read index
avd=$(emulator -list-avds | sed "${index}q;d")
echo "Selected $avd"
emulator -netdelay none -netspeed full -avd $avd
@jasonsperske
jasonsperske / MIT-LICENSE
Last active March 1, 2023 03:06
A simple Python program that can read DOOM.Hexen IWAD and PWAD files and render them as SVG see examples at http://jason.sperske.com/wad/
MIT License
Copyright (c) 2018 Jason Sperske
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@sloria
sloria / bobp-python.md
Last active November 14, 2024 15:01
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens