Skip to content

Instantly share code, notes, and snippets.

@Quasimondo
Quasimondo / hic_et_nunc_get_all_token_data.py
Created April 2, 2021 12:03
Some basic code to retrieve hic et nunc token data from better-call.dev
import os
import pickle
import requests
#download cached token data here:
#https://drive.google.com/file/d/1g_4w_Re5Y0NmcS2Y55WQzESWDeL2dey6/view?usp=sharing
#and put it into the same folder as this file
cachedTokenData = {"maxTokenID":-1,"knownTokenIds":{},"data":[]}
if os.path.exists("cached_token_data.pickle"):
@apivovarov
apivovarov / convert-to-coreml.md
Last active July 29, 2023 21:51
Use AWS Sagemaker to convert DL models to CoreML

Convert Tensorflow/PyTorch models to CoreML with AWS Sagemaker

Intro

CoreML Conversion Demo wiki explains how to:

  • Prepare Image Classification models using Tensorflow and PyTorch
  • Convert the models to CoreML format
  • Run CoreML models on iPad simulator

Software installation

Currently, Neo CoreML conversion service supports models saved in the following frameworks / versions:

# Modified StyleGAN2 Projector with CLIP, addl. losses, kmeans, etc.
# by Peter Baylies, 2021 -- @pbaylies on Twitter
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
@l4rz
l4rz / gist:7040835c3f8266d8b8ea3615a0b49494
Created February 25, 2021 18:35
ALEPH by @advadnoun but for local execution
#
# ALEPH by Advadnoun, https://colab.research.google.com/drive/1Q-TbYvASMPRMXCOQjkxxf72CXYjR_8Vp
# "This is a notebook that uses DALL-E's decoder and CLIP to generate images from text. I will very likely make this better & easier to use in the future."
#
# rearranged to run locally on faster GPU
#
# directions:
# clone https://github.com/openai/DALL-E/ and https://github.com/openai/CLIP
# copy relevant files into one dir with this script
# install torch==1.7.1 and other stuff
@DreamingInBinary
DreamingInBinary / Best in Class iOS Checklist
Last active January 24, 2025 03:26
This is a public checklist updated every year after the latest version of iOS and iPadOS are shipped. It's a boiled down version of a "Best in Class" app checklist created by Jordan Morgan.
# A Best in Class Checklist
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10.
> To use this, create a Github Issue in your own repo, and simply copy and paste this text.
## iOS Core Technology
_Things any iOS app can benefit from_
- [ ] iCloud Sync
- [ ] Focus Filter Support
# git clone https://github.com/NVlabs/stylegan2
import os
import numpy as np
from scipy.interpolate import interp1d
from scipy.io import wavfile
import matplotlib.pyplot as plt
import PIL.Image
import moviepy.editor
import dnnlib
#!/bin/bash
# git clone https://github.com/shawwn/stylegan2 -b tpu
source "$HOME/bin/activate-tf1"
set -x
#export TPU_NAME=grpc://0.tcp.ngrok.io:15992
export TPU_NAME=grpc://0.tcp.ngrok.io:17042
export GCE_BUCKET=gs://sgappa-multi/stylegan-encoder
@shubhamwagh
shubhamwagh / TexturedMeshSteps.md
Last active May 14, 2025 06:23
Steps to create textured mesh from point cloud using Meshlab

Steps to create Textured Mesh from Point Cloud using Meshlab

Get your PointCloud into MeshLab

  • Import the pointcloud file in ".ply" file format in Meshlab. Before importing make sure you do some pre-processing / cleaning on point cloud so as to ease the process of meshing.

Point Cloud Simplification and Normals Computation

  • Next we need to reduce the number of point samples for smooth meshing.
    • So go to Filters -> Point Set -> Point Cloud Simplification. Enter Number of samples circa 5% of original number of points. Make sure Best Sample Heuristic is checked.
  • After point cloud simplification, make sure to select Simplified point cloud in the Show Layer Dialog on the right hand side. If not visible, it can be opened by navigating to View -> Show Layer Dialog. Now we need to compute normals for point set.
  • So go to Filters -> Point Set -> Compute normals for point sets . Enter Neighbour num between 10 - 100. Initially try with 10 and
@willprice
willprice / KINETICS_LABELS.md
Last active December 31, 2024 00:27
Kinetics Dataset Labels (name to ID)

Kinetics Numeric/String labels

These are mapping files that go between class IDs to class names. These are generated from the training CSV files from each dataset by collecting the unique classes, sorting them, and then numbering them from 0 upwards.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.