Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
Discover gists
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
#!/usr/bin/env -S bash -c 'nix-shell --pure $0 -A env' | |
# Usage: | |
# 1. run directly to enter bash (inside venv): `./venv-py37.nix` | |
# 2. build a standalone executable: `nix bundle -f ./venv-py37.nix` #this not works yet since it cause nested `unshare -U` call | |
# 3. run bash with extra arguments: `nix run -f ./venv-py37.nix '' -- -c 'python --version'` | |
# More: | |
# 1. commit id of nixpkgs can be found here: https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=python3 | |
let |
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
package main | |
import ( | |
"os/exec" | |
"unsafe" | |
"golang.org/x/sys/windows" | |
) | |
// We use this struct to retreive process handle(which is unexported) |
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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
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
const fs = require("fs"); | |
const sqlite3 = require("sqlite3"); | |
const glob = require("glob"); | |
const os = require("os"); | |
const { open } = require("sqlite"); | |
const username = os.userInfo().username; | |
const ANNOTATION_DB_PATH = `/users/${username}/Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation/`; | |
const BOOK_DB_PATH = `/users/${username}/Library/Containers/com.apple.iBooksX/Data/Documents/BKLibrary/`; | |
const annotationsFiles = glob.sync(`${ANNOTATION_DB_PATH}/*.sqlite`); |
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
public extension UIView { | |
private static let kLayerNameGradientBorder = "GradientBorderLayer" | |
public func setGradientBorder( | |
width: CGFloat, | |
colors: [UIColor], | |
startPoint: CGPoint = CGPoint(x: 0.5, y: 0), | |
endPoint: CGPoint = CGPoint(x: 0.5, y: 1) | |
) { |
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
#pragma once | |
#include "util/types.hpp" | |
#include "util/std.hpp" | |
#include "util/ndarray.hpp" | |
#include "util/collections.hpp" | |
#include "util/rand.hpp" | |
#include "util/hash.hpp" | |
#include "util/assert.hpp" | |
#include "util/bitset.hpp" |
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
using UnityEngine; | |
using UnityEngine.AddressableAssets; | |
using UnityEngine.AddressableAssets.ResourceLocators; | |
using UnityEngine.ResourceManagement; | |
using UnityEngine.ResourceManagement.ResourceLocations; | |
using UnityEngine.ResourceManagement.ResourceProviders; | |
using UnityEngine.ResourceManagement.AsyncOperations; | |
using UnityEngine.SceneManagement; | |
using System.Collections; | |
using System.Collections.Generic; |
Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.
If you want to try home row mods
on OSX
, don't use Karabiner
but KMonad
.
KMonad
is harder at the beginning but then it is easier than Karabiner
.
Creating layers in KMonad
is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.
You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg
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
var os = require("os"); | |
//Create function to get CPU information | |
function cpuAverage() { | |
//Initialise sum of idle and time of cores and fetch CPU info | |
var totalIdle = 0, totalTick = 0; | |
var cpus = os.cpus(); | |
//Loop through CPU cores |
NewerOlder