This file contains 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 pyarrow.parquet as pq | |
def describe_parquet(file_path): | |
file_size = os.path.getsize(file_path) | |
print(f"File Size: {file_size} bytes") | |
table = pq.read_table(file_path) | |
columns = table.column_names |
This file contains 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 | |
# You know that really annoying message that pops up... | |
# Mosh: You have 3 detached Mosh sessions on this server, with PIDs: | |
# - mosh [2294539] | |
# - mosh [1874313] | |
# - mosh [2294805] | |
# I often find myself copying this list of PIDs in order to kill them manually |
This file contains 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 requests | |
import json | |
from urllib.parse import quote_plus | |
# Please note: f-strings require Python 3.6+ | |
# The URL of the Common Crawl Index server | |
CC_INDEX_SERVER = 'http://index.commoncrawl.org/' | |
# The Common Crawl index you want to query |
This file contains 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 perl | |
# This script is useful when proofing with only some glyphs completed… | |
# Usage example: | |
# $ perl findwords.pl qwertyasdf | |
# Searching for words in /usr/share/dict/words containing only q, w, e, r, t, y, a, s, d, f | |
# westerwards | |
# afterstate | |
# aftertaste |
This file contains 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 | |
if [ $# -eq 0 ] | |
then | |
echo "%usage: $0 <id> [options]" | |
exit | |
fi | |
echo "[$0] 🌶 Now servin' up hot GIFs!" |
This file contains 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/python | |
import random | |
import time | |
import sys | |
class Unbuffered( object ) : | |
def __init__( self, stream ) : | |
self.stream = stream | |
def write( self, data ) : |
This file contains 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/perl | |
use strict; | |
use warnings; | |
use Time::HiRes 'usleep'; | |
$|++; # force auto-flush (see perldoc perlvar) | |
my $distance = 1 + int(rand(49)); | |
my @stones = ("_","-"); |
This file contains 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
10 e$ = chr$(27) | |
20 def fnLocate$( y, x ) = chr$(27) + "[" + str$( y ) + ";" + str$( x ) + "f" | |
30 def fnCentre$(x$) = e$ + "[H" + e$ + "[" + str$(int(height/2)) + "B" + e$ + "[" + str$(int((width/2))-int(len(x$)/2)) + "C" + x$ | |
40 def fnCls$(x$) = e$ + "[H" + e$ + "[J" + x$ | |
50 print fnCls$( fnCentre$( "foo" ) ) | |
60 print fnLocate$(10, 10) + "bar" |
This file contains 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
10 PRINT "Loading..." : PRINT : S% = 1 : E% = 60 : FOR T% = S% TO E% | |
20 SLEEP 0.1 : REM YOUR PROGRAM LOGIC HERE, ADJUST S% AND E% VALUES | |
30 MD = INT((T%/E%*100)/10) : ML = 10 - INT((T%/E%*100)/10) : P% = INT(T%/E%*100) | |
40 IF O% <> P% THEN GOTO 50 : ELSE IF P% <> 100 THEN NEXT T% | |
50 PRINT CHR$(27) "[A" "[" STRING$(MD, "#") STRING$(ML, " ") "] " STR$(P%) "%" : O% = P% : NEXT T% | |
60 PRINT CHR$(27) "[A" CHR$(27) "[18C" "Done" |