Skip to content

Instantly share code, notes, and snippets.

💭
Hope for the best, plan for the worst.

Mr. Phantom agentphantom

💭
Hope for the best, plan for the worst.
Block or report user

Report or block agentphantom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View catalog.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
brand,gun_type,quantity,caliber,description,price,currency,price_in_mxn
ARMSAN,shotgun,7,12 Gauge,"ESCOPETA SOBREPUESTA CALIBRE 12 MARCA ARMSAN MODELO EOS CAÑON DE 76 cm., ACABADO MADERA, CON EXPULSOR, CULATA AJUSTABLE.",1227.74,USD,23327.06
ARMSAN,shotgun,5,12 Gauge,"ESCOPETA DE BOMBA CALIBRE 12 MARCA ARMSAN MODELO EZ DE UN CAÑON DE 71 cm., ACABADO SINTETICO, CINTA VENTILADA.",548.91,USD,10429.29
ARMSAN,shotgun,8,12 Gauge,"ESCOPETA SEMIAUTOMATICA CALIBRE 12 MARCA ARMSAN MODELO EZ DE UN CAÑON DE 71 cm., ACABADO SINTETICO, CINTA VENTILADA.",548.91,USD,10429.29
ARMSAN,shotgun,7,12 Gauge,"ESCOPETA SEMIAUTOMATICA CALIBRE 12 MARCA ARMSAN MODELO A612 A SIX TWELVE CAÑON DE 71 cm., ACABADO MADERA, CINTA VENTILADA.",656.1,USD,12465.9
ARMSAN,shotgun,11,12 Gauge,"ESCOPETA SEMIAUTOMATICA CALIBRE 12 MARCA ARMSAN MODELO A612 (C) CAÑON DE 71 cm., ACABADO CAMO, CINTA VENTILADA.",721.06,USD,13700.14
ARMSAN,shotgun,6,12 Gauge,"ESCOPETA SOBREPUESTA CALIBRE 12 MARCA ARMSAN MODELO EOS SILVER CAÑON DE 71 cm., ACABADO MADERA, CON E
View firebase.py
"""
A script that loads a GitHub repositories info and updates a Firebase database with it.
You will require the following database rules:
{
"rules": {
"repositories": {
".write": "auth != null",
".read": true
View stock.py
import csv
import datetime
formatted_date = "{0:%m/%d/%Y}".format(datetime.datetime.today())
reader = csv.reader(open("data.txt"), delimiter="|")
data_list = list()
names_list = list()
View folder_analyzer.py
#!/usr/bin/python3
import os
import glob
import sys
try:
my_path = sys.argv[1]
except:
print("Please enter a valid path.")
View TwilioSMS.as
/*
Download this file and put it into your project.
https://github.com/timkurvers/as3-crypto/blob/master/src/com/hurlant/util/Base64.as
*/
import com.hurlant.util.Base64;
private var mySecureSocket:SecureSocket; //Use the AIR built-in SecureSocket class.
private function initSocket():void
{
@agentphantom
agentphantom / FizzBuzz.as
Last active Jan 15, 2017
FizzBuzz in AS3
View FizzBuzz.as
package
{
import flash.display.Sprite;
public class FizzBuzz extends Sprite
{
public function FizzBuzz()
{
@agentphantom
agentphantom / FirebaseConverter.as
Last active Feb 22, 2017
Add the node key as a value to an Object from a Firebase database response.
View FirebaseConverter.as
private function dataLoaded(event:flash.events.Event):void
{
//The JSON generated by Firebase contains the id as the key, we use this function to add it to our Objects
var rawData:Object = JSON.parse(event.currentTarget.data);
var myArray:Array = new Array();
for (var parent:String in rawData)
{
var tempObject:Object = new Object();
@agentphantom
agentphantom / FeathersUIEmoji.as
Last active May 2, 2018
Showing emojis in FeathersUI
View FeathersUIEmoji.as
var label:Label = new Label();
label.x = 50;
label.y = 100;
label.text = "Sup 🍔";
label.textRendererFactory = function():ITextRenderer
{
var renderer:TextFieldTextRenderer = new TextFieldTextRenderer();
renderer.textFormat = new TextFormat("_sans", 40, 0xFFFFFF);
return renderer;
};
You can’t perform that action at this time.