Skip to content

Instantly share code, notes, and snippets.

View 7PintsOfCherryGarcia's full-sized avatar

Julian Regalado Perez 7PintsOfCherryGarcia

View GitHub Profile
@ibireme
ibireme / kpc_demo.c
Last active May 4, 2024 14:37
A demo shows how to read Intel or Apple M1 CPU performance counter in macOS.
// =============================================================================
// XNU kperf/kpc demo
// Available for 64-bit Intel/Apple Silicon, macOS/iOS, with root privileges
//
//
// Demo 1 (profile a function in current thread):
// 1. Open directory '/usr/share/kpep/', find your CPU PMC database.
// M1 (Pro/Max/Ultra): /usr/share/kpep/a14.plist
// M2 (Pro/Max): /usr/share/kpep/a15.plist
// M3: /usr/share/kpep/as1.plist
@asimshankar
asimshankar / README.md
Last active April 13, 2024 15:50
Training TensorFlow models in C

Training TensorFlow models in C

Python is the primary language in which TensorFlow models are typically developed and trained. TensorFlow does have bindings for other programming languages. These bindings have the low-level primitives that are required to build a more complete API, however, lack much of the higher-level API richness of the Python bindings, particularly for defining the model structure.

This gist demonstrates taking a model (a TensorFlow graph) created by a Python program and running the training loop in a C program.

The model

@magnetikonline
magnetikonline / README.md
Last active February 4, 2024 07:45
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
@gentaiscool
gentaiscool / tensorflow.md
Last active November 7, 2019 08:22
Building Tensorflow on CentOS 7.X from Source

I figured out how to build tensorflow from source in centOS. This process does not require any root access and you can do it anywhere. This will save your time and no need to worry much after this.

#What to prepare:

  1. Java 8
  2. Bazel
  3. Tensorflow
  4. CuDNN and CUDA toolkit (assume you have install them)

#Installation ##Bazel

@lightonphiri
lightonphiri / bash-install_google_fonts_on_ubuntu.md
Last active May 8, 2024 17:14
Install Google Fonts on Ubuntu

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@526avijitgupta
526avijitgupta / spacemacs-cheatsheet.md
Last active August 29, 2023 12:31
Spacemacs cheatsheet

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@gubatron
gubatron / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Last active March 12, 2024 07:34
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@jatesy
jatesy / Vector_add
Created April 1, 2014 18:19
Graphic Processing Units(GPU) programming: Vectors addition implemented parallel in Cuda
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <cuda.h>
// block size
#define BLOCK_SIZE 512
#define VECTOR_SIZE 100 // We can change the value of W to 200, 400, 800, 1600, 3200