function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def get_process_types(self, displayname=None, add_info=False): """Get a list of process types with the specified name.""" params = self._get_params(displayname=displayname) return self._get_instances(Processtype, add_info=add_info, params=params)
SciLifeLab/genologics
[ 25, 39, 25, 9, 1346852014 ]
def get_protocols(self, name=None, add_info=False): """Get the list of existing protocols on the system """ params = self._get_params(name=name) return self._get_instances(Protocol, add_info=add_info, params=params)
SciLifeLab/genologics
[ 25, 39, 25, 9, 1346852014 ]
def get_reagent_lots(self, name=None, kitname=None, number=None, start_index=None): """Get a list of reagent lots, filtered by keyword arguments. name: reagent kit name, or list of names. kitname: name of the kit this lots belong to number: lot number or list of...
SciLifeLab/genologics
[ 25, 39, 25, 9, 1346852014 ]
def _get_params(self, **kwargs): "Convert keyword arguments to a kwargs dictionary." result = dict() for key, value in kwargs.items(): if value is None: continue result[key.replace('_', '-')] = value return result
SciLifeLab/genologics
[ 25, 39, 25, 9, 1346852014 ]
def _get_instances(self, klass, add_info=None, params=dict()): results = [] additionnal_info_dicts = [] tag = klass._TAG if tag is None: tag = klass.__name__.lower() root = self.get(self.get_uri(klass._URI), params=params) while params.get('start-index') is No...
SciLifeLab/genologics
[ 25, 39, 25, 9, 1346852014 ]
def put_batch(self, instances): """Update multiple instances using a single batch request.""" if not instances: return root = None # XML root element for batch request for instance in instances: if root is None: klass = instance.__class__ ...
SciLifeLab/genologics
[ 25, 39, 25, 9, 1346852014 ]
def tostring(self, etree): "Return the ElementTree contents as a UTF-8 encoded XML string." outfile = BytesIO() self.write(outfile, etree) return outfile.getvalue()
SciLifeLab/genologics
[ 25, 39, 25, 9, 1346852014 ]
def date_for_month(month, day, hour, minute): timez = pytz.timezone('US/Pacific') return timez.localize(datetime(YEAR, month, day, hour, minute))
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def june(day, hour, minute): return date_for_month(6, day, hour, minute)
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_game_date(): assert_equals(game.pretty_date, 'April 1')
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_game_description(): assert_equals(game.description, 'at LA Dodgers')
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_all_teams(_get): _get().content = open('tests/fixtures/teams.html').read() teams = baseball.teams() assert_equals(len(teams), 30)
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_first_teams(_get): _get().content = open('tests/fixtures/teams.html').read() team = baseball.teams()[0] assert_equals(team['name'], 'Baltimore Orioles') assert_equals(team['league'], 'AMERICAN') assert_equals(team['division'], 'EAST') assert_equals(team['links']['schedule'], ...
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_results(_get): _get().content = open('tests/fixtures/schedule.html').read() results, _ = baseball.schedule('WEST', 'http://example.com') assert_equals(results, [ baseball.Result('LA Dodgers', april(1, 13, 5), False, False, '4-0'), baseball.Result('LA Dodgers', april(2, 13, 5), False...
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_no_next_game(_get): _get().content = open('tests/fixtures/schedule_current_game.html').read() game_time, game_id = baseball.next_game('http://example.com') assert_equals(game_id, '330406126')
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_next_game_against_bluejays(_get): _get().content = \ open('tests/fixtures/bluejays_with_double_header.html').read() game_time, game_id = baseball.next_game('http://example.com') assert game_time is not None assert_equals('330604126', game_id)
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_next_game(_get): _get().content = open('tests/fixtures/schedule.html').read() game_time, game_id = baseball.next_game('http://example.com') assert_equals(game_id, '330406126') assert_equals(game_time, april(6, 13, 5))
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_upcoming(_get): _get().content = open('tests/fixtures/schedule.html').read() _, upcoming = baseball.schedule('WEST', 'http://example.com') assert_equals(upcoming, [ baseball.Result('St. Louis', april(6, 13, 5), True, None, '0-0'), baseball.Result('St. Louis', april(7, 13, 5), True, ...
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_upcoming_with_skipped(_get): webpage = open('tests/fixtures/bluejays_with_double_header.html').read() _get().content = webpage _, upcoming = baseball.schedule('WEST', 'http://example.com') print(upcoming[0].opponent) assert_equals(upcoming, [ baseball.Result('Toronto', june(4, 19,...
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_standings(_get): _get().content = open('tests/fixtures/standings.html').read() standings = baseball.current_standings('NATIONAL', 'WEST') examples = [ baseball.Standing('San Francisco', 'SF', 3, 1, .75, 0.0, 'Won 3'), baseball.Standing('Colorado', 'COL', 3, 1, .75, 0.0, 'Won 3'), ...
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_parse_gametime_postponed(): gt = baseball.parse_gametime("Mon, Apr 1", "POSTPONED") assert_equals(pytz.utc.localize(datetime(YEAR, 4, 1, 20, 5)), gt)
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_no_team_info(): with assert_raises(Exception): baseball.team_info('Giantssjk')
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_normalize(): assert_equals(baseball.normalize('Giants'), 'GIANTS') assert_equals(baseball.normalize('Francisco Giants'), 'FRANCISCOGIANTS') assert_equals(baseball.normalize('Red-Sox'), 'REDSOX')
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_preview_gametime(): soup = BeautifulSoup(open('tests/fixtures/preview_during.html')) assert_equals(baseball.parse_game_time(soup), datetime(2013, 4, 13, 17, 5, tzinfo=timezone.utc))
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def test_preview_pitcher(): soup = BeautifulSoup(open('tests/fixtures/preview_during.html')) pitcher = baseball.parse_starting_pitcher(soup, 0) assert_equals(pitcher.name, "Bumgarner") assert_equals(pitcher.era, 0.96) assert_equals(pitcher.record, '2-0')
kyleconroy/vogeltron
[ 9, 2, 9, 2, 1365205105 ]
def __init__(self, client, config, serializer, deserializer) -> None: self._client = client self._serialize = serializer self._deserialize = deserializer self._config = config
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {})
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_long_running_output(pipeline_response): deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def list_by_resource_group( self, resource_group_name: str, service_endpoint_policy_name: str, **kwargs: Any
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.list_by_reso...
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def numpy_ndarray(): import numpy return numpy.ndarray
frmdstryr/enamlx
[ 28, 8, 28, 14, 1440384663 ]
def _update_proxy(self, change): """An observer which sends state change to the proxy.""" # The superclass handler implementation is sufficient. super(PlotItem, self)._update_proxy(change)
frmdstryr/enamlx
[ 28, 8, 28, 14, 1440384663 ]
def _update_range(self, change): """Handle updates and changes""" getattr(self.proxy, "set_%s" % change["name"])(change["value"])
frmdstryr/enamlx
[ 28, 8, 28, 14, 1440384663 ]
def _update_proxy(self, change): """An observer which sends state change to the proxy.""" # The superclass handler implementation is sufficient. super(PlotItem2D, self)._update_proxy(change)
frmdstryr/enamlx
[ 28, 8, 28, 14, 1440384663 ]
def _update_proxy(self, change): """An observer which sends state change to the proxy.""" # The superclass handler implementation is sufficient. super(PlotItem3D, self)._update_proxy(change)
frmdstryr/enamlx
[ 28, 8, 28, 14, 1440384663 ]
def _update_proxy(self, change): """An observer which sends state change to the proxy.""" # The superclass handler implementation is sufficient. super(AbstractDataPlotItem, self)._update_proxy(change)
frmdstryr/enamlx
[ 28, 8, 28, 14, 1440384663 ]
def __init__(self, parent): self.myParent = parent self.topContainer = Frame(parent) self.topContainer.pack(side=TOP, expand=1, fill=X, anchor=NW) self.btmContainer = Frame(parent) self.btmContainer.pack(side=BOTTOM, expand=1, fill=X, anchor=NW) path = StringVar() ver = StringVar() path.set(myloc + "\\...
Naozumi/hashgen
[ 1, 2, 1, 1, 1421020772 ]
def writeOut(self,dir,hashfile,toplevel,var,folder): """ walks a directory, and executes a callback on each file """ dir = os.path.abspath(dir) for file in [file for file in os.listdir(dir) if not file in [".",".."]]: nfile = os.path.join(dir,file) if os.path.isdir(nfile): # is a directory hashfile.writ...
Naozumi/hashgen
[ 1, 2, 1, 1, 1421020772 ]
def buttonHandler_a(self, path, var): self.buttonPress(path, var)
Naozumi/hashgen
[ 1, 2, 1, 1, 1421020772 ]
def test_latest(self): _travis = _get_travispy() repo = get_travis_repo(_travis, 'travispy/on_pypy') builds = get_historical_builds(_travis, repo) build = next(builds) assert build.repository_id == 2598880 assert build.id == repo.last_build_id
jayvdb/travis_log_fetch
[ 1, 3, 1, 6, 1445831087 ]
def test_all_small(self): _travis = _get_travispy() repo = get_travis_repo(_travis, 'travispy/on_pypy') builds = get_historical_builds(_travis, repo) ids = [] for build in builds: assert build.repository_id == 2598880 ids.append(build.id) assert...
jayvdb/travis_log_fetch
[ 1, 3, 1, 6, 1445831087 ]
def test_multiple_batches_bootstrap(self): """Test using a repository that has lots of builds, esp. PRs.""" _travis = _get_travispy() repo = get_travis_repo(_travis, 'twbs/bootstrap') builds = get_historical_builds(_travis, repo, _after=12071, ...
jayvdb/travis_log_fetch
[ 1, 3, 1, 6, 1445831087 ]
def test_logical_multiple_job_build(self): target = Target.from_extended_slug('menegazzo/travispy#101.3') _travis = _get_travispy() job = get_historical_job(_travis, target) assert job.repository_id == 2419489 assert job.number == '101.3' assert job.id == 82131391
jayvdb/travis_log_fetch
[ 1, 3, 1, 6, 1445831087 ]
def expand_matcher_configs(ctx, param, matcher_configs): """Expand the given matcher configuration files Expanding directories recursively for YAML files. """ expanded_matcher_configs = [] for matcher_config_file_location in (Path(f) for f in matcher_configs): if matcher_config_file_locatio...
radish-bdd/radish
[ 176, 45, 176, 16, 1433181573 ]
def cli(**kwargs): """radish - The root from red to green. BDD tooling for Python. radish-test can be used to perform tests for the Steps implemented in a radish base directory. Use the `MATCHER_CONFIGS` to pass configuration files containing the Step matchers. """ config = Config(kwargs) ...
radish-bdd/radish
[ 176, 45, 176, 16, 1433181573 ]
def __init__(self, remote, path, repo_type): """constructor""" self.repo_type = repo_type self.remote = remote self.path = path self.sql_database = os.path.join(self.path, 'database.sqlite') self.local_repo = self.connect2repo() self.root_path = os.path.normpath(_...
roscoeZA/GeoGigSync
[ 1, 1, 1, 1, 1427025939 ]
def export_to_shapefiles(self): for t in self.local_repo.trees: if t.path not in ("layer_statistics", "views_layer_statistics", "virts_layer_statistics"): self.local_repo.exportshp('HEAD', t.path, os.path.join('HEAD', t.path, ...
roscoeZA/GeoGigSync
[ 1, 1, 1, 1, 1427025939 ]
def add_commit_push(self, name, email, message): message += " " + str(datetime.now()) self.local_repo.config(geogig.USER_NAME, name) self.local_repo.config(geogig.USER_EMAIL, email) try: self.import_all_shapefiles() except GeoGigException, e: print 'Error...
roscoeZA/GeoGigSync
[ 1, 1, 1, 1, 1427025939 ]
def get_long_description(): with open(os.path.join(os.path.dirname(__file__), "README.rst"), encoding='utf-8') as fp: return fp.read()
avian2/unidecode
[ 427, 56, 427, 15, 1419003867 ]
def verbose(*args): print(*args)
alonsopg/AuthorProfiling
[ 3, 3, 3, 1, 1443224426 ]
def __init__(self, name): """ Initialize a bridge object. """ self.name = name
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def __repr__(self): """ Return a representaion of a bridge object. """ return "<Bridge: %s>" % self.name
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def delif(self, iname): """ Delete an interface from the bridge. """ _runshell([brctlexe, 'delif', self.name, iname], "Could not delete interface %s from %s." % (iname, self.name))
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def stp(self, val=True): """ Turn STP protocol on/off. """ if val: state = 'on' else: state = 'off' _runshell([brctlexe, 'stp', self.name, state], "Could not set stp on %s." % self.name)
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def setbridgeprio(self, prio): """ Set bridge priority value. """ _runshell([brctlexe, 'setbridgeprio', self.name, str(prio)], "Could not set bridge priority in %s." % self.name)
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def setfd(self, time): """ Set bridge forward delay time value. """ _runshell([brctlexe, 'setfd', self.name, str(time)], "Could not set forward delay in %s." % self.name)
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def setmaxage(self, time): """ Set bridge max message age time. """ _runshell([brctlexe, 'setmaxage', self.name, str(time)], "Could not set max message age in %s." % self.name)
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def setpathcost(self, port, cost): """ Set port path cost value for STP protocol. """ _runshell([brctlexe, 'setpathcost', self.name, port, str(cost)], "Could not set path cost in port %s in %s." % (port, self.name))
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def setportprio(self, port, prio): """ Set port priority value. """ _runshell([brctlexe, 'setportprio', self.name, port, str(prio)], "Could not set priority in port %s in %s." % (port, self.name))
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def getid(self): """ Return the bridge id value. """ return self._show()[1]
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def getstp(self): """ Return if STP protocol is enabled. """ return self._show()[2] == 'yes'
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def showstp(self): """ Return STP information. """ raise NotImplementedError()
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def addbr(self, name): """ Create a bridge and set the device up. """ _runshell([brctlexe, 'addbr', name], "Could not create bridge %s." % name) _runshell([ipexe, 'link', 'set', 'dev', name, 'up'], "Could not set link up for %s." % name) return Bridge(name)
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def showall(self): """ Return a list of all available bridges. """ p = _runshell([brctlexe, 'show'], "Could not show bridges.") wlist = map(str.split, p.stdout.read().splitlines()[1:]) brwlist = filter(lambda x: len(x) != 1, wlist) brlist = map(lambda x: x[0], brwlist...
udragon/pybrctl
[ 6, 11, 6, 2, 1421856776 ]
def test_free_basic(self): free = FreeSpaceDevice(free_size=Size("8 GiB"), dev_id=0, start=0, end=1, parents=[MagicMock(type="disk")], logical=True) self.assertTrue(free.is_logical) self.assertFalse(free.is_extended) self.assertFalse(free.is_primary) self.assertEqual(len(free.ch...
rhinstaller/blivet-gui
[ 141, 23, 141, 20, 1399461349 ]
def test_free_disk(self): # free space on a disk disk = MagicMock(type="disk", children=[], is_disk=True, format=MagicMock(type=None)) free = FreeSpaceDevice(free_size=Size("8 GiB"), dev_id=0, start=0, end=1, parents=[disk]) self.assertEqual(free.disk, disk) # free space in a vg...
rhinstaller/blivet-gui
[ 141, 23, 141, 20, 1399461349 ]
def test_resizable(self): with patch("blivetgui.blivet_utils.BlivetUtils.blivet_reset", lambda _: True): storage = BlivetUtils() device = MagicMock(type="", size=Size("1 GiB"), protected=False, format_immutable=False, children=[]) device.format = MagicMock(exists=True, system_mountpo...
rhinstaller/blivet-gui
[ 141, 23, 141, 20, 1399461349 ]
def __init__(self, p_filename): """ Load the given paradigm p_filename is a string representing the filename of a paradigm xml file """ # Store input paradigm filename self.loadParadigm(p_filename) # set default values (text output, to terminal) self.forma...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def show(self, p_string): """ Process and display the given query """ try: # parse the query parse = ParadigmQuery(p_string) except: print "Could not parse query." return try: # Fetch the parsed tree and make present...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def setCSS(self, p_string=None): """ Set the file location for a Cascading Stylesheet: None or filename This allows for simple formatting """ if p_string <> None: print "Using CSS file:", p_string self.output = p_string
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def loadParadigm(self, p_filename ): """ Load the given paradigm (XML file) Attributes are stored in self.attributes Data are stored in self.data
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def __init__(self, p_paradigm, p_tree): """ p_paradigm is the given paradigm (attributes and data) p_tree is the query tree """ # store parameters self.paradigm = p_paradigm self.tree = p_tree # discover the type self.type = self.getType(self.tree)...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getHTML(self): """ Returns values in html (table) form """ return self.item.getHTML()
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getText(self): """ Returns values in plain text form """ return self.item.getText()
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getMaxWidth(self): """ Returns the width in number of characters """ return self.item.getMaxWidth()
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getDepth(self): """ Get the depth """ return self.item.getDepth()
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def __init__(self, p_paradigm, p_tree): """ p_paradigm is the given paradigm (attributes and data) p_tree is the query tree """ self.paradigm = p_paradigm # Validate that this is a domain assert self.getType(p_tree) == 'D' # Store the attribute sel...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getList(self): """ Return the domain in list form """ return self.paradigm.attributes[self.attribute]
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getHorizontalHTML(self,p_parentSpan=1): """ Return a horizontal html table """ ret_string = "" for item in self.getList(): ret_string += "<td>" + item + "</td>" return "<tr>" + ret_string*p_parentSpan + "</tr>"
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getConditions(self): """ Return a list of conditions for each combination (cell) """ ret_conds = [] for item in self.getList(): new = {self.attribute: item} #new[self.attribute] = item ret_conds.append(new) return ret_conds
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getSpan(self): """ Get the span of this domain (number of elements) """ return len(self.getList())
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def __init__(self, p_paradigm, p_tree): """ p_paradigm is the given paradigm (attributes and data) p_tree is the tree representation of this part of the query (Tree) """ self.paradigm = p_paradigm self.error = None self.tree = p_tree # Validate that this ...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getHTML(self): """ Return a html table for this hierarchy """ ret_string = "" for index in range(len(self.root.getList())): leafCells = self.leaf.getHTML()[4:] ret_string += "<tr><td rowspan=\"" + str(self.leaf.getSpan()) + "\">" + self.root[index] \ ...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getText(self): """ Return text for this hierarchy """ ret_string = "" # Lengths for rendering display max_width_root = self.root.getMaxWidth() max_width_leaf = self.leaf.getMaxWidth() # add root string and call getText() for leaf node # (newlin...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getMaxWidth(self): """ Return the maximum width (in chars) this hierarchy will take up """ return self.root.getMaxWidth() + self.leaf.getMaxWidth() + 1
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getSpan(self): """ Get the span (for HTML tables) of this hierarchy """ return self.root.getSpan() * self.leaf.getSpan()
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def __init__(self, p_paradigm, p_tree): """ p_paradigm is the given paradigm (attributes and data) p_tree is the tree representation of this part of the query (Tree) """ self.paradigm = p_paradigm self.error = None self.tree = p_tree # Validate that this ...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getHTML(self): """ Return a html table for this table operation """ # Start with the dead cell dead_cell = "<tr><td colspan=\"" + str(self.vertical.getDepth()) \ + "\" rowspan=\"" + str(self.horizontal.getDepth()) \ + "\"></td>"...
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getHorizontalHTML(self,p_parentSpan=1): """ Return a horizontal html table (?) """ print "?: getHorizontalHTML() called on a table." return None
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getConditions(self): """ Return conditions for this table (?) """ print "?: getConditions() called on a table. I don't think so." return None
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def getSpan(self): """ Return span for this table (?) """ print "WTF: getSpan() called on a table." return None
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def dictJoin(dict1,dict2): """ A handy function to join two dictionaries If there is any key overlap, dict1 wins! (just make sure this doesn't happen) """ for key in dict1.keys(): dict2[key] = dict1[key] return dict2
RensaProject/nodebox_linguistics_extended
[ 2, 11, 2, 1, 1479284521 ]
def test_index(self): response = self.client.get('/') self.assertEqual(response.status_code, 200)
archlinux/archweb
[ 270, 117, 270, 77, 1370983197 ]
def test_art(self): response = self.client.get('/art/') self.assertEqual(response.status_code, 200)
archlinux/archweb
[ 270, 117, 270, 77, 1370983197 ]
def test_donate(self): response = self.client.get('/donate/') self.assertEqual(response.status_code, 200)
archlinux/archweb
[ 270, 117, 270, 77, 1370983197 ]
def test_master_keys(self): response = self.client.get('/master-keys/') self.assertEqual(response.status_code, 200)
archlinux/archweb
[ 270, 117, 270, 77, 1370983197 ]
def test_feeds(self): response = self.client.get('/feeds/') self.assertEqual(response.status_code, 200)
archlinux/archweb
[ 270, 117, 270, 77, 1370983197 ]
def __init__(self, *args, **kwargs): self.hard = kwargs.pop('hard', False) super().__init__(*args, **kwargs)
Cube777/dotgit
[ 158, 13, 158, 2, 1451246258 ]
def apply(self, source, dest): shutil.copy2(source, dest)
Cube777/dotgit
[ 158, 13, 158, 2, 1451246258 ]
def remove(self, source, dest): if self.hard: shutil.copy2(source, dest) else: os.symlink(source, dest)
Cube777/dotgit
[ 158, 13, 158, 2, 1451246258 ]