Skip to content

Instantly share code, notes, and snippets.

View xaviergoby's full-sized avatar
💭
"Normality's a paved road: Comfy to walk, but no flowers grow in it"-V. Van Gogh

Alexander Xavier O'Rourke Goby xaviergoby

💭
"Normality's a paved road: Comfy to walk, but no flowers grow in it"-V. Van Gogh
View GitHub Profile
@xaviergoby
xaviergoby / network-82c17d34-642.gexf
Created October 24, 2023 07:26
File sent from Gephi
<?xml version='1.0' encoding='UTF-8'?>
<gexf xmlns="http://gexf.net/1.3" version="1.3" xmlns:viz="http://gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd">
<meta lastmodifieddate="2023-10-24">
<creator>Gephi 0.10.1</creator>
<title></title>
<description></description>
</meta>
<graph defaultedgetype="directed" mode="static">
<attributes class="node" mode="static">
<attribute id="0" title="color" type="string"/>
@xaviergoby
xaviergoby / network-0d75ff03-e76.gexf
Created October 24, 2023 01:05
File sent from Gephi
<?xml version='1.0' encoding='UTF-8'?>
<gexf xmlns="http://gexf.net/1.3" version="1.3" xmlns:viz="http://gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd">
<meta lastmodifieddate="2023-10-24">
<creator>Gephi 0.10.1</creator>
<title>EU Regulatory Universe Graph Network Demo</title>
<description></description>
</meta>
<graph defaultedgetype="undirected" mode="static">
<attributes class="node" mode="static">
<attribute id="0" title="color" type="string"/>
@xaviergoby
xaviergoby / Working with paths in Pyhton - Examples
Created November 9, 2019 15:41
Working with paths in Pyhton - Examples
Running all lines of code in:
Windows path seperator: \
OS X & Linux path sep: /
(On Windows)Shift + Right Click (on looped_data_loading.py)| Copy as Path:"C:\Users\XGOBY\LSTMforSHM\src\looped_data_loading.py"
>>>os.getcwd()
'C:\\Users\\XGOBY\\LSTMforSHM\\src'
>>>os.path.abspath(__file__)
'C:\\Users\\XGOBY\\LSTMforSHM\\src\\looped_data_loading.py'
@xaviergoby
xaviergoby / useful_windows_file_system_snippets.py
Last active June 14, 2019 20:31
Just a collection of useful Python code snippets for working with file system on Windows (e.g. how to retrieve the path to the directory containing a Python script you want to run etc...)
# 1]
# Get the absolute path to directory which contains the Python script you want to/are run(ning)
# Note: Folder <==> Directory
# E.g.: Absolute (abs) path to the directory (dir): C:\Users\John\ProjectXFolder\ProjectXSubFolder
# E.g.: Absolute (abs) path to the Python script: C:\Users\John\ProjectXFolder\ProjectXSubFolder\get_data.py
# get_data.py
import os
script_path = os.path.dirname(os.path.abspath(__file__))
print("script_path: ", script_path)
@xaviergoby
xaviergoby / useful_windows_file_system_snippets.py
Created June 14, 2019 09:53
Just a collection of useful Python code snippets for working with file system on Windows (e.g. how to retrieve the path to the directory containing a Python script you want to run etc...)
# 1]
# Get the absolute path to directory which contains the Python script you want to/are run(ning)
# Note: Folder <==> Directory
# E.g.: Absolute (abs) path to the directory (dir): C:\Users\John\ProjectXFolder\ProjectXSubFolder
# E.g.: Absolute (abs) path to the Python script: C:\Users\John\ProjectXFolder\ProjectXSubFolder\get_data.py
# get_data.py
import os
script_path = os.path.dirname(os.path.abspath(__file__))
print("script_path: ", script_path)
@xaviergoby
xaviergoby / useful_windows_file_system_snippets.py
Created June 14, 2019 09:53
Just a collection of useful Python code snippets for working with file system on Windows (e.g. how to retrieve the path to the directory containing a Python script you want to run etc...)
# 1]
# Get the absolute path to directory which contains the Python script you want to/are run(ning)
# Note: Folder <==> Directory
# E.g.: Absolute (abs) path to the directory (dir): C:\Users\John\ProjectXFolder\ProjectXSubFolder
# E.g.: Absolute (abs) path to the Python script: C:\Users\John\ProjectXFolder\ProjectXSubFolder\get_data.py
# get_data.py
import os
script_path = os.path.dirname(os.path.abspath(__file__))
print("script_path: ", script_path)
# Misc
## Emphasis
**This is bold text**
__This is bold text__
*This is italic text*
@xaviergoby
xaviergoby / yahoo_finance.py
Created February 16, 2019 02:09 — forked from scrapehero/yahoo_finance.py
Python 3 code to extract stock market data from yahoo finance
from lxml import html
import requests
from time import sleep
import json
import argparse
from collections import OrderedDict
from time import sleep
def parse(ticker):
url = "http://finance.yahoo.com/quote/%s?p=%s"%(ticker,ticker)
@xaviergoby
xaviergoby / settings.py
Created December 27, 2018 03:37 — forked from nadya-p/settings.py
Simple Python settings class using JSON file as storage
import json
import os
class Settings:
_config_location = 'config.json'
def __init__(self):
if os.path.exists(self._config_location):
self.__dict__ = json.load(open(self._config_location))
@xaviergoby
xaviergoby / bash-cheatsheet.sh
Created November 19, 2018 16:56 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04