Skip to content

Instantly share code, notes, and snippets.

View gist:eb3ab92a8db8ae5fb93deb135ae1c7b4
# Adding a tag to our commit identified
# by the first 7 digits of its SHA1 checksum
git tag -m 'a nice tag' 51dcfd9
# looking for the created files we see one more file
# has been created
find .git/objects -type f
.git/objects/51/e1acfa6ecdb46d6c9d4ad13e82b5cab90d5f3f
.git/objects/51/dcfd9bba09650f50ccad8dde3ad5fe8ba68ad2
.git/objects/53/8d4c75373bb8ebb9af381c4e8287b6f0819533
@JimGrange
JimGrange / parallel_examples.R
Created Jul 20, 2019
Examples of different parallelisations in R
View parallel_examples.R
# https://nceas.github.io/oss-lessons/parallel-computing-in-r/parallel-computing-in-r.html
library(parallel)
library(foreach)
library(doParallel)
library(snow)
set.seed(42)
n_subs <- 100000
n_trials <- 5000
View DSI - 2 - lane
[ 2.500602] printk: console [ttyS0] enabled
[ 2.506767] sun6i-mipi-dsi 1ca0000.dsi: Attached device ts8550b
[ 2.542180] sun4i-drm display-engine: bound 1100000.mixer (ops sun8i_mixer_ops)
[ 2.551519] sun4i-drm display-engine: bound 1200000.mixer (ops sun8i_mixer_ops)
[ 2.559042] sun4i_dclk_recalc_rate: val = 1, rate = 594000000
[ 2.565017] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[ 2.572875] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops sun4i_tcon_ops)
[ 2.581096] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops sun4i_tcon_ops)
[ 2.589125] 0.0 drm_connector_init
[ 2.592541] 0. 282992392-1-0 (null)
@jhrom
jhrom / README-Template.md
Last active Jul 20, 2019 — forked from ramantehlan/README-Template.md
README template I use for most of my projects.
View README-Template.md

Introduction

  • Add your project logo.
  • Write a short introduction to the project.
  • If you are using badges, add them here.

📒 Index

View python-pptx-chart
from pptx import Presentation
from pptx.chart.data import CategoryChartData,XyChartData
from pptx.enum.chart import XL_CHART_TYPE,XL_LEGEND_POSITION,XL_CATEGORY_TYPE
from pptx.util import Inches,Pt
import numpy as numpy
import pandas as pd
from WindPy import *
@vanjac
vanjac / karabiner_example.json
Created Jul 20, 2019
Karabiner example rule
View karabiner_example.json
{
"title": "111 Macro keyboard rules",
"rules": [
{
"description": "Press A to save",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "a"
@franzwong
franzwong / index.js
Created Jul 20, 2019
Mac OS Keychain wrapper
View index.js
const util = require('util');
const child_process = require('child_process');
const exec = util.promisify(child_process.exec);
function addPassword(serviceName, userName, password) {
return exec(`security add-generic-password -s ${serviceName} -a ${userName} -w ${password}`);
}
async function getPassword(serviceName, userName) {
View WinImageBuilder.psm
# Copyright 2017 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
View gopay-inline-change-paid-order-status.php
<?php
add_filter('gopay_notify_virtual_product_status', 'toret_gopay_custom_paid_status', 10, 2 );
add_filter('gopay_notify_normal_product_status', 'toret_gopay_custom_paid_status', 10, 2 );
if ( !function_exists( 'toret_gopay_custom_paid_status' ) ) {
function toret_gopay_custom_paid_status( $status, $order ) {
return 'paid-order';
View tensorflow_boston.py
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
num_points=1000
vectors_set=[]
for i in range(num_points):
x1=np.random.normal(0.0,0.55) #横坐标,进行随机高斯处理化,以0为均值,以0.55为标准差
You can’t perform that action at this time.