Skip to content

Instantly share code, notes, and snippets.

View adrian-castravete's full-sized avatar

Adrian Castravete adrian-castravete

  • Cognizant Softvision
  • Romania
View GitHub Profile
@adrian-castravete
adrian-castravete / figshare-desktop-uploader-windows-logs.asciidoc
Last active May 11, 2018 07:31
figshare desktop uploader windows logs
  1. Open a “Command Prompt”

    1. Click on “Start” (Windows Logo) in the taskbar.

    2. Click on “Run” a&b alternative. Hold “Windows Logo” key and press R.

    3. Type cmd and press Enter

  2. In the “Command Prompt” go to the figshare uploader directory.

    ----
    cd "%APPDATA%\figshare uploader"
@adrian-castravete
adrian-castravete / init_mem
Last active April 1, 2018 11:48
Memory initialisation routine
SECTION "High Ram", HRAM
RSSET $FF80
state RB 1
speed RB 1
score RW 1
height RW 1
SECTION "Code", ROM0
ResetInitial:
xor a
In [15]: def dec1(func):
...: @wraps(func)
...: def wrapper(*args, **kwargs):
...: largs = list(args)
...: largs.append('dec1')
...: args = tuple(largs)
...: return func(*args, **kwargs)
...: return wrapper
In [16]: def dec2(func):
@adrian-castravete
adrian-castravete / Project.xml
Created September 17, 2013 13:40
Project is an unzipped gephi file. ProjectBroken is the same file saved after copying a weird bug.
<?xml version="1.0" encoding="UTF-8"?><gephiFile version="0.8"><!--File saved from Gephi 0.8.1--><core tasks="0"><lastModifiedDate>2013-09-17 16:18:08<!--yyyy-MM-dd HH:mm:ss--></lastModifiedDate></core><project name="Project 0"><metadata><title></title><keywords></keywords><description></description><author>adrian</author></metadata><workspaces><workspace name="Workspace 0" status="open"><!--Persistence from org.gephi.data.attributes.serialization.AttributeModelPersistenceProvider--><attributemodel><table name="Nodes" version="2" nodetable="true" edgetable="false" graphtable="false"><column><index>0</index><id>id</id><title>Id</title><type>STRING</type><origin>PROPERTY</origin><default></default></column><column><index>1</index><id>label</id><title>Label</title><type>STRING</type><origin>PROPERTY</origin><default></default></column></table><table name="Graph" version="2" nodetable="false" edgetable="false" graphtable="true"><column><index>0</index><id>name</id><title>Name</title><type>STRING</type><origin>PRO
@adrian-castravete
adrian-castravete / scraps.py
Last active February 13, 2019 10:17
Objectify a dictionary, or act as a decorator and objectify the return value of the decorated function. Objectify means getting a dictionary, and assigning attributes to the dictionary given its keys or newer assignments.
#!/usr/bin/env python
"""Scrap module.
Just tiny bits & bolts.
.. author: Adrian Castravete
"""