commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
b4b3d133c53db0f182949d1e31b27c87818d3a0c
Create quiz_corrected.py
homelessrobot/IPND-Stage-2
quiz_corrected.py
quiz_corrected.py
#code for the project final quiz.code #I'll break it down into single pieces and work from there #0. Write three quizzes: easy, medium, hard and write blanks for each. # Easy quiz level and answers easy_level = '''The internet is basically a huge ___1___ of computers that can all communicate with each other. When a ...
bsd-2-clause
Python
d80388591e3a55969688957b7c1bbd9bcda40296
Create social_feedback_counter.py compatible with hatebu, fb_like & tweet
shiraco/social_feedback_counter
social_feedback_counter.py
social_feedback_counter.py
# coding:utf-8 import urllib import json class SocialFeadbackCounter(object): def __init__(self, url): self.url = url def hatebu(self): api_url = 'http://b.hatena.ne.jp/entry/json/' + self.url hb_json = json.loads(urllib.urlopen(api_url).read(), encoding='utf-8') if hb_json ...
mit
Python
1866bb1ad5f5c4338c2173327d620e92c2ba5043
Create basic PodSixNet server
thebillington/pygame_multiplayer_server
server.py
server.py
from PodSixNet.Channel import Channel from PodSixNet.Server import Server from time import sleep #Create the channel to deal with our incoming requests from the client #A new channel is created every time a client connects class ClientChannel(Channel): #Create a function that will respond to every request from t...
mit
Python
0cc0b16a6f29d31c3c2b3e2ad4eb313b010f7806
test addBuilds() method
red-hat-storage/errata-tool,mmuzila/errata-tool,ktdreyer/errata-tool,ktdreyer/errata-tool,red-hat-storage/errata-tool,mmuzila/errata-tool
errata_tool/tests/test_add_builds.py
errata_tool/tests/test_add_builds.py
import requests class TestAddBuilds(object): def test_add_builds_url(self, monkeypatch, mock_post, advisory): monkeypatch.setattr(requests, 'post', mock_post) advisory.addBuilds(['ceph-10.2.3-17.el7cp'], release='RHEL-7-CEPH-2') assert mock_post.response.url == 'https://errata.devel.redha...
mit
Python
fbbd6526612bbb450c5c4c1ecffd21e32f4c98c6
Add simple server
ThibWeb/jean-giono
server.py
server.py
import SimpleHTTPServer import SocketServer PORT = 8000 Handler = SimpleHTTPServer.SimpleHTTPRequestHandler httpd = SocketServer.TCPServer(('', PORT), Handler) print "serving at port", PORT httpd.serve_forever()
cc0-1.0
Python
5cfcd8fe88fc56bd5738c97152d37be1478560a9
Add server.py
icersong/twisted-connect-proxy,fmoo/twisted-connect-proxy
server.py
server.py
from twisted.web.proxy import Proxy, ProxyRequest from twisted.internet.protocol import Protocol, ClientFactory import urlparse from twisted.python import log class ConnectProxyRequest(ProxyRequest): """HTTP ProxyRequest handler (factory) that supports CONNECT""" connectedProtocol = None def process(sel...
bsd-3-clause
Python
9e6bae8aa92ed0332efd689b6f43063b0569ef0a
add 16.py
bm5w/pychal
16.py
16.py
"""Python challenge #16: http://www.pythonchallenge.com/pc/return/mozart.html""" import urllib2 from PIL import Image url = 'http://www.pythonchallenge.com/pc/return/mozart.gif' un = 'huge' pw = 'file' pink = (255, 0, 255) def main(): setup_auth_handler() img = urllib2.urlopen(url) im = Image.open(img) ...
mit
Python
af320490aaa59d69faed9357d9690d945272bec5
add empty file to test Slack integration
kvantos/intro_to_python_class
A2.py
A2.py
#!/usr/bin/env python3
bsd-2-clause
Python
944102f3d19b4086e7f7cb9c30e95a3d4b043601
Add python prototype
davesque/go.py
ho.py
ho.py
class Position(object): COLORS = { 'black': '@', 'white': 'O', 'empty': '+', } class PositionError(Exception): pass def __init__(self, color): if color not in self.COLORS: raise self.PositionError('Color must be one of the following: {0}'.format(self...
mit
Python
31a74f1b9b50036a9b1de603f3437516eaef7807
Create pb.py
NETponents/ParseBasic
pb.py
pb.py
print "ParseBasic interpreter v0.1" print "Copyright 2015 NETponents" print "Licensed under MIT license" print "Commercial use of this build is prohibited"
mit
Python
c4015ed868b65ce5c7ed660c84e252a950294642
Add basic functionality to query the (horrible) website.
kdungs/R1D2
r1.py
r1.py
from datetime import date import bs4 import itertools as it import re import requests def grouper(iterable, n, fillvalue=None): args = [iter(iterable)] * n return it.izip_longest(fillvalue=fillvalue, *args) def extract_name(bsitem): return bsitem.find('span').text def extract_price(bsitem): reg = ...
mit
Python
7dede788648d5569587214722a2a128f419a7b8a
Create v1.py
GTeninbaum/pizzapi.py
v1.py
v1.py
print "This is Pizza Pi R Squared. What's it do? It lets you determine whether buying a small pizza or a large pizza is a better value in terms of cost per bite of pizza." diameter_one = int(raw_input("What's the first pizza's diameter (in inches)?")) cost_one = int(raw_input("How much does the first pizza cost? (i...
mit
Python
a998bd2686ab924035325d7288131a7141a457bb
Apply orphaned migration
dbinetti/barberscore,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore-django,barberscore/barberscore-api
project/apps/api/migrations/0010_remove_chart_song.py
project/apps/api/migrations/0010_remove_chart_song.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0009_auto_20150722_1041'), ] operations = [ migrations.RemoveField( model_name='chart', name=...
bsd-2-clause
Python
fe668b882d3c27f8f7bf7f8cf6d338bf3216310e
add testing script in temp location
mozilla-releng/scriptworker,mozilla-releng/scriptworker,escapewindow/scriptworker,escapewindow/scriptworker
aki.py
aki.py
#!/usr/bin/env python # XXX this is a helpful script, but probably belongs in scriptworker/test/data from __future__ import print_function import aiohttp import asyncio from copy import deepcopy import json import logging import pprint import sys from scriptworker.constants import DEFAULT_CONFIG from scriptworker.cont...
mpl-2.0
Python
59b01485c70d42e32acb4c80efbe0e393ca8c437
Add aes.py
catroll/clipboard,catroll/clipboard,catroll/clipboard,catroll/clipboard
aes.py
aes.py
# -*- coding: utf-8 -*- import base64 from Crypto import Random from Crypto.Cipher import AES class AESCipher: def __init__(self, key): self.bs = 32 if len(key) >= 32: self.key = key[:32] else: self.key = self._pad(key) def encrypt(self, raw): raw = se...
mit
Python
68b8ad567545c7ec07f13089f2b3e4ecd4cc835e
Create api.py
repopreeth/trep
api.py
api.py
from flask import Flask from flask.ext.restful import reqparse, abort, Api, Resource from profile import Profile app = Flask(__name__) api = Api(app) def abort_if_user_doesnt_exist(user): if not isValid(user): abort(404, message="User {} doesn't exist".format(user)) # Argument validation parser = reqpa...
apache-2.0
Python
265bedb193f8615f99daa63c921b572408921605
Add tests for quick sort
nbeck90/data_structures_2
test_quick_sort.py
test_quick_sort.py
# -*- coding: utf-8 -*- from quick_sort import quick_sort def test_sorted(): my_list = list(range(100)) quick_sort(my_list) assert my_list == list(range(100)) def test_reverse(): my_list = list(range(100))[::-1] quick_sort(my_list) assert my_list == list(range(100)) def test_empty(): m...
mit
Python
017fa0b360c23696d3176f48e2c53accac8bcfc5
Add version module
SlightlyUnorthodox/PyCap,sburns/PyCap,dckc/PyCap,redcap-tools/PyCap,dckc/PyCap,tjrivera/PyCap
redcap/version.py
redcap/version.py
VERSION = '0.5.2'
mit
Python
426ef95ba1b2f3ac42c16a3594d186c4c9226a6e
add admin
byteweaver/django-referral,Chris7/django-referral
referral/admin.py
referral/admin.py
from django.contrib import admin from models import Campaign, Referrer class ReferrerInine(admin.TabularInline): model = Referrer extra = 0 class CampaignAdmin(admin.ModelAdmin): inlines = (ReferrerInine, ) class ReferrerAdmin(admin.ModelAdmin): list_display = ('name', 'campaign', 'creation_date') ...
mit
Python
e826c3e95b1a035484a5fa3ab05d5bc5e5a023bb
Add db_fsck.py which checks for some problems with the server and image store.
drougge/wellpapp-pyclient
db_fsck.py
db_fsck.py
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- from hashlib import md5 import Image from os.path import exists from os import stat, walk import re def usage(argv): print "Usage:", argv[0], "-opts" print "Where opts can be:" print "\t-t Check thumb existance" print "\t-T Check thumb integrity (decodeability an...
mit
Python
747800528b3709759738081ee580e380bf164c02
add skeletons of new unit tests to be added
dongsenfo/pymatgen,montoyjh/pymatgen,gVallverdu/pymatgen,gmatteo/pymatgen,richardtran415/pymatgen,montoyjh/pymatgen,gVallverdu/pymatgen,fraricci/pymatgen,fraricci/pymatgen,vorwerkc/pymatgen,richardtran415/pymatgen,tschaume/pymatgen,richardtran415/pymatgen,richardtran415/pymatgen,blondegeek/pymatgen,vorwerkc/pymatgen,do...
pymatgen/analysis/defects/tests/test_compatibility.py
pymatgen/analysis/defects/tests/test_compatibility.py
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals import unittest from pymatgen.util.testing import PymatgenTest class DefectCompatibilityTest(PymatgenTest): def test_process_entry(self): pass def t...
mit
Python
b68db14e5ecd2e8ccaaa0412798a8669232fb8e5
Add constraint variables in solver
mpardalos/CS-Internal
solver.py
solver.py
from collections import namedtuple from past import autotranslate # python-constraint is python2, so we'll use python-future's autotranslate function autotranslate(['constraint']) import constraint # periods is an int for how many periods per week are required for this subject subject = namedtuple("subject", ['name',...
mit
Python
a14d696cad5b3249997257298150977fa53f9cc8
Add lc151_reverse_words_in_a_string.py
bowen0701/algorithms_data_structures
lc151_reverse_words_in_a_string.py
lc151_reverse_words_in_a_string.py
"""Leetcode 151. Reverse Words in a String Medium Given an input string, reverse the string word by word. Example 1: Input: "the sky is blue" Output: "blue is sky the" Example 2: Input: " hello world! " Output: "world! hello" Explanation: Your reversed string should not contain leading or trailing spaces. Exampl...
bsd-2-clause
Python
b80d7927225f172653922317ef5c96e90876588d
Create SemiSupervisedTSNE.py
lmcinnes/sstsne
sstsne/SemiSupervisedTSNE.py
sstsne/SemiSupervisedTSNE.py
bsd-2-clause
Python
2fbcd2c5c47b4066e74619196dc333fa88a015d1
isolate pipe operator overload code
h2non/paco
tests/pipe_test.py
tests/pipe_test.py
# -*- coding: utf-8 -*- import asyncio import pytest import paco from paco.pipe import overload def test_pipe_operator_overload(): @asyncio.coroutine def filterer(x): return x < 8 @asyncio.coroutine def mapper(x): return x * 2 @asyncio.coroutine def drop(x): return x ...
mit
Python
fd6eea38f389a440f2c7d69e0de29677a64dbd2c
Add manual wifi table migration script.
mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,therewillbecode/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea
ichnaea/scripts/migrate.py
ichnaea/scripts/migrate.py
""" Manual migration script to move networks from old single wifi table to new sharded wifi table structure. """ from collections import defaultdict import sys import time from ichnaea.config import read_config from ichnaea.db import ( configure_db, db_worker_session, ) from ichnaea.models.wifi import ( Wi...
apache-2.0
Python
d4c7869d62635eca3108d743c2bc12c9f394d68a
Add archive.File class, which allows downloading from archive.org
brycedrennan/internetarchive,JesseWeinstein/internetarchive,dattasaurabh82/internetarchive,jjjake/internetarchive,wumpus/internetarchive
tests/test_item.py
tests/test_item.py
import os, sys inc_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, inc_path) import archive def test_item(): item = archive.Item('stairs') assert item.metadata['metadata']['identifier'] == 'stairs' def test_file(): item = archive.Item('stairs') filename = 'glogo...
agpl-3.0
Python
fa4b4de37b38f0ff800bbd2ac007ab6521720258
Add test for box migration script
ticklemepierce/osf.io,haoyuchen1992/osf.io,Nesiehr/osf.io,wearpants/osf.io,zachjanicki/osf.io,acshi/osf.io,chennan47/osf.io,ZobairAlijan/osf.io,cwisecarver/osf.io,njantrania/osf.io,TomHeatwole/osf.io,chrisseto/osf.io,felliott/osf.io,erinspace/osf.io,TomBaxter/osf.io,abought/osf.io,jnayak1/osf.io,rdhyee/osf.io,aaxelb/os...
scripts/tests/test_box_migrate_to_external_account.py
scripts/tests/test_box_migrate_to_external_account.py
from nose.tools import * from scripts.box.migrate_to_external_account import do_migration, get_targets from framework.auth import Auth from tests.base import OsfTestCase from tests.factories import ProjectFactory, UserFactory from website.addons.box.model import BoxUserSettings from website.addons.box.tests.factori...
apache-2.0
Python
7056f00934c0956bfe1a6aed7558cb3b9fd1de57
add ability to retrieve sorted profiler statistics
Aloomaio/tornado-profile,makearl/tornado-profile
tornado_profile.py
tornado_profile.py
"""Profile a Tornado application via REST.""" from operator import itemgetter import tornado.web import yappi __author__ = "Megan Kearl Patten <megkearl@gmail.com>" def start_profiling(): """Start profiler.""" # POST /profiler yappi.start(builtins=False, profile_threads=False) def is_profiler_running(...
"""Profile a Tornado application via REST.""" import tornado.web import yappi __author__ = "Megan Kearl Patten <megkearl@gmail.com>" def start_profiling(): """Start profiler.""" # POST /profiler yappi.start(builtins=False, profile_threads=False) def is_profiler_running(): """Return True if the prof...
mit
Python
97d62cd3cb08c8d43a804eb7989b03df3626f0ab
Create music.py
harryparkdotio/dabdabrevolution,harryparkdotio/dabdabrevolution,harryparkdotio/dabdabrevolution
music.py
music.py
from microbit import * import music import random while True: music.play(music.NYAN, loop=True, wait=False) if getValidDab(): music.play(music.POWER_UP) else: music.play(music.POWER_DOWN)
mit
Python
9c26b042c38963bf95cc6456b0f9082c1c0827f3
Add ttype API tests
jalr/privacyidea,XCage15/privacyidea,wheldom01/privacyidea,jh23453/privacyidea,jh23453/privacyidea,privacyidea/privacyidea,woddx/privacyidea,wheldom01/privacyidea,jh23453/privacyidea,XCage15/privacyidea,wheldom01/privacyidea,jalr/privacyidea,XCage15/privacyidea,jh23453/privacyidea,jh23453/privacyidea,privacyidea/privac...
tests/test_api_ttype.py
tests/test_api_ttype.py
from urllib import urlencode import json from .base import MyTestCase from privacyidea.lib.user import (User) from privacyidea.lib.tokens.totptoken import HotpTokenClass from privacyidea.models import (Token) from privacyidea.lib.config import (set_privacyidea_config, get_token_types, ...
agpl-3.0
Python
86cae13f7dde04f7031ae111e596f2d8c03d5420
Add tests of CSVFile and StdOut recorders
jstutters/Plumbium
tests/test_recorders.py
tests/test_recorders.py
import pytest from plumbium.processresult import record, pipeline, call from plumbium.recorders import CSVFile, StdOut from collections import OrderedDict @pytest.fixture def simple_pipeline(): @record() def recorded_function(): call(['echo', '6.35']) def a_pipeline(): recorded_function()...
mit
Python
c850cb4832e6273c8239eeb7d457d8e16bb472d6
Add graph factory
googleinterns/data-dependency-graph-analysis
graph_generation/graph_template.py
graph_generation/graph_template.py
""" This module implements factory for creating a graph. Current version supports proto and networkx graphs. """ from proto_graph import ProtoGraph from nx_graph import NxGraph class GraphTemplate: """ A class to get instance of a selected class for graph generation. ... Methods: get_proto_grap...
apache-2.0
Python
4bd9e4db4af430ae34ed87f695d72ae99ba5bb70
Set up first test level, started to create constraints
joeYeager/BlockDudeSolver
solver.py
solver.py
from constraint import * # Empty space is 0 # Brick is a 1 # Block is a 2 # West facing player - 3 # East facing player - 4 # Door - 5 level = [[1,1,1,1,1,1,1,1,1,1], [1,0,0,0,0,0,0,0,0,1], [1,0,0,0,0,0,0,0,0,1], [1,0,0,0,0,0,0,0,0,1], [1,0,0,0,0,0,0,0,0,1], [1,0,0,0,0,0,0,...
mit
Python
c92e0350527e7715b6b625c33a79c993aeae66fd
Add gui.py
dsdshcym/Y86-Pipe-Simulator,dsdshcym/Y86-Pipe-Simulator
gui.py
gui.py
#!/usr/bin/python import sys from PyQt5.QtWidgets import QMainWindow, QDesktopWidget, QApplication class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.init_UI() def init_UI(self): WINDOW_WIDTH = 800 WINDOW_HEIGHT = 800 self.resiz...
mit
Python
2fb5557aed14d047d1ae120f0ff91c0e355d779f
Add simple perf measuring tool
cemeyer/xkcd-skein-brute,cemeyer/xkcd-skein-brute,cemeyer/xkcd-skein-brute
ref.py
ref.py
#!/usr/bin/env python2 import sys import subprocess """ Usage: ./ref.py ./main -B 1000000 -t 3 -T 31 """ system = subprocess.check_output githash = system("git rev-parse HEAD", shell=True).strip() date = system("date -Ihours", shell=True).strip() filename = "reference.%s.%s" % (githash, date) benchargs = sys....
mit
Python
3bb3a1f1babab9e6516f635290baa4d4e9762b8d
add pressure box device
jminardi/mecode,alexvalentine/mecode,razeh/mecode,travisbusbee/mecode
mecode/devices/efd_pressure_box.py
mecode/devices/efd_pressure_box.py
import serial STX = '\x02' #Packet Start ETX = '\x03' #Packet End ACK = '\x06' #Acknowledge NAK = '\x15' #Not Acknowledge ENQ = '\x05' #Enquiry EOT = '\x04' #End Of Transmission class EFDPressureBox(object): def __init__(self, comport='COM4'): self.comport = comport self.connect() ...
mit
Python
7927fd0c13f14b348faa63c08683c6f80bdc7a0f
Create 5.3_nextsmallbig.py
HeyIamJames/CodingInterviewPractice,HeyIamJames/CodingInterviewPractice
5.3_nextsmallbig.py
5.3_nextsmallbig.py
""" given a positive integer, return the next smallest and largest number with the same number of 1s in the binary represenation """
mit
Python
c9e111804974f21dbe297855ab217e964526baa2
Add search_hints option.
gunan/tensorflow,renyi533/tensorflow,petewarden/tensorflow,jbedorf/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,jbedorf/tensorflow,theflofly/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow,ghchinoy/tensorflow,alsrgv/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflo...
tensorflow/tools/docs/generate2.py
tensorflow/tools/docs/generate2.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
apache-2.0
Python
1e82d6110bee6953b78ee357ed5e0b94710b1357
fix urls
aristotle-mdr/user-documentation,aristotle-mdr/user-documentation,aristotle-mdr/user-documentation
heroku/urls.py
heroku/urls.py
from django.conf.urls import include, url urlpatterns = [ url(r'^fafl', include('fafl.urls')), url(r'^', include('aristotle_cloud.urls')), url(r'^publish/', include('aristotle_mdr.contrib.self_publish.urls', app_name="aristotle_self_publish", namespace="aristotle_self_publish")), url(r'^', include('ari...
mit
Python
6f9ced48a8c423e505e21cfa9a0b0d05b4c86f5c
Add lava context processor.
Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server
lava_server/context_processors.py
lava_server/context_processors.py
# Copyright (C) 2010, 2011 Linaro Limited # # Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org> # # This file is part of LAVA Server. # # LAVA Server is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License version 3 # as published by the Free Software F...
agpl-3.0
Python
54f6b9e5d8769ba608fe0d3f14eda2746319d6d2
Add class DepthSerializerMixin
krescruz/depth-serializer-mixin
mixins.py
mixins.py
class DepthSerializerMixin(object): """Custom method 'get_serializer_class', set attribute 'depth' based on query parameter in the url""" def get_serializer_class(self): serializer_class = self.serializer_class query_params = self.request.QUERY_PARAMS depth = query_params.get('__depth', None) serializer_cla...
mit
Python
935375fdc785adbbf74c8f943d319988ef4240f5
Create execute.py
krishnasumanthm/Quora_Answer_Classifier
execute.py
execute.py
import extractor as ex from sklearn.svm import LinearSVC from sklearn import linear_model from sklearn.naive_bayes import MultinomialNB from sklearn.naive_bayes import GaussianNB from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn.neighbors import KNeighborsC...
mit
Python
2b9df0394285f601c80de2b6e7c5c39006caa3ed
add deployment script for OMS PDS, see ./doc/INSTALL.rst for more details on the deployment
patcon/openPDS,HumanDynamics/openPDS,patcon/openPDS,eschloss/FluFuture,HumanDynamics/openPDS,eschloss/FluFuture,HumanDynamics/openPDS,patcon/openPDS,eschloss/FluFuture
fabfile.py
fabfile.py
''' Install PDS ----------- details at oms-deploy! https://github.com/IDCubed/oms-deploy ''' from oms_fabric.webapp import Webapp PDS = Webapp() PDS.repo_url = 'https://github.com/IDCubed/OMS-PDS' PDS.repo_name = 'OMS-PDS' def deploy_project(instance='pds', branch='master', con...
mit
Python
1214755d5023331a432a2cea3224a6d117622393
Create odrive.py
finoradin/moma-utils,finoradin/moma-utils
odrive.py
odrive.py
#!/usr/bin/env python import glob import os import re ''' # tool for MoMA O drive migration # will create "artist level" folders and move object level folders inside Pseudo code 1. crawl folders 2 levels deep 2. for folder: if folder matches *---*---*---* pattern: a. if artist level folder already exists aa....
mit
Python
10bd939290f4a9195ff582addb17beed5ba08f67
Add some examples of situations the leak detector detects.
Nextdoor/nose-leak-detector
examples.py
examples.py
""" Some examples of what nose leak detector can detect. """ try: from unittest import mock except ImportError: from mock import mock new_global_mock = None def test_with_leaked_new_global_mock(): global new_global_mock new_global_mock = mock.Mock() called_global_mock = mock.Mock() def test_with...
bsd-2-clause
Python
cc6322683b0f98f666f0bef130fab4e7c45e07a6
Add auxiliary python file
cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl
la/oblas/data/auxiliary.py
la/oblas/data/auxiliary.py
# Copyright 2016 The Gosl Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. def vprint(name, v): l = '%s := []float64{' % name for i in range(len(v)): if i > 0: l += ',' l += '%23.15e' % v[i] l += '}' prin...
bsd-3-clause
Python
e39ffc74a2386d58d62e1302ea0b0f2e8550cf84
Create genetic algorithm engine: genetic.py
felipemaion/genetic-algorithms
genetic.py
genetic.py
import random import statistics import sys import time def _generate_parent(length, geneSet, get_fitness): genes = [] while len(genes) < length: sampleSize = min(length - len(genes), len(geneSet)) genes.extend(random.sample(geneSet, sampleSize)) genes = ''.join(genes) fitness = get_fi...
mit
Python
8588624502c88b89426619640acee0077332906d
Create getImgs.py
xiepeiliang/WebCrawler
getImgs.py
getImgs.py
#在猫扑网上爬取一些好看的~图片 #-*-coding:utf-8-*- import urllib2, re, urllib from bs4 import BeautifulSoup def getHtml(url): header = {'User-Agent':'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0'} request = urllib2.Request(url, headers=header) response = urllib2.urlopen(request) html ...
mit
Python
a6eab0de0a7b681d13462528edd0fec212452341
Create pset1.py
gaurav61/MIT6.00x
pset1.py
pset1.py
# PROBLEM 1 : Counting Vowels count=0 for char in s: if char=='a' or char=='e' or char=='i' or char=='o' or char=='u': count+=1 print count # PROBLEM 2 : Counting Bobs count=0 for i in range(0,len(s)-2): if s[i]=='b' and s[i+1]=='o' and s[i+2]=='b': count+=1 print count # PROBLEM 3 : Count...
mit
Python
7107149104424959f989b9bfaef48dd09391d7cc
Add lc0819_most_common_word.py
bowen0701/algorithms_data_structures
lc0819_most_common_word.py
lc0819_most_common_word.py
"""Leetcode 819. Most Common Word Easy URL: https://leetcode.com/problems/most-common-word/ Given a paragraph and a list of banned words, return the most frequent word that is not in the list of banned words. It is guaranteed there is at least one word that isn't banned, and that the answer is unique. Words in the l...
bsd-2-clause
Python
034aaea2e8e56d24d709669f9992b0806b638621
create a new python file test_cut_milestone.py
WheatonCS/Lexos,WheatonCS/Lexos,WheatonCS/Lexos
test/unit_test/test_cut_milestone2.py
test/unit_test/test_cut_milestone2.py
from lexos.processors.prepare.cutter import cut_by_milestone class TestMileStone: def test_milestone_regular(self): text_content = "The bobcat slept all day.." milestone = "bobcat" assert cut_by_milestone(text_content, milestone) == ["The ", ...
mit
Python
6b9a0fe7181a3d80a4a88d32e895dda51923a96b
fix bug 984562 - track b2g 1.3 builds
linearregression/socorro,adngdb/socorro,pcabido/socorro,yglazko/socorro,spthaolt/socorro,luser/socorro,Tchanders/socorro,AdrianGaudebert/socorro,bsmedberg/socorro,mozilla/socorro,AdrianGaudebert/socorro,KaiRo-at/socorro,Tchanders/socorro,twobraids/socorro,twobraids/socorro,spthaolt/socorro,pcabido/socorro,adngdb/socorr...
alembic/versions/224f0fda6ecb_bug_984562-track-b2g-1_3.py
alembic/versions/224f0fda6ecb_bug_984562-track-b2g-1_3.py
"""bug 984562 - track b2g 1.3 Revision ID: 224f0fda6ecb Revises: 4c279bec76d8 Create Date: 2014-03-28 10:54:59.521434 """ # revision identifiers, used by Alembic. revision = '224f0fda6ecb' down_revision = '4c279bec76d8' from alembic import op from socorro.lib import citexttype, jsontype, buildtype from socorro.lib....
mpl-2.0
Python
e0786c5798b35b911193de1b4e3694b7ad8cad76
Add unit test for generate_admin_metadata helper function
JIC-CSB/dtoolcore
tests/test_generate_admin_metadata.py
tests/test_generate_admin_metadata.py
"""Test the generate_admin_metadata helper function.""" def test_generate_admin_metadata(): import dtoolcore from dtoolcore import generate_admin_metadata admin_metadata = generate_admin_metadata("ds-name", "creator-name") assert len(admin_metadata["uuid"]) == 36 assert admin_metadata["dtoolcore_ve...
mit
Python
1db200b51d05e799b1016cdf1ed04726a3377635
Add basic structure of rules.
sievetech/rgc
rules.py
rules.py
# -*- coding: utf-8 -*- class RuleDoesNotExistError(Exception): def __init__(self, rulename): self.value = rulename def __str__(self): return 'rule "{0}" is not implemented'.format(self.value) def __unicode__(self): return str(self).decode('utf-8') class RuleSet(object)...
bsd-3-clause
Python
724dc6ff77e9494e9519cb507cf43644034d5ca6
Integrate switch 10 and introduce couplings.
wglas85/pytrain,wglas85/pytrain,wglas85/pytrain,wglas85/pytrain
run_2.py
run_2.py
#!/usr/bin/python3 # # start pytrain # import os import sys MYDIR = os.path.dirname(sys.argv[0]) os.system(MYDIR+"/run.sh") if len(sys.argv)==1: sys.argv.append("10.0.0.6") os.system("chromium http://%s:8000/index.html"%(sys.argv[1]))
apache-2.0
Python
73cb99538aa48e43cfc3b2833ecf0ececee1dc42
Add timers example
asvetlov/europython2015,hguemar/europython2015,ifosch/europython2015
timers.py
timers.py
import asyncio @asyncio.coroutine def coro(loop): yield from asyncio.sleep(0.5, loop=loop) print("Called coro") loop = asyncio.get_event_loop() def cb(arg): print("Called", arg) loop.create_task(coro(loop)) loop.call_soon(cb, 1) loop.call_later(0.4, cb, 2) loop.call_at(loop.time() + 0.6, cb, 3) loop...
apache-2.0
Python
17af81742f5bf6473155837c655506f4509a4273
Add buildlet/__init__.py
tkf/buildlet
buildlet/__init__.py
buildlet/__init__.py
# [[[cog import cog; cog.outl('"""\n%s\n"""' % file('../README.rst').read())]]] """ Buildlet - build tool like functionality as a Python module =========================================================== """ # [[[end]]] __author__ = "Takafumi Arakaki" __version__ = "0.0.1.dev0" __license__ = 'BSD License'
bsd-3-clause
Python
1ed0bc1eb37b42845f42659ae00ccfbe444b0bfe
add first game
Devoxx4KidsDE/workshop-minecraft-modding-raspberry-pi,Devoxx4KidsDE/workshop-minecraft-modding-raspberry-pi
game-timeout.py
game-timeout.py
# -*- coding: utf-8 -*- from mcpi import minecraft, block import time def buildGame(mc, y): mc.postToChat("Begin") mc.setting("world_immutable", True) putDestination(mc, -5,y-1,5) putPoint(mc, -5, y, 5) putPoint(mc, -5, y, -5) putPoint(mc, 5, y, 5) putPoint(mc, 5, y, -5) def putPoint(...
mit
Python
9c939cca65e3fbf0318e34f94021f3fa7ddb4f2d
add setup script for downloading dependencies
DucAnhPhi/LinguisticAnalysis
setup.py
setup.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Aug 30 16:09:27 2017 Setup script for downloading all dependencies @author: duc """ import pip import nltk dependencies = [ 'certifi==2017.7.27.1', 'chardet==3.0.4', 'cycler==0.10.0', 'idna==2.6', 'matplotlib==2.0.2', 'nltk==...
mit
Python
4f024a5da95d7a55e055fcde89981cefcc48a9b4
Add setup script
django-blog-zinnia/zinnia-spam-checker-mollom
setup.py
setup.py
"""Setup script of zinnia-spam-checker-mollom""" from setuptools import setup from setuptools import find_packages setup( name='zinnia-spam-checker-akismet', version='1.0.dev', description='Anti-spam protections for django-blog-zinnia with Mollom', long_description=open('README.rst').read(), keywo...
bsd-3-clause
Python
6c4bbb599900644055c200cfdd3a6fd2cd02a295
add setup
MinnSoe/orcid
setup.py
setup.py
from setuptools import setup, Command class PyTest(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): import sys,subprocess errno = subprocess.call([sys.executable, 'runtests.py']) raise SystemExit(er...
bsd-2-clause
Python
9d406dc943a3a135ad8386255bd312b0412e9fe6
Add files via upload
QuinDiesel/CommitSudoku-Project-Game
Definitief/timer.py
Definitief/timer.py
import pygame screen = pygame.display.set_mode((800, 600)) clock = pygame.time.Clock() counter, text = 10, '10'.rjust(3) pygame.time.set_timer(pygame.USEREVENT, 1000) font = pygame.font.SysFont('timer', 30) event = pygame.USEREVENT while True: for e in pygame.event.get(): if e.type == pygame.even...
mit
Python
61b007c4e79edd98f076ed2873d4cdca601b6202
Add setup.py
lamenezes/simple-model
setup.py
setup.py
# Copyright (c) 2017 Luiz Menezes # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distri...
mit
Python
83fd46732d473132cf51f551608689e2ac4fc4c9
Add poodle main file
mpgn/poodle-PoC,mpgn/poodle-exploit,mpgn/poodle-PoC
poodle.py
poodle.py
import http.server import http.client import socketserver import ssl import argparse import socket import sys import threading sys.path.append('tests/') from testClient import open_ssl from pprint import pprint CRLF = "\r\n\r\n" class MyTCPHandler(socketserver.BaseRequestHandler): """ The RequestHandler class...
mit
Python
063bf860b8a6b043e982d9db0f6c5cb524590752
Create gate-puzzles.py
Pouf/CodingCompetition,Pouf/CodingCompetition
CiO/gate-puzzles.py
CiO/gate-puzzles.py
from string import punctuation def find_word(message): msg = ''.join(l for l in message.lower() if not l in punctuation).split() lMessage = len(msg) scores = msg[:] for i, word in enumerate(msg): lWord = len(word) likeness = 0 for each in msg: likeness += word[0] ==...
mit
Python
7e5e310f0a4bd4aa3fa4313624136f52146c9bbd
add setup.py
byteweaver/django-tickets,byteweaver/django-tickets,Christophe31/django-tickets,Christophe31/django-tickets
setup.py
setup.py
import os from setuptools import setup, find_packages import tickets def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-tickets', version=tickets.__version__, description='Reusable django application providing a generic support ticket system', ...
bsd-3-clause
Python
6953c04104eb4cc3eb908026f2420e3978371616
Move working view.cwl script to doc folder
curoverse/l7g,curoverse/l7g,curoverse/l7g,curoverse/l7g,curoverse/l7g,curoverse/l7g,curoverse/l7g
doc/viewcwl-json.py
doc/viewcwl-json.py
#!/usr/bin/env python import fnmatch import requests import time import os import glob # You can alternatively define these in travis.yml as env vars or arguments BASE_URL = 'https://view.commonwl.org/workflows' #get the cwl in l7g/cwl-version matches = [] for root, dirnames, filenames in os.walk('cwl-version'): ...
agpl-3.0
Python
c43a2af36172faca15d24c858fdb27c88ba6e76a
Add the main setup config file
vu3jej/scrapy-corenlp
setup.py
setup.py
from setuptools import setup setup( name='scrapy-corenlp', version='0.1', description='Scrapy spider middleware :: Stanford CoreNLP Named Entity Recognition', url='https://github.com/vu3jej/scrapy-corenlp', author='Jithesh E J', author_email='mail@jithesh.net', license='BSD', packages=...
bsd-2-clause
Python
d177935aab000e0c909f85a6162d64438f009301
add setup script
kwarunek/file2py,kAlmAcetA/file2py
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup setup( name="file2py", packages=['file2py'], version="0.2.0", author="Krzysztof Warunek", author_email="kalmaceta@gmail.com", description="Allows to include/manage binary files ...
mit
Python
df00bcd0fbf94b35162e02a2776ee7d089a4193c
update version string
ContinuumIO/pycosat,sandervandorsten/pycosat,sandervandorsten/pycosat,ContinuumIO/pycosat
setup.py
setup.py
import sys from distutils.core import setup, Extension version = '0.6.0.dev' ext_kwds = dict( name = "pycosat", sources = ["pycosat.c"], define_macros = [] ) if sys.platform != 'win32': ext_kwds['define_macros'].append(('PYCOSAT_VERSION', '"%s"' % version)) if '--inplace' in sys.argv: ext_kwds['...
import sys from distutils.core import setup, Extension version = '0.6.0' ext_kwds = dict( name = "pycosat", sources = ["pycosat.c"], define_macros = [] ) if sys.platform != 'win32': ext_kwds['define_macros'].append(('PYCOSAT_VERSION', '"%s"' % version)) if '--inplace' in sys.argv: ext_kwds['defi...
mit
Python
39fd3d75dd6dc60fb2f4fdc1cf5cf4096eade93d
Create setup.py
allanliebold/data-structures,allanliebold/data-structures
setup.py
setup.py
""".""" from setuptools import setup setup( name="data-structures", description="Implementations of various data structures in Python", version=0.1, author="Matt Favoino, Allan Liebold", licence="MIT", py_modules=['linked-list'], package_dir={'': 'src'}, install_requires=[], extras_...
mit
Python
91a851dd6516bcdd451ba187c72fe2d3eef6a3ce
make fileoperate module
helloTC/ATT,BNUCNL/ATT
utilfunc/fileoperate.py
utilfunc/fileoperate.py
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode:nil -*- # vi: set ft=python sts=4 sw=4 et: import os import shutil verbose = True class DeleteFile(object): """ Delete file/directory -------------------------------- Parameters: path: path for deleting >>> m = DeleteFile()...
mit
Python
4f6900033dc8bbba5f85369565ce17aa850c230c
Add an egg-ified setup
emgee/formal,emgee/formal,emgee/formal
setup.py
setup.py
try: from setuptools import setup except: from distutils.core import setup import forms setup( name='forms', version=forms.version, description='HTML forms framework for Nevow', author='Matt Goodall', author_email='matt@pollenation.net', packages=['forms', 'forms.test'], )
mit
Python
5e153bf16e25f3ab5039531be61c3d7ee09137bb
add test (#35568)
luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_tile.py
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_tile.py
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # 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 ap...
apache-2.0
Python
aee2363f6c6995a124b3c0ad358e83dc815ea808
Remove redundant subscription fields from user model.
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
alembic/versions/3fc4c97dc6bd_remove_redundant_user_subscription_.py
alembic/versions/3fc4c97dc6bd_remove_redundant_user_subscription_.py
"""remove redundant user subscription fields Revision ID: 3fc4c97dc6bd Revises: 3d723944025f Create Date: 2015-01-27 18:11:15.822193 """ # revision identifiers, used by Alembic. revision = '3fc4c97dc6bd' down_revision = '3d723944025f' branch_labels = None depends_on = None from alembic import op import sqlalchemy a...
apache-2.0
Python
a3e70bdd8146d4e70dc8f34396f7c537dbd4784c
add setup.py
comynli/m
setup.py
setup.py
from distutils.core import setup setup(name='m', version='0.1.0', packages=['m', 'm.security'], install_requires=['WebOb>=1.6.1'], author = "comyn", author_email = "me@xueming.li", description = "This is a very light web framework", license = "Apache License 2.0", )
apache-2.0
Python
76d2386bfa9e61ac17bca396384772ae70fb4563
Add one liner to add ability to print a normal distribution with mean zero and varience one
ianorlin/pyrandtoys
gauss.py
gauss.py
#!/usr/bin/env python3 #Copyright 2015 BRendan Perrine import random random.seed() print (random.gauss(0,1), "Is a normal distribution with mean zero and standard deviation and varience of one")
mit
Python
5653330769630c8f4f8ed88753b3886d063f9e3d
Add web example
TonyPythoneer/seria-bot-py
web.py
web.py
# -*- coding: utf-8 -*- import asyncio import os from flask import Flask flask_app = Flask(__name__) @flask_app.route('/') def hello(): return 'Hello World!' async def main(): port = int(os.environ.get('PORT', 5000)) future_tasks = [ asyncio.ensure_future(flask_app.run(host='0.0.0.0', port=por...
apache-2.0
Python
4a89b6e085f363a6e848a13e857872165a781d61
add a base setup.py
armstrong/armstrong.apps.content,armstrong/armstrong.apps.content
setup.py
setup.py
from distutils.core import setup import os # Borrowed and modified from django-registration # Compile the list of packages available, because distutils doesn't have # an easy way to do this. packages, data_files = [], [] root_dir = os.path.dirname(__file__) if root_dir: os.chdir(root_dir) def build_package(dirpat...
apache-2.0
Python
9fb6d0ea74aacc77f06d36805760270854e53eba
Add missing django_libs test requirement
claudep/django-calendarium,claudep/django-calendarium,bitmazk/django-calendarium,bitmazk/django-calendarium,claudep/django-calendarium,bitmazk/django-calendarium,claudep/django-calendarium
setup.py
setup.py
import os from setuptools import setup, find_packages import calendarium def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except IOError: return '' setup( name="django-calendarium", version=calendarium.__version__, description=read('DESCRIP...
import os from setuptools import setup, find_packages import calendarium def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except IOError: return '' setup( name="django-calendarium", version=calendarium.__version__, description=read('DESCRIP...
mit
Python
ff000972d386b001d75cb36b161acd59a1626917
Correct Path to PyPi Readme
rjschwei/azure-sdk-for-python,leihu0724/azure-sdk-for-python,huguesv/azure-sdk-for-python,oaastest/azure-sdk-for-python,Azure/azure-sdk-for-python,aarsan/azure-sdk-for-python,Azure/azure-sdk-for-python,bonethrown/azure-sdk-for-python,mariotristan/azure-sdk-for-python,AutorestCI/azure-sdk-for-python,aarsan/azure-sdk-for...
setup.py
setup.py
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # 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...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # 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...
mit
Python
e611dda17f64b0d1355fbe85589b2c790db40158
Create hello.py
MehtaShivam/cs3240-labdemo
hello.py
hello.py
def main(): print("hello") if __name__=='__main__': main()
mit
Python
bd0f6328bcb0aeae69568fab203f97e155fe406f
add the lexicon preprocess script demo
huajianjiu/Bernoulli-CBOFP,huajianjiu/Bernoulli-CBOFP,huajianjiu/Bernoulli-CBOFP,huajianjiu/Bernoulli-CBOFP
PPDB.py
PPDB.py
import numpy as np import os.path import cPickle as pickle import sys class PPDB_2(object): def __init__(self, vocab="vocab.txt", ppdb="ppdb-2.0-tldr", output="ppdb2.txt"): self.vocab = vocab self.ppdb_paraphrases = ppdb_paraphrases = {} self.word_hash = {} self.output = output ...
apache-2.0
Python
23ccab0a6d4107de250fb5e609538bb86a3aef24
add main script runner
osxi/selenium-drupal-demo
runner.py
runner.py
import json import urllib2 from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC drupal_site = "http://url.toyourdrupalsite.com" data_path = "/api/v1/resource" # ...
mit
Python
4e503a060023da75153438d73902d19a07e90be3
Add the source file
cromod/PyBF
PyBF.py
PyBF.py
# -*- coding: utf-8 -*- import sys array = [0] # array of bytes ptr = 0 # data pointer def readNoLoop(char): global ptr # Increment/Decrement the byte at the data pointer if char=='+': array[ptr] += 1 elif char=='-': array[ptr] -= 1 if array[ptr] < 0: raise ValueError("Negative value in arr...
mit
Python
7d3a1eb991e6678e8227ea7778688a0458ad5843
Add package distribution files
mvy/google_code_jam_framework
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='GCJCore', version='1.0', description='AppState reader for python scripts', author='Yves Stadler', author_email='yves.stadler@gmail.com', url='', packages=['gcjcore'], )
mit
Python
5d5806ed7b490ab79a882e8b3f966d5309db648b
Create setup.py
david-shu/lxml-mate
setup.py
setup.py
import sys try: from setuptools import setup except ImportError: if sys.version_info > (3,): raise RuntimeError("python3 support requires setuptools") from distutils.core import setup info = {} src = open("lxmlmate.py") lines = [] for ln in src: lines.append(ln) if "__version__" in ln: ...
mit
Python
addc7e79920afbef5a936b0df536bb8d5f71af99
Add a setup script.
mit-athena/python-discuss
setup.py
setup.py
#!/usr/bin/python from distutils.core import setup setup(name='discuss', version='1.0', description='Python client for Project Athena forum system', author='Victor Vasiliev', packages=['discuss'] )
mit
Python
06eea20e9db69879bec2657e73c95d452774acf9
Create blynk_ctrl.py
okhiroyuki/blynk-library,csicar/blynk-library,CedricFinance/blynk-library,csicar/blynk-library,blynkkk/blynk-library,flashvnn/blynk-library,CedricFinance/blynk-library,al1271/blynk-library,al1271/blynk-library,flashvnn/blynk-library,flashvnn/blynk-library,al1271/blynk-library,johan--/blynk-library,ivankravets/blynk-lib...
scripts/blynk_ctrl.py
scripts/blynk_ctrl.py
#!/usr/bin/env python ''' This script uses Bridge feature to control another device from the command line. Examples: python blynk_ctrl.py --token=b168ccc8c8734fad98323247afbc1113 write D0 1 python blynk_ctrl.py --token=b168ccc8c8734fad98323247afbc1113 write A0 123 python blynk_ctrl.py --token=b168ccc8c8734f...
mit
Python
3edc58673e21c7bbbfa5db07d7c6a92c76470dfc
add setup script
yamahigashi/sphinx-git-lowdown
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup setup( name='sphinx-git-lowdown', version='0.0.1', url='https://github.com/yamahigashi/sphinx-git-lowdown', # download_url='http://pypi.python.org/pypi/sphinx-git-lowdown', license='Apache', author='yamahigashi', author_email='yamahigas...
apache-2.0
Python
0741cd665592dc18a7880622fad83aec92093907
add setup.py
PRIArobotics/STM32Flasher,PRIArobotics/STM32Flasher
setup.py
setup.py
from setuptools import setup, find_packages import hedgehog_light setup( name="stm32flasher", description="STM32 USART Flasher", version=hedgehog_light.__version__, license="AGPLv3", url="https://github.com/PRIArobotics/STM32Flasher", author="Clemens Koza", author_email="koza@pria.at", ...
agpl-3.0
Python
845660721ddcbefa4b52fe4a5f3fd3bba75c10bc
Add setup.py
stivalet/C-Sharp-Vuln-test-suite-gen,stivalet/C-Sharp-Vuln-test-suite-gen
setup.py
setup.py
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): """Utility function to read the REA...
mit
Python
d98c66ee6a0e27485980fd336ef2ee7a2f08462c
Add setup.py for Read the Docs
coffeestats/coffeestats-django,coffeestats/coffeestats-django,coffeestats/coffeestats-django,coffeestats/coffeestats-django
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='coffeestats', version='0.2.1', description='Coffeestats.org', author='Jan Dittberner', author_email='jan@dittberner.info', url='https://github.com/coffeestats/coffeestats-django', package_dir = {'': 'coffeestats'}, ...
mit
Python
2c11575e5414cca19698cc500844e7553dcc9aa8
Add setup.py
bremac/s3viewport
setup.py
setup.py
from distutils.core import setup setup(name='s3viewport', version='20120930', description='A FUSE filesystem for viewing S3 buckets', author='Brendan MacDonell', author_email='brendan@macdonell.net', url='https://github.com/bremac/s3viewport', packages=['s3viewport'], package...
isc
Python
02f984f7efe9481dbaa2517cfc11ec826421925f
update the version of jinja needed, 2.6 is out
getpelican/pelican,eevee/pelican,lazycoder-ru/pelican,jo-tham/pelican,kennethlyn/pelican,janaurka/git-debug-presentiation,HyperGroups/pelican,ionelmc/pelican,abrahamvarricatt/pelican,0xMF/pelican,ls2uper/pelican,deved69/pelican-1,kernc/pelican,Rogdham/pelican,karlcow/pelican,iKevinY/pelican,lazycoder-ru/pelican,arty-na...
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup requires = ['feedgenerator', 'jinja2 >= 2.6', 'pygments', 'docutils', 'pytz', 'blinker', 'unidecode'] try: import argparse # NOQA except ImportError: requires.append('argparse') entry_points = { 'console_scripts': [ 'pelican = pelica...
#!/usr/bin/env python from setuptools import setup requires = ['feedgenerator', 'jinja2 >= 2.4', 'pygments', 'docutils', 'pytz', 'blinker', 'unidecode'] try: import argparse # NOQA except ImportError: requires.append('argparse') entry_points = { 'console_scripts': [ 'pelican = pelica...
agpl-3.0
Python
2e2ae8f42c46a09224fdd4d39ab317f23c96d465
Create setup.py
Colin-b/pyconfigparser
setup.py
setup.py
import os from setuptools import setup, find_packages this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, 'README.md'), 'r') as f: long_description = f.read() setup(name='boa', version='0.1', author='Bounouar Colin', maintainer='Bounouar Colin', url='http...
mit
Python
67c508d132f1ec40768a7488bc1e08e62d2208fe
Add DatabaselessTestRunner class
ZeroCater/zc_common,ZeroCater/zc_common
zc_common/databaseless_test_runner.py
zc_common/databaseless_test_runner.py
from django.test.runner import DiscoverRunner class DatabaselessTestRunner(DiscoverRunner): """A test suite runner that does not set up and tear down a database.""" def setup_databases(self): """Overrides DjangoTestSuiteRunner""" pass def teardown_databases(self, *args): """Overr...
mit
Python
15112cbf19478ff966e2946977b25a2cb0042cb6
Add D2 PvE stats model
jgayfer/spirit
cogs/models/pve_stats.py
cogs/models/pve_stats.py
class PvEStats: """This class represents the general PvE stats for a Destiny 2 character (or set of characters) Args: pve_stats: The 'response' portion of the JSON returned from the D2 'GetHistoricalStats' endpoint with modes 7,4,16,17,18,46,47 (given as a dictionary). """ ...
mit
Python
28fd3e9305872593a9d8167afa11ce3190b43903
add uncollectible object sample code
baishancloud/pykit,baishancloud/pykit,sejust/pykit,sejust/pykit
profiling/snippet/uncollectible.py
profiling/snippet/uncollectible.py
from __future__ import print_function import gc ''' This snippet shows how to create a uncollectible object: It is an object in a cycle reference chain, in which there is an object with __del__ defined. The simpliest is an object that refers to itself and with a __del__ defined. ''' def dd(*mes): for m in mes: ...
mit
Python