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
9ec9dca1bc599a3a4234881029f9dfff5f0a2e63
Add vacation_overlap.
jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools,jhanley634/testing-tools
problem/bench/db/vacation_overlap.py
problem/bench/db/vacation_overlap.py
#! /usr/bin/env python """Al and Ben will each take vacations, with overlap. How short staffed will the office be, on a daily basis? """ import datetime as dt import sqlalchemy as sa class Vacation: def __init__(self): self.engine = sa.create_engine('sqlite:////tmp/vacation.db') def _create_table...
mit
Python
1dc52c2139e535b487cd9082259ac74802313132
Create Wiki_XML.py
North-Guard/BigToolsComplicatedData,North-Guard/BigToolsComplicatedData
week4-5/Wiki_XML.py
week4-5/Wiki_XML.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 27 14:25:47 2017 @author: Laurent Vermue (lauve@dtu.dk) """ import xml.etree.ElementTree as ET import time import re from bz2file import BZ2File import sqlite3 from psutil import virtual_memory # Possibility to take memory into account(Machine opti...
mit
Python
4900617f38a912fbf386c6a87c55627d87dd59fd
Add test_assign.py
sony/nnabla,sony/nnabla,sony/nnabla
python/test/function/test_assign.py
python/test/function/test_assign.py
# Copyright (c) 2017 Sony Corporation. 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 applicabl...
apache-2.0
Python
b9044185e572c811ebe8a8fc89d54f141b0466fb
Add getCurrentConfig method to track.py
ollien/playserver,ollien/playserver,ollien/playserver
play-server/track.py
play-server/track.py
import configmanager import osascript APP_CONFIG_PATH = "applications/" applicationConfigs = configmanager.ConfigManager(APP_CONFIG_PATH) #TODO: Make this user choosable currentApplication = "radiant" def getCurrentConfig(): return applicationConfigs[currentApplication]
mit
Python
dff6aebe247601bbd1a28acc1ddda57052fb7fb3
Create seaborn.py
mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets
seaborn.py
seaborn.py
import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline #------------------------------------------------------------------------------------ # http://gree2.github.io/python/2015/05/05/python-seaborn-tutorial-controlling-figure-aesthetics # Reset all parameters to default sns.set() # STYLES # default...
mit
Python
5426b2be91d7cd42e70d074e305b6e6b705dd67b
Improve multy ordering in admin change list: http://code.djangoproject.com/ticket/389
ilblackdragon/django-misc
misc/admin.py
misc/admin.py
from django.contrib.admin.views.main import ChangeList class SpecialOrderingChangeList(ChangeList): """ Override change list for improve multiordering in admin change list. `Django will only honor the first element in the list/tuple ordering attribute; any others will be ignored.` Example: ...
mit
Python
edca5c6332d8301da5473e204a10e82acf47c40f
Add mixin_demo.py
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine
mixin_demo.py
mixin_demo.py
import time class Mixin(object): mixins = {} def __init__(self, target, mixin, key=""): self.key = key.upper() + "_CALCULATION_MODE" self.target = target self.mixin = mixin def __enter__(self): return self._load() def __exit__(self, *args): self._unload() ...
agpl-3.0
Python
95d855743e9f37e87397c9be7ffc9b888320a4ac
Add the init method to the note model.
yiyangyi/cc98-tornado
model/note.py
model/note.py
class NoteModel(Query): def __init__(self, db): self.db = db self.table_name = "note" super(NoteModel, self).__init__()
mit
Python
87a77ca8150c970ac9083894b67c3d73a8a73e7f
Add configuration.py
xthan/polyvore,xthan/polyvore
polyvore/configuration.py
polyvore/configuration.py
# Copyright 2017 Xintong Han. 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
5854334b3ed9b20886e0dd62e21094e7df0fdad0
add basic test for schema
mylokin/schematec
tests/test_schema.py
tests/test_schema.py
from __future__ import absolute_import # import pytest import schematec.schema # import schematec.converters as converters # import schematec.validators as validators # import schematec.exc as exc def test_empty_schema_with_empty_value(): schema = schematec.schema.Schema() assert schema({}) == {}
mit
Python
655fc717469c2f8fa49b4c55e4f0a1768b045758
add quick sort
creativcoder/AlgorithmicProblems,creativcoder/AlgorithmicProblems,creativcoder/AlgorithmicProblems,creativcoder/AlgorithmicProblems
Python/quick_sort.py
Python/quick_sort.py
arr = [134,53,4,234,23,452,3,5,43,534,3,5,435,345] def sort(arr): low = 0 high = len(arr)-1 quick_sort(arr,low,high) def get_pivot(arr,low,high): mid = (high + low) // 2 pivot = high if arr[low] < arr[mid]: pivot = mid elif arr[low] < arr[high]: pivot = low return pivot def quick_sort(arr,low,high): if ...
mit
Python
b75e72c5a0a8aa328afa03dee593daaa8400e96a
Add nosetest
wkentaro/utaskweb
test_utaskweb.py
test_utaskweb.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # import requests from bs4 import BeautifulSoup import utaskweb def assert_text_obj(obj): unicode_obj = unicode(obj) assert type(unicode_obj) == unicode def test_get_text_if_exists(): node1 = BeautifulSoup('<tr>Hello World</tr>') node2 = BeautifulSoup('...
mit
Python
2448b2608ab4d32c4d80c1bbd2a09063197524e6
Create __init__.py
OdooCommunityWidgets/website_product_attachments
__init__.py
__init__.py
import product_attachments
mit
Python
8e83b41a4796d62868a113ccb1e949a2d09bafac
Test throwing future callback
aldebaran/libqi,aldebaran/libqi-java,aldebaran/libqi-java,aldebaran/libqi,aldebaran/libqi,vbarbaresi/libqi,bsautron/libqi,aldebaran/libqi-java
python/test/test_servicedirectory.py
python/test/test_servicedirectory.py
import time from qi import ServiceDirectory from qi import Session def main(): def raising(f): raise Exception("woops") local = "tcp://127.0.0.1:5555" sd = ServiceDirectory() sd.listen(local) s = Session() s.connect(local) f = s.service("ServiceDirectory", _async=True) f.add...
bsd-3-clause
Python
fcae40e5bbc5e593d4245747dd0d1d1ef78cad3a
Add a (hackish) feed wrapper for auto-subscribing and reading new MLs
Humbedooh/ponymail,quenda/ponymail,jimjag/ponymail,Humbedooh/ponymail,jimjag/ponymail,rbowen/ponymail,quenda/ponymail,Humbedooh/ponymail,jimjag/ponymail,rbowen/ponymail,rbowen/ponymail,quenda/ponymail,jimjag/ponymail
tools/feedwrapper.py
tools/feedwrapper.py
#!/usr/bin/env python3.4 # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
apache-2.0
Python
d50d43854596522f7cef8712e0599b39c71b027b
Add initial jenkins python script for jenkins tests
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/jenkins.py
tests/jenkins.py
#!/usr/bin/env python ''' This script is used to test salt from a jenkins server, specifically jenkins.satstack.com. This script is intended to be shell centric!! ''' import subprocess import hashlib import random import optparse def run(platform, provider): ''' RUN! ''' htag = hashlib.md5(str(rando...
apache-2.0
Python
4cddb31cd5054ff146f4bab8471367dcc48297c4
Create server2.py
khoteevnd/stepic
server2.py
server2.py
# -*- coding: UTF-8 -*- import socket, threading, string debug = True _connector = None _running = True _host = '0.0.0.0' _port = 2222 _maxClient = 10 _recvBuffer = 1024 def printd (aString): if debug: print aString class talkToClient (threading.Thread): def __init__(self, clientSock, addr): ...
mit
Python
13fd2335eb8b8b93e5330fe9bcc125557bffb198
Add missing migration for verbose_name alter
edx/ecommerce,edx/ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce,edx/ecommerce,edx/ecommerce,eduNEXT/edunext-ecommerce
ecommerce/extensions/payment/migrations/0012_auto_20161109_1456.py
ecommerce/extensions/payment/migrations/0012_auto_20161109_1456.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_paypalprocessorconfiguration'), ] operations = [ migrations.AlterField( model_name='paypalproces...
agpl-3.0
Python
65c1ddc6837a36b87992304e2d364b5eb6e8d0d9
add selenium test
otron/flask-travis-selenium-minimality,otron/flask-travis-selenium-minimality
tests/seltest.py
tests/seltest.py
from selenium import webdriver import pytest def test_selenium_basic(): driver = webdriver.Firefox() driver.get("localhost:5000") bod = driver.get_element_by_tag_name('body') assert "Hello" in bod.text driver.quit()
bsd-2-clause
Python
98262d909ad612684df9dfe6f98ee3c8217df2ce
Create __init__.py
robertclf/FAFT,robertclf/FAFT
FAFT_2048-points_C2C/__init__.py
FAFT_2048-points_C2C/__init__.py
bsd-3-clause
Python
a301a90ed9cc570c3de1fdcd4c6908512cfd1183
add require_billing_admin decorator
puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,gmimano/commcaretest,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,SEL-C...
corehq/apps/accounting/decorators.py
corehq/apps/accounting/decorators.py
from django.http import Http404 from corehq import BillingAccountAdmin def require_billing_admin(): def decorate(fn): """ Decorator to require the current logged in user to be a billing admin to access the decorated view. """ def wrapped(request, *args, **kwargs): if no...
bsd-3-clause
Python
c38d3695c0b056da3014951ee842bae4f817b657
Add serialization unit-test
timstaley/chimenea
chimenea/tests/test_obsinfo.py
chimenea/tests/test_obsinfo.py
from __future__ import absolute_import from unittest import TestCase import json from chimenea.obsinfo import ObsInfo class TestObsInfoSerialization(TestCase): def setUp(self): self.obs = ObsInfo(name='foo', group='fooish', metadata={'bar':'baz'}) ...
bsd-3-clause
Python
0d7706db887bb5d1522f3de39b9fe1533f80fd8d
Add original script version, still not fit for general use
Vilkku/Dota-2-Hero-Parser
dota2parser.py
dota2parser.py
from bs4 import BeautifulSoup import urllib.request import MySQLdb db = MySQLdb.connect(user="", passwd="", db="") c = db.cursor() c.execute("SELECT id, name FROM heroes WHERE active=1") heroes = c.fetchall() for hero_id, hero_name in heroes: hero_url = 'https://www.dota2.com/hero/'+str(hero_name).replace(' ', '_')....
mit
Python
a8e2f22bcc521aedc216d0d1849b6e4f58ede443
Add old matrix file
WalrusCow/pyConsole
matrix.py
matrix.py
''' Cover the screen in green ones and zeroes, as if in the Matrix. ''' import time, sys import random from console import getTerminalSize ESC = '\033' def getLine(cols): ''' Create a matrix line. ''' CHOICES = '000111 ' line = ''.join(random.choice(CHOICES) for _ in range(cols)) return line def matr...
mit
Python
33155a213e1b31e8676a92c8e7a7f0330050b4c1
Add base class for plugins.
lyft/pycollectd
pycollectd/plugin.py
pycollectd/plugin.py
# -*- coding: utf-8 -*- # # © 2013 Lyft, Inc. # # 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 agre...
apache-2.0
Python
0f84eb57024bb856c10a6326a3827cb91e4d20c2
Put the contents of a pyui file onto the clipboard
cclauss/Ten-lines-or-less
pyui_to_clipboard.py
pyui_to_clipboard.py
import clipboard filename = 'put_your_filename_here.pyui' # edit this line before running with open(filename) as in_file: clipboard.set(in_file.read()) print('The contents of {} are now on the clipboard.'.format(filename))
apache-2.0
Python
6126ef6028449abab49994bbbe555ecf591ad910
Work on comets tracking
hadim/fiji_tools,hadim/fiji_tools,hadim/fiji_scripts,hadim/fiji_scripts,hadim/fiji_scripts
plugins/Scripts/Plugins/Test_In_Vivo_Comets_Tracking.py
plugins/Scripts/Plugins/Test_In_Vivo_Comets_Tracking.py
# @Float(label="Sigma 1", required=true, value=4.2) sigma1 # @Float(label="Sigma 2", required=true, value=1.25) sigma2 # @Boolean(label="Do thresholding ?", required=true, value=true) do_thresholding # @Boolean(label="Show intermediates images (for debugging)", required=true, value=true) show_images # @ImageJ ij # @Im...
bsd-3-clause
Python
ae0ebcc4da3425539e067d4d6a611554327357ad
Add web-scraping
ioanacrant/Hackathon-Update,ioanacrant/Hackathon-Update,ioanacrant/Hackathon-Update
hackathonupdate-webscraping.py
hackathonupdate-webscraping.py
from lxml import html import requests page=requests.get('https://mlh.io/seasons/s2015/events.html') tree=html.fromstring(page.text) titles=tree.xpath('//*[name()="h3"]/text()') #add dates and locations later print(titles)
apache-2.0
Python
a3706e1c743ef7ec7f38375b116538a71ccb8455
Add utilities to convert from python2 to python3.
Quasimondo/RasterFairy
rasterfairy/utils.py
rasterfairy/utils.py
def cmp_to_key(mycmp): """ Convert `sorted` function from python2 to python3. This function is used to convert `cmp` parameter of python2 sorted function into `key` parameter of python3 sorted function. This code is taken from here: https://docs.python.org/2/howto/sorting.html#the-old-way-usin...
bsd-3-clause
Python
c0b53a195974173942b73d320248febd19b6788c
Add exercise 9
zhaoshengshi/practicepython-exercise
exercise/9.py
exercise/9.py
import random i = random.randint(1, 9) def ask_for_input(): while True: s = input('Please guess what I got (an integer between 1 and 9) in hand?: ' ) ii = int(s) if 1 <= ii <= 9: return ii else: print('Wrong input!') continue def ask_for_again()...
apache-2.0
Python
141bb79f45053e7bc5bfc4aa06e98d6e2788fc2c
Implement type reranker
filipdbrsk/NWRDomainModel
type_reranker.py
type_reranker.py
from dbpediaEnquirerPy import * from KafNafParserPy import * import os def get_entity_sent(filename, parser, entity): terms=[] for ref in entity.get_references(): termbs=ref.get_span().get_span_ids() if len(termbs)==0: w.write(filename + "\t" + entity.get_id() + "\n") return 100 print termbs, len(...
apache-2.0
Python
37e3380cbbef86f35f963ebfa3bdb07eb3d3ae3d
Add condor test
swift-lang/swift-e-lab,Parsl/parsl,swift-lang/swift-e-lab,Parsl/parsl,Parsl/parsl,Parsl/parsl
libsubmit/tests/test_integration/test_ssh/test_ssh_condor_earth.py
libsubmit/tests/test_integration/test_ssh/test_ssh_condor_earth.py
import os import libsubmit from libsubmit import SshChannel, Condor import time def test_1(): config = { "site": "T3_US_NotreDame", "execution": { "scriptDir": ".scripts", "environment": { 'CONDOR_CONFIG': '/opt/condor/RedHat6/etc/condor_config', ...
apache-2.0
Python
ed31ebcd8c8058b3cc92a9fd4411577e9227605b
Add models.py with sqla settings and player, game classes
dropshot/dropshot-server
models.py
models.py
from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base import json engine = create_engine('sqlite:///db.sqlite', echo=True) Base = declarative_base() class Player(Base): __tablename__ = 'players' id = Column(Integer, primary_key=True) username = Colum...
mit
Python
546e9441b7dc6eb1575aab3c534f414aed0f0c3c
Create GC_content.py
chamkank/Python-DNA-Tool,zechamkank/Python-DNA-Tool
sequence_manipulation/GC_content.py
sequence_manipulation/GC_content.py
''' Written by Cham K. June 16th 2015 ''' from sequence_manipulation import nucleotide_count def GC_content(sequence, percent=True): ''' (str, bool) -> (float) Returns the GC-content as a non-rounded percentage (or ratio if percent=False) of a DNA sequence. Can process upper-case and lower-case sequence i...
mit
Python
150b1c07a55d2f3ce429cc0108fdaf653b9b7132
Create models.py
gabimachado/cooktop-IoT,gabimachado/cooktop-IoT
models.py
models.py
from django.db import models class Mode(models.Model): name = models.CharField(max_length=50) class State(models.Model): name = models.CharField(max_length=50)
mit
Python
d26034963c0332346ea1b6b50b9ad3d637da7e36
Add script to try and push stripe payment of unpaid invoices
SYNHAK/spiff,SYNHAK/spiff,SYNHAK/spiff
spiff/payment/management/commands/attempt_payment.py
spiff/payment/management/commands/attempt_payment.py
from django.core.management import BaseCommand from spiff.payment.models import Invoice import stripe class Command(BaseCommand): help = 'Attempts to process an invoice via stripe' def handle(self, *args, **options): for invoice in Invoice.objects.unpaid().all(): print invoice try: unpaid ...
agpl-3.0
Python
c5ed01ce81b1c0e459d93bf26bf96cdeb80a0344
Use specific notifications when possible.
typesupply/defconAppKit,typemytype/defconAppKit
Lib/defconAppKit/representationFactories/__init__.py
Lib/defconAppKit/representationFactories/__init__.py
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
mit
Python
31d26cefd8f3d246437511c2b0852051d68cb2c8
modify wod2vec
mathrho/word2vec,mathrho/word2vec,mathrho/word2vec,mathrho/word2vec
exampleWtoV.py
exampleWtoV.py
#/datastore/zhenyang/bin/python import gensim, logging import sys import os from xml.etree import ElementTree def get_parentmap(tree): parent_map = {} for p in tree.iter(): for c in p: if c in parent_map: parent_map[c].append(p) # Or raise, if you don't want...
apache-2.0
Python
b68244965b4f69711f0c4d9d42f24e6b3f5742f4
Add script to update images in the js code
richq/toggle-js-addon
update-images.py
update-images.py
#!/usr/bin/env python import urllib def img2base64(img): return open(img, "rb").read().encode("base64").replace('\n', '') disabled_base64 = img2base64("assets/no-js.png") enabled_base64 = img2base64("assets/jsenabled.png") data = open('bootstrap.js') output = [] for line in data.readlines(): if line.starts...
bsd-2-clause
Python
ef526fe30b0bfcf82319195e76e4da01ab613ca3
add initial spline
harmslab/epistasis,Zsailer/epistasis
epistasis/models/nonlinear/spline.py
epistasis/models/nonlinear/spline.py
import numpy as np from .minimizer import Minimizer from .ordinary import EpistasisNonlinearRegression from epistasis.models import EpistasisLinearRegression from epistasis.models.utils import (arghandler, FittingError) from scipy.interpolate import UnivariateSpline # -------------------- Minimizer object -----------...
unlicense
Python
49cb9138a10e3fc9324f6c2e655cc4b8bd34276c
Add transliteration tool
Sakartu/excel-toolkit
extranslit.py
extranslit.py
#!/usr/bin/env python # -*- coding: utf8 -*- """ Usage: translit_location.py INCOLUMN [--lang LANG] [--reverse] [--minlen MINLEN] INFILE... Options: INCOLUMN The number of the INCOLUMN to use, 1 based (A=1). OUTCOLUMN The number of the OUTCOLUMN to put the result in (WILL OVERWRITE ALL VALUES), 1 ...
mit
Python
0c50fc3838cd87f09e767727c41ee6c0771b396d
Create type.py
joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle,joshhartigan/semicircle
code/neominim/type.py
code/neominim/type.py
# -*- coding: utf-8 -*- __author__ = "joshhartigan" class NeoMinimError(Exception): """ general purpose neominim error """ pass
bsd-2-clause
Python
b0c6bddfac0931de679972a4d8674269889e5cd2
Correct set_node_options argument list
Tesora/tesora-project-config,Tesora/tesora-project-config,dongwenjuan/project-config,openstack-infra/project-config,noorul/os-project-config,openstack-infra/project-config,noorul/os-project-config,dongwenjuan/project-config
zuul/openstack_functions.py
zuul/openstack_functions.py
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
Python
02d5370f09956077623ea76340e51d1cf6d10f93
Add boolean primitive type support.
4degrees/harmony
source/harmony/ui/widget/boolean.py
source/harmony/ui/widget/boolean.py
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from PySide import QtGui from .simple import Simple class Boolean(Simple): '''Boolean control.''' def _constructControl(self, **kw): '''Return the control widget.''' return QtGui.QCheckBo...
apache-2.0
Python
2a93cd12a8e198cd6a09d2a077148999eb6c3739
add source file collection_builder.py
ellenzinc/collection_builder
collection_builder.py
collection_builder.py
#!/usr/bin/python #===================================================================================== # conversion from .bib file to Jekyll collection files (ver 1.0) # # Copyright (c) <2015> <Haining Wang> # https://github.com/ellenzinc/ # Permission is hereby granted, free of charge, to any person obtaining a ...
mit
Python
e3900a167b0f9bba731353bd8175b8a5ede9491b
add loggeduser migration
mercycorps/TolaActivity,toladata/TolaActivity,mercycorps/TolaActivity,toladata/TolaActivity,mercycorps/TolaActivity,mercycorps/TolaActivity,toladata/TolaActivity,toladata/TolaActivity
activitydb/migrations/0024_loggeduser.py
activitydb/migrations/0024_loggeduser.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-08-23 21:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('activitydb', '0023_tolasites_tola_report_url'), ] operations = [ migrations....
apache-2.0
Python
c168efd883bcc1fc5ed8fe3c80de95db905bb468
Add file for nontermianl adding when grammar is create
PatrikValkovic/grammpy
tests/grammar_creation_test/NonterminalAddingTest.py
tests/grammar_creation_test/NonterminalAddingTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main()
mit
Python
307e4fda61f92e344bfd90c1a43f5a9076e7b832
Add files for rule's invalid syntax validation
PatrikValkovic/grammpy
tests/rules_tests/isValid_tests/InvalidSyntaxTest.py
tests/rules_tests/isValid_tests/InvalidSyntaxTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()
mit
Python
bb9a796abc1a1535c5113c260ac5a703c4cefb53
Add Python source code
marcaube/prime-factors,marcaube/prime-factors,marcaube/prime-factors,marcaube/prime-factors,marcaube/prime-factors,marcaube/prime-factors
primes.py
primes.py
#!/usr/bin/env python import sys number = int(sys.argv[1]) candidate = 2 while (number > 1): while (number % candidate == 0): print candidate number /= candidate candidate += 1
mit
Python
8e48aec6d1e6aca9c2ce54108fface01d2cbde8f
add bottom Ekman layer test
tkarna/cofs
test/bottomFriction/test_ekman_bottom.py
test/bottomFriction/test_ekman_bottom.py
""" Bottom Ekman layer test ======================= Steady state flow in a channel subject to bottom friction and rotation. Vertical viscosity is assumed to be constant to allow simple analytical solution. """ from thetis import * import numpy import pytest def run_test(layers=25, tolerance=0.05, verify=True, **mode...
mit
Python
83470a90d8f765438ec77a61527e4d3d8963890f
add test for the fastq_count script
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
test/scripts/test_sequana_fastq_count.py
test/scripts/test_sequana_fastq_count.py
from sequana.scripts import fastq_count from nose.plugins.attrib import attr from sequana import sequana_data #@attr("skip") class TestPipeline(object): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run""" klass.prog = "sequana_fastq_count...
bsd-3-clause
Python
c6e2732575993f76657ba15b155e6cfe45aa60c4
add static data generator
elly/starbase,eve-val/starbase,elly/starbase,shibdib/starbase,eve-val/starbase,eve-val/starbase,shibdib/starbase
gen-static.py
gen-static.py
#!/usr/bin/env python import json import sqlite3 class SDE: def __init__(self, db): self.db = db def groups_in_category(self, category): c = self.db.cursor() c.execute("SELECT categoryID FROM invCategories WHERE categoryName = ?", (category,)) category_id = c.fetchone()[0] c.execute("SELECT groupName FR...
mit
Python
1e15f0953076810c1ccd2d04c258d3fb0eba71e1
Create sample.py
tonythms/project2,tonythms/project2
sample.py
sample.py
apache-2.0
Python
2900f014bf7d8bdf5b7f4fe10d844cd516d0372a
Add basic views tests
ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo
web/web/tests.py
web/web/tests.py
from django.test import Client, TestCase from django.core.urlresolvers import reverse # Create your tests here. class BasicViewsTestCase(TestCase): fixtures = [] def setUp(self): self.public_views = [('login', dict()), ('logout', dict())] self.private_views = [('homepage', dict()), ...
agpl-3.0
Python
81c4f9300e0cef204aaf2a0205ebf21be23f9414
add strings to return ehllo world as output
ctsit/J.O.B-Training-Repo-1
hellomarly.py
hellomarly.py
#This is my hello marly..... print 'Hello Marly'
apache-2.0
Python
b3962e17bbc0328faa928d1eaed57de40cc28ee0
add heroku_api.py
Impactstory/oadoi,Impactstory/sherlockoa,Impactstory/oadoi,Impactstory/oadoi,Impactstory/sherlockoa
heroku_api.py
heroku_api.py
import heroku import argparse import os import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning, SNIMissingWarning, InsecurePlatformWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) requests.packages.urllib3.disable_warnings(SNIMissingWarning) requests.packages....
mit
Python
257d0c9e8e6a8b571bfc896b2197f303251173df
Create p.py
pythoneiros/PyQuantio
webscraping/p.py
webscraping/p.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib2 t = urllib2.urlopen('http://www.gmasson.com.br/').read() # TAG tags = t.split('<p')[1:] tags = [ tag.split('</p>')[0] for tag in tags ] for i in tags: print i
mit
Python
01710f18efbe29dc5cf187726d5c686beec7e6e7
Add helper script for getting plaso timeline in to timesketch
armuk/timesketch,armuk/timesketch,google/timesketch,armuk/timesketch,google/timesketch,armuk/timesketch,google/timesketch,lockhy/timesketch,google/timesketch,lockhy/timesketch,lockhy/timesketch,lockhy/timesketch
utils/add_plaso_timeline.py
utils/add_plaso_timeline.py
# Copyright 2014 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 a...
apache-2.0
Python
2c0fc3387a6dbd54bbcd4c47952ce8739d0b2152
Add super-simple deduplication filter that uses a dictionary
ryansb/zaqar-webscraper-demo
dedup_worker.py
dedup_worker.py
# Pull URL # Strip query string # Query exists # IFN save to sqlite # IFN push to queue # IFY do nothing seen = {} if __name__ == '__main__': from helpers import client ingest = client.queue('ingest') scrape = client.queue('scrape') while True: claimed = ingest.claim(ttl=180, grace=60) ...
mit
Python
d62ffdce6df8cf848c1b1b198fc65d4dc0d70a1e
Add MergeSort.py
besirkurtulmus/AdvancedAlgorithms
Sorting/MergeSort.py
Sorting/MergeSort.py
# @auther Besir Kurtulmus ''' The MIT License (MIT) Copyright (c) 2014 Ahmet Besir Kurtulmus 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 ...
mit
Python
c8da605c3eef2cc205a47851e9c3e5b7c2a60f00
Create nltk13.py
PythonProgramming/Natural-Language-Processing-NLTK-Python-2.7
nltk13.py
nltk13.py
from __future__ import division import sqlite3 import time conn = sqlite3.connect('knowledgeBase.db') conn.text_factory = str c = conn.cursor() negativeWords = [] positiveWords = [] sql = "SELECT * FROM wordVals WHERE value = ?" def loadWordArrays(): for negRow in c.execute(sql, [(-1)]): negativeWords...
mit
Python
4ec6852368a79d272da145cdb3aa34620cbf0573
Create a.py
y-sira/atcoder,y-sira/atcoder
abc006/a.py
abc006/a.py
n = int(input()) if n % 3 == 0 or '3' in str(n): print('YES') else: print('NO')
mit
Python
f25fe8cd315cfd08e5c717a2706bf85fa0fbbbe2
Add LBFGS tomography example
aringh/odl,kohr-h/odl,aringh/odl,kohr-h/odl,odlgroup/odl,odlgroup/odl
examples/solvers/lbfgs_tomography.py
examples/solvers/lbfgs_tomography.py
# Copyright 2014-2016 The ODL development group # # This file is part of ODL. # # ODL is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
mpl-2.0
Python
51c6335718e5aca75d1c8e7e1fa08e396aa8a557
Create Valid_Parentheses.py
UmassJin/Leetcode
Array/Valid_Parentheses.py
Array/Valid_Parentheses.py
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not. class Solution: # @return a boolean def isValid(self, s): stack = [] ...
mit
Python
dbba2e9b541af2b95cbc3f9f306b3062be81460e
Create AnimationBase.py
gitoni/animation
AnimationBase.py
AnimationBase.py
# -*- coding: utf_8 -*- """ Created on 13.07.2014 @author: gitoni """ import subprocess as sp import os import webbrowser as wb class Animation(object): """ A class for creating animations with ImageMagick. Paths need to be adapted to your system. This here works on Windows, asuming that ImageMagi...
mit
Python
83632d537a033deb017dbfeab02ba4e1073e309a
add export filters
qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttar...
couchforms/filters.py
couchforms/filters.py
''' Out of the box filters you can use to filter your exports ''' def instances(doc): """ Only return XFormInstances, not duplicates or errors """ return doc["doc_type"] == "XFormInstance" def duplicates(doc): """ Only return Duplicates """ return doc["doc_type"] == "XFormDuplicate" ...
bsd-3-clause
Python
7e8ff3971c21335468a683edcb9efb260c49bd61
Add packet class
umbc-hackafe/x10-controller
packet.py
packet.py
class Packet: PACKET_LENGTH = 4 def decode(b): """Retuns a Packet object for the given string, or None if it isn't valid.""" if len(b) != Packet.PACKET_LENGTH: return None if b[0] ^ b[1] ^ b[2] != b[3] or ((b[0] & 0x80) >> 7) != 1: return None if (b[0] ...
unlicense
Python
38aaf30aa1d148bfa31e7856b399a735ba818c6b
Add test for accessing module docstring.
pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython
tests/basics/module_docstring.py
tests/basics/module_docstring.py
""" doc string""" try: __doc__ except NameError: print("SKIP") raise SystemExit print(__doc__)
mit
Python
3a2bec63eff4a2657250e46a523b5f98b9d27aea
Add tests for validate models.
unt-libraries/coda,unt-libraries/coda,unt-libraries/coda,unt-libraries/coda
coda/coda_validate/tests/test_models.py
coda/coda_validate/tests/test_models.py
from .. import factories class TestValidate: def test_unicode(self): validate = factories.ValidateFactory.build() assert unicode(validate) == validate.identifier
bsd-3-clause
Python
9d30c51aac7ca00b4f191270a82f24372687163c
Add Pandoc filter to convert SVG illustrations to PDF
alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile
svg2pdf.py
svg2pdf.py
#!/usr/bin/env python """ Pandoc filter to convert svg files to pdf as suggested at: https://github.com/jgm/pandoc/issues/265#issuecomment-27317316 """ __author__ = "Jerome Robert" import mimetypes import subprocess import os import sys from pandocfilters import toJSONFilter, Image fmt_to_option = { "sile": ("--...
agpl-3.0
Python
6892e38e328508e05a349b0c4bc9a154dd854f4f
Create Maximal-Square.py
UmassJin/Leetcode
Array/Maximal-Square.py
Array/Maximal-Square.py
''' Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 Return 4. ''' # Method 1: use the 2D array DP, the details showed in the following links class Solution: # @param...
mit
Python
d9b03bf39a83a473f76aec045b3b182f25d1d7f5
Teste de JSON
renzon/appengine-video,renzon/appengine-video,renzon/appengine-video,renzon/appengine-video
backend/test/curso_tests/rest_tests.py
backend/test/curso_tests/rest_tests.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from base import GAETestCase from course_app.course_model import Course from mommygae import mommy from routes.courses import rest class ListarTests(GAETestCase): def test_sucesso(self): mommy.save_one(Course) respost...
mit
Python
286232f060f4268881105fdc7b08bdf3f2f276a9
Add meeting.py
vasilvv/ndsc
meeting.py
meeting.py
#!/usr/bin/python # # A simple tool to manage the discuss meetings. # import argparse import discuss import sys acl_flags = "acdorsw" def die(text): sys.stderr.write("%s\n" % text) sys.exit(1) def get_user_realm(client): user = client.who_am_i() return user[user.find('@'):] def add_meeting(): ...
mit
Python
df09148f7c53177124e898de27f49a082afb86d6
Create foursq_tips.py
chenyang03/Foursquare_Crawler,chenyang03/Foursquare_Crawler
foursq_tips.py
foursq_tips.py
# -*- coding: utf-8 -*- import json import guess_language from textblob import TextBlob from foursq_utils import * def get_venue_category(venue_category_name): if venue_category_name in category_Arts_Entertainment: return 'Arts_Entertainment' elif venue_category_name in category_College_University: ...
mit
Python
e51431c5fb111fc86f1087184accc84d633590de
add first hash of assignee_disambiguatiion
funginstitute/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,nikken1/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,yngcan/patentprocessor,yngcan/patentprocessor,yngcan/patentprocessor
lib/assignee_disambiguation.py
lib/assignee_disambiguation.py
#!/usr/bin/env Python """ Performs a basic assignee disambiguation """ import redis from collections import Counter from Levenshtein import jaro_winkler from alchemy import fetch_session # gives us the `session` variable from alchemy.schema import * THRESHOLD = 0.95 # get alchemy.db from the directory above s = fetch...
bsd-2-clause
Python
3ffe8dd8ed59cb5c03087844534a94b11bb73a8d
Add longest increasing subsequence
gsathya/dsalgo,gsathya/dsalgo
algo/lis.py
algo/lis.py
arr = [1, 6, 3, 5, 9, 7] ans = [1] for i in range(1, len(arr)): t = [] for j in range(i): if arr[i] > arr[j]: t.append(ans[j]+1) else: t.append(ans[j]) ans.append(max(t)) print max(ans)
mit
Python
b7c6b5115ce5aec129af64d6b85c672901a435d3
Add a multiprocessor for particle learning.
probcomp/cgpm,probcomp/cgpm
gpmcc/experiments/particle_engine.py
gpmcc/experiments/particle_engine.py
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
apache-2.0
Python
ac58f25c47c9954a694a98008f8c658ae3a0f840
add a way to merge cut files together
kratsg/optimization,kratsg/optimization,kratsg/optimization
add-cuts.py
add-cuts.py
import os import csv import json def add_cuts(cuts_left, cuts_right): output_dict = {} for h in cuts_left.keys(): output_dict[h] = dict((k, cuts_left[h][k]+cuts_right[h][k]) for k in ["raw", "scaled", "weighted"]) return output_dict if __name__ == '__main__': import argparse import subprocess class ...
mit
Python
db4d640bb4ec5cc3d6e7a21334b3ba35ca6a9268
Create obmplib.py
omiddavoodi/obmplib
obmplib.py
obmplib.py
def read4bint(f, o): ret = f[o+3] ret *= 256 ret += f[o+2] ret *= 256 ret += f[o+1] ret *= 256 ret += f[o] return ret def read2bint(f, o): ret = f[o+1] ret *= 256 ret += f[o] return ret def loadBMP(filename): f = open(filename, 'b+r') bts = f.read() f.close(...
mit
Python
e5a0647862c179fb0840454fd6b827c46a05ecbc
Add check_scattering_factor.py to see atomic scattering factors for X-ray and electrons Commit 41956836
keitaroyam/yamtbx,keitaroyam/yamtbx,keitaroyam/yamtbx,keitaroyam/yamtbx
cctbx_progs/check_scattering_factor.py
cctbx_progs/check_scattering_factor.py
import numpy import cctbx.eltbx.xray_scattering import cctbx.eltbx.e_scattering def fetch_equation(table): return "+".join(["%f*exp(-%f*s**2)" %(a,b) for a,b in zip(table.array_of_a(), table.array_of_b())]) + "+%f" % table.c() def run(elements, smin=0, smax=1, sstep=0.01): #reg = cctbx.xray.scattering_type_re...
bsd-3-clause
Python
3a9807fd14257c49490ec429d7365c902209508c
Add beginnings of a Python driver. Currently just prints out input file.
nostrademons/GumboStats,nostrademons/GumboStats
gumbo_stats.py
gumbo_stats.py
import ctypes import sys def parse_warc(filename): pass def parse_file(filename): with open(filename) as infile: text = infile.read() print(text) if __name__ == '__main__': filename = sys.argv[1] if filename.endswith('.warc.gz'): parse_warc(filename) else: parse_file(filename)
apache-2.0
Python
36d7bc4719490b046d8782465ddeba6e8240233e
Split images into bf and bc bears. Defaults to images.
hypraptive/bearid,hypraptive/bearid,hypraptive/bearid
tools/xml_split_images_locale.py
tools/xml_split_images_locale.py
#! /usr/bin/python3 import sys import argparse import xml_utils as u import datetime from argparse import RawTextHelpFormatter from collections import defaultdict ##------------------------------------------------------------ ## can be called with: ## ## write bc and bf face images to separate files ##--------...
mit
Python
daba5cef48e2194a902c82e263fc6df3a279f826
Add basic Linux LVM support
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/linux_lvm.py
salt/modules/linux_lvm.py
''' Support for Linux LVM2 ''' # Import python libs import re # Import salt libs import salt.utils def __virtual__(): ''' Only load the module if lvm is installed ''' if salt.utils.which('lvm'): return 'lvm' return False def version(): ''' Return LVM version from lvm version ...
apache-2.0
Python
1077d1df94b207606a15a233182a6f6aa07c9625
create module to support vendoring
ceph/remoto,alfredodeza/remoto
vendor.py
vendor.py
import subprocess import os from os import path import traceback import sys import shutil error_msg = """ This library depends on sources fetched when packaging that failed to be retrieved. This means that it will *not* work as expected. Errors encountered: """ def run(cmd): print '[vendoring] Running command:...
mit
Python
5f2c2e4736cfe141b1f717b688b290657e3ddef7
Add script to install gsl-lite package
martinmoene/gsl-lite,martinmoene/gsl-lite,martinmoene/gsl-lite
script/install-gsl-pkg.py
script/install-gsl-pkg.py
#!/usr/bin/env python # # Copyright 2015-2018 by Martin Moene # # gsl-lite is based on GSL: Guideline Support Library, # https://github.com/microsoft/gsl # # This code is licensed under the MIT License (MIT). # # script/install-gsl-pkg.py # from __future__ import print_function import argparse import os import re i...
mit
Python
62ed9524bc1c7ec5aafb44e3e1aea0c313083d64
add script to retrieve catalog statistics
cvmfs/cvmfs,Gangbiao/cvmfs,alhowaidi/cvmfsNDN,Moliholy/cvmfs,Gangbiao/cvmfs,trshaffer/cvmfs,djw8605/cvmfs,MicBrain/cvmfs,MicBrain/cvmfs,trshaffer/cvmfs,cvmfs-testing/cvmfs,djw8605/cvmfs,DrDaveD/cvmfs,reneme/cvmfs,alhowaidi/cvmfsNDN,MicBrain/cvmfs,Gangbiao/cvmfs,trshaffer/cvmfs,DrDaveD/cvmfs,reneme/cvmfs,cvmfs-testing/c...
add-ons/tools/get_info.py
add-ons/tools/get_info.py
#!/usr/bin/env python import sys import cvmfs def usage(): print sys.argv[0] + " <local repo name | remote repo url> [root catalog]" print "This script looks in the given root_catalog (or the repository HEAD) and" print "retrieves the contained statistics counters in CVMFS 2.1 catalogs." print pri...
bsd-3-clause
Python
34e7a8d904b332a91a615043a629725100367d6f
Add ast.GlyphDefinition
googlefonts/fonttools,fonttools/fonttools
Lib/fontTools/voltLib/ast.py
Lib/fontTools/voltLib/ast.py
from __future__ import print_function, division, absolute_import from __future__ import unicode_literals import fontTools.feaLib.ast as ast class VoltFile(ast.Block): def __init__(self): ast.Block.__init__(self, location=None) class GlyphDefinition(ast.Statement): def __init__(self, location, name, g...
mit
Python
52c0006c7d26e821eeba6e4ad07949f8f59b9e86
add wrapper
francois-berder/PyLetMeCreate
letmecreate/click/alcohol.py
letmecreate/click/alcohol.py
#!/usr/bin/env python3 """Python binding of Alcohol Click wrapper of LetMeCreate library.""" import ctypes _LIB = ctypes.CDLL('libletmecreate_click.so') def get_measure(mikrobus_index): """Returns a 16-bit integer from the Accel Click. mikrobus_index: must be 0 (MIKROBUS_1) or 1 (MIKROBUS_2) Note: An e...
bsd-3-clause
Python
a0d5c9aaf0f573ff11beacb6a30a91f90312dd08
Create BitonicSort.py (#386)
TheAlgorithms/Python
sorts/BitonicSort.py
sorts/BitonicSort.py
# Python program for Bitonic Sort. Note that this program # works only when size of input is a power of 2. # The parameter dir indicates the sorting direction, ASCENDING # or DESCENDING; if (a[i] > a[j]) agrees with the direction, # then a[i] and a[j] are interchanged.*/ def compAndSwap(a, i, j, dire): if (di...
mit
Python
7457275762214bef85ad53282eb0bb8bc9d6ddba
Create DetachReAttach.py
Ccantey/ArcGIS-Scripting,Ccantey/ArcGIS-Scripting
DetachReAttach.py
DetachReAttach.py
import csv import arcpy import os import sys input = r"Database Connections\your.sde\pictures featureclass" inputField = "NAME" matchTable = r"C:\Users\<user>\Desktop\matchtable.csv" matchField = "NAME" pathField = r"picture Location" rootdir = r"C:\Root Directory\A-Z pictures\picture" #get subdirectories subdirector...
unlicense
Python
76d2d97183d4e57f9f59f654fc1302bf99740c0b
add failing test
praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo
molo/core/tests/test_models.py
molo/core/tests/test_models.py
import pytest from datetime import datetime, timedelta from django.test import TestCase from molo.core.models import ArticlePage @pytest.mark.django_db class TestModels(TestCase): fixtures = ['molo/core/tests/fixtures/test.json'] def test_article_order(self): now = datetime.now() article1 = ...
bsd-2-clause
Python
1dbfcfd6558a3148ea2726898d65e1e8ef9115fc
Add a management command that imports bug data from YAML files
vipul-sharma20/oh-mainline,Changaco/oh-mainline,openhatch/oh-mainline,SnappleCap/oh-mainline,nirmeshk/oh-mainline,heeraj123/oh-mainline,SnappleCap/oh-mainline,campbe13/openhatch,heeraj123/oh-mainline,eeshangarg/oh-mainline,ehashman/oh-mainline,Changaco/oh-mainline,SnappleCap/oh-mainline,willingc/oh-mainline,sudheesh001...
mysite/customs/management/commands/import_bugimporter_data.py
mysite/customs/management/commands/import_bugimporter_data.py
# This file is part of OpenHatch. # Copyright (C) 2012 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
agpl-3.0
Python
1314da3ffbaa42aca4a917aef8a230478a22be68
Add a script that uses the JSON metadata to create ordered symlinks.
webcomics/dosage,mbrandis/dosage,peterjanes/dosage,Freestila/dosage,wummel/dosage,wummel/dosage,blade2005/dosage,Freestila/dosage,mbrandis/dosage,peterjanes/dosage,webcomics/dosage,blade2005/dosage
scripts/order-symlinks.py
scripts/order-symlinks.py
#!/usr/bin/env python # Copyright (C) 2013 Tobias Gruetzmacher """ This script takes the JSON file created by 'dosage -o json' and uses the metadata to build a symlink farm in the deduced order of the comic. It created those in a subdirectory called 'inorder'. """ from __future__ import print_function import sys import...
mit
Python
a756edd9da035b027e2538228da349592031412e
Create ASCII_Art.py
Alumet/Codingame
Easy/ASCII_Art.py
Easy/ASCII_Art.py
l = int(input()) h = int(input()) t = input() row=[] for i in range(h): row.append(input()) alpha=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] letter=[] for obj in t: found=False for i in range(len(alpha)): if obj.lower()==alpha[i]: ...
mit
Python
3cf77344df5993428cab38f646303e6735ecefd3
Implement shorthand type constructors for users
gdementen/numba,shiquanwang/numba,sklam/numba,ssarangi/numba,GaZ3ll3/numba,gmarkall/numba,numba/numba,pombredanne/numba,gmarkall/numba,pitrou/numba,cpcloud/numba,pombredanne/numba,gdementen/numba,stuartarchibald/numba,jriehl/numba,gmarkall/numba,GaZ3ll3/numba,numba/numba,ssarangi/numba,sklam/numba,IntelLabs/numba,sklam...
numba/typesystem/shorthands.py
numba/typesystem/shorthands.py
""" Shorthands for type constructing, promotions, etc. """ from numba.typesystem import * from numba.minivect import minitypes #------------------------------------------------------------------------ # Utilities #------------------------------------------------------------------------ def is_obj(type): return t...
bsd-2-clause
Python
66591bd481a8c78f9563ef001f0d799a38130869
add version file
PaloAltoNetworks-BD/autofocus-client-library
autofocus/version.py
autofocus/version.py
__version__ = "1.2.0"
isc
Python
8d1d0719b2d43e49f9e3403d147201b34b526a81
Add SubscriptionInfo class
CartoDB/cartoframes,CartoDB/cartoframes
cartoframes/data/observatory/subscription_info.py
cartoframes/data/observatory/subscription_info.py
class SubscriptionInfo(object): def __init__(self, raw_data): self._raw_data = raw_data @property def id(self): return self._raw_data.get('id') @property def estimated_delivery_days(self): return self._raw_data.get('estimated_delivery_days') @property def subscri...
bsd-3-clause
Python
c8f868e24378eebd31a84b5da29d27361eb987de
Create inmoov3.minimalHead.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
home/hairygael/inmoov3.minimalHead.py
home/hairygael/inmoov3.minimalHead.py
#file : InMoov3.minimalHead.py # this will run with versions of MRL above 1695 # a very minimal script for InMoov # although this script is very short you can still # do voice control of a right hand or finger box # It uses WebkitSpeechRecognition, so you need to use Chrome as your default browser for this script to w...
apache-2.0
Python
84edade82d83129afe88a6df7748aab551619c38
Create examples.py
aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,honnibal/spaCy,recognai/spaCy,recognai/spaCy,aikramer2/spaCy,aikramer2/spaCy,honnibal...
spacy/lang/hi/examples.py
spacy/lang/hi/examples.py
# coding: utf8 from __future__ import unicode_literals """ Example sentences to test spaCy and its language models. >>> from spacy.lang.en.examples import sentences >>> docs = nlp.pipe(sentences) """ sentences = [ "एप्पल 1 अरब डॉलर के लिए यू.के. स्टार्टअप खरीदने पर विचार कर रहा है",      "स्वायत्त कार निर्म...
mit
Python
8180c84a98bec11308afca884a4d7fed4738403b
Add tests for new Levenshtein alignment
explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,recognai/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaC...
spacy/tests/test_align.py
spacy/tests/test_align.py
import pytest from .._align import align @pytest.mark.parametrize('string1,string2,cost', [ (b'hello', b'hell', 1), (b'rat', b'cat', 1), (b'rat', b'rat', 0), (b'rat', b'catsie', 4), (b't', b'catsie', 5), ]) def test_align_costs(string1, string2, cost): output_cost, i2j, j2i, matrix = align(str...
mit
Python