Skip to content

Instantly share code, notes, and snippets.

nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs:
@luizomf
luizomf / settings.json
Created October 24, 2022 13:01
Configuração inicial do VS Code
{
"window.zoomLevel": 2,
"workbench.startupEditor": "none",
"explorer.compactFolders": false,
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 18,
"workbench.colorTheme": "OM Theme (Default Dracula Italic)",
"code-runner.executorMap": {
"python": "clear ; python -u",
},
@mingfeima
mingfeima / pytorch_performance_profiling.md
Last active April 16, 2024 15:19
How to do performance profiling on PyTorch

(Internal Tranining Material)

Usually the first step in performance optimization is to do profiling, e.g. to identify performance hotspots of a workload. This gist tells basic knowledge of performance profiling on PyTorch, you will get:

  • How to find the bottleneck operator?
  • How to trace source file of a particular operator?
  • How do I indentify threading issues? (oversubscription)
  • How do I tell a specific operator is running efficiently or not?

This tutorial takes one of my recent projects - pssp-transformer as an example to guide you through path of PyTorch CPU peformance optimization. Focus will be on Part 1 & Part 2.

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@kyo-takano
kyo-takano / openai_batch_generation.py
Created April 16, 2024 09:31
Submitting an Asyncronous Large-Batch Request with OpenAI Python SDK
#!/usr/bin/python
import json
import textwrap
import time
from openai import OpenAI
client = OpenAI()
@jamesspi
jamesspi / xzvuln.sql
Last active April 16, 2024 15:16
OSQuery To Check for XZ and liblzma - *nix
SELECT 'DEB Package' AS source, name, version,
CASE
WHEN version LIKE '5.6.0%' OR version LIKE '5.6.1%' THEN 'Potentially Vulnerable'
ELSE 'Most likely not vulnerable'
END AS status
FROM deb_packages
WHERE name = 'xz-utils' OR name = 'liblzma' OR name LIKE 'liblzma%'
UNION
SELECT 'RPM Package' AS source, name, version,
CASE
@zackfern
zackfern / lastfm_now_playing.js
Last active April 16, 2024 15:16
Displays your latest last.fm tracks on your webpage.
// Hacky last.fm Now Playing
// by Zack Fernandes (zackfern.me) April 2013
//
// Instructions:
// - Install jQuery, if you don't have it already.
// - Create a last.fm API key and set the api_key variable.
// - Set the username variable to your last.fm username.
// - Add something with the ID of now_playing in your site.
// - Include this script and enjoy.
//

Creación del Proyecto Fake-store

Endpoint: https://fakestoreapi.com/products

Creación del proyecto y agregando Material Design (MacOS)

Cargar el Terminal de MacOS y ejecute las siguientes instrucciones:

cd /Users/alumnos/IdeaProjects
@thanasishadow
thanasishadow / pack making mods
Last active April 16, 2024 15:15
A list of mods which are useful for modpack makers
Mine/Craft Tweaker - Create/Change crafting table or furnace recipes.
Content Tweaker - Create new blocks, items, liquids and much more.
Mod Tweaker - Adds mod compatibility to Craft Tweaker.
Game Stages (And addons) - Prevent players from accessing dimensions/items/mobs/materials/waila information before they reach a certain point.
Gendustry - Create custom bees, combs, bee mutations and squeezer/carpenter recipes.
Block Drop Tweaker - Change what certain blocks drop.
Custom Stuff - Create custom items, blocks, recipes, world gen and oredicts.
Custom Things - Create custom items/blocks.
Modular Machinery - Create custom machines.
Artisan Worktables - Adds many variations of the crafting table and many more crafting tools.