This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # | |
| # Strip Packages | |
| # | |
| # This is script that goes through all conda packages in the current | |
| # directory and removes everything except the essential "info" metadata | |
| # folder. It also updates the metadata so that this package can be installed | |
| # by conda without failing package validation. | |
| echo "Processing .conda files" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| 🦃 Thanksgiving Dinner Demo 🦃 | |
| Because why cook a real Thanksgiving dinner when you can just... | |
| run it with conda or pixi? | |
| How to use? | |
| With conda: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| I wrote this script because I'm trying to figure out what day | |
| would be the best day to take off if I only want to work four days | |
| a week. | |
| The best day here means I will get the most time off in the year if | |
| I choose this day. | |
| The holidays are German holidays and the extra days are company | |
| holidays. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import sqlite3 | |
| import time | |
| import uuid | |
| from functools import wraps | |
| DB_FILE = 'tester.db' | |
| FILE = 'tester.cache' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Usage: | |
| python simple_http_example.py [sync|async] | |
| Description: | |
| Simple python script to show the differences in implementation/speed of | |
| synchronous and asynchronous approach for downloading content. | |
| The output will show what was downloaded. The script repeats five | |
| times and prints the average run speed before exiting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SPI.h> | |
| #include <Adafruit_GPS.h> | |
| //#include <SoftwareSerial.h> | |
| #include <SD.h> | |
| #include <DHT.h> | |
| #include <avr/sleep.h> | |
| // Ladyada's logger modified by Bill Greiman to use the SdFat library | |
| // | |
| // This code shows how to listen to the GPS module in an interrupt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def convert_degree_dec_min_to_degree_dec(degree_dec_min: str): | |
| """ | |
| Converts a string that looks like this: | |
| - "12238.2974W" | |
| To this: | |
| - -122.63829 | |
| In other words, it converts the "Degrees and Decimal Minutes" format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| ############################################################################# | |
| # Author: Travis Hathaway # | |
| # # | |
| # Description: # | |
| # This is a simple script used to transform a .mov file to a .gif file # | |
| # # | |
| # Example: # | |
| # mov_to_gif <mov_file> <start_time:seconds> <duration:seconds> # | |
| # mov_to_gif your_movie.mov 5 2.5 # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sqlite3 | |
| from functools import wraps | |
| def sqlite_conn(func): | |
| @wraps(func) | |
| def wrap(self, *args, **kwargs): | |
| conn = getattr(self, 'conn', None) | |
| if not conn: | |
| raise NotImplementedError( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from functools import wraps | |
| import sqlite3 | |
| CONN_STR = '/tmp/foo.db' | |
| def sqlite_conn(conn_str): | |
| def dec_func(func): | |
| @wraps(func) |
NewerOlder