Skip to content

Instantly share code, notes, and snippets.

View ksdme's full-sized avatar
⚔️

Kilari Teja ksdme

⚔️
View GitHub Profile
(function() {
const style = document.createElement('style');
style.innerHTML = `
.theater .js-jukebox-list {
display: none !important;
}
.theater .current__info {
display: none !important;
@ksdme
ksdme / Events.py
Created June 25, 2020 10:32
Simple GraphQL Server
from ariadne import QueryType
from ariadne import MutationType
from ariadne import gql
from ariadne import make_executable_schema
from ariadne.asgi import GraphQL
from mongoengine import connect
from bson.objectid import ObjectId
type_defs = gql("""
@ksdme
ksdme / stdlib-docs-rep.yaml
Last active May 22, 2020 14:08
Representation of ferret stdlib documentation
utils:
- token: WAIT
file_name: utils/wait.go
line_number: 12
doc:
desc: Wait pauses the execution for a given period.
params:
- name: timeout
type:
- Float
import graphene
venues = {
'0': 'Big Hotel',
'1': 'Small Hotel',
}
class Venue(graphene.ObjectType):
address = graphene.String()
from scipy import stats
import math
def black_scholes (s, k, t, v, rf, div, cp):
""" Price an option using the Black-Scholes model.
s: initial stock price
k: strike price
t: expiration time
v: volatility
rf: risk-free rate
@ksdme
ksdme / sahil-prime.py
Created January 7, 2020 13:21
Find the biggest prime factor of a number.
# I have a number n
# Test divisinility by numbers in the range 2, Sqrt(n)
# If n is divisible by a prime p, for the first time, keep on dividing it with p till you find the largets power of p that divides n.
# Replace n by n/(p**alpha)
# Repeat the process until I get n = 1 or
# Print p
from math import ceil
subject = 600851475143
answer = 0
diff --git a/lib/main.dart b/lib/main.dart
index 2362ab4..3a8bad4 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -4,6 +4,7 @@ import 'package:states_rebuilder/states_rebuilder.dart';
void main() => runApp(MyApp());
class CounterBloc {
+ int factor = 1;
int counter = 0;
diff --git a/lib/main.dart b/lib/main.dart
index c2b13d3..2362ab4 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,58 +1,55 @@
import 'package:flutter/material.dart';
+import 'package:states_rebuilder/states_rebuilder.dart';
void main() => runApp(MyApp());
@ksdme
ksdme / setup.py
Created July 23, 2019 11:45
py3exiv2 patched setup.py file for installation on Windows using vcpkg.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import os
import glob
import subprocess
from setuptools import setup, find_packages, Extension
[
"object name",
"edit status",
"editorial update",
"urgency",
"subject reference",
"category",
"supplemental category",
"fixture identifier",
"keywords",