commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
73477dbb9176f7c71a1ce3bbab70313fb65578f8 | uk_results/serializers.py | uk_results/serializers.py | from __future__ import unicode_literals
from rest_framework import serializers
from .models import PostResult, ResultSet, CandidateResult
from candidates.serializers import (
MembershipSerializer, MinimalPostExtraSerializer
)
class CandidateResultSerializer(serializers.HyperlinkedModelSerializer):
class Met... | from __future__ import unicode_literals
from rest_framework import serializers
from .models import PostResult, ResultSet, CandidateResult
from candidates.serializers import (
MembershipSerializer, MinimalPostExtraSerializer
)
class CandidateResultSerializer(serializers.HyperlinkedModelSerializer):
class Met... | Add review status to serializer | Add review status to serializer
| Python | agpl-3.0 | DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative | ---
+++
@@ -31,7 +31,7 @@
'ip_address',
'num_turnout_reported', 'num_spoilt_ballots',
# 'post_result',
- 'user', 'user_id',
+ 'user', 'user_id', 'review_status',
)
# post_result = PostResultSerializer()
user = serializers.ReadOnlyField(so... |
2aa415cae1cb7ed0bb2b7fdaf51d9d5eaceaa768 | sweettooth/extensions/admin.py | sweettooth/extensions/admin.py |
from django.contrib import admin
from extensions.models import Extension, ExtensionVersion
from extensions.models import STATUS_ACTIVE, STATUS_REJECTED
from review.models import CodeReview
class CodeReviewAdmin(admin.TabularInline):
model = CodeReview
fields = 'reviewer', 'comments',
class ExtensionVersionA... |
from django.contrib import admin
from extensions.models import Extension, ExtensionVersion
from extensions.models import STATUS_ACTIVE, STATUS_REJECTED
from review.models import CodeReview
class CodeReviewAdmin(admin.TabularInline):
model = CodeReview
fields = 'reviewer', 'comments',
class ExtensionVersionA... | Make the user field into a raw field | extensions: Make the user field into a raw field
It's a bit annoying having to navigate through a 20,000 line combobox.
| Python | agpl-3.0 | GNOME/extensions-web,GNOME/extensions-web,GNOME/extensions-web,GNOME/extensions-web,magcius/sweettooth,magcius/sweettooth | ---
+++
@@ -37,6 +37,7 @@
list_display = 'name', 'uuid', 'num_versions', 'creator',
list_display_links = 'name', 'uuid',
search_fields = ('uuid', 'name')
+ raw_id_fields = ('user',)
def num_versions(self, ext):
return ext.versions.count() |
f1e50c1caeeec5b8e443f634534bfed46f26dbdf | 2017/async-socket-server/simple-client.py | 2017/async-socket-server/simple-client.py | import sys, time
import socket
def make_new_connection(name, host, port):
sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sockobj.connect((host, port))
sockobj.send(b'foo^1234$jo')
sockobj.send(b'sdfsdfsdfsdf^a')
sockobj.send(b'fkfkf0000$dfk^$sdf^a$^kk$')
buf = b''
while True... | import sys, time
import socket
import threading
class ReadThread(threading.Thread):
def __init__(self, sockobj):
super().__init__()
self.sockobj = sockobj
self.bufsize = 8 * 1024
def run(self):
while True:
buf = self.sockobj.recv(self.bufsize)
print('Re... | Modify client to read the socket concurrently | Modify client to read the socket concurrently
| Python | unlicense | eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog | ---
+++
@@ -1,21 +1,37 @@
import sys, time
import socket
+import threading
+
+
+class ReadThread(threading.Thread):
+ def __init__(self, sockobj):
+ super().__init__()
+ self.sockobj = sockobj
+ self.bufsize = 8 * 1024
+
+ def run(self):
+ while True:
+ buf = self.sockob... |
c17dc4a9876ac45b88307d2ab741655bae6c5dc7 | inboxen/tests/settings.py | inboxen/tests/settings.py | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB')
SECRET_KEY = "This is a test, you don't ... | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB')
postgres_user = os.environ.get('PG_USER',... | Allow setting of postgres user via an environment variable | Allow setting of postgres user via an environment variable
Touch #73
| Python | agpl-3.0 | Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen | ---
+++
@@ -12,6 +12,7 @@
}
db = os.environ.get('DB')
+postgres_user = os.environ.get('PG_USER', 'postgres')
SECRET_KEY = "This is a test, you don't need secrets"
@@ -27,7 +28,7 @@
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'inboxen',
- ... |
aecc14ea11cae2bb27ee2534a229e7af8453053e | readthedocs/rtd_tests/tests/test_hacks.py | readthedocs/rtd_tests/tests/test_hacks.py | from django.test import TestCase
from readthedocs.core import hacks
class TestHacks(TestCase):
fixtures = ['eric.json', 'test_data.json']
def setUp(self):
hacks.patch_meta_path()
def tearDown(self):
hacks.unpatch_meta_path()
def test_hack_failed_import(self):
import boogy
... | from django.test import TestCase
from core import hacks
class TestHacks(TestCase):
fixtures = ['eric.json', 'test_data.json']
def setUp(self):
hacks.patch_meta_path()
def tearDown(self):
hacks.unpatch_meta_path()
def test_hack_failed_import(self):
import boogy
self.as... | Fix import to not include project. | Fix import to not include project. | Python | mit | agjohnson/readthedocs.org,pombredanne/readthedocs.org,wijerasa/readthedocs.org,atsuyim/readthedocs.org,CedarLogic/readthedocs.org,safwanrahman/readthedocs.org,nyergler/pythonslides,sunnyzwh/readthedocs.org,raven47git/readthedocs.org,CedarLogic/readthedocs.org,michaelmcandrew/readthedocs.org,fujita-shintaro/readthedocs.... | ---
+++
@@ -1,5 +1,5 @@
from django.test import TestCase
-from readthedocs.core import hacks
+from core import hacks
class TestHacks(TestCase):
fixtures = ['eric.json', 'test_data.json'] |
ada4e94fb4b6de1303d4c4ad47d239bbf0699f3e | dev_settings.py | dev_settings.py | """
This is a home for shared dev settings. Feel free to add anything that all
devs should have set.
Add `from dev_settings import *` to the top of your localsettings file to use.
You can then override or append to any of these settings there.
"""
import os
LOCAL_APPS = (
'django_extensions',
)
####### Django E... | """
This is a home for shared dev settings. Feel free to add anything that all
devs should have set.
Add `from dev_settings import *` to the top of your localsettings file to use.
You can then override or append to any of these settings there.
"""
import os
LOCAL_APPS = (
'django_extensions',
)
####### Django E... | Add dummy cache setting so code can be loaded | Add dummy cache setting so code can be loaded
I mimic what will happen on ReadTheDocs locally by doing the following:
* Don't start my hq environment (no couch, pillowtop, redis, etc)
* Enter my hq virtualenv
* Move or rename `localsettings.py` so it won't be found
* `$ cd docs/`
* `$ make html`
Basically it ne... | Python | bsd-3-clause | qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq | ---
+++
@@ -42,3 +42,5 @@
}
BOWER_PATH = os.popen('which bower').read().strip()
+
+CACHES = {'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}} |
09f1a21fd3a59e31468470e0f5de7eec7c8f3507 | ynr/apps/popolo/serializers.py | ynr/apps/popolo/serializers.py | from rest_framework import serializers
from popolo import models as popolo_models
from parties.serializers import MinimalPartySerializer
class MinimalPostSerializer(serializers.ModelSerializer):
class Meta:
model = popolo_models.Post
fields = ("id", "label", "slug")
id = serializers.ReadOnly... | from rest_framework import serializers
from popolo import models as popolo_models
from parties.serializers import MinimalPartySerializer
class MinimalPostSerializer(serializers.ModelSerializer):
class Meta:
model = popolo_models.Post
fields = ("id", "label", "slug")
id = serializers.ReadOnly... | Remove membership internal ID and change person to name | Remove membership internal ID and change person to name
| Python | agpl-3.0 | DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative | ---
+++
@@ -22,9 +22,9 @@
class Meta:
model = popolo_models.Membership
- fields = ("elected", "party_list_position", "person", "party")
+ fields = ("id", "elected", "party_list_position", "name", "party")
elected = serializers.ReadOnlyField()
party_list_position = serializers... |
de7854ddf9577e9cd14a630503ce514d19a0a235 | demo/app/launch.py | demo/app/launch.py | def main():
from psi.experiment.workbench import PSIWorkbench
workbench = PSIWorkbench()
io_manifest = 'io_manifest.IOManifest'
controller_manifest = 'simple_experiment.ControllerManifest'
workbench.register_core_plugins(io_manifest, controller_manifest)
workbench.start_workspace('demo')
if _... | def main():
import logging
logging.basicConfig(level='DEBUG')
from psi.experiment.workbench import PSIWorkbench
workbench = PSIWorkbench()
io_manifest = 'io_manifest.IOManifest'
controller_manifest = 'simple_experiment.ControllerManifest'
workbench.register_core_plugins(io_manifest, contro... | Add debugging output to app demo | Add debugging output to app demo
| Python | mit | bburan/psiexperiment | ---
+++
@@ -1,4 +1,7 @@
def main():
+ import logging
+ logging.basicConfig(level='DEBUG')
+
from psi.experiment.workbench import PSIWorkbench
workbench = PSIWorkbench()
|
b1106407aa9695d0ca007b53af593e25e9bb1769 | saleor/plugins/migrations/0004_drop_support_for_env_vatlayer_access_key.py | saleor/plugins/migrations/0004_drop_support_for_env_vatlayer_access_key.py | from django.db import migrations
def assign_access_key(apps, schema):
vatlayer_configuration = (
apps.get_model("plugins", "PluginConfiguration")
.objects.filter(identifier="mirumee.taxes.vatlayer")
.first()
)
if vatlayer_configuration:
vatlayer_configuration.active = Fals... | from django.db import migrations
def deactivate_vatlayer(apps, schema):
vatlayer_configuration = (
apps.get_model("plugins", "PluginConfiguration")
.objects.filter(identifier="mirumee.taxes.vatlayer")
.first()
)
if vatlayer_configuration:
vatlayer_configuration.active = Fa... | Change migration name to more proper | Change migration name to more proper
| Python | bsd-3-clause | mociepka/saleor,mociepka/saleor,mociepka/saleor | ---
+++
@@ -1,7 +1,7 @@
from django.db import migrations
-def assign_access_key(apps, schema):
+def deactivate_vatlayer(apps, schema):
vatlayer_configuration = (
apps.get_model("plugins", "PluginConfiguration")
.objects.filter(identifier="mirumee.taxes.vatlayer")
@@ -20,5 +20,5 @@
]
... |
e0c926667a32031b5d43ec1701fe7577282176ca | rest_flex_fields/utils.py | rest_flex_fields/utils.py | def is_expanded(request, key):
""" Examines request object to return boolean of whether
passed field is expanded.
"""
expand = request.query_params.get("expand", "")
expand_fields = []
for e in expand.split(","):
expand_fields.extend([e for e in e.split(".")])
return "~all" in ... | try:
# Python 3
from collections.abc import Iterable
string_types = (str,)
except ImportError:
# Python 2
from collections import Iterable
string_types = (str, unicode)
def is_expanded(request, key):
""" Examines request object to return boolean of whether
passed field is expanded.... | Handle other iterable types gracefully in split_level utility function | Handle other iterable types gracefully in split_level utility function
| Python | mit | rsinger86/drf-flex-fields | ---
+++
@@ -1,3 +1,13 @@
+try:
+ # Python 3
+ from collections.abc import Iterable
+ string_types = (str,)
+except ImportError:
+ # Python 2
+ from collections import Iterable
+ string_types = (str, unicode)
+
+
def is_expanded(request, key):
""" Examines request object to return boolean of wh... |
defb736895d5f58133b9632c85d8064669ee897a | blueLed.py | blueLed.py | '''
Dr Who Box: Blue Effects LED
'''
from __future__ import print_function
import RPi.GPIO as GPIO
import time
from multiprocessing import Process
import math
# Define PINS
LED = 18
# Use numbering based on P1 header
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(LED, GPIO.OUT, GPIO.LOW)
def pulsate... | '''
Dr Who Box: Blue Effects LED
'''
from __future__ import print_function
import RPi.GPIO as GPIO
import time
from multiprocessing import Process
import math
# Define PINS
LED = 18
# Use numbering based on P1 header
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(LED, GPIO.OUT, GPIO.LOW)
def pulsate... | Tidy up and apply PEP8 guidelines. | Tidy up and apply PEP8 guidelines.
| Python | mit | davidb24v/drwho | ---
+++
@@ -22,36 +22,36 @@
def pulsateLed():
pwm = GPIO.PWM(LED, 100)
pwm.start(0)
- values = [math.sin(x*math.pi/180.0) for x in range (0,181)]
- values = [int(100*x**3) for x in values]
+ values = [math.sin(x * math.pi / 180.0) for x in range(0, 181)]
+ values = [int(100 * x ** 3) for x in v... |
e74aff778d6657a8c4993c62f264008c9be99e78 | api/app.py | api/app.py | # TODO: Add private API with Redis Cache and PostgreSQL (or any SQL DB with SQLAlchemy)
from api import api, cache, db
from flask import abort, Flask
from flask_restful import Resource
from os import getenv
from api.resources.market import Data
from api.resources.trend import Predict
def setup_app():
db_uri = gete... | # TODO: Add private API with Redis Cache and PostgreSQL (or any SQL DB with SQLAlchemy)
from api import api, cache, ENABLE_DB, db
from flask import abort, Flask
from flask_restful import Resource
from os import getenv
from api.resources.market import Data
from api.resources.trend import Predict
def setup_app():
ap... | Fix validate DB when DB is disabled and not connected | Fix validate DB when DB is disabled and not connected
| Python | mit | amicks/Speculator | ---
+++
@@ -1,5 +1,5 @@
# TODO: Add private API with Redis Cache and PostgreSQL (or any SQL DB with SQLAlchemy)
-from api import api, cache, db
+from api import api, cache, ENABLE_DB, db
from flask import abort, Flask
from flask_restful import Resource
from os import getenv
@@ -7,12 +7,15 @@
from api.resources.t... |
b68e609b746af6211a85493246242ba00a26f306 | bin/hand_test_lib_main.py | bin/hand_test_lib_main.py | #!/usr/bin/env python
import csv
import sys
from gwaith import get_rates, processors
only = ('PLN', 'GBP')
for data in get_rates(processor=processors.to_json, only=only):
print(data)
for data in get_rates(processor=processors.raw, only=only):
print(data)
for data in get_rates(processor=processors.raw_pytho... | #!/usr/bin/env python
import csv
import sys
from gwaith import get_rates, processors
only = ('PLN', 'GBP')
def header(msg):
print('=' * 80 + '\r\t\t\t ' + msg + ' ')
header('to_json')
for data in get_rates(processor=processors.to_json, only=only):
print(data)
header('raw')
for data in get_rates(processor... | Improve output of the manual testing command adding headers | Improve output of the manual testing command adding headers
| Python | mit | bartekbrak/gwaith,bartekbrak/gwaith,bartekbrak/gwaith | ---
+++
@@ -6,17 +6,24 @@
only = ('PLN', 'GBP')
+
+def header(msg):
+ print('=' * 80 + '\r\t\t\t ' + msg + ' ')
+
+
+header('to_json')
for data in get_rates(processor=processors.to_json, only=only):
print(data)
+header('raw')
for data in get_rates(processor=processors.raw, only=only):
print(data... |
0498e1575f59880b4f7667f0d99bfbd993f2fcd5 | profiles/backends.py | profiles/backends.py | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
class CaseInsensitiveModelBackend(ModelBackend):
def authenticate(email=None, password=None, **kwargs):
"""
Created by LNguyen(
Date: 14Dec2017
Description: Method to handle backen... | from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
class CaseInsensitiveModelBackend(ModelBackend):
def authenticate(email=None, password=None, **kwargs):
"""
Created by LNguyen(
Date: 14Dec2017
Description: Method to handle backen... | Fix issues with changing passwords | Fix issues with changing passwords
| Python | mit | gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID | ---
+++
@@ -17,7 +17,10 @@
email=kwargs.get(UserModel.email)
try:
- user=UserModel.objects.get(email__iexact=email)
+ if (type(email)==str):
+ user=UserModel.objects.get(email__iexact=email)
+ else:
+ user=UserModel.objects.get(email... |
fc830b0caf29fe1424bc8fe30afcf7e21d8ecd72 | inbound.py | inbound.py | import logging, email, yaml
from django.utils import simplejson as json
from google.appengine.ext import webapp, deferred
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api.urlfetch import fetch
settings = yaml.load(open('settings.yaml'))
def callback(raw):
result = {... | import logging, email, yaml
from django.utils import simplejson as json
from google.appengine.ext import webapp, deferred
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api.urlfetch import fetch
from google.appengine.api.urlfetch import Error as FetchError
settings = yam... | Raise if response is not 200 | Raise if response is not 200
| Python | mit | maccman/remail-engine | ---
+++
@@ -3,20 +3,25 @@
from google.appengine.ext import webapp, deferred
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api.urlfetch import fetch
+from google.appengine.api.urlfetch import Error as FetchError
settings = yaml.load(open('settings.yaml'))
def c... |
47ea7ebce827727bef5ad49e5df84fa0e5f6e4b9 | pycloudflare/services.py | pycloudflare/services.py | from itertools import count
from demands import HTTPServiceClient
from yoconfig import get_config
class CloudFlareService(HTTPServiceClient):
def __init__(self, **kwargs):
config = get_config('cloudflare')
headers = {
'Content-Type': 'application/json',
'X-Auth-Key': confi... | from itertools import count
from demands import HTTPServiceClient
from yoconfig import get_config
class CloudFlareService(HTTPServiceClient):
def __init__(self, **kwargs):
config = get_config('cloudflare')
headers = {
'Content-Type': 'application/json',
'X-Auth-Key': confi... | Use an iterator to get pages | Use an iterator to get pages
| Python | mit | gnowxilef/pycloudflare,yola/pycloudflare | ---
+++
@@ -14,16 +14,16 @@
}
super(CloudFlareService, self).__init__(config['url'], headers=headers)
+ def iter_zones(self):
+ for page in count():
+ batch = self.get('zones?page=%i&per_page=50' % page).json()['result']
+ if not batch:
+ return
+ ... |
c496be720461722ce482c981b4915365dd0df8ab | events/views.py | events/views.py | from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from base.util import class_view_decorator
from base.views import RedirectBackView
from .models import Event, EventUserRegistr... | from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext_lazy as _
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from base.util import class_view_decorator
from base.views import Redir... | Raise error when user is registering to the event multiple times | events: Raise error when user is registering to the event multiple times
| Python | mit | matus-stehlik/roots,rtrembecky/roots,tbabej/roots,rtrembecky/roots,matus-stehlik/roots,rtrembecky/roots,tbabej/roots,tbabej/roots,matus-stehlik/roots | ---
+++
@@ -1,5 +1,6 @@
from django.contrib import messages
from django.contrib.auth.decorators import login_required
+from django.utils.translation import ugettext_lazy as _
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
@@ -29,14 +30,26 @@
def dispatch(s... |
3fe4f1788d82719eac70ffe0fbbbae4dbe85f00b | evexml/forms.py | evexml/forms.py | from django import forms
from django.forms.fields import IntegerField, CharField
import evelink.account
class AddAPIForm(forms.Form):
key_id = IntegerField()
v_code = CharField(max_length=64, min_length=1)
def clean(self):
self._clean()
return super(AddAPIForm, self).clean()
def _cl... | from django import forms
from django.forms.fields import IntegerField, CharField
import evelink.account
class AddAPIForm(forms.Form):
key_id = IntegerField()
v_code = CharField(max_length=64, min_length=1)
def clean(self):
self._clean()
return super(AddAPIForm, self).clean()
def _cl... | Implement checks to pass tests | Implement checks to pass tests
| Python | mit | randomic/aniauth-tdd,randomic/aniauth-tdd | ---
+++
@@ -18,14 +18,20 @@
"""
key_id = self.cleaned_data.get('key_id')
v_code = self.cleaned_data.get('v_code')
- if key_id and v_code:
- api = evelink.api.API(api_key=(key_id, v_code))
- account = evelink.account.Account(api)
- try:
- ... |
f31ab02d9a409e31acf339db2b950216472b8e9e | salesforce/backend/operations.py | salesforce/backend/operations.py | # django-salesforce
#
# by Phil Christensen
# (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org)
# See LICENSE.md for details
#
import re
from django.db.backends import BaseDatabaseOperations
"""
Default database operations, with unquoted names.
"""
class DatabaseOperations(BaseDatabaseOperations):
... | # django-salesforce
#
# by Phil Christensen
# (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org)
# See LICENSE.md for details
#
import re
from django.db.backends import BaseDatabaseOperations
"""
Default database operations, with unquoted names.
"""
class DatabaseOperations(BaseDatabaseOperations):
... | Fix bug with Date fields and SOQL. | Fix bug with Date fields and SOQL.
Fixes https://github.com/freelancersunion/django-salesforce/issues/10 | Python | mit | django-salesforce/django-salesforce,chromakey/django-salesforce,philchristensen/django-salesforce,hynekcer/django-salesforce,chromakey/django-salesforce,hynekcer/django-salesforce,hynekcer/django-salesforce,chromakey/django-salesforce,django-salesforce/django-salesforce,philchristensen/django-salesforce,django-salesfor... | ---
+++
@@ -35,6 +35,12 @@
We let the JSON serializer handle dates for us.
"""
return value
+
+ def value_to_db_date(self, value):
+ """
+ We let the JSON serializer handle dates for us.
+ """
+ return value
def last_insert_id(self, cursor, db_table, db_column):
return cursor.lastrowid |
84338dba126a25a0c37056df8d7fd0c5a13f2a69 | selftest.features/environment.py | selftest.features/environment.py | # -*- coding: UTF-8 -*-
"""
before_step(context, step), after_step(context, step)
These run before and after every step.
The step passed in is an instance of Step.
before_scenario(context, scenario), after_scenario(context, scenario)
These run before and after each scenario is run.
The scenario passed ... | # -*- coding: UTF-8 -*-
"""
before_step(context, step), after_step(context, step)
These run before and after every step.
The step passed in is an instance of Step.
before_scenario(context, scenario), after_scenario(context, scenario)
These run before and after each scenario is run.
The scenario passed ... | Disable after_all() output for now. | Disable after_all() output for now.
| Python | bsd-2-clause | jenisys/behave,jenisys/behave | ---
+++
@@ -25,7 +25,8 @@
logging.basicConfig(level=logging.DEBUG)
def after_all(context):
- print "SUMMARY:"
+ # TEMPORARILY-DISABLED: print "SUMMARY:"
+ pass
#def before_feature(context, feature):
# context.workdir = None |
fb7e771646946637824b06eaf6d21b8c1b2be164 | main.py | main.py | # -*- coding: utf-8 -*-
'''
url-shortener
==============
An application for generating and storing shorter aliases for
requested urls. Uses `spam-lists`__ to prevent generating a short url
for an address recognized as spam, or to warn a user a pre-existing
short alias has a target that has been later recognized as spa... | # -*- coding: utf-8 -*-
'''
url-shortener
==============
An application for generating and storing shorter aliases for
requested urls. Uses `spam-lists`__ to prevent generating a short url
for an address recognized as spam, or to warn a user a pre-existing
short alias has a target that has been later recognized as spa... | Make application use log file if its name is not None | Make application use log file if its name is not None
| Python | mit | piotr-rusin/url-shortener,piotr-rusin/url-shortener | ---
+++
@@ -20,7 +20,9 @@
__copyright__ = 'Copyright 2016 Piotr Rusin'
-if not app.debug:
+log_file = app.config['LOG_FILE']
+
+if not app.debug and log_file is not None:
import logging
from logging.handlers import TimedRotatingFileHandler
file_handler = TimedRotatingFileHandler(app.config['LOG_FI... |
805e86c0cd69f49863d2ca4c37e094a344d79c64 | lib/jasy/core/MetaData.py | lib/jasy/core/MetaData.py | #
# Jasy - JavaScript Tooling Refined
# Copyright 2010 Sebastian Werner
#
class MetaData:
"""
Data structure to hold all dependency information
Hint: Must be a clean data class without links to other
systems for optiomal cachability using Pickle
"""
def __init__(self, tree):
se... | #
# Jasy - JavaScript Tooling Refined
# Copyright 2010 Sebastian Werner
#
class MetaData:
"""
Data structure to hold all dependency information
Hint: Must be a clean data class without links to other
systems for optiomal cachability using Pickle
"""
__slots__ = ["provides", "requires",... | Make use of slots to reduce in-memory size | Make use of slots to reduce in-memory size
| Python | mit | zynga/jasy,zynga/jasy,sebastian-software/jasy,sebastian-software/jasy | ---
+++
@@ -10,6 +10,8 @@
Hint: Must be a clean data class without links to other
systems for optiomal cachability using Pickle
"""
+
+ __slots__ = ["provides", "requires", "optionals", "breaks", "assets"]
def __init__(self, tree):
self.provides = set() |
c73de73aca304d347e9faffa77eab417cec0b4b5 | app/util.py | app/util.py | # Various utility functions
import os
SHOULD_CACHE = os.environ['ENV'] == 'production'
def cached_function(func):
data = {}
def wrapper(*args):
if not SHOULD_CACHE:
return func(*args)
cache_key = ' '.join([str(x) for x in args])
if cache_key not in data:
data... | # Various utility functions
import os
SHOULD_CACHE = os.environ['ENV'] == 'production'
def cached_function(func):
data = {}
def wrapper(*args):
if not SHOULD_CACHE:
return func(*args)
cache_key = ' '.join([str(x) for x in args])
if cache_key not in data:
data... | Make cached_function not modify function name | Make cached_function not modify function name
| Python | mit | albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com | ---
+++
@@ -16,4 +16,5 @@
data[cache_key] = func(*args)
return data[cache_key]
+ wrapper.__name__ = func.__name__
return wrapper |
bc8b0ce313d1b09469b8bc2e15fa068ce0133057 | numpy/fft/fftpack_lite_clr.py | numpy/fft/fftpack_lite_clr.py | import clr
clr.AddReference("fft")
from numpy__fft__fftpack_cython import * | import clr
clr.AddReference("fftpack_lite")
from numpy__fft__fftpack_cython import * | Fix an incorrect library name. | Fix an incorrect library name.
| Python | bsd-3-clause | numpy/numpy-refactor,numpy/numpy-refactor,numpy/numpy-refactor,numpy/numpy-refactor,numpy/numpy-refactor | ---
+++
@@ -1,4 +1,4 @@
import clr
-clr.AddReference("fft")
+clr.AddReference("fftpack_lite")
from numpy__fft__fftpack_cython import * |
267a7cb5c3947697df341cb25f962da1fa791805 | cubex/calltree.py | cubex/calltree.py | class CallTree(object):
def __init__(self, node):
self.call_id = node.get('id')
self.region_id = node.get('calleeId')
self.children = []
self.metrics = {}
#cube.cindex[int(node.get('id'))] = self
#for child_node in node.findall('cnode'):
# child_tree = ... | class CallTree(object):
def __init__(self, node):
self.call_id = int(node.get('id'))
self.region_id = int(node.get('calleeId'))
self.children = []
self.metrics = {}
#cube.cindex[int(node.get('id'))] = self
#for child_node in node.findall('cnode'):
# chi... | Save call tree indices as integers | Save call tree indices as integers
| Python | apache-2.0 | marshallward/cubex | ---
+++
@@ -2,8 +2,8 @@
def __init__(self, node):
- self.call_id = node.get('id')
- self.region_id = node.get('calleeId')
+ self.call_id = int(node.get('id'))
+ self.region_id = int(node.get('calleeId'))
self.children = []
self.metrics = {}
|
174ed142f4726b0f725cf24b83d8c1e45ea395c8 | gunter-tweet.py | gunter-tweet.py | #!/usr/bin/env python
import os
import random
import tweepy
import config
last_seen_path = os.path.join(os.path.dirname(__file__), 'last-seen')
def get_api():
auth = tweepy.OAuthHandler(config.consumer_key, config.consumer_secret)
auth.set_access_token(config.key, config.secret)
return tweepy.API(aut... | #!/usr/bin/env python
import os
import random
import tweepy
import config
last_seen_path = os.path.join(os.path.dirname(__file__), 'last-seen')
def get_api():
auth = tweepy.OAuthHandler(config.consumer_key, config.consumer_secret)
auth.set_access_token(config.key, config.secret)
return tweepy.API(aut... | Use the first mention for saving | Use the first mention for saving
| Python | agpl-3.0 | gnoronha/gunter-tweet | ---
+++
@@ -25,7 +25,7 @@
def save_last_seen(mentions):
- open(last_seen_path, 'w').write(str(mentions[-1].id))
+ open(last_seen_path, 'w').write(str(mentions[0].id))
def generate_wenks(): |
29f727f5391bb3fc40270b58a798f146cc202a3d | modules/pipeurlbuilder.py | modules/pipeurlbuilder.py | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | # pipeurlbuilder.py
#
import urllib
from pipe2py import util
def pipe_urlbuilder(context, _INPUT, conf, **kwargs):
"""This source builds a url and yields it forever.
Keyword arguments:
context -- pipeline context
_INPUT -- not used
conf:
BASE -- base
PATH -- path elements
... | Handle single param definition (following Yahoo! changes) | Handle single param definition (following Yahoo! changes)
| Python | mit | nerevu/riko,nerevu/riko | ---
+++
@@ -37,7 +37,11 @@
#Ensure url is valid
url = util.url_quote(url)
- params = dict([(util.get_value(p['key'], item, **kwargs), util.get_value(p['value'], item, **kwargs)) for p in conf['PARAM'] if p])
+ param_defs = conf['PARAM']
+ if not isinstance(param_defs, ... |
d5229fcae9481ff6666eeb076825f4ddd3929b02 | asyncio/__init__.py | asyncio/__init__.py | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | Fix asyncio.__all__: export also unix_events and windows_events symbols | Fix asyncio.__all__: export also unix_events and windows_events symbols
For example, on Windows, it was not possible to get ProactorEventLoop or
DefaultEventLoopPolicy using "from asyncio import *".
| Python | apache-2.0 | overcastcloud/trollius,overcastcloud/trollius,overcastcloud/trollius | ---
+++
@@ -29,12 +29,6 @@
from .tasks import *
from .transports import *
-if sys.platform == 'win32': # pragma: no cover
- from .windows_events import *
-else:
- from .unix_events import * # pragma: no cover
-
-
__all__ = (coroutines.__all__ +
events.__all__ +
futures.__all__ +
@... |
e642716c0815c989b994d436921b0fb1a4f3dfa1 | djangae/checks.py | djangae/checks.py | import os
from django.core import checks
from google.appengine.tools.devappserver2.application_configuration import ModuleConfiguration
from djangae.environment import get_application_root
def check_deferred_builtin(app_configs=None, **kwargs):
"""
Check that the deferred builtin is switched off, as it'll o... | import os
from django.core import checks
from djangae.environment import get_application_root
def check_deferred_builtin(app_configs=None, **kwargs):
"""
Check that the deferred builtin is switched off, as it'll override Djangae's deferred handler
"""
from google.appengine.tools.devappserver2.applic... | Move import that depends on devserver | Move import that depends on devserver
| Python | bsd-3-clause | potatolondon/djangae,grzes/djangae,potatolondon/djangae,grzes/djangae,grzes/djangae | ---
+++
@@ -1,7 +1,6 @@
import os
from django.core import checks
-from google.appengine.tools.devappserver2.application_configuration import ModuleConfiguration
from djangae.environment import get_application_root
@@ -10,6 +9,8 @@
"""
Check that the deferred builtin is switched off, as it'll overri... |
6eb8ad49e25039ad61470e30e42c8ab352ab9b1c | sep/sep_search_result.py | sep/sep_search_result.py | from lxml import html
import re
import requests
from constants import SEP_URL
class SEPSearchResult():
query = None
results = None
def __init__(self, query):
self.set_query(query)
def set_query(self, query):
pattern = re.compile('[^a-zA-Z\d\s]')
stripped_query = re.sub(patte... | from lxml import html
import re
import requests
from constants import SEP_URL
class SEPSearchResult():
query = None
results = None
def __init__(self, query):
self.set_query(query)
def set_query(self, query):
pattern = re.compile('[^a-zA-Z\d\s]')
stripped_query = re.sub(patte... | Print SEP urls for debug | New: Print SEP urls for debug
| Python | mit | AFFogarty/SEP-Bot,AFFogarty/SEP-Bot | ---
+++
@@ -22,6 +22,7 @@
url = SEP_URL + "search/searcher.py?query="
for word in self.query:
url += word + "+"
+ print url
return url
def request_results(self): |
7fdbe50d113a78fd02101056b56d44d917c5571c | joins/models.py | joins/models.py | from django.db import models
# Create your models here.
class Join(models.Model):
email = models.EmailField()
ip_address = models.CharField(max_length=120, default='ABC')
timestamp = models.DateTimeField(auto_now_add = True, auto_now=False)
updated = models.DateTimeField(auto_now_add = False, auto_now=True)
def... | from django.db import models
# Create your models here.
class Join(models.Model):
email = models.EmailField()
ip_address = models.CharField(max_length=120, default='ABC')
timestamp = models.DateTimeField(auto_now_add = True, auto_now=False)
updated = models.DateTimeField(auto_now_add = False, auto_now=True)
def... | Add South Guide, made message for it | Add South Guide, made message for it
| Python | mit | codingforentrepreneurs/launch-with-code,codingforentrepreneurs/launch-with-code,krishnazure/launch-with-code,krishnazure/launch-with-code,krishnazure/launch-with-code | ---
+++
@@ -11,3 +11,7 @@
def __unicode__(self):
return "%s" %(self.email)
+
+#To see the guide on using south, go here:
+#https://github.com/codingforentrepreneurs/Guides/blob/master/using_south_in_django.md
+ |
e43ea9602c272119f18e270a0ee138401ee0b02a | digit_guesser.py | digit_guesser.py | import matplotlib.pyplot as plt
from sklearn import datasets
from sklearn import svm
digits = datasets.load_digits()
clf = svm.SVC(gamma=0.0001, C=100)
training_set = digits.data[:-10]
labels = digits.target[:-10]
x, y = training_set, labels
clf.fit(x, y)
for i in range(10):
print("Prediction: {}".format(clf.... | from sklearn import datasets
from sklearn import svm
digits = datasets.load_digits()
clf = svm.SVC(gamma=0.0001, C=100)
training_set = digits.data[:-10]
training_labels = digits.target[:-10]
testing_set = digits.data[-10:]
testing_labels = digits.target[-10:]
x, y = training_set, training_labels
clf.fit(x, y)
for... | Make variables self descriptive and create a testing set. | Make variables self descriptive and create a testing set.
| Python | mit | jeancsil/machine-learning | ---
+++
@@ -1,5 +1,3 @@
-import matplotlib.pyplot as plt
-
from sklearn import datasets
from sklearn import svm
@@ -8,15 +6,13 @@
clf = svm.SVC(gamma=0.0001, C=100)
training_set = digits.data[:-10]
-labels = digits.target[:-10]
+training_labels = digits.target[:-10]
-x, y = training_set, labels
+testing_set... |
86b889049ef1ee1c896e4ab44185fc54ef87a2c0 | IPython/consoleapp.py | IPython/consoleapp.py | """
Shim to maintain backwards compatibility with old IPython.consoleapp imports.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from warnings import warn
warn("The `IPython.consoleapp` package has been deprecated. "
"You should import from jupyter_client... | """
Shim to maintain backwards compatibility with old IPython.consoleapp imports.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from warnings import warn
warn("The `IPython.consoleapp` package has been deprecated since IPython 4.0."
"You should import fr... | Remove Deprecation Warning, add since when things were deprecated. | Remove Deprecation Warning, add since when things were deprecated.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | ---
+++
@@ -6,7 +6,7 @@
from warnings import warn
-warn("The `IPython.consoleapp` package has been deprecated. "
- "You should import from jupyter_client.consoleapp instead.", DeprecationWarning, stacklevel=2)
+warn("The `IPython.consoleapp` package has been deprecated since IPython 4.0."
+ "You should i... |
4600fd4cf06d1a2f58b92ec5f9ce1e502cf1da33 | bawebauth/models.py | bawebauth/models.py | # -*- coding: utf-8 -*-
from django.db import models
from django.core.cache import cache
from django.contrib.auth.models import User
from bawebauth.decorators import cache_property
from django.utils.translation import ugettext_lazy as _
class Device(models.Model):
user = models.ForeignKey(User)
name = models.C... | # -*- coding: utf-8 -*-
from django.db import models
from django.core.cache import cache
from django.contrib.auth.models import User
from bawebauth.decorators import cache_property
from django.utils.translation import ugettext_lazy as _
class Device(models.Model):
user = models.ForeignKey(User)
name = models.C... | Revert order of usage property | Revert order of usage property
| Python | mit | mback2k/django-bawebauth,mback2k/django-bawebauth,mback2k/django-bawebauth,mback2k/django-bawebauth | ---
+++
@@ -17,7 +17,7 @@
@cache_property
def usages(self):
- return self.usage_set.order_by('-crdate')
+ return self.usage_set.order_by('crdate')
@cache_property
def last_usage(self): |
c974a2fe075accdf58148fceb3f722b144e0b8d8 | diylang/types.py | diylang/types.py | # -*- coding: utf-8 -*-
"""
This module holds some types we'll have use for along the way.
It's your job to implement the Closure and Environment types.
The DiyLangError class you can have for free :)
"""
class DiyLangError(Exception):
"""General DIY Lang error class."""
pass
class Closure:
def __ini... | # -*- coding: utf-8 -*-
"""
This module holds some types we'll have use for along the way.
It's your job to implement the Closure and Environment types.
The DiyLangError class you can have for free :)
"""
class DiyLangError(Exception):
"""General DIY Lang error class."""
pass
class Closure(object):
d... | Fix Old-style class, subclass object explicitly. | Fix Old-style class, subclass object explicitly.
| Python | bsd-3-clause | kvalle/diy-lisp,kvalle/diy-lisp,kvalle/diy-lang,kvalle/diy-lang | ---
+++
@@ -13,7 +13,7 @@
pass
-class Closure:
+class Closure(object):
def __init__(self, env, params, body):
raise NotImplementedError("DIY")
@@ -22,7 +22,7 @@
return "<closure/%d>" % len(self.params)
-class Environment:
+class Environment(object):
def __init__(self, vari... |
87d4e604ef72fbe0513c725a7fdf0d421e633257 | changes/api/project_index.py | changes/api/project_index.py | from __future__ import absolute_import, division, unicode_literals
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.constants import Status
from changes.models import Project, Build
class ProjectIndexAPIView(APIView):
def get(self):
queryset = Project.query.order_b... | from __future__ import absolute_import, division, unicode_literals
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.constants import Status
from changes.models import Project, Build
class ProjectIndexAPIView(APIView):
def get(self):
queryset = Project.query.order_b... | Remove numActiveBuilds as its unused | Remove numActiveBuilds as its unused
| Python | apache-2.0 | dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes | ---
+++
@@ -31,11 +31,6 @@
Build.date_created.desc(),
).first()
- data['numActiveBuilds'] = Build.query.filter(
- Build.project == project,
- Build.status != Status.finished,
- ).count()
-
context['projects'].append(data)... |
194e6a34744963e2a7b17b846ee2913e6e01ae11 | pyblish_starter/plugins/validate_rig_members.py | pyblish_starter/plugins/validate_rig_members.py | import pyblish.api
class ValidateStarterRigFormat(pyblish.api.InstancePlugin):
"""A rig must have a certain hierarchy and members
- Must reside within `rig_GRP` transform
- controls_SEL
- cache_SEL
- resources_SEL (optional)
"""
label = "Rig Format"
order = pyblish.api.ValidatorOrde... | import pyblish.api
class ValidateStarterRigFormat(pyblish.api.InstancePlugin):
"""A rig must have a certain hierarchy and members
- Must reside within `rig_GRP` transform
- out_SEL
- controls_SEL
- in_SEL (optional)
- resources_SEL (optional)
"""
label = "Rig Format"
order = pyb... | Update interface for rigs - in/out versus None/cache | Update interface for rigs - in/out versus None/cache
| Python | mit | pyblish/pyblish-starter,pyblish/pyblish-mindbender,mindbender-studio/core,MoonShineVFX/core,getavalon/core,MoonShineVFX/core,mindbender-studio/core,getavalon/core | ---
+++
@@ -5,8 +5,9 @@
"""A rig must have a certain hierarchy and members
- Must reside within `rig_GRP` transform
+ - out_SEL
- controls_SEL
- - cache_SEL
+ - in_SEL (optional)
- resources_SEL (optional)
"""
@@ -20,7 +21,7 @@
missing = list()
for member in (... |
42c76c83e76439e5d8377bed2f159cfe988f05b1 | src/icalendar/__init__.py | src/icalendar/__init__.py | from icalendar.cal import (
Calendar,
Event,
Todo,
Journal,
Timezone,
TimezoneStandard,
TimezoneDaylight,
FreeBusy,
Alarm,
ComponentFactory,
)
# Property Data Value Types
from icalendar.prop import (
vBinary,
vBoolean,
vCalAddress,
vDatetime,
vDate,
vDDDTy... | from icalendar.cal import (
Calendar,
Event,
Todo,
Journal,
Timezone,
TimezoneStandard,
TimezoneDaylight,
FreeBusy,
Alarm,
ComponentFactory,
)
# Property Data Value Types
from icalendar.prop import (
vBinary,
vBoolean,
vCalAddress,
vDatetime,
vDate,
vDDDTy... | Remove incorrect use of __all__ | Remove incorrect use of __all__ | Python | bsd-2-clause | untitaker/icalendar,nylas/icalendar,geier/icalendar | ---
+++
@@ -44,16 +44,3 @@
q_split,
q_join,
)
-
-
-__all__ = [
- Calendar, Event, Todo, Journal,
- FreeBusy, Alarm, ComponentFactory,
- Timezone, TimezoneStandard, TimezoneDaylight,
- vBinary, vBoolean, vCalAddress, vDatetime, vDate,
- vDDDTypes, vDuration, vFloat, vInt, vPeriod,
- vWeekd... |
59cd76a166a46756977440f46b858efa276c0aa0 | fireplace/cards/utils.py | fireplace/cards/utils.py | import random
import fireplace.cards
from ..actions import *
from ..enums import CardType, GameTag, Race, Rarity, Zone
from ..targeting import *
def hand(func):
"""
@hand helper decorator
The decorated event listener will only listen while in the HAND Zone
"""
func.zone = Zone.HAND
return func
drawCard = lambd... | import random
import fireplace.cards
from ..actions import *
from ..enums import CardType, GameTag, Race, Rarity, Zone
from ..targeting import *
def hand(func):
"""
@hand helper decorator
The decorated event listener will only listen while in the HAND Zone
"""
func.zone = Zone.HAND
return func
drawCard = lambd... | Implement a RandomCard helper for definitions | Implement a RandomCard helper for definitions
| Python | agpl-3.0 | jleclanche/fireplace,Meerkov/fireplace,amw2104/fireplace,NightKev/fireplace,oftc-ftw/fireplace,butozerca/fireplace,liujimj/fireplace,liujimj/fireplace,Meerkov/fireplace,smallnamespace/fireplace,Ragowit/fireplace,amw2104/fireplace,oftc-ftw/fireplace,beheh/fireplace,smallnamespace/fireplace,butozerca/fireplace,Ragowit/fi... | ---
+++
@@ -16,5 +16,9 @@
drawCard = lambda self, *args: self.controller.draw()
+def RandomCard(**kwargs):
+ return random.choice(fireplace.cards.filter(**kwargs))
+
+
def randomCollectible(**kwargs):
- return random.choice(fireplace.cards.filter(collectible=True, **kwargs))
+ return RandomCard(collectible=True... |
a0d10e419b504dc2e7f4ba45a5d10a2d9d47019c | knights/base.py | knights/base.py |
import ast
from . import parse
class Template:
def __init__(self, raw):
self.raw = raw
self.root = parse.parse(raw)
code = ast.Expression(
body=ast.ListComp(
elt=ast.Call(
func=ast.Name(id='str', ctx=ast.Load()),
args=[... |
import ast
from . import parse
class Template:
def __init__(self, raw):
self.raw = raw
self.nodelist = parse.parse(raw)
code = ast.Expression(
body=ast.GeneratorExp(
elt=ast.Call(
func=ast.Name(id='str', ctx=ast.Load()),
... | Use a generator for rendering, and pass nodelist unwrapped | Use a generator for rendering, and pass nodelist unwrapped
| Python | mit | funkybob/knights-templater,funkybob/knights-templater | ---
+++
@@ -7,10 +7,10 @@
class Template:
def __init__(self, raw):
self.raw = raw
- self.root = parse.parse(raw)
+ self.nodelist = parse.parse(raw)
code = ast.Expression(
- body=ast.ListComp(
+ body=ast.GeneratorExp(
elt=ast.Call(
... |
16811d4f379974fb94c98b56b398a4d555e3e4cd | jasy/item/Doc.py | jasy/item/Doc.py | #
# Jasy - Web Tooling Framework
# Copyright 2010-2012 Zynga Inc.
# Copyright 2013-2014 Sebastian Werner
#
import os
import jasy.js.api.Data as Data
import jasy.core.Text as Text
import jasy.item.Abstract as Abstract
from jasy import UserError
class DocItem(Abstract.AbstractItem):
kind = "doc"
def generat... | #
# Jasy - Web Tooling Framework
# Copyright 2010-2012 Zynga Inc.
# Copyright 2013-2014 Sebastian Werner
#
import os
import jasy.js.api.Data as Data
import jasy.core.Text as Text
import jasy.item.Abstract as Abstract
from jasy import UserError
class DocItem(Abstract.AbstractItem):
kind = "doc"
def generat... | Fix ID generation for js package documentation | Fix ID generation for js package documentation
| Python | mit | sebastian-software/jasy,sebastian-software/jasy | ---
+++
@@ -22,7 +22,7 @@
else:
fileId = ""
- return (fileId + os.path.splitext(relPath)[0]).replace("/", ".")
+ return (fileId + os.path.dirname(relpath)).replace("/", ".")
def getApi(self):
field = "api[%s]" % self.id |
6593645ace6efdc0e7b79dbdf5a5b5f76396c693 | cli/cli.py | cli/cli.py | import argparse
parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis')
parser.add_argument('-v', '--version', action='version', version='0.1.0')
parser.parse_args()
| import argparse
parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis')
parser.add_argument('-v', '--version', action='version', version='0.1.0')
subparsers = parser.add_subparsers(help='commands')
# A list command
list_parser = subparsers.add_parser('list', help='List commands')
list_p... | Add commands for listing available analytics commadns | Add commands for listing available analytics commadns
| Python | mit | McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research | ---
+++
@@ -2,4 +2,11 @@
parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis')
parser.add_argument('-v', '--version', action='version', version='0.1.0')
+
+subparsers = parser.add_subparsers(help='commands')
+
+# A list command
+list_parser = subparsers.add_parser('list', help='Lis... |
808413e56eb14568eae98791581c0f5870f46cd2 | example/config.py | example/config.py | # pyinfra
# File: pyinfra/example/config.py
# Desc: entirely optional config file for the CLI deploy
# see: pyinfra/api/config.py for defaults
from pyinfra import hook, local
# These can be here or in deploy.py
TIMEOUT = 5
FAIL_PERCENT = 81
# Add hooks to be triggered throughout the deploy - separate to the ... | # pyinfra
# File: pyinfra/example/config.py
# Desc: entirely optional config file for the CLI deploy
# see: pyinfra/api/config.py for defaults
from pyinfra import hook
# These can be here or in deploy.py
TIMEOUT = 5
FAIL_PERCENT = 81
# Add hooks to be triggered throughout the deploy - separate to the operati... | Make it possible to run examples on any branch! | Make it possible to run examples on any branch!
| Python | mit | Fizzadar/pyinfra,Fizzadar/pyinfra | ---
+++
@@ -3,7 +3,7 @@
# Desc: entirely optional config file for the CLI deploy
# see: pyinfra/api/config.py for defaults
-from pyinfra import hook, local
+from pyinfra import hook
# These can be here or in deploy.py
@@ -14,15 +14,9 @@
# Add hooks to be triggered throughout the deploy - separate to t... |
e8bb04f0084e0c722c21fc9c5950cb1b5370dd22 | Tools/scripts/byteyears.py | Tools/scripts/byteyears.py | #! /usr/local/python
# byteyears file ...
#
# Print a number representing the product of age and size of each file,
# in suitable units.
import sys, posix, time
from stat import *
secs_per_year = 365.0 * 24.0 * 3600.0
now = time.time()
status = 0
for file in sys.argv[1:]:
try:
st = posix.stat(file)
except posix... | #! /usr/local/python
# Print the product of age and size of each file, in suitable units.
#
# Usage: byteyears [ -a | -m | -c ] file ...
#
# Options -[amc] select atime, mtime (default) or ctime as age.
import sys, posix, time
import string
from stat import *
# Use lstat() to stat files if it exists, else stat()
try... | Add options -amc; do lstat if possible; columnize properly. | Add options -amc; do lstat if possible; columnize properly.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | ---
+++
@@ -1,29 +1,57 @@
#! /usr/local/python
-# byteyears file ...
+# Print the product of age and size of each file, in suitable units.
#
-# Print a number representing the product of age and size of each file,
-# in suitable units.
+# Usage: byteyears [ -a | -m | -c ] file ...
+#
+# Options -[amc] select atim... |
298dc9be1d9e85e79cdbaa95ef9cab1986fe87a7 | saleor/product/migrations/0026_auto_20170102_0927.py | saleor/product/migrations/0026_auto_20170102_0927.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-01-02 15:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0025_auto_20161219_0517'),
]
operations = [
migrations.CreateMod... | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-01-02 15:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0025_auto_20161219_0517'),
]
operations = [
migrations.CreateMod... | Remove unrelated thing from migration | Remove unrelated thing from migration
| Python | bsd-3-clause | UITools/saleor,mociepka/saleor,mociepka/saleor,mociepka/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor | ---
+++
@@ -20,9 +20,4 @@
('products', models.ManyToManyField(to='product.Product')),
],
),
- migrations.AlterField(
- model_name='stocklocation',
- name='name',
- field=models.CharField(max_length=100, verbose_name='location'),
- )... |
3d42553ae6acd452e122a1a89851e4693a89abde | build.py | build.py | import os
from flask.ext.frozen import Freezer
import webassets
from content import app, assets
bundle_files = []
for bundle in assets:
assert isinstance(bundle, webassets.Bundle)
print("Building bundle {}".format(bundle.output))
bundle.build(force=True, disable_cache=True)
bundle_files.append(bundle... | import os
from flask.ext.frozen import Freezer
import webassets
from content import app, assets
bundle_files = []
for bundle in assets:
assert isinstance(bundle, webassets.Bundle)
print("Building bundle {}".format(bundle.output))
bundle.build(force=True, disable_cache=True)
bundle_files.append(bundle... | Add workaround for frozen-flask generating static pages for dynamic api pages like /oauth/. | Add workaround for frozen-flask generating static pages for dynamic api pages like /oauth/.
| Python | apache-2.0 | daboross/dabo.guru,daboross/dabo.guru,daboross/dabo.guru,daboross/dabo.guru | ---
+++
@@ -12,11 +12,22 @@
bundle.build(force=True, disable_cache=True)
bundle_files.append(bundle.output)
-print("Freezing")
+
+# This is a copy of Freezer.no_argument_rules() modified to ignore certain paths
+def no_argument_rules_urls_with_ignore():
+ """URL generator for URL rules that take no arg... |
c1a4e9c83aa20ad333c4d6a1c9e53a732540ea39 | jump_to_file.py | jump_to_file.py | import sublime
import sublime_plugin
import os
class JumpToFile(sublime_plugin.TextCommand):
def run(self, edit = None):
view = self.view
for region in view.sel():
if view.score_selector(region.begin(), "parameter.url, string.quoted"):
# The scope includes the quote char... | import sublime
import sublime_plugin
import os
class JumpToFile(sublime_plugin.TextCommand):
def _try_open(self, try_file, path=None):
if path:
try_file = os.path.join(path, try_file)
if not os.path.isfile(try_file):
try_file += '.rb'
if os.path.isfile(try_file):
... | Add support for paths relative to project folders | Add support for paths relative to project folders
| Python | mit | russelldavis/sublimerc | ---
+++
@@ -3,19 +3,41 @@
import os
class JumpToFile(sublime_plugin.TextCommand):
+ def _try_open(self, try_file, path=None):
+ if path:
+ try_file = os.path.join(path, try_file)
+
+ if not os.path.isfile(try_file):
+ try_file += '.rb'
+
+ if os.path.isfile(try_file):... |
a1b47d442290ea9ce19e25cd03c1aa5e39ad2ec5 | scikits/learn/tests/test_pca.py | scikits/learn/tests/test_pca.py | from nose.tools import assert_equals
from .. import datasets
from ..pca import PCA
iris = datasets.load_iris()
X = iris.data
def test_pca():
"""
PCA
"""
pca = PCA(k=2)
X_r = pca.fit(X).transform(X)
assert_equals(X_r.shape[1], 2)
pca = PCA()
pca.fit(X)
assert_equals(pca.explaine... | import numpy as np
from .. import datasets
from ..pca import PCA
iris = datasets.load_iris()
X = iris.data
def test_pca():
"""
PCA
"""
pca = PCA(k=2)
X_r = pca.fit(X).transform(X)
np.testing.assert_equal(X_r.shape[1], 2)
pca = PCA()
pca.fit(X)
np.testing.assert_almost_equal(pca... | Fix tests to be moroe robust | BUG: Fix tests to be moroe robust
| Python | bsd-3-clause | nvoron23/scikit-learn,B3AU/waveTree,sumspr/scikit-learn,frank-tancf/scikit-learn,madjelan/scikit-learn,mattilyra/scikit-learn,xzh86/scikit-learn,mwv/scikit-learn,yunfeilu/scikit-learn,JsNoNo/scikit-learn,scikit-learn/scikit-learn,Fireblend/scikit-learn,btabibian/scikit-learn,davidgbe/scikit-learn,arabenjamin/scikit-lea... | ---
+++
@@ -1,4 +1,4 @@
-from nose.tools import assert_equals
+import numpy as np
from .. import datasets
from ..pca import PCA
@@ -14,8 +14,8 @@
pca = PCA(k=2)
X_r = pca.fit(X).transform(X)
- assert_equals(X_r.shape[1], 2)
+ np.testing.assert_equal(X_r.shape[1], 2)
pca = PCA()
pca.f... |
aeec346bf49f9f297802a4c6c50cf28de20a70f8 | examples/load.py | examples/load.py | # coding: utf-8
import os
import requests
ROOT = os.path.dirname(os.path.realpath(__file__))
ENDPOINT = os.environ.get('ES_ENDPOINT_EXTERNAL', 'localhost:9200')
INDEX = 'gsiCrawler'
eid = 0
with open(os.path.join(ROOT, 'blogPosting.txt'), 'r') as f:
for line in f:
url = 'http://{}/{}/{}/{}'.format(ENDP... | # coding: utf-8
import os
import requests
ROOT = os.path.dirname(os.path.realpath(__file__))
ENDPOINT = os.environ.get('ES_ENDPOINT_EXTERNAL', 'localhost:9200')
INDEX = 'gsiCrawler'
eid = 0
with open(os.path.join(ROOT, 'blogPosting.txt'), 'r') as f:
for line in f:
url = 'http://{}/{}/{}/{}'.format(ENDP... | Add content-type to requests in example | Add content-type to requests in example
| Python | apache-2.0 | gsi-upm/gsicrawler,gsi-upm/gsicrawler,gsi-upm/gsicrawler,gsi-upm/gsicrawler | ---
+++
@@ -13,11 +13,11 @@
with open(os.path.join(ROOT, 'blogPosting.txt'), 'r') as f:
for line in f:
url = 'http://{}/{}/{}/{}'.format(ENDPOINT, INDEX, "twitter", eid)
- requests.put(url, data=line)
+ requests.put(url, data=line, headers={'Content-Type': 'application/json'})
ei... |
4ca6d139139a08151f7cdf89993ded3440287a4a | keyform/urls.py | keyform/urls.py | from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.views import login, logout_then_login
from keyform import views
urlpatterns = [
url(r'^$', views.HomeView.as_view(), name='home'),
url(r'^contact$', views.ContactView.as_view(), name='contact'),
url(r'^edit-... | from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import RedirectView
from django.contrib.auth.views import login, logout_then_login
from keyform import views
urlpatterns = [
url(r'^$', views.HomeView.as_view(), name='home'),
url(r'^table.php$', RedirectView.a... | Add redirect for old hotlinks | Add redirect for old hotlinks
| Python | mit | mostateresnet/keyformproject,mostateresnet/keyformproject,mostateresnet/keyformproject | ---
+++
@@ -1,10 +1,12 @@
from django.conf.urls import url, include
from django.contrib import admin
+from django.views.generic import RedirectView
from django.contrib.auth.views import login, logout_then_login
from keyform import views
urlpatterns = [
url(r'^$', views.HomeView.as_view(), name='home'),
+ ... |
1f1c8eed6a60945a404aa0efd6169687431c87d5 | exec_thread_1.py | exec_thread_1.py | import spam
#Convert the LTA file to the UVFITS format
spam.convert_lta_to_uvfits('Name of the file')
spam.precalibrate_targets('Name of UVFITS output file')
spam.process_target()
| import spam
#Convert the LTA file to the UVFITS format
#Generates UVFITS file with same basename as LTA file
spam.convert_lta_to_uvfits('Name of the file')
#Take generated UVFITS file as input and precalibrate targets
#Generates files (RRLL with the name of the source (can be obtained using ltahdr)
spam.precalibrate... | Add pipeline flow (in comments) to thread template | Add pipeline flow (in comments) to thread template
| Python | mit | NCRA-TIFR/gadpu,NCRA-TIFR/gadpu | ---
+++
@@ -1,9 +1,15 @@
import spam
#Convert the LTA file to the UVFITS format
-
+#Generates UVFITS file with same basename as LTA file
spam.convert_lta_to_uvfits('Name of the file')
+#Take generated UVFITS file as input and precalibrate targets
+#Generates files (RRLL with the name of the source (can be obt... |
89a0edf7e5e00de68615574b2044f593e0339f2e | jsonrpc/views.py | jsonrpc/views.py | from _json import dumps
from django.http import HttpResponse
from django.shortcuts import render_to_response
from jsonrpc.site import jsonrpc_site
from jsonrpc import mochikit
def browse(request):
if (request.GET.get('f', None) == 'mochikit.js'):
return HttpResponse(mochikit.mochikit, content_type='application/x... | from _json import dumps
from django.http import HttpResponse
from django.shortcuts import render_to_response
from jsonrpc.site import jsonrpc_site
from jsonrpc import mochikit
def browse(request, site=jsonrpc_site):
if (request.GET.get('f', None) == 'mochikit.js'):
return HttpResponse(mochikit.mochikit, content_... | Make browse work with non-default sites | Make browse work with non-default sites
| Python | mit | palfrey/django-json-rpc | ---
+++
@@ -4,12 +4,12 @@
from jsonrpc.site import jsonrpc_site
from jsonrpc import mochikit
-def browse(request):
+def browse(request, site=jsonrpc_site):
if (request.GET.get('f', None) == 'mochikit.js'):
return HttpResponse(mochikit.mochikit, content_type='application/x-javascript')
if (request.GET.g... |
7fd0c08926e9e4e24df2afe047625b3ceb651a02 | examples/sponza/effect.py | examples/sponza/effect.py | import moderngl as mgl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
@effec... | import moderngl as mgl
from demosys.effects import effect
class SceneEffect(effect.Effect):
"""Generated default effect"""
def __init__(self):
self.scene = self.get_scene("Sponza/glTF/Sponza.gltf", local=True)
self.proj_mat = self.create_projection(fov=75.0, near=0.01, far=1000.0)
@effec... | Disable bbox draw in sponza example | Disable bbox draw in sponza example
| Python | isc | Contraz/demosys-py | ---
+++
@@ -21,4 +21,4 @@
)
# Draw bbox
- self.scene.draw_bbox(self.proj_mat, self.sys_camera.view_matrix, all=True)
+ # self.scene.draw_bbox(self.proj_mat, self.sys_camera.view_matrix, all=True) |
5e969205ab1840aaa83008ce8ef8600d40743eec | neutron/objects/stdattrs.py | neutron/objects/stdattrs.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Switch to new engine facade for StandardAttribute objects | Switch to new engine facade for StandardAttribute objects
Enable the new Engine Facade for StandardAttribute objects.
Change-Id: Ia3eb436d07e3b2fc633b219aa00c78cc07ed30db
| Python | apache-2.0 | mahak/neutron,openstack/neutron,openstack/neutron,openstack/neutron,mahak/neutron,mahak/neutron | ---
+++
@@ -24,6 +24,8 @@
# Version 1.0: Initial version
VERSION = '1.0'
+ new_facade = True
+
db_model = standard_attr.StandardAttribute
fields = { |
9faf5f090239d80a79c426de83c7a0025eb08ea5 | src/sentry/options/defaults.py | src/sentry/options/defaults.py | """
sentry.options.defaults
~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
from sentry.options import register, FLAG_NOSTORE, FLAG_REQUIRED, FLAG_PRIORITIZE_DIS... | """
sentry.options.defaults
~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
from sentry.options import register, FLAG_NOSTORE, FLAG_REQUIRED, FLAG_PRIORITIZE_DIS... | Change system.rate-limit to prioritize disk | Change system.rate-limit to prioritize disk
| Python | bsd-3-clause | ifduyue/sentry,ifduyue/sentry,mvaled/sentry,BuildingLink/sentry,JamesMura/sentry,looker/sentry,mvaled/sentry,JamesMura/sentry,ifduyue/sentry,looker/sentry,JamesMura/sentry,gencer/sentry,JackDanger/sentry,looker/sentry,fotinakis/sentry,beeftornado/sentry,fotinakis/sentry,BuildingLink/sentry,JamesMura/sentry,mvaled/sentr... | ---
+++
@@ -16,7 +16,7 @@
register('system.admin-email', flags=FLAG_REQUIRED)
register('system.databases', default={}, flags=FLAG_NOSTORE)
register('system.debug', default=False, flags=FLAG_NOSTORE)
-register('system.rate-limit', default=0, type=int)
+register('system.rate-limit', default=0, type=int, flags=FLAG_P... |
b0916a35dc0049105acb3b2b62a579353e57d33a | erpnext/accounts/doctype/bank/bank_dashboard.py | erpnext/accounts/doctype/bank/bank_dashboard.py | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'bank',
'transactions': [
{
'label': _('Bank Deatils'),
'items': ['Bank Account', 'Bank Guarantee']
},
{
'items': ['Payment Order']
}
]
}
| from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'fieldname': 'bank',
'transactions': [
{
'label': _('Bank Deatils'),
'items': ['Bank Account', 'Bank Guarantee']
}
]
}
| Remove payment order from bank dashboard | fix: Remove payment order from bank dashboard
| Python | agpl-3.0 | gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext,gsnbng/erpnext | ---
+++
@@ -10,9 +10,6 @@
{
'label': _('Bank Deatils'),
'items': ['Bank Account', 'Bank Guarantee']
- },
- {
- 'items': ['Payment Order']
}
]
} |
bf66f0f267b6bca16241ed4920199dfa4128bd5c | social_core/backends/surveymonkey.py | social_core/backends/surveymonkey.py | """
SurveyMonkey OAuth2 backend, docs at:
https://developer.surveymonkey.com/api/v3/#authentication
"""
from .oauth import BaseOAuth2
class SurveyMonkeyOAuth2(BaseOAuth2):
"""SurveyMonkey OAuth2 authentication backend"""
name = 'surveymonkey'
AUTHORIZATION_URL = 'https://api.surveymonkey.com/oauth/aut... | """
SurveyMonkey OAuth2 backend, docs at:
https://developer.surveymonkey.com/api/v3/#authentication
"""
from .oauth import BaseOAuth2
class SurveyMonkeyOAuth2(BaseOAuth2):
"""SurveyMonkey OAuth2 authentication backend"""
name = 'surveymonkey'
AUTHORIZATION_URL = 'https://api.surveymonkey.com/oauth/aut... | Disable the STATE parameter - it doesn't play nice with the SurveyMonkey App Directory links | Disable the STATE parameter - it doesn't play nice with the SurveyMonkey App Directory links
| Python | bsd-3-clause | python-social-auth/social-core,python-social-auth/social-core | ---
+++
@@ -12,6 +12,8 @@
ACCESS_TOKEN_URL = 'https://api.surveymonkey.com/oauth/token'
ACCESS_TOKEN_METHOD = 'POST'
USER_DATA_URL = '/v3/users/me'
+ STATE_PARAMETER = False
+ REDIRECT_STATE = False
EXTRA_DATA = [
('access_url', 'access_url'),
] |
49602d0abfe93a0c98f55d932e7b86ddf2a59d38 | connect.py | connect.py | import ConfigParser
import threading
import time
import chatbot
def runbot(t):
config = ConfigParser.ConfigParser()
config.readfp(open('./config.ini'))
ws = chatbot.Chatbot(config.get('Chatbot', 'server'),
protocols=['http-only', 'chat'])
try:
ws.connect()
ws... | import ConfigParser
import threading
import time
import chatbot
def runbot(t):
config = ConfigParser.ConfigParser()
config.readfp(open('./config.ini'))
ws = chatbot.Chatbot(config.get('Chatbot', 'server'),
protocols=['http-only', 'chat'])
try:
ws.connect()
ws... | Add sleep before new Chatbot instance is created on crash | Add sleep before new Chatbot instance is created on crash
| Python | mit | ScottehMax/pyMon,ScottehMax/pyMon,lc-guy/pyMon,lc-guy/pyMon | ---
+++
@@ -24,11 +24,11 @@
while True:
try:
if 'chatbot' not in [x.name for x in threading.enumerate()]:
+ time.sleep(10)
bot = threading.Thread(target=runbot, name='chatbot', args=([2]))
# Entire program exits when there are only daemon thr... |
ee81f71d7c6b311ee760b42ca5c9b7e80f44a8d7 | src/pip/_internal/metadata/importlib/_compat.py | src/pip/_internal/metadata/importlib/_compat.py | import importlib.metadata
from typing import Optional, Protocol
class BasePath(Protocol):
"""A protocol that various path objects conform.
This exists because importlib.metadata uses both ``pathlib.Path`` and
``zipfile.Path``, and we need a common base for type hints (Union does not
work well since `... | import importlib.metadata
from typing import Any, Optional, Protocol, cast
class BasePath(Protocol):
"""A protocol that various path objects conform.
This exists because importlib.metadata uses both ``pathlib.Path`` and
``zipfile.Path``, and we need a common base for type hints (Union does not
work w... | Make version hack more reliable | Make version hack more reliable
| Python | mit | pradyunsg/pip,pypa/pip,pradyunsg/pip,pypa/pip,sbidoul/pip,sbidoul/pip,pfmoore/pip,pfmoore/pip | ---
+++
@@ -1,5 +1,5 @@
import importlib.metadata
-from typing import Optional, Protocol
+from typing import Any, Optional, Protocol, cast
class BasePath(Protocol):
@@ -38,4 +38,4 @@
The ``name`` attribute is only available in Python 3.10 or later. We are
targeting exactly that, but Mypy does not know... |
2625b539a05156fe3baea1ebf195d242740b599d | osfclient/models/storage.py | osfclient/models/storage.py | from .core import OSFCore
from .file import File
class Storage(OSFCore):
def _update_attributes(self, storage):
if not storage:
return
# XXX does this happen?
if 'data' in storage:
storage = storage['data']
self.id = self._get_attribute(storage, 'id')
... | from .core import OSFCore
from .file import File
class Storage(OSFCore):
def _update_attributes(self, storage):
if not storage:
return
# XXX does this happen?
if 'data' in storage:
storage = storage['data']
self.id = self._get_attribute(storage, 'id')
... | Refactor key to access files from a folder's JSON | Refactor key to access files from a folder's JSON
| Python | bsd-3-clause | betatim/osf-cli,betatim/osf-cli | ---
+++
@@ -18,8 +18,9 @@
self.node = self._get_attribute(storage, 'attributes', 'node')
self.provider = self._get_attribute(storage, 'attributes', 'provider')
- files = ['relationships', 'files', 'links', 'related', 'href']
- self._files_url = self._get_attribute(storage, *files)
+ ... |
173b4f39433aa27970955173e63f99f58cfeecb1 | custom/enikshay/urls.py | custom/enikshay/urls.py | from django.conf.urls import patterns, include
urlpatterns = patterns(
'custom.enikshay.integrations.ninetyninedots.views',
(r'^99dots/', include("custom.enikshay.integrations.ninetyninedots.urls")),
)
| from django.conf.urls import patterns, include
urlpatterns = patterns(
'',
(r'^99dots/', include("custom.enikshay.integrations.ninetyninedots.urls")),
)
| Remove reference to wrong view | Remove reference to wrong view
| Python | bsd-3-clause | dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq | ---
+++
@@ -1,6 +1,6 @@
from django.conf.urls import patterns, include
urlpatterns = patterns(
- 'custom.enikshay.integrations.ninetyninedots.views',
+ '',
(r'^99dots/', include("custom.enikshay.integrations.ninetyninedots.urls")),
) |
5bc2ce310cfb13b966b022573255c0042fc03791 | application/page/models.py | application/page/models.py | import datetime
from sqlalchemy import desc
from application import db
class Page(db.Model):
__tablename__ = 'page'
id = db.Column(db.Integer, primary_key=True)
path = db.Column(db.String(256), unique=True)
revisions = db.relationship('PageRevision', backref='page', lazy='dynamic')
def __init__(self, path):
... | import datetime
from sqlalchemy import desc
from application import db
class Page(db.Model):
__tablename__ = 'page'
id = db.Column(db.Integer, primary_key=True)
path = db.Column(db.String(256), unique=True)
revisions = db.relationship('PageRevision', backref='page', lazy='dynamic')
def __init__(self, path):
... | Fix navigition links a bit again | Fix navigition links a bit again
| Python | mit | viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct | ---
+++
@@ -16,7 +16,8 @@
def get_most_recent(self):
revision = PageRevision.query.filter(PageRevision.page_id == self.id)
revision = revision.order_by(PageRevision.timestamp.desc()).first()
- revision.path = self.path
+ if revision is not None:
+ revision.path = self.path
return revision
|
0f5fcca49bc22b8a481ba86e9421757ac373a932 | bin/example_game_programmatic.py | bin/example_game_programmatic.py | from vengeance.game import Direction
from vengeance.game import Game
from vengeance.game import Location
go_up = Direction('up')
go_down = Direction('down')
go_up.opposite = go_down
go_in = Direction('in')
go_out = Direction('out')
go_in.opposite = go_out
go_west = Direction('west')
go_east = Direction('east')
go_we... | from vengeance.game import Direction
from vengeance.game import Game
from vengeance.game import Location
go_up = Direction('up')
go_down = Direction('down')
go_up.opposite = go_down
go_in = Direction('in')
go_out = Direction('out')
go_in.opposite = go_out
go_west = Direction('west')
go_east = Direction('east')
go_we... | Add use of Game.character.current_location to example | Add use of Game.character.current_location to example
| Python | unlicense | mmurdoch/Vengeance,mmurdoch/Vengeance | ---
+++
@@ -26,6 +26,8 @@
game = Game([church, crypt, coffin, cave])
# Move the player down from the church to the crypt
+print("Current location: " + game.character.current_location.name)
game.process_input('d')
+print("Current location: " + game.character.current_location.name)
game.run() |
ceebd0b345fe7221577bfcfe18632267897871e8 | test/helpers/xnat_test_helper.py | test/helpers/xnat_test_helper.py | import os, re
from base64 import b64encode as encode
from qipipe.staging import airc_collection as airc
from qipipe.staging.staging_helper import SUBJECT_FMT
from qipipe.helpers import xnat_helper
import logging
logger = logging.getLogger(__name__)
def generate_subject_name(name):
"""
Makes a subject name tha... | import os, re
from base64 import b64encode as encode
from qipipe.staging import airc_collection as airc
from qipipe.staging.staging_helper import SUBJECT_FMT
from qipipe.helpers import xnat_helper
import logging
logger = logging.getLogger(__name__)
def generate_subject_name(name):
"""
Makes a subject name tha... | Move get_subjects and delete_subjects to qipipe helpers. | Move get_subjects and delete_subjects to qipipe helpers.
| Python | bsd-2-clause | ohsu-qin/qipipe | ---
+++
@@ -15,45 +15,3 @@
@return: the test subject name
"""
return 'Test_' + encode(name).strip('=')
-
-def get_subjects(collection, source, pattern=None):
- """
- Infers the XNAT subject names from the given source directory.
- The source directory contains subject subdirectories.
- The ... |
518a572c4979d98fda60a4b736984fe3673ecc0a | courses.py | courses.py | from glob import glob
course_map = {'course_folder_name' : 'Full Course Name'}
def update_lectures():
course_lectures = dict()
for course_id in course_map:
vid_files = sorted(glob('static/courses/%s/*.mp4' % course_id))
lectures = dict((n+1, str(x)) for n,x in enumerate(vid_files))
cou... | from glob import glob
course_map = {'course_folder_name' : 'Full Course Name'}
def update_lectures():
course_lectures = dict()
for course_id in course_map:
vid_files = sorted(glob('static/courses/%s/*.mp4' % course_id))
lectures = dict((n+1, str(x)) for n,x in enumerate(vid_files))
cou... | Make update_lectures return outside the loop | Make update_lectures return outside the loop
| Python | mit | jailuthra/webedu | ---
+++
@@ -8,4 +8,4 @@
vid_files = sorted(glob('static/courses/%s/*.mp4' % course_id))
lectures = dict((n+1, str(x)) for n,x in enumerate(vid_files))
course_lectures[course_id] = lectures
- return course_lectures
+ return course_lectures |
4d7ffb1b09c861a28da3acaae94ee84cb9ee85b7 | nap/api.py | nap/api.py |
# TODO: Add other patterns to allow introspection?
class Api(object):
'''Helper class for registering many Publishers in one URL namespace'''
def __init__(self, name):
self.name = name
self.children = {}
def patterns(self):
urlpatterns = []
for child in self.children:
... |
from django.conf.urls import url, include
# TODO: Add other patterns to allow introspection?
class Api(object):
'''Helper class for registering many Publishers in one URL namespace'''
def __init__(self, name):
self.name = name
self.children = {}
def patterns(self, flat=False):
ur... | Add flat patterns for Api Add register/autodiscover system for Api | Add flat patterns for Api
Add register/autodiscover system for Api
| Python | bsd-3-clause | limbera/django-nap,MarkusH/django-nap | ---
+++
@@ -1,4 +1,5 @@
+from django.conf.urls import url, include
# TODO: Add other patterns to allow introspection?
@@ -8,15 +9,15 @@
self.name = name
self.children = {}
- def patterns(self):
- urlpatterns = []
- for child in self.children:
- urlpatterns.extend... |
457cbeaa66fa504442c1303bec4df25e83ee35c3 | froide/document/models.py | froide/document/models.py | from django.db import models
from filingcabinet.models import (
AbstractDocument,
AbstractDocumentCollection,
)
class Document(AbstractDocument):
original = models.ForeignKey(
'foirequest.FoiAttachment', null=True, blank=True,
on_delete=models.SET_NULL, related_name='original_document'
... | from django.db import models
from filingcabinet.models import (
AbstractDocument,
AbstractDocumentCollection,
)
class Document(AbstractDocument):
original = models.ForeignKey(
'foirequest.FoiAttachment', null=True, blank=True,
on_delete=models.SET_NULL, related_name='original_document'
... | Add get_serializer_class to document model | Add get_serializer_class to document model | Python | mit | fin/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide | ---
+++
@@ -24,6 +24,13 @@
def is_public(self):
return self.public
+ def get_serializer_class(self, detail=False):
+ from .api_views import DocumentSerializer, DocumentDetailSerializer
+
+ if detail:
+ return DocumentDetailSerializer
+ return DocumentSerializer
+
... |
da0dc08d8fdd18a64ecc883404553c86de6a726c | test/functional/feature_shutdown.py | test/functional/feature_shutdown.py | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoind shutdown."""
from test_framework.test_framework import BitcoinTestFramework
from test_framewo... | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoind shutdown."""
from test_framework.test_framework import BitcoinTestFramework
from test_framewo... | Remove race between connecting and shutdown on separate connections | qa: Remove race between connecting and shutdown on separate connections
| Python | mit | DigitalPandacoin/pandacoin,DigitalPandacoin/pandacoin,peercoin/peercoin,peercoin/peercoin,DigitalPandacoin/pandacoin,peercoin/peercoin,peercoin/peercoin,DigitalPandacoin/pandacoin,DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,peercoin/peercoin | ---
+++
@@ -5,7 +5,7 @@
"""Test bitcoind shutdown."""
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import assert_equal, get_rpc_proxy
+from test_framework.util import assert_equal, get_rpc_proxy, wait_until
from threading import Thread
def test_long_call(node):
@@ -... |
8fb421831bb562a80edf5c3de84d71bf2a3eec4b | tools/scrub_database.py | tools/scrub_database.py | import os
import sys
import django
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "museum.settings")
django.setup()
from museum_site.models import * # noqa: E402
from museum_site.constants import REMOVED_ARTICLE, DETAIL_REMOVED # noqa: E... | import datetime
import os
import sys
import django
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "museum.settings")
django.setup()
from django.contrib.sessions.models import Session
from django.contrib.auth.models import User
from museu... | Remove sessions when scrubbing DB for public release | Remove sessions when scrubbing DB for public release
| Python | mit | DrDos0016/z2,DrDos0016/z2,DrDos0016/z2 | ---
+++
@@ -1,3 +1,5 @@
+import datetime
+
import os
import sys
@@ -6,6 +8,9 @@
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "museum.settings")
django.setup()
+
+from django.contrib.sessions.models import Session
+from django.contr... |
058d9a5c9396522d60cf595820cf94a67b42c475 | bigcommerce/resources/webhooks.py | bigcommerce/resources/webhooks.py | from .base import *
class Webhooks(ListableApiResource, CreateableApiResource,
UpdateableApiResource, DeleteableApiResource):
resource_name = 'webhooks'
| from .base import *
class Webhooks(ListableApiResource, CreateableApiResource,
UpdateableApiResource, DeleteableApiResource):
resource_name = 'hooks'
| Fix typo in resource name | Fix typo in resource name | Python | mit | hockeybuggy/bigcommerce-api-python,bigcommerce/bigcommerce-api-python | ---
+++
@@ -3,4 +3,4 @@
class Webhooks(ListableApiResource, CreateableApiResource,
UpdateableApiResource, DeleteableApiResource):
- resource_name = 'webhooks'
+ resource_name = 'hooks' |
8bc4a4a5c6ef82b43f78ac9bcd1ce7e2888e2e4b | backend/messages.py | backend/messages.py | # -*- coding: utf-8 -*-
import json
from enum import Enum
class BEMessages(Enum):
ALL_MAIN_BROADCAST = 'ALL_MAIN_BROADCAST'
class FEMessages(Enum):
pass
class AllMainBroadCast(object):
message_type = BEMessages.ALL_MAIN_BROADCAST
def __init__(self):
pass
def broadcast(self):
... | # -*- coding: utf-8 -*-
import json
from enum import Enum
class BEMessages(Enum):
ALL_MAIN_BROADCAST = 'ALL_MAIN_BROADCAST'
class FEMessages(Enum):
pass
class AllMainBroadCast(object):
message_type = BEMessages.ALL_MAIN_BROADCAST
def __init__(self):
pass
def broadcast(self, handler)... | Add handler send logic to message | Add handler send logic to message
| Python | mit | verekia/hackarena,verekia/hackarena,verekia/hackarena,verekia/hackarena | ---
+++
@@ -18,12 +18,11 @@
def __init__(self):
pass
- def broadcast(self):
+ def broadcast(self, handler):
data = {
'type': self.message_type,
- 'content': '', # TODO: grab message data from class vars
+ 'content': 'TEST', # TODO: grab message data ... |
197d2b1282d9f4c94535f6627ff151752bd8f063 | c3po/provider/groupme/receive.py | c3po/provider/groupme/receive.py | """Handles message receiving for GroupMe provider."""
import logging
import json
import time
import flask
from c3po.provider.groupme import send
APP = flask.Flask(__name__)
APP.config['DEBUG'] = True
SUCCESS = ('', 200)
@APP.route('/groupme/<bot_id>', methods=['POST'])
def receive_message(bot_id):
"""Process... | """Handles message receiving for GroupMe provider."""
import logging
import json
import time
import flask
from c3po.provider.groupme import send
APP = flask.Flask(__name__)
APP.config['DEBUG'] = True
SUCCESS = ('', 200)
@APP.route('/groupme/<bot_id>', methods=['POST'])
def receive_message(bot_id):
"""Process... | Remove delay when responding to messages | Remove delay when responding to messages
Not needed anymore.
Fixes #123
| Python | apache-2.0 | rhefner1/c3po,rhefner1/c3po | ---
+++
@@ -17,7 +17,6 @@
@APP.route('/groupme/<bot_id>', methods=['POST'])
def receive_message(bot_id):
"""Processes a message and returns a response."""
- time.sleep(.1)
logging.info("Request data: %s", flask.request.data)
|
3aabe40ba9d65f730763a604d1869c3114886273 | odin/compatibility.py | odin/compatibility.py | """
This module is to include utils for managing compatibility between Python and Odin releases.
"""
import inspect
import warnings
def deprecated(message, category=DeprecationWarning):
"""
Decorator for marking classes/functions as being deprecated and are to be removed in the future.
:param message: Me... | """
This module is to include utils for managing compatibility between Python and Odin releases.
"""
import inspect
import warnings
def deprecated(message, category=DeprecationWarning):
"""
Decorator for marking classes/functions as being deprecated and are to be removed in the future.
:param message: Me... | Support kwargs along with args for functions | Support kwargs along with args for functions
| Python | bsd-3-clause | python-odin/odin | ---
+++
@@ -28,12 +28,12 @@
return obj
else:
- def wrapped_func(*args):
+ def wrapped_func(*args, **kwargs):
warnings.warn(
"{0} is deprecated and scheduled for removal. {1}".format(obj.__name__, message),
categor... |
39104d9b098a32ee6aa68eba9cb8d12127d3eb74 | direlog.py | direlog.py | #!/usr/bin/env python
# encoding: utf-8
import sys
import re
import argparse
from patterns import pre_patterns
def prepare(infile):
"""
Apply pre_patterns from patterns to infile
:infile: input file
"""
try:
for line in infile:
result = line
for pattern in pre_p... | #!/usr/bin/env python
# encoding: utf-8
import sys
import re
import argparse
from argparse import RawDescriptionHelpFormatter
from patterns import pre_patterns
def prepare(infile, outfile=sys.stdout):
"""
Apply pre_patterns from patterns to infile
:infile: input file
"""
try:
for line ... | Add some info and outfile to prepare function | Add some info and outfile to prepare function
| Python | mit | abcdw/direlog,abcdw/direlog | ---
+++
@@ -3,11 +3,12 @@
import sys
import re
import argparse
+from argparse import RawDescriptionHelpFormatter
from patterns import pre_patterns
-def prepare(infile):
+def prepare(infile, outfile=sys.stdout):
"""
Apply pre_patterns from patterns to infile
@@ -19,14 +20,20 @@
for line ... |
27acd078d04222e345a7939d5f74c6d43069832e | fabfile.py | fabfile.py | from fabric.api import * # noqa
env.hosts = [
'104.131.30.135',
]
env.user = "root"
env.directory = "/home/django/freemusic.ninja/django"
def deploy():
with cd(env.directory):
run("git pull --rebase")
run("pip3 install -r requirements.txt")
run("python3 manage.py collectstatic --noi... | from fabric.api import * # noqa
env.hosts = [
'104.131.30.135',
]
env.user = "root"
env.directory = "/home/django/freemusic.ninja/django"
def deploy():
with cd(env.directory):
run("git pull --rebase")
sudo("pip3 install -r requirements.txt", user='django')
sudo("python3 manage.py co... | Add more fabric commands and fix deploy command | Add more fabric commands and fix deploy command
| Python | bsd-3-clause | FreeMusicNinja/freemusic.ninja,FreeMusicNinja/freemusic.ninja | ---
+++
@@ -11,7 +11,26 @@
def deploy():
with cd(env.directory):
run("git pull --rebase")
- run("pip3 install -r requirements.txt")
- run("python3 manage.py collectstatic --noinput")
- run("python3 manage.py migrate")
+ sudo("pip3 install -r requirements.txt", user='django')... |
5d5f8e02efa6854bef0813e0e8383a3760cf93d2 | os_brick/privileged/__init__.py | os_brick/privileged/__init__.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Fix os-brick in virtual environments | Fix os-brick in virtual environments
When running os-brick in a virtual environment created by a non root
user, we get the following error:
ModuleNotFoundError: No module named 'os_brick.privileged.rootwrap'
This happens because the privsep daemon drops all the privileged except
those defined in the context, and o... | Python | apache-2.0 | openstack/os-brick,openstack/os-brick | ---
+++
@@ -10,8 +10,19 @@
# License for the specific language governing permissions and limitations
# under the License.
+import os
+
from oslo_privsep import capabilities as c
from oslo_privsep import priv_context
+
+
+capabilities = [c.CAP_SYS_ADMIN]
+
+# On virtual environments libraries are not owned... |
565ed49b29f09acf4fa79ba395a31b88792e91ce | setup.py | setup.py | #! /usr/bin/env python
"""Setup information of demandlib.
"""
from setuptools import setup, find_packages
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='demandlib',
version='0.1.5dev',
author='oemof developer group',
url='https://oem... | #! /usr/bin/env python
"""Setup information of demandlib.
"""
from setuptools import setup, find_packages
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='demandlib',
version='0.1.5dev',
author='oemof developer group',
url='https://oem... | Allow newest versions of numpy and pandas | Allow newest versions of numpy and pandas
| Python | mit | oemof/demandlib | ---
+++
@@ -20,8 +20,8 @@
description='Demandlib of the open energy modelling framework',
long_description=read('README.rst'),
packages=find_packages(),
- install_requires=['numpy >= 1.7.0, <= 1.14.3',
- 'pandas >= 0.18.0, <= 0.23'],
+ install_requires=['numpy >= ... |
5aa48facaf77d8fb6919c960659dfa41f3f1ad78 | fabfile.py | fabfile.py | import os
from fabric.api import *
def unit():
current_dir = os.path.dirname(__file__)
command = " ".join(["PYTHONPATH=$PYTHONPATH:%s/videolog" % current_dir,
"nosetests", "-s", "--verbose", "--with-coverage",
"--cover-package=videolog", "tests/unit/*"])
local(command)
| import os
from fabric.api import *
def clean():
current_dir = os.path.dirname(__file__)
local("find %s -name '*.pyc' -exec rm -f {} \;" % current_dir)
local("rm -rf %s/build" % current_dir)
def unit():
clean()
current_dir = os.path.dirname(__file__)
command = " ".join(["PYTHONPATH=$PYTHONPATH... | Add task clean() to remove *.pyc files | Add task clean() to remove *.pyc files
| Python | mit | rcmachado/pyvideolog | ---
+++
@@ -2,7 +2,13 @@
from fabric.api import *
+def clean():
+ current_dir = os.path.dirname(__file__)
+ local("find %s -name '*.pyc' -exec rm -f {} \;" % current_dir)
+ local("rm -rf %s/build" % current_dir)
+
def unit():
+ clean()
current_dir = os.path.dirname(__file__)
command = " ".... |
02090062a61e96fa6490181acaea1b8820109b98 | hooks/post_gen_project.py | hooks/post_gen_project.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('post_gen_project')
import shutil
import os
{% if cookiecutter.docs_tool == "mkdocs" %}
logger.info('Moving files for mkdocs.')
os.rename('mkdocs/mkdocs.yml', 'mkdocs.yml')
shutil.move('... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('post_gen_project')
import shutil
import os
{% if cookiecutter.docs_tool == "mkdocs" %}
logger.info('Moving files for mkdocs.')
os.rename('mkdocs/mkdocs.yml', 'mkdocs.yml')
shutil.move('... | Add an additional post gen hook to remove the jinja2 templates | Add an additional post gen hook to remove the jinja2 templates
| Python | mit | pytest-dev/cookiecutter-pytest-plugin | ---
+++
@@ -29,3 +29,7 @@
shutil.rmtree('sphinxdocs')
{% endif %}
+
+
+logger.info('Removing jinja2 macros')
+shutil.rmtree('macros') |
16aafc5ed95a7a0f830905d45c827dcc3cd67889 | setup.py | setup.py | """
PiPocketGeiger
-----
Radiation Watch Pocket Geiger Type 5 library for Raspberry Pi.
Links
`````
* `code and documentation <https://github.com/MonsieurV/PiPocketGeiger>`_
"""
import re
import ast
from setuptools import setup
setup(
name='PiPocketGeiger',
version=0.1,
url='https://github... | """
==============
PiPocketGeiger
==============
Radiation Watch Pocket Geiger Type 5 library for Raspberry Pi.
Usage
=====
::
from PiPocketGeiger import RadiationWatch
import time
with RadiationWatch(24, 23) as radiationWatch:
while 1:
print(radiationWatch.status())
... | Update pypi description and release new version | Update pypi description and release new version
| Python | mit | MonsieurV/PiPocketGeiger | ---
+++
@@ -1,11 +1,24 @@
"""
+==============
PiPocketGeiger
------
+==============
+
Radiation Watch Pocket Geiger Type 5 library for Raspberry Pi.
-Links
-`````
-* `code and documentation <https://github.com/MonsieurV/PiPocketGeiger>`_
+Usage
+=====
+::
+
+ from PiPocketGeiger import RadiationWatch
+ imp... |
4cb1535b2e296b6f2471e17295e0ebe6fef7214c | fabfile.py | fabfile.py | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INSTALLED_APPS': (
'django.contrib.contenttypes',
'armstrong.core.arm_wells',
'armstrong.core.arm_wells.tests.arm_wells_support',
),
'TEMPLATE_CONTEXT_PROCESSORS': (
'django.core.context_processors.request',
... | from armstrong.dev.tasks import *
settings = {
'DEBUG': True,
'INSTALLED_APPS': (
'django.contrib.contenttypes',
'armstrong.core.arm_wells',
'armstrong.core.arm_wells.tests.arm_wells_support',
'south',
),
'TEMPLATE_CONTEXT_PROCESSORS': (
'django.core.context_proc... | Add south to list of installed apps to create migrations | Add south to list of installed apps to create migrations
| Python | apache-2.0 | armstrong/armstrong.core.arm_wells,dmclain/armstrong.core.arm_wells,texastribune/armstrong.core.arm_wells,armstrong/armstrong.core.arm_wells,texastribune/armstrong.core.arm_wells,dmclain/armstrong.core.arm_wells,armstrong/armstrong.core.arm_wells | ---
+++
@@ -6,6 +6,7 @@
'django.contrib.contenttypes',
'armstrong.core.arm_wells',
'armstrong.core.arm_wells.tests.arm_wells_support',
+ 'south',
),
'TEMPLATE_CONTEXT_PROCESSORS': (
'django.core.context_processors.request', |
55fed5d1ae2f7ad72eb4766d41440b2c50ff4fb2 | setup.py | setup.py | #!/usr/bin/python
# -*-coding:UTF-8 -*-
from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
setup(
name='dictmysqldb',
version='0.1.7',
description='A mysql package above MySQL-python for more convenient database manipulation with Python dictionar... | #!/usr/bin/python
# -*-coding:UTF-8 -*-
from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
setup(
name='dictmysqldb',
version='0.1.8',
description='A mysql package above MySQL-python for more convenient database manipulation with Python dictionar... | Update the version to 0.1.8 | Update the version to 0.1.8
| Python | mit | ligyxy/DictMySQLdb,ligyxy/DictMySQL | ---
+++
@@ -9,7 +9,7 @@
setup(
name='dictmysqldb',
- version='0.1.7',
+ version='0.1.8',
description='A mysql package above MySQL-python for more convenient database manipulation with Python dictionary.',
|
63c2bdcf6cc3dae59f78abb59b14ca3e52789852 | src/rlib/string_stream.py | src/rlib/string_stream.py | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, si... | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, ... | Fix StringStream to conform to latest pypy | Fix StringStream to conform to latest pypy
Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
| Python | mit | smarr/PySOM,smarr/PySOM,SOM-st/RPySOM,SOM-st/RPySOM,SOM-st/PySOM,SOM-st/PySOM | ---
+++
@@ -1,4 +1,5 @@
from rpython.rlib.streamio import Stream, StreamError
+
class StringStream(Stream):
def __init__(self, string):
@@ -8,14 +9,9 @@
def write(self, data):
raise StreamError("StringStream is not writable")
+
def truncate(self, size):
raise StreamError("String... |
b9805bebaf3a3cc3116dfd528f4b7f5c6c959aa0 | setup.py | setup.py | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.1.1',
description='Caching mindful of computation/storage costs',
url='http://github.com/mrocklin/cachey/',
maintainer='Matthew Rocklin',
maintainer_email='mrocklin@gmail.com',
... | #!/usr/bin/env python
from os.path import exists
from setuptools import setup
setup(name='cachey',
version='0.1.1',
description='Caching mindful of computation/storage costs',
url='http://github.com/blaze/cachey/',
maintainer='Matthew Rocklin',
maintainer_email='mrocklin@gmail.com',
... | Change links to blaze org | Change links to blaze org
| Python | bsd-3-clause | blaze/cachey,Winterflower/cachey,mrocklin/cachey | ---
+++
@@ -6,7 +6,7 @@
setup(name='cachey',
version='0.1.1',
description='Caching mindful of computation/storage costs',
- url='http://github.com/mrocklin/cachey/',
+ url='http://github.com/blaze/cachey/',
maintainer='Matthew Rocklin',
maintainer_email='mrocklin@gmail.com',
... |
2300bd970de91c13b899f50b5f15c0d2cefaecb4 | setup.py | setup.py | from setuptools import setup
__version__ = None
with open('mendeley/version.py') as f:
exec(f.read())
setup(
name='mendeley',
version=__version__,
packages=['mendeley'],
url='http://dev.mendeley.com',
license='MIT',
author='Mendeley',
author_email='api@mendeley.com',
description='P... | from setuptools import setup
__version__ = None
with open('mendeley/version.py') as f:
exec(f.read())
setup(
name='mendeley',
version=__version__,
packages=['mendeley'],
url='http://dev.mendeley.com',
license='MIT',
author='Mendeley',
author_email='api@mendeley.com',
description='P... | Return to using latest versions, now vcrpy is fixed. | Return to using latest versions, now vcrpy is fixed.
| Python | apache-2.0 | Mendeley/mendeley-python-sdk,lucidbard/mendeley-python-sdk | ---
+++
@@ -15,15 +15,15 @@
description='Python SDK for the Mendeley API',
install_requires=[
- 'arrow==0.4.4',
- 'future==0.13.0',
- 'memoized-property==1.0.2',
- 'requests==2.3.0',
- 'requests-oauthlib==0.4.1',
+ 'arrow',
+ 'future',
+ 'memoized-pr... |
cc379cb3e68ddf5a110eef139282c83dc8b8e9d1 | tests/test_queue/test_queue.py | tests/test_queue/test_queue.py | import unittest
from aids.queue.queue import Queue
class QueueTestCase(unittest.TestCase):
'''
Unit tests for the Queue data structure
'''
def setUp(self):
self.test_queue = Queue()
def test_queue_initialization(self):
self.assertTrue(isinstance(self.test_queue, Queue))
def test_queue... | import unittest
from aids.queue.queue import Queue
class QueueTestCase(unittest.TestCase):
'''
Unit tests for the Queue data structure
'''
def setUp(self):
self.test_queue = Queue()
def test_queue_initialization(self):
self.assertTrue(isinstance(self.test_queue, Queue))
def test_queue... | Add unit tests for enqueue, dequeue and length for Queue | Add unit tests for enqueue, dequeue and length for Queue
| Python | mit | ueg1990/aids | ---
+++
@@ -17,5 +17,17 @@
def test_queue_is_empty(self):
self.assertTrue(self.test_queue.is_empty())
+ def test_queue_enqueue(self):
+ self.test_queue.enqueue(1)
+ self.assertEqual(len(self.test_queue), 1)
+
+ def test_queue_dequeue(self):
+ self.test_queue.enqueue(1)
+ self.assertEqual(self... |
0da53a2d876baac9ef83ad1a9d606439e0672a09 | system/t04_mirror/show.py | system/t04_mirror/show.py | from lib import BaseTest
import re
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirr... | from lib import BaseTest
import re
class ShowMirror1Test(BaseTest):
"""
show mirror: regular mirror
"""
fixtureCmds = ["aptly mirror create mirror1 http://mirror.yandex.ru/debian/ wheezy"]
runCmd = "aptly mirror show mirror1"
class ShowMirror2Test(BaseTest):
"""
show mirror: missing mirr... | Add '+' to list of skipped symbols. | Add '+' to list of skipped symbols.
| Python | mit | aptly-dev/aptly,gdbdzgd/aptly,aptly-dev/aptly,adfinis-forks/aptly,sobczyk/aptly,gearmover/aptly,seaninspace/aptly,bankonme/aptly,adfinis-forks/aptly,smira/aptly,neolynx/aptly,gdbdzgd/aptly,seaninspace/aptly,bankonme/aptly,ceocoder/aptly,neolynx/aptly,vincentbernat/aptly,bsundsrud/aptly,ceocoder/aptly,aptly-dev/aptly,gd... | ---
+++
@@ -24,4 +24,4 @@
"""
fixtureDB = True
runCmd = "aptly mirror show --with-packages wheezy-contrib"
- outputMatchPrepare = lambda _, s: re.sub(r"Last update: [0-9:A-Za-z -]+\n", "", s)
+ outputMatchPrepare = lambda _, s: re.sub(r"Last update: [0-9:+A-Za-z -]+\n", "", s) |
c96146226c693b8b5d1d13e0cf650b40f5e92df2 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='zeit.campus',
version='1.6.4.dev0',
author='Zeit Online',
author_email='zon-backend@zeit.de',
url='http://www.zeit.de/',
description="vivi section Campus",
packages=find_packages('src'),
package_dir={'': 'src'},
include_packa... | from setuptools import setup, find_packages
setup(
name='zeit.campus',
version='1.6.4.dev0',
author='Zeit Online',
author_email='zon-backend@zeit.de',
url='http://www.zeit.de/',
description="vivi section Campus",
packages=find_packages('src'),
package_dir={'': 'src'},
include_packa... | Update to version with celery. | ZON-3409: Update to version with celery.
| Python | bsd-3-clause | ZeitOnline/zeit.campus | ---
+++
@@ -21,7 +21,7 @@
'mock',
'plone.testing',
'setuptools',
- 'zeit.cms>=2.88.0.dev0',
+ 'zeit.cms >= 3.0.dev0',
'zeit.content.article',
'zeit.content.cp',
'zeit.content.gallery', |
b5fa8ff1d86485c7f00ddecaef040ca66a817dfc | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(
name='freki',
version='0.3.0-develop',
description='PDF-Extraction helper for RiPLEs pipeline.',
author='Michael Goodman, Ryan Georgi',
author_email='goodmami@uw.edu, rgeorgi@uw.edu',
url='https://github.com/xigt/freki',
license=... | #!/usr/bin/env python
from distutils.core import setup
setup(
name='freki',
version='0.3.0-develop',
description='PDF-Extraction helper for RiPLEs pipeline.',
author='Michael Goodman, Ryan Georgi',
author_email='goodmami@uw.edu, rgeorgi@uw.edu',
url='https://github.com/xigt/freki',
license=... | Add Chardet as installation dependency | Add Chardet as installation dependency
| Python | mit | xigt/freki,xigt/freki | ---
+++
@@ -29,7 +29,8 @@
packages=['freki', 'freki.readers', 'freki.analyzers'],
install_requires=[
'numpy',
- 'matplotlib'
+ 'matplotlib',
+ 'chardet'
],
entry_points={
'console_scripts': [ |
b6461f1f270f6c10f86d0a28c7dd6e37b8050059 | setup.py | setup.py | from distutils.core import setup
from setuptools import find_packages
with open('README.md') as fp:
long_description = fp.read()
setup(
name='sendwithus',
version='5.2.0',
author='sendwithus',
author_email='us@sendwithus.com',
packages=find_packages(),
scripts=[],
url='https://github.c... | from distutils.core import setup
from setuptools import find_packages
with open('README.md') as fp:
long_description = fp.read()
setup(
name='sendwithus',
version='5.2.0',
author='sendwithus',
author_email='us@sendwithus.com',
packages=find_packages(),
scripts=[],
url='https://github.c... | Add a description content type for PyPI | Add a description content type for PyPI
A long_description_content_type is required since our README is in markdown
instead of restructured text.
| Python | apache-2.0 | sendwithus/sendwithus_python | ---
+++
@@ -15,6 +15,7 @@
license='LICENSE.txt',
description='Python API client for sendwithus.com',
long_description=long_description,
+ long_description_content_type='text/markdown',
test_suite="sendwithus.test",
install_requires=[
"requests >= 2.0.0", |
3cc25e574c38a1d8247a1edd4f70a2db72cb2538 | setup.py | setup.py | from setuptools import setup
config = {
'include_package_data': True,
'description': 'Simulated datasets of DNA',
'download_url': 'https://github.com/kundajelab/simdna',
'version': '0.4.3.3',
'packages': ['simdna', 'simdna.resources', 'simdna.synthetic'],
'package_data': {'simdna.resources': ['... | from setuptools import setup
config = {
'include_package_data': True,
'description': 'Simulated datasets of DNA',
'download_url': 'https://github.com/kundajelab/simdna',
'version': '0.4.3.2',
'packages': ['simdna', 'simdna.resources', 'simdna.synthetic'],
'package_data': {'simdna.resources': ['... | Revert "Updating version now that docs are up-to-date" | Revert "Updating version now that docs are up-to-date"
This reverts commit 3f2ed8f7bfbed7162f4047cea534d83e52e714af.
| Python | mit | kundajelab/simdna,kundajelab/simdna | ---
+++
@@ -4,7 +4,7 @@
'include_package_data': True,
'description': 'Simulated datasets of DNA',
'download_url': 'https://github.com/kundajelab/simdna',
- 'version': '0.4.3.3',
+ 'version': '0.4.3.2',
'packages': ['simdna', 'simdna.resources', 'simdna.synthetic'],
'package_data': {'sim... |
293cad9d71c3cec7dacf486a4bb6da21e8d7df28 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='coverpy',
version='0.0.2dev',
packages=find_packages(),
install_requires=['requests'],
license='MIT License',
long_description=open('README.md').read(),
package_data = {
'': ['*.txt', '*.md'],
},
)
| from setuptools import setup, find_packages
setup(
name='coverpy',
version='0.8',
packages=find_packages(exclude=['scripts', 'tests']),
install_requires=['requests'],
license='MIT License',
author="fallenshell",
author_email='dev@mxio.us',
description="A wrapper for iTunes Search API",
long_description=open('... | Exclude tests and cmdline scripts | Exclude tests and cmdline scripts
| Python | mit | fallenshell/coverpy | ---
+++
@@ -2,12 +2,15 @@
setup(
name='coverpy',
- version='0.0.2dev',
- packages=find_packages(),
+ version='0.8',
+ packages=find_packages(exclude=['scripts', 'tests']),
install_requires=['requests'],
license='MIT License',
+ author="fallenshell",
+ author_email='dev@mxio.us',
+ description="A wrapper for ... |
73e3cee19d0330154f36157b762cd1a69e055b19 | setup.py | setup.py | from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='pycc',
version='0.0.1',
url='https://github.com/kevinconway/pycc',
license=license,
description='Python code optimizer..',
author='Ke... | from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='pycc',
version='0.0.1',
url='https://github.com/kevinconway/pycc',
license=license,
description='Python code optimizer..',
author='Ke... | Add package dependencies for printing and testing | Add package dependencies for printing and testing
Signed-off-by: Kevin Conway <3473c1f185ca03eadc40ad288d84425b54fd7d57@gmail.com>
| Python | apache-2.0 | kevinconway/pycc,kevinconway/pycc | ---
+++
@@ -18,8 +18,8 @@
long_description=readme,
classifiers=[],
packages=find_packages(exclude=['tests', 'build', 'dist', 'docs']),
- requires=['astkit'],
- entry_points = {
+ requires=['astkit', 'pytest'],
+ entry_points={
'console_scripts': [
'pycc-lint = pycc.cli... |
05650789f9ee950f6906a43806009a0fafb977a1 | setup.py | setup.py | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | Handle cases where nvidia-smi does not exist | Handle cases where nvidia-smi does not exist
| Python | apache-2.0 | theislab/dca,theislab/dca,theislab/dca | ---
+++
@@ -6,6 +6,8 @@
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProcessError:
+ tf = 'tensorflow'
+except FileNotFoundError:
tf = 'tensorflow'
|
1f391ca2ea88f3181b1c856012261db1327242ac | setup.py | setup.py | """\
Grip
----
Render local readme files before sending off to Github.
Grip is easy to set up
``````````````````````
::
$ pip install grip
$ cd myproject
$ grip
* Running on http://localhost:5000/
Links
`````
* `Website <http://github.com/joeyespo/grip/>`_
"""
from setuptools import setup, fin... | """\
Grip
----
Render local readme files before sending off to Github.
Grip is easy to set up
``````````````````````
::
$ pip install grip
$ cd myproject
$ grip
* Running on http://localhost:5000/
Links
`````
* `Website <http://github.com/joeyespo/grip/>`_
"""
from setuptools import setup, fin... | Add LINCENSE to included files. | Add LINCENSE to included files.
| Python | mit | ssundarraj/grip,jbarreras/grip,mgoddard-pivotal/grip,mgoddard-pivotal/grip,joeyespo/grip,ssundarraj/grip,joeyespo/grip,jbarreras/grip | ---
+++
@@ -37,7 +37,7 @@
long_description=__doc__,
platforms='any',
packages=find_packages(),
- package_data={package.__name__: ['static/*', 'templates/*']},
+ package_data={package.__name__: ['LICENSE', 'static/*', 'templates/*']},
entry_points={'console_scripts': ['grip = grip.command:mai... |
889a2349efa1b76fd92981210798dc3e2d38d711 | setup.py | setup.py | """
Setup script for the kvadratnet module.
"""
import os
import subprocess
from setuptools import setup
import kvadratnet
def readme():
"""
Return a properly formatted readme text, if possible, that can be used
as the long description for setuptools.setup.
"""
# This will fail if pandoc is not ... | """
Setup script for the kvadratnet module.
"""
from setuptools import setup
import kvadratnet
def readme():
"""
Return a properly formatted readme text, if possible, that can be used
as the long description for setuptools.setup.
"""
with open("readme.md") as readme_file:
descr = readme_f... | Use unaltered markdown readme for long_description | Use unaltered markdown readme for long_description
| Python | isc | kbevers/kvadratnet,kbevers/kvadratnet | ---
+++
@@ -1,9 +1,6 @@
"""
Setup script for the kvadratnet module.
"""
-
-import os
-import subprocess
from setuptools import setup
import kvadratnet
@@ -14,24 +11,9 @@
Return a properly formatted readme text, if possible, that can be used
as the long description for setuptools.setup.
"""
- ... |
e817716960e4e89798d976d0b04bf49408932f0b | setup.py | setup.py | from setuptools import setup, find_packages
__version__ = None
exec(open('tadtool/version.py').read())
setup(
name='tadtool',
version=__version__,
description='Assistant to find cutoffs in TAD calling algorithms.',
packages=find_packages(exclude=["test"]),
install_requires=[
'numpy>=1.9.0... | import os
from setuptools import setup, find_packages, Command
__version__ = None
exec(open('tadtool/version.py').read())
class CleanCommand(Command):
"""
Custom clean command to tidy up the project root.
"""
user_options = []
def initialize_options(self):
pass
def finalize_options(... | Add clean command and remove download tarball | Add clean command and remove download tarball
| Python | mit | vaquerizaslab/tadtool | ---
+++
@@ -1,8 +1,25 @@
-from setuptools import setup, find_packages
+import os
+from setuptools import setup, find_packages, Command
__version__ = None
exec(open('tadtool/version.py').read())
+
+class CleanCommand(Command):
+ """
+ Custom clean command to tidy up the project root.
+ """
+ user_opt... |
1a547646ee75841a016788aa64cf71c876a9dd8b | setup.py | setup.py | from setuptools import setup, find_packages
from djcelery_ses import __version__
setup(
name='django-celery-ses',
version=__version__,
description="django-celery-ses",
author='tzangms',
author_email='tzangms@streetvoice.com',
url='http://github.com/StreetVoice/django-celery-ses',
license='... | from setuptools import setup, find_packages
from djcelery_ses import __version__
setup(
name='django-celery-ses',
version=__version__,
description="django-celery-ses",
author='tzangms',
author_email='tzangms@streetvoice.com',
url='http://github.com/StreetVoice/django-celery-ses',
license='... | Set install_requires: django >= 1.3, < 1.9 | Set install_requires: django >= 1.3, < 1.9
| Python | mit | StreetVoice/django-celery-ses | ---
+++
@@ -15,7 +15,7 @@
include_package_data=True,
zip_safe=False,
install_requires = [
- "django >= 1.3",
+ "django >= 1.3, < 1.9",
"django-celery >= 3",
],
classifiers=[ |
9646c595068f9c996f05de51d7216cb0443a9809 | setup.py | setup.py | from distutils.core import setup
from dyn import __version__
with open('README.rst') as f:
readme = f.read()
with open('HISTORY.rst') as f:
history = f.read()
setup(
name='dyn',
version=__version__,
keywords=['dyn', 'api', 'dns', 'email', 'dyndns', 'dynemail'],
long_description='\n\n'.join([re... | from distutils.core import setup
from dyn import __version__
with open('README.rst') as f:
readme = f.read()
with open('HISTORY.rst') as f:
history = f.read()
setup(
name='dyn',
version=__version__,
keywords=['dyn', 'api', 'dns', 'email', 'dyndns', 'dynemail'],
long_description='\n\n'.join([re... | Fix for incorrect project url | Fix for incorrect project url
| Python | bsd-3-clause | Marchowes/dyn-python,dyninc/dyn-python,mjhennig/dyn-python | ---
+++
@@ -14,7 +14,7 @@
description='Dyn REST API wrapper',
author='Jonathan Nappi, Cole Tuininga',
author_email='jnappi@dyn.com',
- url='https://github.com/dyninc/Dynect-API-Python-Library',
+ url='https://github.com/moogar0880/dyn-python',
packages=['dyn', 'dyn/tm', 'dyn/mm', 'dyn/tm/ser... |
4ee7ebe82f7f17ae10c838073ffbb319e1fff24f | setup.py | setup.py | import os
from setuptools import setup
version = '0.9.2.dev0'
def read_file(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as fp:
return fp.read()
setup(name='django-ogmios',
version=version,
author="Fusionbox, Inc.",
author_email="programmers@fusionbox.com",
... | import os
from setuptools import setup
version = '0.9.2.dev0'
def read_file(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as fp:
return fp.read()
setup(name='django-ogmios',
version=version,
author="Fusionbox, Inc.",
author_email="programmers@fusionbox.com",
... | Add missing comma to requirements. | Add missing comma to requirements.
| Python | bsd-2-clause | fusionbox/django-ogmios,fusionbox/django-ogmios | ---
+++
@@ -30,7 +30,7 @@
'Topic :: Software Development :: Libraries'
],
install_requires=[
- 'Django>=1.7,<1.9'
+ 'Django>=1.7,<1.9',
'PyYAML',
'Markdown',
'html2text', |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.