Skip to content

Instantly share code, notes, and snippets.

View indigoviolet's full-sized avatar
🐈

Venky Iyer indigoviolet

🐈
View GitHub Profile
cimport stdlib
cdef extern from "link-includes.h":
pass
cdef extern from "api-structures.h":
ctypedef struct Parse_Options_s:
pass
ctypedef struct Dictionary_s:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import os
cfiles = filter(None, [c.strip() for c in """
src/analyze-linkage.c
src/and.c
src/api.c
src/build-disjuncts.c
@indigoviolet
indigoviolet / postgres_queries_and_commands.sql
Created November 15, 2016 00:26 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@indigoviolet
indigoviolet / date bookmarklet.js
Last active March 1, 2017 02:13 — forked from shanechin1/date bookmarklet.js
PRs updated in last 7 days bookmarklet
javascript: (function(){
var d = new Date();
d.setDate(d.getDate() - 7);
window.location.href="https://github.com/pulls?utf8=✓&q=is%3Aopen+is%3Apr+involves%3Aindigoviolet+sort%3Aupdated-desc+user%3Afinventures+updated%3A>"+d.toISOString().substring(0, 10)
}());
/* I previously used the other comment style, which broke the bookmarklet */
diff --git a/app/services/team_service.rb b/app/services/team_service.rb
index 87a28ad7ed..3cfd9a99bc 100644
--- a/app/services/team_service.rb
+++ b/app/services/team_service.rb
@@ -1,13 +1,8 @@
# frozen_string_literal: true
-class TeamService
+module TeamService
include C
with weekends AS (
-- generate all weekends between 2017-01-01 and next weekend
select
DATEADD(day, 7*n, '2017-01-01') AS ref_date,
CAST(NEXT_DAY(DATEADD(day, 7*n, '2017-01-01'), 'Saturday') AS timestamp) AS saturday,
CAST(NEXT_DAY(DATEADD(day, 7*n, '2017-01-01'), 'Sunday') AS timestamp) + interval '86399 second' AS sunday
from numbers
where DATEADD(day, 7*n, '2017-01-01') <= getdate() + interval '7 day'
config.ru
Rakefile
Vagrantfile
Gemfile
.pryrc
app/mailers/messager_mailer.rb
app/mailers/fin_mailer.rb
app/mailers/smoke_test_mailer.rb
app/mailers/user_mailer.rb
app/mailers/remote_task_mailer.rb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
otImplementedError Traceback (most recent call last)
<ipython-input-19-d720bdf83541> in <module>()
18 trainer.resume_or_load(resume=False)
19 wandb.watch(trainer.model)
---> 20 trainer.train()
12 frames
/usr/local/lib/python3.6/dist-packages/detectron2/engine/defaults.py in train(self)
399 OrderedDict of results, if evaluation is enabled. Otherwise None.
400 """
@indigoviolet
indigoviolet / detectron2-tutorial.ipynb
Last active February 20, 2024 20:11
Detectron2 Tutorial.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.