Name | Version | License | URL |
---|---|---|---|
align-text | 0.1.4 | MIT | git://github.com/jonschlinkert/align-text.git |
amdefine | 1.0.0 | BSD-3-Clause AND MIT | https://github.com/jrburke/amdefine.git |
async | 1.5.2 | MIT | https://github.com/caolan/async.git |
async | 0.2.10 | MIT | https://github.com/caolan/async.git |
balanced-match | 0.4.2 | MIT | git://github.com/juliangruber/balanced-match.git |
brace-expansion | 1.1.6 | MIT | git://github.com/juliangruber/brace-expansion.git |
camelcase | 1.2.1 | MIT |
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
# Deterministic Pseudo-Random Number Generator Seeding | |
# ------------------------------------------------------------------------------ | |
# A helper script for setting a consistent deterministic PRNG seed for third- | |
# party libraries, supporting more reproducible experiment execution. | |
# | |
# Setting a deterministic seed: | |
# | |
# - By an environment variable: `PYTHON_SEED=12345 python script.py` | |
# - By calling `randomness.reseed(12345)` | |
# |
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
# Stocks Data Assembly and Preprocessing | |
# ------------------------------------------------------------------------------ | |
import os | |
import csv | |
import time | |
from pathlib import Path | |
from functools import reduce | |
import pandas as pd | |
from alpha_vantage.timeseries import TimeSeries | |
from argparse_prompt import PromptParser |
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
def f(x,s): | |
start = 44 | |
a = 0 | |
print(a) | |
if x==1: | |
start = int(s[24:29]) | |
s = list(s[:24]) + list('{:>5d}'.format(start+11)) + list(s[29:start]) + list(' a += 1\n') + list(s[start:]) | |
s = ''.join(s) | |
return s |
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 numpy as np | |
from scipy.stats import unitary_group | |
def eigenterpolate(U0, U1, s): | |
"""Interpolates between two matrices.""" | |
return U0 * eigenpow(U0.H * U1, s) | |
def eigenpow(M, t): | |
"""Raises a matrix to a power.""" | |
return eigenlift(lambda b: b**t, M) |
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
using UnityEngine; | |
namespace Islands { | |
[ExecuteInEditMode] | |
[RequireComponent(typeof(SpriteRenderer))] | |
public class DynamicDepthSort: MonoBehaviour { | |
/// <summary> | |
/// A reference to the game object’s sprite renderer component. | |
/// </summary> |
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
class CaptainUp | |
# Include HTTParty as a mix-in | |
include HTTParty | |
# Set up the base API endpoint | |
base_uri 'captainup.com' | |
# Initialize the Captain Up SDK | |
def initialize(options = {}) | |
@options = options |
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
captain.up(function() { | |
// Listen to the `signup:open` event, that's triggered whenever the sign up | |
// modal is opened. | |
captain.on('signup:open', function() { | |
// Replace the sign up modal title with "Hello, World!" | |
$('#cpt-sign-up-modal h1').text('Hello, World!'); | |
}); | |
}); |
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
// Asynchronous wrapper around Captain Up, similar to jQuery's DOM ready. Place this | |
// snippet on every page where you want the HUD to start in minimized state. Place it | |
// below the Captain Up script embed snippet in your HTML. The code will run immediately | |
// after Captain Up finished loading. | |
captain.up(function() { | |
// Minimizes the HUD, instantly. | |
captain.hud.minimize({instantly: true}); | |
}); |
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
// Only run the code when Captain Up has loaded on the page | |
captain.up(function() { | |
// Track a new 'daily_visit' custom action | |
captain.action('daily_visit', { | |
// Pass extra data about the action | |
entity: { | |
// The current page name | |
name: captain.get_page_title() | |
// The referrer URL | |
referrer: captain.player_info.referrer |
NewerOlder