Skip to content

Instantly share code, notes, and snippets.

Rami Chowdhury necaris

Block or report user

Report or block necaris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View medium-upside-graphenepydantic4.py
from graphene_pydantic import PydanticObjectType
class GraphQLFlight(PydanticObjectType):
class Meta:
model = Flight
View medium-upside-graphenepydantic3.graphql
type Flight {
origin: String
destination: String
departure: DateTime
}
View medium-upside-graphenepydantic2.py
In [0]: Flight(origin="DCA", destination="ORD", departure="hurrah")
ValidationError: 1 validation error
departure
invalid datetime format (type=type_error.datetime)
View medium-upside-graphenepydantic1.py
from datetime import datetime
from pydantic import BaseModel
class Flight(BaseModel):
origin: str
destination: str
departure: datetime
View fetch-gh-issues-as-csv.py
# https://gist.github.com/unbracketed/3380407
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import sys
import csv
import requests
View keybase.md

Keybase proof

I hereby claim:

  • I am necaris on github.
  • I am necaris (https://keybase.io/necaris) on keybase.
  • I have a public key whose fingerprint is 3BF7 81AD 3BD9 B5EF 67C8 E0DE EA69 CB29 A08D 8FD1

To claim this, I am signing this object:

View gist:10613453
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 671, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 901, in move_wheel_files
View couchdb2cb_direct.py
#!/usr/bin/env python
#-*-coding: utf-8-*-
"""
Simple script to dump documents out of a CouchDB database and straight into
a Couchbase instance.
"""
# Copyright (c) 2013, Rami Chowdhury
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
View couchdb2cb_replicator.py
#!/usr/bin/env python
#-*-coding: utf-8-*-
"""
Fake CouchDB replication endpoint that copies documents into Couchbase.
"""
# Copyright (c) 2013, Rami Chowdhury
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
@necaris
necaris / couchdb2cb.py
Last active Dec 2, 2017
Simple script to transfer data from CouchDB to Couchbase
View couchdb2cb.py
#-*-coding: utf-8-*-
"""
Simple script to dump documents out of a CouchDB database and straight into
a Couchbase instance.
"""
import time
import sys
import argparse
You can’t perform that action at this time.