Skip to content

Instantly share code, notes, and snippets.

View AlexNolasco's full-sized avatar
🎯
Focusing

Alex Nolasco AlexNolasco

🎯
Focusing
View GitHub Profile
You need to generate an input prompt for a text-to-image neural network. The system accepts as correct the query string, where all arguments are separated by commas.
The words in prompt are crucial. Users need to prompt what they want to see, specifying artist names, media sources, or art styles to get desired results. Be descriptive in a manne similar to prompts provided below about what you want. It is more sensitive to precise wording. That includes adjectives and prepositions like “in front of [x]“, and “taken by [camera name]“.
It also supports weights. By bracketing the words you can change their importance. For example, (rainy) would be twice as important compared to "rainy" for the model, and [rainy] would be half as important.
Write a medium lenth prompt, like below. Too long and it would fail to generate, too short and it would generate crap. Be as detailed as possible and avoid both scenarios at any cost.
As photographers and painters know, light has a huge effect on the final impression an image
@AlexNolasco
AlexNolasco / gist:0051b6c1ce3e1eb499c9977c076f764f
Created June 29, 2020 22:11
MongoDB Get Collection Record Numbers
db.getCollectionNames().forEach(function(collection) {
records = db[collection].count()
if (records > 0) {
print( collection + ": " + records);
}
});
input length = 20;
def curClose = close;
def prevClose = close[1];
def inc = if curClose > prevClose then curClose - prevClose else 0;
def dec = if prevClose > curClose then prevClose - curClose else 0;
def sumInc = sum(inc, length);
def sumDec = sum(dec, length);
plot CMO = if sumInc + sumDec == 0 then 0 else (sumInc - sumDec) / (sumInc + sumDec) * 100;
Source https://tradinganalysis.com/four-percentile-resource/
IV Rank is the description of where the current IV lies in comparison to its yearly high and low IV.IV Rank is the description of where the current IV lies in comparison to its yearly high and low IV.
# IV% thinkscript code
# Display Implied Volatility Percentile as a label on a chart
declare upper ;
input length = 252 ; # bars to use in implied volatility calculation
-----
-- By Robert Heatwole
1) Go to 'Charts' tab
2) Click on the "eye-dropper" icon (officially called "edit studies icon"...same line where you type in the ticker same symbol, first icon moving left to right)
3) Click on "New"... Lower left hand corner
4) Delete everything in the box. (plot Data = close;)
5) Paste the entire code listed below
6) Name the study RankLevels
7) Click 'OK'
8) Click 'Apply'

Keybase proof

I hereby claim:

  • I am alexnolasco on github.
  • I am alexnolasco (https://keybase.io/alexnolasco) on keybase.
  • I have a public key ASBKFJVfJbpVZj6HEMitBeiXBpuCTsyT5TJYK56cogQtKwo

To claim this, I am signing this object:

@AlexNolasco
AlexNolasco / swagger-type-variance.md
Created May 3, 2016 21:25 — forked from leedm777/swagger-type-variance.md
Type variance in Swagger models

This document describes how to extend Swagger data models to allow the types of fields to vary.

Given that Swagger models need to map cleanly to a statically typed object model, a subclassing approach seems like it would be a good fit.

Inheritance

Inheritance allows a model (the derived type) to inherit all of the