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
7cd1c65b77eb474f67f1e194ceeb7bcde2d2bdb9
Create wsgi.py
KrishMunot/NGeO,KrishMunot/NGeO,KrishMunot/NGeO
NGeO/NGeO/wsgi.py
NGeO/NGeO/wsgi.py
""" WSGI config for NGeO project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "NGeO.settings") from django.core.wsgi im...
mit
Python
a7f1565efbdfa20d4d97d90a688b78da51533113
Add new package: ycsb (#17788)
LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,LLNL/spack,iulian787/spack
var/spack/repos/builtin/packages/ycsb/package.py
var/spack/repos/builtin/packages/ycsb/package.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Ycsb(Package): """Yahoo! Cloud Serving Benchmark.""" homepage = "https://research.yah...
lgpl-2.1
Python
b7baf1e53f24bb96a0b09e9305f5f1e562cf3547
Create analog_tester.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
home/moz4r/analog_tester.py
home/moz4r/analog_tester.py
arduino = Runtime.createAndStart("arduino","Arduino") arduino.setBoardNano() arduino.connect("COM6") arduino.setAref("DEFAULT") def publishPin(pins): for pin in range(0, len(pins)):print(pins[pin].value) arduino.addListener("publishPinArray","python","publishPin") #arduino.enablePin(pinAddress, rate) #analog pin ra...
apache-2.0
Python
17956f008eabcca80dbacdb20e92b819b87d0f57
Create homework-1-cryptanalysis.py
JohnDvorak/general-cryptanalysis
homework-1-cryptanalysis.py
homework-1-cryptanalysis.py
#! usr/bin/env python3 ORIGINAL_CIPHERTEXT = "\ NAGQNXIIZAGBGIIYXQOMQUGQUZAXTNGMYXQGTTASNISQO\ AMFGZAGEZVOOGUZAGIGMTAMQUTZYMXQGUMCMYZDECMLWS\ RVQYVIEASVQUTXLMQQSZTZMYZZAGDMOMXQSQMPVMYYESR\ WQSNIGUOGZAGEAMZGZSAVQZXLMQAMVIZAGDMQUVYOGZAG\ DQSDSYGQSDSYGLMQXGQUVYGZSBGMYZAGBYVQZSRZAGBSS\ WTZAMZIXGSVZSQZAGUGTWTMRVIIZAYGGTLSY...
mit
Python
5e6cfc84a4b34a292281ea466bf11facb680e72b
initialize radix sort file
miracode/data-structures
radix_sort.py
radix_sort.py
def radix_sort(array): """ Sorts an array of numbers using the least signficant digit radix algorithm. """ if __name__ == '__main__': print radix_sort.func_doc
mit
Python
3e54e311a747b1e032384c7a74a8ed9aeafe1e8d
Fix constructor for Bernoulli node
SalemAmeen/bayespy,fivejjs/bayespy,jluttine/bayespy,bayespy/bayespy
bayespy/inference/vmp/nodes/bernoulli.py
bayespy/inference/vmp/nodes/bernoulli.py
###################################################################### # Copyright (C) 2014 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ###################################################################### ####################...
###################################################################### # Copyright (C) 2014 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ###################################################################### ####################...
mit
Python
0a16a2002e1247ad87a877de6aa85bb0844dc9c4
tag tweaks
luetgendorf/Espruino,wilberforce/Espruino,wilberforce/Espruino,luetgendorf/Espruino,wilberforce/Espruino,lancernet/Espruino,wilberforce/Espruino,luetgendorf/Espruino,lancernet/Espruino,wilberforce/Espruino,lancernet/Espruino,luetgendorf/Espruino,lancernet/Espruino,lancernet/Espruino,luetgendorf/Espruino,luetgendorf/Esp...
boards/NRF51TAG.py
boards/NRF51TAG.py
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at h...
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at h...
mpl-2.0
Python
e96832e16a6e5746faeaf647c6cd681f1d2f9bca
Create break_fracmorse.py
jameslyons/python_cryptanalysis,jameslyons/python_cryptanalysis,jameslyons/python_cryptanalysis
break_fracmorse.py
break_fracmorse.py
# usage: python break_fracmorse.py 'CIPHERTEXTMESSAGE' # ideally you'll want 200 or so characters to reliably decrypt, shorter will often work but not as reliably. import random from ngram_score import ngram_score import re import sys from pycipher import FracMorse #ctext = FracMorse('PQRSTUVWXYZABCDEFGHIJKLMNO').enc...
mit
Python
decf4b1916a421fe996a31feb131b7ed9e4e3c36
Add a simple benchmark script
abhimanyuma/ml-with-py
numpy-benchmark-one.py
numpy-benchmark-one.py
import timeit normal_py_sec = timeit.timeit('sum (x*x for x in xrange(1000))',number = 10000) naive_np_sec = timeit.timeit('sum(na*na)',setup='import numpy as np; na=np.arange(1000)', number = 10000) good_np_sec = timeit.timeit('na.dot(na)',setup='import numpy as np; na=np.arange(1000)', number = 10000) print("Normal...
unlicense
Python
cb517a2cd1dea12fadf4f72147fecf0105cbd717
include missing Message
cocodelabs/api.palaverapp.com,cocodelabs/api.palaverapp.com
palaverapi/message.py
palaverapi/message.py
# Adapted from https://github.com/kylef/irctk/blob/master/irctk/message.py from typing import List, Optional class Message: @classmethod def parse(cls, string: str) -> 'Message': prefix = None parameters = [] if string.startswith('@'): _, string = string[1:].split(' ', 1)...
bsd-3-clause
Python
7aaf42a7b129ba5b9548db0b2a71a095246aeac9
Add Py3 compatibility support helpers
paramiko/paramiko,Automatic/paramiko,rcorrieri/paramiko,redixin/paramiko,thisch/paramiko,davidbistolas/paramiko,reaperhulk/paramiko,anadigi/paramiko,thusoy/paramiko,varunarya10/paramiko,mhdaimi/paramiko,mirrorcoder/paramiko,fvicente/paramiko,ameily/paramiko,esc/paramiko,zarr12steven/paramiko,torkil/paramiko,digitalquac...
paramiko/py3compat.py
paramiko/py3compat.py
import sys __all__ = ['PY3', 'string_types', 'integer_types', 'text_type', 'bytes_type', 'long', 'input', 'bytestring', 'byte_ord', 'byte_chr', 'byte_mask', 'b', 'u', 'StringIO', 'BytesIO', 'is_callable', 'MAXSIZE', 'next'] PY3 = sys.version_info[0] >= 3 if PY3: import collections import struct string_ty...
lgpl-2.1
Python
6db9688d7c078c8cf8d1b17305e89bb680a46e53
Create lc1001.py
FiveEye/ProblemSet,FiveEye/ProblemSet
LeetCode/lc1001.py
LeetCode/lc1001.py
xs = {} ys = {} fs = {} ss = {} grid = {} def checkdic(xs, x): if x not in xs: xs[x] = set() def checkempty(xs, x): if x not in xs: return 1 if len(xs[x]) == 0: return 1 return 0 def remove(x, y): if x not in grid: return if y not in grid[x]: return ...
mit
Python
b7762c1b8bc987ed1b72ba0db0dbf47894c2e931
add score
xiahei/Daily_scripts,x1ah/Daily_scripts,x1ah/Daily_scripts,xiahei/Daily_scripts,x1ah/Daily_scripts,xiahei/Daily_scripts,x1ah/Daily_scripts,x1ah/Daily_scripts
StuScore/Score.py
StuScore/Score.py
#!/usr/bin/env python # coding:utf-8 from bs4 import BeautifulSoup import requests import re import sys reload(sys) sys.setdefaultencoding('utf-8') def login(username, pswd='0'): ''' 模拟登录教务系统 :param username: :param pswd: :return: 登录状态 ''' login_url = 'http://219.242.68.33/Login.aspx' f...
mit
Python
98aee2af9aa3f7dcc75969f1ec3118c40539793e
Add clone of Haskell version
pilona/Utils,pilona/Utils,pilona/Utils
pandoc-include-code.py
pandoc-include-code.py
#! /usr/bin/env python3 from sys import stdout, stderr, exit import json def walktransform(tree): if isinstance(tree, list): return [walktransform(subtree) for subtree in tree] elif not isinstance(tree, dict): exit('Unsupported AST node', type(tree)) elif i...
isc
Python
70a6553d9323b3522e492c414b67e76111519368
Add file to create all files to school census.
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
scripts/data_download/school_census/create_all_files.py
scripts/data_download/school_census/create_all_files.py
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/school_census/create_files.py en/pt output_path\n" exit() logging.basicConfig(filename=os.path.abspath(os.path.join(sys.argv[2],str(...
mit
Python
91b58112f1c83048511fdab09f9aad58351eb991
add new package (#23573)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-pycocotools/package.py
var/spack/repos/builtin/packages/py-pycocotools/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPycocotools(PythonPackage): """Official APIs for the MS-COCO dataset.""" homepage =...
lgpl-2.1
Python
638ee09f0f2958a955fbad42368ffc6bb2a2688a
Add minimal REST API script based on flask
BioroboticsLab/deeppipeline,BioroboticsLab/bb_pipeline,BioroboticsLab/deeppipeline
pipeline/scripts/bb_pipeline_api.py
pipeline/scripts/bb_pipeline_api.py
#!/usr/bin/env python3 from tempfile import NamedTemporaryFile import json from threading import Lock import numpy as np from flask import Flask, request from scipy.misc import imread from pipeline import Pipeline from pipeline.objects import Image, Candidates, Saliencies, IDs from pipeline.pipeline import get_auto_c...
apache-2.0
Python
427caaa998ea03bf80a00aaf90833eb910cf909d
Add migration file
OpenSourcePolicyCenter/webapp-public,OpenSourcePolicyCenter/webapp-public,OpenSourcePolicyCenter/PolicyBrain,OpenSourcePolicyCenter/PolicyBrain,OpenSourcePolicyCenter/webapp-public,OpenSourcePolicyCenter/webapp-public,OpenSourcePolicyCenter/PolicyBrain,OpenSourcePolicyCenter/PolicyBrain
webapp/apps/taxbrain/migrations/0061_auto_20171220_1859.py
webapp/apps/taxbrain/migrations/0061_auto_20171220_1859.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import webapp.apps.taxbrain.models class Migration(migrations.Migration): dependencies = [ ('taxbrain', '0060_auto_20171219_2153'), ] operations = [ migrations.AddField( ...
mit
Python
80d75bad57c8be1b08fbb2129bb0511c633446e2
Create CertPaIT.py
yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti
plugins/feeds/public/CertPaIT.py
plugins/feeds/public/CertPaIT.py
import logging from datetime import datetime, timedelta from core.observables import Hash from core.feed import Feed from core.errors import ObservableValidationError class CertPaIt(Feed): default_values = { "frequency": timedelta(minutes=30), "name": "CertPaIT", "source" : "https://infose...
apache-2.0
Python
90a467a849bb05cd0922ca0808279bf009657150
Create reverse_words.py
mschruf/python
Google_Code_Jam/2010_Africa/Qualification_Round/B/reverse_words.py
Google_Code_Jam/2010_Africa/Qualification_Round/B/reverse_words.py
#!/usr/bin/python -tt """Solves problem B from Google Code Jam Qualification Round Africa 2010 (https://code.google.com/codejam/contest/351101/dashboard#s=p1) "Reverse Words" """ import sys def main(): """Reads problem data from stdin and prints answers to stdout. Args: None Returns: No...
cc0-1.0
Python
3155a8ab725c1b1535a99229f31008587ceb3e64
Add continuous finite test
econ-ark/HARK,econ-ark/HARK
HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py
HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py
# -*- coding: utf-8 -*- """ Created on Tue Jan 26 10:06:51 2021 @author: Mateo """ import unittest from copy import copy import numpy as np from HARK.ConsumptionSaving.ConsRiskyAssetModel import ( RiskyContribConsumerType, init_riskyContrib ) class test_(unittest.TestCase): def setUp(self): ...
apache-2.0
Python
0f6961c10def1f1343c6c31d117e5ca87cefd4b7
add openvas_vulns migration
asrozar/perception
alembic/versions/506c8e35ba7c_create_openvas_vuln_table.py
alembic/versions/506c8e35ba7c_create_openvas_vuln_table.py
"""create openvas_vuln table Revision ID: 506c8e35ba7c Revises: 13b7c3d4c802 Create Date: 2017-07-21 12:19:35.711173 """ from alembic import op import sqlalchemy as sa import datetime def _get_date(): return datetime.datetime.now() # revision identifiers, used by Alembic. revision = '506c8e35ba7c' down_revisio...
mit
Python
6ce0d934cfe8b9e93a833ff1d31915ffd14c643d
add new package (#25526)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-pydantic/package.py
var/spack/repos/builtin/packages/py-pydantic/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPydantic(PythonPackage): """Data validation and settings management using Python type hi...
lgpl-2.1
Python
f363864f7f6ad9da45cb3053816d500838821a27
add new package (#27093)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/r-posterior/package.py
var/spack/repos/builtin/packages/r-posterior/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RPosterior(RPackage): """Tools for Working with Posterior Distributions. Provides use...
lgpl-2.1
Python
1596d091183d89c703e67555e81f24722dc0d8a2
add import script for Chelmsford
DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_chelmsford.py
polling_stations/apps/data_collection/management/commands/import_chelmsford.py
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E07000070' addresses_name = 'Democracy_Club__04May2017 (1).tsv' stations_name = 'Democracy_Club__04May2017 (1).tsv' elections = ['local.essex.2017-05-04'] ...
bsd-3-clause
Python
94e83a48d3700cdc7c9bb6bd9a14860d2665c655
Add custom roster module
saltstack/salt-pkg-tests,saltstack/salt-pkg-tests,saltstack/salt-pkg-tests
_modules/roster.py
_modules/roster.py
# import python libraries import logging # import salt libraries import salt.utils.files import salt.utils.yaml log = logging.getLogger(__name__) def remove(roster, name): ''' remove an entry from the salt-ssh roster ''' with salt.utils.files.fopen(roster, 'r') as conf: roster_txt = conf.read...
apache-2.0
Python
8a043a2d3a9517c5eb84aea3e9916419f6136e23
Add tests for IndexAbstractor.
pySUMO/pysumo,pySUMO/pysumo
test/lib/indexabstractor.py
test/lib/indexabstractor.py
""" The PyUnit test framework for the indexabstractor. """ import unittest from lib import parser from lib.indexabstractor import * class indexTestCase(unittest.TestCase): def setUp(self): self.sumo = parser.Ontology('data/Merge.kif', name='SUMO') self.kif = parser.kifparse(self.sumo) sel...
bsd-2-clause
Python
859d1031bc61cd4466953cbc7a5e282abff35e50
Create database.py
deepak223098/Data_Science_Python
database.py
database.py
bsd-3-clause
Python
c8d57138240e87c802b84cf0b2b01efd01c80e41
Create solution.py
lilsweetcaligula/Online-Judges,lilsweetcaligula/Online-Judges,lilsweetcaligula/Online-Judges
hackerrank/algorithms/implementation/easy/angry_professor/py/solution.py
hackerrank/algorithms/implementation/easy/angry_professor/py/solution.py
#!/bin/python3 import sys def isClassCancelled(arrivalTimes, cancellationThreshold): count = 0 for arrivalTime in arrivalTimes: if arrivalTime <= 0: count += 1 return count < cancellationThreshold t = int(input()) for a0 in range(t): n, k = map(int, inpu...
mit
Python
02183bdcd1b3e4109568f5077a6074573bbd8bf9
Add send_unsent.py.
ProgVal/site-enseigner
send_unsent.py
send_unsent.py
#!/usr/bin/env python2 # -*- coding: utf8 -*- import smtplib import enseigner.model as model import enseigner.emails as emails mails = model.Mail.all_unsent() yesno = raw_input(u'Envoyer %d mails ? ' % len(mails)) if yesno != 'yes': exit(0) sender = emails.Sender() errors = [] for mail in mails: try: ...
mit
Python
eee8b3e96f7b0c9f24e7c43483bb6d74bd8a490a
add proto
mylokin/servy
servy/proto.py
servy/proto.py
import json class Response(object): @classmethod def encode(cls, content): return json.dumps(content) @classmethod def decode(cls, content): return json.loads(content) class Request(object): @classmethod def encode(cls, proc, args, kw): return json.dumps({ ...
mit
Python
6f8d2e724f4aafb6b8295b8b0a1f915d5f21fa38
fix script
EGP-CIG-REU/dealii,nicolacavallini/dealii,lue/dealii,ibkim11/dealii,sriharisundar/dealii,angelrca/dealii,spco/dealii,naliboff/dealii,gpitton/dealii,flow123d/dealii,YongYang86/dealii,flow123d/dealii,msteigemann/dealii,sriharisundar/dealii,adamkosik/dealii,sairajat/dealii,nicolacavallini/dealii,Arezou-gh/dealii,Arezou-gh...
tests/scripts/makereport.py
tests/scripts/makereport.py
# accepts 0,1, or 2 arguments. If a string starting with a number is handed in, it is assumed to be a subdirectory of the current directory to run on. If not specified, the newest build is used. Any other string is taken as the branch name for this test (or treated as mainline). Order of the arguments does not matter. ...
# accepts 0,1, or 2 arguments. If a string starting with a number is handed in, it is assumed to be a subdirectory of the current directory to run on. If not specified, the newest build is used. Any other string is taken as the branch name for this test (or treated as mainline). Order of the arguments does not matter. ...
lgpl-2.1
Python
339bb5cd325c7b9c08b8a43994f55bbe1756fbde
validate redirect
djaodjin/djaodjin-signup,smirolo/djaodjin-signup,smirolo/djaodjin-signup,djaodjin/djaodjin-signup,djaodjin/djaodjin-signup,smirolo/djaodjin-signup
signup/auth.py
signup/auth.py
# Copyright (c) 2014, Fortylines LLC # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions an...
bsd-2-clause
Python
c6e85e35a090c33bc1d6813dce959c8d47588ae8
send an email with current IP address
aldebaran1/skytraq
send_Email.py
send_Email.py
# -*- coding: utf-8 -*- """ Created on Fri Jun 16 12:14:51 2017 @author: smrak """ import requests import urllib3 from datetime import datetime def getIP(): """ Sebastijan Mrak: get & reteurn a public IP address """ http = urllib3.PoolManager() r = http.request('GET', 'http://ip.42.pl/raw'...
mit
Python
c13968125383581e67804e11bc430391d355145a
Create DataStreamasDisjointIntervals.py
Chasego/codirit,Chasego/codirit,cc13ny/algo,Chasego/codirit,Chasego/codi,Chasego/codirit,cc13ny/algo,Chasego/cod,Chasego/cod,Chasego/cod,Chasego/codi,cc13ny/algo,cc13ny/algo,Chasego/codi,Chasego/codi,Chasego/codirit,Chasego/cod,cc13ny/algo,Chasego/cod,Chasego/codi
leetcode/352-Data-Stream-as-Disjoint-Intervals/DataStreamasDisjointIntervals.py
leetcode/352-Data-Stream-as-Disjoint-Intervals/DataStreamasDisjointIntervals.py
# Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class SummaryRanges(object): def __init__(self): """ Initialize your data structure here. """ self.intervals = [] def addNum(sel...
mit
Python
435220dda7eb928d9d959594d7986136f17da973
Add actual url patter for #239
Sinar/popit_ng,Sinar/popit_ng
popit/urls/rooturls.py
popit/urls/rooturls.py
from django.conf.urls import url from popit.views import * urlpatterns = [ url(r'^(?P<language>\w{2})', api_root, name="api-root"), url(r'^$', api_root_all), ]
agpl-3.0
Python
f955620fb2cb12f14c38ad196d99ae12d5b9c1ff
add default openflow test settings
avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf
src/python/expedient/clearinghouse/defaultsettings/openflowtests.py
src/python/expedient/clearinghouse/defaultsettings/openflowtests.py
'''Contains default settings for the testing environment. Created on Aug 22, 2010 @author: jnaous ''' from os.path import join, dirname PYTHON_DIR = join(dirname(__file__), "../../..") OM_PROJECT_DIR = join(PYTHON_DIR, "openflow/optin_manager") CH_PROJECT_DIR = join(PYTHON_DIR, "expedient/clearinghouse") GCF_DIR = jo...
bsd-3-clause
Python
99f454b3fa62cffac922a7b3431e0024e6dfde3d
add data migration script
fedspendingtransparency/data-act-broker-backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend,fedspendingtransparency/data-act-broker-backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend
dataactcore/scripts/migrateDataBroker.py
dataactcore/scripts/migrateDataBroker.py
# migrate data using pg_dump and pg_restore # data copied from tables: # error_data: # error_metadata # file # job_tracker: # job # submission # job_dependency # user_manager; # users # email_token # validator: # appropriation # award_financial # award_financial_assistance # object_class_program_a...
cc0-1.0
Python
17bbd6d44ec7edd1a079b12a44c283a358b11b92
add import script for Teignbridge (closes #865)
DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_teignbridge.py
polling_stations/apps/data_collection/management/commands/import_teignbridge.py
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E07000045' addresses_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017.tsv' stations_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017.ts...
bsd-3-clause
Python
c750cbb65541ea32c2f8904c394469a14fa1e82b
add import script for West Dorset
DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_west_dorset.py
polling_stations/apps/data_collection/management/commands/import_west_dorset.py
from data_collection.management.commands import BaseXpressDCCsvInconsistentPostcodesImporter class Command(BaseXpressDCCsvInconsistentPostcodesImporter): council_id = 'E07000052' addresses_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017WDDC.TSV' stations_name = 'parl.2017-06-08/Version 1/Democ...
bsd-3-clause
Python
3e4ed4d6624ac0db7838e9aeb7a98710f746b2b8
Create solution.py
lilsweetcaligula/Online-Judges,lilsweetcaligula/Online-Judges,lilsweetcaligula/Online-Judges
hackerrank/algorithms/strings/easy/mars_exploration/py/solution.py
hackerrank/algorithms/strings/easy/mars_exploration/py/solution.py
#!/bin/python3 import sys def solution(signal): import itertools count = 0 for expected, received in zip(itertools.cycle('SOS'), signal): if expected != received: count += 1 return count signal = input().strip() count = solution(signal) print(count)
mit
Python
eb9eb8fd295d8dbba66267e7551f4e6a51687797
Set db starting point.
glogiotatidis/snippets-service,mozilla/snippets-service,mozmar/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,glogiotatidis/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service
snippets/base/migrations/0062_set_asrsnippet_id_autoincrement_starting_point.py
snippets/base/migrations/0062_set_asrsnippet_id_autoincrement_starting_point.py
# Generated by Django 2.1.3 on 2018-11-16 12:30 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0061_auto_20181116_0810'), ] operations = [ migrations.RunSQL(['ALTER TABLE base_asrsnippet AUTO_INCREMENT=10500;'], ['']) ]
mpl-2.0
Python
68e10dcb52f17aca1482112816062ea15e40097b
Create viruscheck.py
kieranjol/IFIscripts
viruscheck.py
viruscheck.py
#!/usr/bin/env python #Requires ClamAV to be installed import sys import subprocess def clamscan(): scan = subprocess.check_output([ 'clamscan', '-r', starting_dir ]) print scan starting_dir = sys.argv[1] print "Running scan.........." clamscan()
mit
Python
70e14187ecd2567894e5e8183341a63835d6839c
Create pldm related specific constants file.
openbmc/openbmc-test-automation,openbmc/openbmc-test-automation
data/pldm_variables.py
data/pldm_variables.py
#!/usr/bin/python r""" Contains PLDM-related constants. """ PLDM_TYPE_BASE = '00' PLDM_TYPE_PLATFORM = '02' PLDM_TYPE_BIOS = '03' PLDM_TYPE_OEM = '3F' PLDM_BASE_CMD = { 'GET_TID': '2', 'GET_PLDM_VERSION': '3', 'GET_PLDM_TYPES': '4', 'GET_PLDM_COMMANDS': '5'} PLDM_SUCCESS = '00' PLDM_ERROR = '01' PL...
apache-2.0
Python
8ff3b74df83055068b1f8abe05e8ce186ab6eb18
implement strStr with KMP. Kana我喜欢你啊!!!
sureleo/leetcode,sureleo/leetcode,lsingal/leetcode,lsingal/leetcode,lsingal/leetcode,sureleo/leetcode
python/string/ImplementstrStr.py
python/string/ImplementstrStr.py
#KMP algorithm. can't get it. Just a simple implementation of #0. https://www.youtube.com/watch?v=2ogqPWJSftE #and #1. http://www.cnblogs.com/zuoyuan/p/3698900.html class Solution: # @param haystack, a string # @param needle, a string # @return an integer def strStr(self, haystack, needle): n = ...
mit
Python
8b42b0825d5cbb6becef9669b43a2c8229ea8642
Add script to remove unpaired fasta entries.
konrad/kuf_bio_scripts
remove_unpaired_fasta_entries.py
remove_unpaired_fasta_entries.py
#!/usr/bin/env python """ Remove unpaired reads from a fasta file. This script can be used for the case that unpaired reads (e.g. as reads were removed during quality trimming) in a pair of fasta files from paired-end sequencing need to be removed. """ import argparse from Bio import SeqIO from Bio.SeqIO.FastaIO im...
isc
Python
b84af881f800bfad13b5e90379c5f4ec0445239a
Add setup.py.
vasilvv/pymoira
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name = 'pymoira', version = '1.0', description = 'Client library for MIT Moira service managment system protocol', author = 'Victor Vasiliev', author_email = 'vasilvv@mit.edu', url = 'https://github.com/vasilvv/pymoira', ...
mit
Python
52d3a5a20c7f1bf4c874e4210fd17753a67d5c71
Add ID command
TheReverend403/Pyper,TheReverend403/Pyper
commands/cmd_id.py
commands/cmd_id.py
from lib.command import Command class IdCommand(Command): name = 'id' description = 'Returns your user ID, or the ID of the current chat when -c or \'chat\' is passed as an argument.' def run(self, message, args): reply = 'Your Telegram ID is {0}'.format(message.from_user.id) if '-c' or '...
agpl-3.0
Python
9bc26f8a0d2c209fc3e73cd0f267164bfd49fef3
Update setup.py
moreati/wok,algor512/wok,edunham/wok,vaygr/wok,wummel/wok,mythmon/wok,wummel/wok,edunham/wok,matt-garman/wok,edunham/wok,ngokevin/wok,gchriz/wok,ngokevin/wok,matt-garman/wok,matt-garman/wok,Avaren/wok,jneves/wok,abbgrade/wok,chrplace/wok,abbgrade/wok,algor512/wok,vaygr/wok,jneves/wok,Avaren/wok,Avaren/wok,mythmon/wok,m...
setup.py
setup.py
#!/usr/bin/env python2 from distutils.core import setup from wok import version setup( name='wok', version=version.encode("utf8"), author='Mike Cooper', author_email='mythmon@gmail.com', url='http://wok.mythmon.com', description='Static site generator', long_description= "Wok is a...
#!/usr/bin/env python2 from distutils.core import setup from wok import version setup(name='wok', version=version.encode("utf8"), description='Static site generator', install_requires=['pyyaml', 'jinja2'], author='Mike Cooper', author_email='mythmon@gmail.com', url='https://www.gi...
mit
Python
8238e0476097af0afed1443391370285dd61d8ca
Add setup.py
althonos/fs.sshfs
setup.py
setup.py
#!/usr/bin/env python import setuptools import os with open(os.path.join('fs', 'sshfs', '__metadata__.py')) as f: exec(f.read()) CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Inde...
lgpl-2.1
Python
72416d5bf4308c10bc9b2ab31464ad2853042402
Use the official package django select2 that finally support py3
kenjhim/django-accounting,kenjhim/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting
setup.py
setup.py
#!/usr/bin/env python """ Installation script: To release a new version to PyPi: - Ensure the version is correctly set in accounting.__init__.py - Run: `python setup.py sdist` `twine upload dist/*` """ from setuptools import setup, find_packages import os import sys from accounting import get_version PROJECT...
#!/usr/bin/env python """ Installation script: To release a new version to PyPi: - Ensure the version is correctly set in accounting.__init__.py - Run: `python setup.py sdist` `twine upload dist/*` """ from setuptools import setup, find_packages import os import sys from accounting import get_version PROJECT...
mit
Python
a79fcf2786df38f84b065ff579f83f03c1d5a20b
Add setup.py file
playfire/django-cyclebufferfield
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-cyclebufferfield', description="Field to manage Django fields in a fixed-size ring buffer.", version='0.1', url='http://code.playfire.com/', author='Playfire.com', author_email='tech@playfire.com', licen...
bsd-3-clause
Python
5d6f52d2b89eda2aa070faafad2fd89eeaf599ec
add setup py
RustoriaRu/SelectelCloudApi
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='selectel_cloud_api', version='1.0', packages=find_packages(), install_requires='selectel_cloud_api', url='https://github.com/RustoriaRu/SelectelCloudApi', license='MIT', author='vir-mir', ...
mit
Python
ab3728405be94c071c353374735b97f207479c00
Add setup.py to make an .exe with py2exe
cevad/tmpr
setup.py
setup.py
#!/c/Anaconda/python from distutils.core import setup import py2exe setup(console=["tmpr.py"])
mit
Python
2e91c826a72e3f240f6d010678d68bab0bab5749
Add setup.py for packaging
winny-/sirsi
setup.py
setup.py
from setuptools import setup from sirsi import __version__, __author__ setup( name='sirsi', version=__version__, author=__author__, author_email='winston@ml1.net', description='Manage a sirsi enterprise-based library account', url='https://github.com/-winny/sirsi', license='MIT', packag...
mit
Python
76601be760f0aa15637f65164c5e595b218fc2b9
Add setup.py
tylertreat/gaeutils
setup.py
setup.py
from setuptools import find_packages from setuptools import setup VERSION = '0.0.1' setup( name='gae-utils', version=VERSION, packages=find_packages(), install_requires=[], include_package_data=True, zip_safe=False, maintainer='Tyler Treat', maintainer_email='ttreat31@gmail.com' )
apache-2.0
Python
609bc6fbd1284c1b769c2e0548f6c65a97d144cd
Add initial attempt at a setup.py file
AndyDeany/pygame-template
setup.py
setup.py
from setuptools import setup import pygametemplate setup( name="pygametemplate", version=pygametemplate.__version__, description=pygametemplate.__doc__, url="https://github.com/AndyDeany/pygame-template", author=pygametemplate.__author__, author_email="oneandydean@hotmail.com", packages=[...
mit
Python
b5b503229789c61af5bb47d6bb587bafb2ada562
Fix setup.py, bump version.
agoragames/pykafka,dsully/pykafka,xujun10110/pykafka
setup.py
setup.py
#!/usr/bin/env python """ # pykafka pykafka allows you to produce messages to the Kafka distributed publish/subscribe messaging service. ## Requirements You need to have access to your Kafka instance and be able to connect through TCP. You can obtain a copy and instructions on how to setup kafka at https://github.c...
#!/usr/bin/env python """ # pykafka pykafka allows you to produce messages to the Kafka distributed publish/subscribe messaging service. ## Requirements You need to have access to your Kafka instance and be able to connect through TCP. You can obtain a copy and instructions on how to setup kafka at https://github.c...
mit
Python
a1e35b73b5e10a885e78e965242c5b1b6e92aa16
Add a setup.py file
jcarbaugh/django-wellknown
setup.py
setup.py
from setuptools import setup setup( name='wellknown', version='0.1dev', packages=['wellknown'] )
bsd-3-clause
Python
65ecc0145406e7d8e20a281c0e5c04b26208646d
Add a setup.py file.
Tech-XCorp/ultracold-ions,hosseinsadeghi/ultracold-ions,hosseinsadeghi/ultracold-ions,Tech-XCorp/ultracold-ions
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'name': 'ultracold-ions', 'description': 'A library for the simulation of ultracold neutral plasmas.', 'author': 'Tech-X Corporation', 'url': 'https://github.com/Tech-XCorp/ultracold-ions', 'do...
mit
Python
d9d3ae4a1d4007a0aa1dafe09102cb7414c338db
Remove extracting HG revision from setup.py.
zsiciarz/django-markitup,carljm/django-markitup,carljm/django-markitup,carljm/django-markitup,zsiciarz/django-markitup,WimpyAnalytics/django-markitup,zsiciarz/django-markitup,WimpyAnalytics/django-markitup,WimpyAnalytics/django-markitup
setup.py
setup.py
from setuptools import setup long_description = (open('README.rst').read() + open('CHANGES.rst').read() + open('TODO.rst').read()) def _static_files(prefix): return [prefix+'/'+pattern for pattern in [ 'markitup/*.*', 'markitup/sets/*/*.*', 'markitu...
from setuptools import setup import subprocess import os.path try: # don't get confused if our sdist is unzipped in a subdir of some # other hg repo if os.path.isdir('.hg'): p = subprocess.Popen(['hg', 'parents', r'--template={rev}\n'], stdout=subprocess.PIPE, stderr=su...
bsd-3-clause
Python
b82dee62e325d83f8aeaede406de24973ee42b42
Update project url in setup.py
manelvf/closure-linter,google/closure-linter,google/closure-linter,manelvf/closure-linter,google/closure-linter,manelvf/closure-linter
setup.py
setup.py
#!/usr/bin/env python # # Copyright 2010 The Closure Linter 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 #...
#!/usr/bin/env python # # Copyright 2010 The Closure Linter 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 #...
apache-2.0
Python
45a7a979d687b75851d3901171b826faa965389e
Add setup script
vene/ambra
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='ambra', version='0.1dev', description='Temporal prediction by pairwise comparisons', packages=['ambra'], )
bsd-2-clause
Python
20a5ccf55c9292d3c360a34d190e583b84594a37
Add zeeman energy tests.
fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python
pyoommf/test_zeeman.py
pyoommf/test_zeeman.py
from zeeman import Zeeman def test_zeeman_mif(): H = (0.1, -0.5, -8.9e6) zeeman = Zeeman(H) mif_string = zeeman.get_mif() lines = mif_string.split('\n') assert 'Specify Oxs_FixedZeeman {' in lines[0] assert '{ Oxs_UniformVectorField {' in lines[1] assert 'vector' in lines[2] line2 = lin...
bsd-2-clause
Python
331aecb334f4e4ff4c38b4a2b12d3a80d7327de1
Remove unused URL from setup.py
5monkeys/mock,Vanuan/mock
setup.py
setup.py
#! /usr/bin/python # Copyright (C) 2007-2010 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from mock import __version__ from distutils.core import setup import os NAME = 'mock' MODULES = ['mock'] DESCRIPTION = 'A Python Mocking and Patching ...
#! /usr/bin/python # Copyright (C) 2007-2010 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from mock import __version__ from distutils.core import setup import os NAME = 'mock' MODULES = ['mock'] DESCRIPTION = 'A Python Mocking and Patching ...
bsd-2-clause
Python
d00f9fd43cfc45747a9479f00db5d67fda658e55
Add initial distutils configuration
mirek2580/namebench
setup.py
setup.py
# Copyright 2009 Google Inc. 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 applicable law or ...
apache-2.0
Python
8439263d6ff66e659a8051d3efc0475020048629
update v.# make tag and set to release
atvKumar/open-tamil,arcturusannamalai/open-tamil,Ezhil-Language-Foundation/open-tamil,Ezhil-Language-Foundation/open-tamil,arcturusannamalai/open-tamil,tuxnani/open-telugu,tshrinivasan/open-tamil,tuxnani/open-telugu,atvKumar/open-tamil,arcturusannamalai/open-tamil,Ezhil-Language-Foundation/open-tamil,tuxnani/open-telug...
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (C) 2013-2014 முத்தையா அண்ணாமலை # open-tamil project from distutils.core import setup from codecs import open setup(name='Open-Tamil', version='0.2.8', description='Tamil language text processing tools', author='M. Annamalai, T. Arulalan,', a...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (C) 2013-2014 முத்தையா அண்ணாமலை # open-tamil project from distutils.core import setup from codecs import open setup(name='Open-Tamil', version='0.2.4', description='Tamil language text processing tools', author='Muthiah Annamalai', author_ema...
mit
Python
c75ee6a0ee2f542463b5ca8cb81b06a6a6650d4c
Add initial setup file
ctma/consul_kv
setup.py
setup.py
from setuptools import setup setup( name='python2-consul', packages=['python2-consul'], version='0.0.1', install_requires=[ 'certifi==2017.4.17', 'chardet==3.0.4', 'idna==2.5', 'PyYAML==3.12', 'requests==2.18.1', 'urllib3==1.21.1', 'validators==0....
mit
Python
af2effaf147b8e473f7b9c655842617a91414278
Upgrade the requirement on taskotron-python-versions to include latest changes in shared functions
fedora-python/portingdb,irushchyshyn/portingdb,irushchyshyn/portingdb,irushchyshyn/portingdb,ari3s/portingdb,irushchyshyn/portingdb,fedora-python/portingdb,ari3s/portingdb,fedora-python/portingdb,ari3s/portingdb,ari3s/portingdb
setup.py
setup.py
import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): super().finalize_options() self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pyt...
import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): super().finalize_options() self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pyt...
mit
Python
47b2e9890a0f3022ffbbf83a6e722b2e77e3443b
Fix dajax setup.py
jayfk/django-dajax,Leonime/django-dajax,jorgebastida/django-dajax,jorgebastida/django-dajax,Leonime/django-dajax,jayfk/django-dajax,jorgebastida/django-dajax
setup.py
setup.py
from distutils.core import setup setup( name='django-dajax', version='0.9', author='Jorge Bastida', author_email='me@jorgebastida.com', description=('Easy to use library to create asynchronous presentation ' 'logic with django and dajaxice'), url='http://dajaxproject.com', ...
from distutils.core import setup setup( name='django-dajax', version='0.9', author='Jorge Bastida', author_email='me@jorgebastida.com', description=('Easy to use library to create asynchronous presentation ' 'logic with django and dajaxice'), url='http://dajaxproject.com', ...
bsd-3-clause
Python
330650e7fe7c1a9aa0178812d08af332e927fe98
add minimal setup.py
librallu/cohorte-herald,librallu/cohorte-herald,librallu/cohorte-herald
setup.py
setup.py
from setuptools import setup setup(name='Cohorte Micronode', version='0.9', description='Cohorte Micronode Repository', url='https://github.com/librallu/cohorte-herald', author='Luc Libralesso', author_email='libralesso.l@gmail.com', license='Apache License 2.0', packages=[], ...
apache-2.0
Python
a90162a43e4e1817bd818b66e4ad6e377ab8af92
Update the setup.py version.
florianjacob/pelican,number5/pelican,GiovanniMoretti/pelican,abrahamvarricatt/pelican,gymglish/pelican,crmackay/pelican,Scheirle/pelican,lazycoder-ru/pelican,ingwinlu/pelican,TC01/pelican,ehashman/pelican,jo-tham/pelican,ingwinlu/pelican,talha131/pelican,zackw/pelican,farseerfc/pelican,simonjj/pelican,JeremyMorgan/peli...
setup.py
setup.py
from distutils.core import setup import sys requires = ['feedgenerator', 'jinja2', 'pygments'] if sys.version_info < (2,7): requires.append('argparse') setup( name = "pelican", version = '1.2', url = 'http://hg.lolnet.org/pelican/', author = 'Alexis Metaireau', author_email = 'alexis@notmyidea...
from distutils.core import setup import sys requires = ['feedgenerator', 'jinja2', 'pygments'] if sys.version_info < (2,7): requires.append('argparse') setup( name = "pelican", version = '1.1.1', url = 'http://hg.lolnet.org/pelican/', author = 'Alexis Metaireau', author_email = 'alexis@notmyid...
agpl-3.0
Python
06c67a7df4e2fd5cbc221f2a9c3f64179af91344
Add setup.py
alexsilva/django-xadmin,vincent-fei/django-xadmin,taxido/django-xadmin,merlian/django-xadmin,AndyHelix/django-xadmin,hochanh/django-xadmin,zhiqiangYang/django-xadmin,wbcyclist/django-xadmin,alexsilva/django-xadmin,wbcyclist/django-xadmin,t0nyren/django-xadmin,jneight/django-xadmin,tvrcopgg/edm_xadmin,zhiqiangYang/djang...
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-exadmin', version='0.1.0', description='New style and free plugin django admin module, UI base bootstrap2.', author='TM (sshwsfc)', author_email='sshwsfc@gmail.com', url='http://github.com/sshwsfc/django-exadmin', download_url=...
bsd-3-clause
Python
2c874c09e7bf35a0ea6a7a5029c9b17ec5f057af
Fix mongoengine version.
jazzband/django-mongonaut,pydanny/django-mongonaut,jazzband/django-mongonaut,pydanny/django-mongonaut,lchsk/django-mongonaut,jazzband/django-mongonaut,pydanny/django-mongonaut,lchsk/django-mongonaut,lchsk/django-mongonaut
setup.py
setup.py
from setuptools import setup, find_packages import mongonaut LONG_DESCRIPTION = open('README.rst').read() setup( name='django-mongonaut', version=mongonaut.__version__, description="An introspective interface for Django and MongoDB", long_description=LONG_DESCRIPTION, classifiers=[ "Devel...
from setuptools import setup, find_packages import mongonaut LONG_DESCRIPTION = open('README.rst').read() setup( name='django-mongonaut', version=mongonaut.__version__, description="An introspective interface for Django and MongoDB", long_description=LONG_DESCRIPTION, classifiers=[ "Devel...
mit
Python
ccbb7e11edc63a128b7006e015539fdabd8f3a7f
Set up frontend for longpolling
c00w/bitHopper,c00w/bitHopper
bitHopper/LongPoll.py
bitHopper/LongPoll.py
from gevent.event import AsyncResult _event = AsyncResult() def wait(): """ Gets the New Block work unit to send to clients """ return _event.get() def trigger(work): """ Call to trigger a LP """ old = self._event self._event = event.AsyncResult() old.set(work)
mit
Python
34ad457ab831173efd3758af926deb17daf53feb
Add sitemap
uhuramedia/Havel,uhuramedia/Havel
resources/sitemaps.py
resources/sitemaps.py
from django.contrib.sitemaps import Sitemap from resources.models import Resource from django.utils import translation class ResourceSitemap(Sitemap): def items(self): return Resource.objects.filter(noindex=False, is_published=True, language=translation.get_language(...
bsd-3-clause
Python
67cca3176d1e2b5def3ebbd64f4bd56a8976529b
add res.company file
OCA/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil
l10n_br_sale/res_company.py
l10n_br_sale/res_company.py
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2014 Renato Lima - Akretion # # ...
agpl-3.0
Python
a562aa0ac58b2ee4fec3f9ff0b70a595db4c48ad
add test case for csv validation, with first test already implemented
DOAJ/doaj,DOAJ/doaj,DOAJ/doaj,DOAJ/doaj
doajtest/unit/test_reapp_csv_validate.py
doajtest/unit/test_reapp_csv_validate.py
from doajtest.helpers import DoajTestCase from portality.clcsv import ClCsv from portality import reapplication from copy import deepcopy import os APPLICATION_COL = [ "The Title", "http://journal.url", "Alternative Title", "1234-5678", "9876-5432", "The Publisher", "Society Institution", ...
apache-2.0
Python
df84cf964214420987c51813b8960ce068223adf
Add request handler
Tiglas/pickup-planner,Tiglas/pickup-planner,Tiglas/pickup-planner,Tiglas/pickup-planner,Tiglas/pickup-planner
request_handler/request_handler.py
request_handler/request_handler.py
#!flask/bin/python from flask import Flask, jsonify, abort from flask import make_response from flask import request from flask import url_for import psycopg2 as pg app = Flask(__name__) def make_public_request(request): new_request = {} new_request['uri'] = url_for('get_requests', request_id=request[0], _ex...
mit
Python
4e54128e5c0b9c762e5f93ae0d8791eeddde2264
Add JSON serializer
pombredanne/dxr,KiemVM/Mozilla--dxr,pelmers/dxr,pelmers/dxr,bozzmob/dxr,gartung/dxr,KiemVM/Mozilla--dxr,KiemVM/Mozilla--dxr,jay-z007/dxr,nrc/dxr,srenatus/dxr,bozzmob/dxr,jbradberry/dxr,bozzmob/dxr,bozzmob/dxr,gartung/dxr,KiemVM/Mozilla--dxr,KiemVM/Mozilla--dxr,erikrose/dxr,kleintom/dxr,bozzmob/dxr,jay-z007/dxr,kleintom...
dxr/json.py
dxr/json.py
#!/usr/bin/env python2 class JsonOutput: need_separator = False content = '' def open(self): self.content += '{' self.need_separator = False def close(self): self.content += '}' self.need_separator = True def open_list(self): self.content += '[' self.need_separator = False def c...
mit
Python
30eec7bb18285b82a7d67a0a3d9098afc5b9e286
Create QRfactorization.py
Effective-Quadratures/Effective-Quadratures,psesh/Effective-Quadratures
effective_quadratures/QRfactorization.py
effective_quadratures/QRfactorization.py
# A set of functions just for QR factorization, pivoting and iterative-QR
lgpl-2.1
Python
324243dfd61afd8ce244a9a02ffc800c5c73ce55
Add modified chart with better values
chrisgilmerproj/brewday,chrisgilmerproj/brewday
charts/daniels_designing_great_beers/appendix_two_course_grind_potential_extract_modified.py
charts/daniels_designing_great_beers/appendix_two_course_grind_potential_extract_modified.py
from brew.utilities import sg_from_dry_basis """ Ray Daniels Designing Great Beers Appendix 2: Course Grind Potential Extract (modified) Notes: The chart appears to have been developed with the moisture content set to zero (0.0) and the Brew House Efficiency set to 100% (1.0). This is not typical and ...
mit
Python
7172d06ced60b2c69b9ac2762019ff95f3fd7da5
Create twice.py
iwyos13/Robosys2
twice.py
twice.py
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 n = 0 def cb(message): //rospy.loginfo(message.data*2) global n n = message.data*2 if __name__ == '__main__': rospy.init_node('twice') sub = rospy.Subscriber('count_up', Int32, cb) //rospy.spin() ...
bsd-2-clause
Python
a882409ede1898a3b4e2fb4619089b33c1427315
Add migration
DMPwerkzeug/DMPwerkzeug,DMPwerkzeug/DMPwerkzeug,DMPwerkzeug/DMPwerkzeug,rdmorganiser/rdmo,rdmorganiser/rdmo,rdmorganiser/rdmo
apps/conditions/migrations/0005_empty_relation.py
apps/conditions/migrations/0005_empty_relation.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-08-10 14:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('conditions', '0004_condition_title'), ] operations = [ migrations.AlterField( ...
apache-2.0
Python
673a6ee654d7e540fe9c473904b6d1e326928c58
Create run_test.py
chohner/staged-recipes,jjhelmus/staged-recipes,kwilcox/staged-recipes,birdsarah/staged-recipes,basnijholt/staged-recipes,scopatz/staged-recipes,NOAA-ORR-ERD/staged-recipes,jochym/staged-recipes,cpaulik/staged-recipes,ocefpaf/staged-recipes,johanneskoester/staged-recipes,shadowwalkersb/staged-recipes,SylvainCorlay/stage...
recipes/django-storages/run_test.py
recipes/django-storages/run_test.py
import django from django.conf import settings settings.configure(INSTALLED_APPS=['storages', 'django.contrib.contenttypes', 'django.contrib.auth']) django.setup() import storages
bsd-3-clause
Python
87de57c86b5d607b1fa795b46cefb3a722919f72
add script for testing speed
jcmgray/quijy
scripts/time_quimb.py
scripts/time_quimb.py
import timeit # ----------------------------- dense dot ----------------------------------- # setup = """ import quimb a = quimb.rand_herm(2**4) b = quimb.rand_herm(2**4) """ stmt = """ a @ b """ t = timeit.timeit(stmt, setup=setup, number=100000) print("Small dot".ljust(20) + ": {:.3} sec".format(t)) setup = """ i...
mit
Python
397bc67a5a214a4cad5eef20f3a13c53f90964c5
Modify tms_nw_svr
irvs/ros_tms,irvs/ros_tms,irvs/ros_tms,irvs/ros_tms,irvs/ros_tms,irvs/ros_tms,irvs/ros_tms,irvs/ros_tms,irvs/ros_tms
scripts/tms_nw_svr.py
scripts/tms_nw_svr.py
#!/usr/bin/python # -*- coding: utf-8 -*- import rospy import requests from BaseHTTPServer import HTTPServer from BaseHTTPServer import BaseHTTPRequestHandler import urlparse def svr_start(port, callback): def handler(*args): CallbackServer(callback, *args) server = HTTPServer(('', int(port)), handler)...
bsd-3-clause
Python
fec45cfaee6c5e5d02b6c3979179cdad153d5076
add ds18b20 rpi implementation to examples
cloud4rpi/cloud4rpi
examples/raspberrypi/platform/ds18b20.py
examples/raspberrypi/platform/ds18b20.py
import os import re import subprocess W1_DEVICES = '/sys/bus/w1/devices/' W1_SENSOR_PATTERN = re.compile('(10|22|28)-.+', re.IGNORECASE) def modprobe(module): return subprocess.check_call(['modprobe', module]) def init_w1(): modprobe('w1-gpio') modprobe('w1-therm') def is_w1_sensor(path): return ...
mit
Python
ba3643f6e2adc0c5c32134b5ec23403e97663237
Create vFMCT.py
Jean-Gaby/cropTool
vFMCT.py
vFMCT.py
# -*- coding: utf-8 -*- """ @author: Jean-Gabriel JOLLY """ from tkinter import * import PIL from PIL import Image import os global rectangleList rectangleList=[] global numberImage, numberRectangle,totalRectangle numberImage, numberRectangle,totalRectangle = 0,0,0 #Square position global x1,x2,y1,y2 x1,x2,y1,y2=...
apache-2.0
Python
01a659318644ef47cfe0c9ad3c484a974fb31e25
Create __init__.py
robertclf/FAFT,robertclf/FAFT
__init__.py
__init__.py
bsd-3-clause
Python
cb454d310431700e5ac9883a32f0b36e2e50e0fe
Add a check for keystone expired tokens buildup.
aacole/ursula-monitoring,sivakom/ursula-monitoring,sivakom/ursula-monitoring,blueboxgroup/ursula-monitoring,blueboxgroup/ursula-monitoring,sivakom/ursula-monitoring,aacole/ursula-monitoring,aacole/ursula-monitoring,aacole/ursula-monitoring,sivakom/ursula-monitoring,blueboxgroup/ursula-monitoring,blueboxgroup/ursula-mon...
sensu/plugins/check-keystone-expired-tokens.py
sensu/plugins/check-keystone-expired-tokens.py
#!/opt/openstack/current/keystone/bin/python # # Copyright 2015, Jesse Keating <jlk@bluebox.net> # # 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...
apache-2.0
Python
ac40e54d22717fbf1a2444a67198cdba66506df8
Add test for input setup workflow
architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst
cea/tests/test_inputs_setup_workflow.py
cea/tests/test_inputs_setup_workflow.py
import os import unittest import cea.config from cea.utilities import create_polygon from cea.datamanagement import zone_helper, surroundings_helper, terrain_helper, streets_helper, data_initializer, \ archetypes_mapper # Zug site coordinates POLYGON_COORDINATES = [(8.513465734818856, 47.178027239429234), (8.5154...
mit
Python
8465d9a9b2c30b0b493bdf9ba24a29e39a51c1df
add dbutil to compute archive_begin for HADS sites
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/dbutil/compute_hads_sts.py
scripts/dbutil/compute_hads_sts.py
"""Compute the archive start time of a HADS/DCP network""" from pyiem.network import Table as NetworkTable import sys import psycopg2 import datetime THISYEAR = datetime.datetime.now().year HADSDB = psycopg2.connect(database='hads', host='iemdb') MESOSITEDB = psycopg2.connect(database='mesosite', host='iemdb') def d...
mit
Python
582b5c598da5b35032447f0eb7888051b84f844c
Add datetime to fast cache
porduna/appcomposer,morelab/appcomposer,porduna/appcomposer,morelab/appcomposer,morelab/appcomposer,go-lab/appcomposer,go-lab/appcomposer,porduna/appcomposer,morelab/appcomposer,porduna/appcomposer,go-lab/appcomposer,go-lab/appcomposer
alembic/versions/20860ffde766_add_datetime_to_fastcache.py
alembic/versions/20860ffde766_add_datetime_to_fastcache.py
"""Add datetime to fastcache Revision ID: 20860ffde766 Revises: 471e6f7722a7 Create Date: 2015-04-14 07:44:36.507406 """ # revision identifiers, used by Alembic. revision = '20860ffde766' down_revision = '471e6f7722a7' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated b...
bsd-2-clause
Python
f54f427c16b394ff1ea0f55875bfb9d02e7264b0
add SiD calculator.
cvn001/codonPY
src/get_SiD.py
src/get_SiD.py
#!/usr/bin/python # -*- coding: UTF-8 -*- # Introduction: This script is used to calculate similarity index (SiD) # Created by Xiangchen Li on 2017/3/19 21:15 from collections import defaultdict from src.global_items import genetic_code def get_sid(virus_rscu_file, host_rscu_file): for pass_codon in ["TAG", "TAA...
mit
Python
cd9f80c1567c945fe40e02af56433c49c6ddad65
Create lintcode_二进制求和.py
wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode,wangyangkobe/leetcode
lintcode_二进制求和.py
lintcode_二进制求和.py
/** * http://www.lintcode.com/zh-cn/problem/add-binary/ * 给定两个二进制字符串,返回他们的和(用二进制表示。 * 样例 a = 11 b = 1 返回 100 */ class Solution: # @param {string} a a number # @param {string} b a number # @return {string} the result def addBinary(self, a, b): # Write your code here a = a[::-1] ...
mit
Python
65b362985d502440b12efc8a6a49ab0603354fd2
Add script to count emotional sentences according to LIWC
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
liwc_emotional_sentences.py
liwc_emotional_sentences.py
"""Count the numbers of annotated entities and emotional sentences in the corpus that was manually annotated. Usage: python annotation_statistics.py <dir containing the folia files with EmbodiedEmotions annotations> """ from lxml import etree from bs4 import BeautifulSoup from emotools.bs4_helpers import sentence, not...
apache-2.0
Python
c910e1898c1e49c60877e092032daebd289c6f31
add scripts to export from env file to profile
N402/NoahsArk,N402/NoahsArk
scripts/env2profile.py
scripts/env2profile.py
#!/usr/bin/evn python import os import re import sys line_re = re.compile('(\S+?)\s*?=\s*?(\S+?)$') def env2profile(env_path, out_path): out_lines = list() with open(env_path, 'r') as env_file: for line in env_file.readlines(): matched = line_re.findall(line) if matched and l...
mit
Python
8351d98c3036021507a75b65e424d02942f09633
Add alembic upgrade info
HERA-Team/Monitor_and_Control,HERA-Team/hera_mc,HERA-Team/hera_mc
alembic/versions/3d3c72ecbc0d_add_rtp_task_resource_record_table.py
alembic/versions/3d3c72ecbc0d_add_rtp_task_resource_record_table.py
"""Add rtp_task_resource_record table Revision ID: 3d3c72ecbc0d Revises: c9a1ff35c6ed Create Date: 2018-01-20 21:35:16.716477+00:00 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3d3c72ecbc0d' down_revision = 'c9a1ff35c6ed' branch_labels = None depends_on = N...
bsd-2-clause
Python
843e6f0ccb73a387e151d7f40ef7a2b4fc1597e0
test getmap
nimral/pathmap
pathmap/test/test_getmap.py
pathmap/test/test_getmap.py
import unittest from .. getmap import MapDownloader class TestGetmap(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
mit
Python