Skip to content

Instantly share code, notes, and snippets.

View andytriboletti's full-sized avatar

Andy Triboletti andytriboletti

View GitHub Profile
@andytriboletti
andytriboletti / social.py
Created January 8, 2025 19:12
Social media manager that integrates X, Instagram, LinkedIn, and uses local AI tools for content generation.
#open source code generated with Claude by Andy
#[email protected]
#The Postiz project is now AGPL.
#this code is public domain
import requests
import json
import time
from datetime import datetime
import schedule
@andytriboletti
andytriboletti / gist:4053fbdae8612523d320cf27615cd9bf
Created October 13, 2024 20:10
decimate.py for blender. used for infinigen project to reduce huge file size - adjust ratio and minimum as needed - I think I used different values - I forget
import bpy
# 1. Purge unused data (materials, textures, meshes)
bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True)
# 2. Apply Decimate Modifier to all selected objects with high-polygon meshes
def apply_decimate(threshold=10, ratio=0.0001):
# Loop through all mesh objects in the scene
for obj in bpy.data.objects:
if obj.type == 'MESH':
@andytriboletti
andytriboletti / Speedometer.kt
Created October 20, 2018 10:26
Display Speed in MPH
package com.greenrobot.speedometer
import android.Manifest
import android.annotation.SuppressLint
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.google.android.gms.location.LocationCallback
import com.google.android.gms.location.LocationRequest
import com.google.android.gms.location.LocationResult
import com.google.android.gms.location.LocationServices
Verifying that +andytriboletti is my blockchain ID. https://onename.com/andytriboletti
2011-04-03 13:16:20:000000 -> Query:
SELECT c20110403,c20110402,c20110401,c20110331,c20110330
FROM pz_impressions
WHERE id='22'
AND aid='1'
ErrNo:1054 Message:Unknown column 'c20110403' in 'field list'
2011-04-03 13:16:31:000000 -> Query:
SELECT c20110403,c20110402,c20110401,c20110331,c20110330
FROM pz_impressions
WHERE id='22'
{"result":{"status":"success","responsedata":{"campaigns":{"campaign":[{"id":8854,"title":"Fantapper","description":"Fantapper is a free web download that adds interactive apps to online images & test of celebrities. The Fantapper apps give people access to celebrity YouTube videos, Twitter & Facebook feeds, news and more.Demographics:We have found that the top age range of people downloading is 18-45. And, our highest conversion rates from promotions targeting to celebrity and avid sport fans, as you would expect given the product. ","launched":"2010-11-15","epc":0,"verticals":{"vertical":["Downloads","Mobile"]},"currency":"USD","allowedpromotions":{"allowedpromotion":["Web","Paid Search","Downloadable Software","Social Network"]},"incentivized":"false","exitpopup":"false","zipsubmit":"false","emailsubmit":"false","exclusive":"false","redirectlink":"http://qdmil.com/click/?s=8039&o=8854&c=0&subid=","allowedcountries":{"allowedcountry":["US"]},"creativedownloadurl":"http://api.neverblue
import oauth2 as oauth
import imaplib
consumer = oauth.Consumer("your_consumer_key", "your_consumer_secret")
token = oauth.Token("the_users_oauth_key_from_3_legged_auth",
"the_users_oauth_key_from_3_legged_auth")
class GmailClient(imaplib.IMAP4_SSL):