Skip to content

Instantly share code, notes, and snippets.

@michaljirman
michaljirman / gist:9b26da2b6dffcd155b89881175ea5943
Created January 1, 2023 16:14 — forked from koakh/gist:fbbc37cde630bedcf57acfd4d6a6956b
SurrealDB : How to use signin and signup (server + client nodesjs)
**As a developer you have complete control over the signup and signin functionality...**
```shell
$ surreal sql --conn http://localhost:8000 --user root --pass root --ns test --db test
```
```sql
-- optional : this is the default see --ns test --db test start server flags
-- USE NS test DB test;
@michaljirman
michaljirman / 00-packages.config
Created October 17, 2017 17:58 — forked from keeth/00-packages.config
Django, Postgres 9.6 and Celery on Elastic Beanstalk - ebextensions
packages:
yum:
libjpeg-turbo-devel: []
libpng-devel: []
libcurl-devel: []
commands:
01_install_rhel_pg:
command: "(yum repolist |grep -q pgdg96) || sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-96-9.6-2.noarch.rpm -y"
02_install_pg_devel:
@michaljirman
michaljirman / 00_bc_day_1_section_02
Created October 3, 2017 14:57 — forked from yhilpisch/00_bc_day_1_section_02
Gist with additional files from For Python Quants Bootcamp, May 2017, New York City
3 + 4
3 * 4
3 / 4
type(3)
type(4)
3 ** 4
sqrt(3)
3 ** 0.5
import math
math.sqrt(3)
@michaljirman
michaljirman / sierra-hackintosh-z170-a.md
Created August 16, 2017 10:29 — forked from unsalted/sierra-hackintosh-z170-a.md
Sierra 10.12.3 Hackintosh | Asus z170-A, Intel i5 6500, MSI GTX 960 OC, GTX1070(Dormant)

Sierra 10.12.3 Hackintosh

This is my build documentation for an ASUS Z170-A setup with an NVIDIA GTX960 and the Intel i5 6500, most of this came from Storks asus rog maximus build, his audio instructions didn't work for me so it differs substantially there. This build also doesn't have NVRAM. Nearest I can tell everything is running as expected, including all USB and audio ports.

Build

  • Asus Z170-A
  • Intel Core i5-6500
  • Crucial Ballistix Sport LT 32GB (2 x 16GB) DDR4-2400 Memory
  • MSI GeForce GTX 960 4GB Installed in slot 1!
@michaljirman
michaljirman / ChatKitLoader.m
Created January 15, 2017 17:46 — forked from NSExceptional/ChatKitLoader.m
A quick and dirty example of loading classes at runtime
#import <dlfcn.h> // for dlopen()
#import "MirrorKit.h" // pod 'MirrirKit'
- (NSArray<NSString *> *)chatKitClassNames {
// Load the framework, close the handle. Now you can use any ChatKit class if you know its name.
void *handle = dlopen("/System/Library/PrivateFrameworks/ChatKit.framework/ChatKit", RTLD_NOW);
dlclose(handle);
// Making use of the Objc runtime to get the classes
@michaljirman
michaljirman / rollingFuturesContract
Created November 30, 2016 11:03 — forked from drSeeS/rollingFuturesContract
Class for constructing rolling futures contracts (at this time only using panama backadj. method on fixed calender days before maturity)
import datetime
import pandas as pd
from pandas.tseries.offsets import Day, BDay, DateOffset
import numpy as np
import os
import pickle
class rollingFuturesContract: