Skip to content

Instantly share code, notes, and snippets.

@mp035
mp035 / tk_scroll_demo.py
Last active May 4, 2024 14:19
A simple scrollable frame class for tkinter, including example usage.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import tkinter as tk
import platform
# ************************
# Scrollable Frame Class
# ************************
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 4, 2024 14:18
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/bin/bash
### steps ####
# Verify the system has a cuda-capable gpu
# Download and install the nvidia cuda toolkit and cudnn
# Setup environmental variables
# Verify the installation
###
### to verify your gpu is cuda enable check
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active May 4, 2024 14:16
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@jesster2k10
jesster2k10 / README.md
Last active May 4, 2024 14:15
Rails API Social Login

Rails API-Only Social Login

This is another piece of code I've extrapolated from a Ruby on Rails project I'm currently working on. The code implmenets social login with a RoR API-based application, targeted at API clients.

The setup does not involve any browser-redirects or sessions as you would have to use working with Omniauth. Instead, what it does is takes an access_token generated on client-side SDKs, retireves user info from the access token and creates a new user and Identity in the database.

This setup works with native applications as described in the Google iOS Sign In Docs (see Authenticating with a backend server)

@rxaviers
rxaviers / gist:7360908
Last active May 4, 2024 14:14
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
  1. For compiling the source code install essential packages. (If you haven't done this before)
sudo apt install wget build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev 
sudo apt install zlib1g-dev
sudo apt install zlib1g zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
sudo apt install libedit-dev libnss3-dev 
@jfreels
jfreels / README.md
Last active May 4, 2024 14:12
d3js: Create a table using data from a CSV file.

d3js: Create a table using data from a CSV file.

@planetceres
planetceres / RESET_USB_KERNEL_MODULE.md
Last active May 4, 2024 14:11
Restart/reset USB kernel module in Ubuntu 18.04 without rebooting
@asarode
asarode / generateRandomColor.swift
Last active May 4, 2024 14:10
Generating random UIColor in Swift
func generateRandomColor() -> UIColor {
let hue : CGFloat = CGFloat(arc4random() % 256) / 256 // use 256 to get full range from 0.0 to 1.0
let saturation : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from white
let brightness : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from black
return UIColor(hue: hue, saturation: saturation, brightness: brightness, alpha: 1)
}