100+ results results for 'import glob lang:python' (332 ms)

Not the results you expected?
run.bsh https://jedit.svn.sourceforge.net/svnroot/jedit | Unknown | 62 lines
                    
1/**
                    
2	Run a command in its own in its own private global namespace, with its
                    
3	own class manager and interpeter context.  (kind of like unix "chroot" for 
                    
8	extended it is effectively read only / copy on write...  
                    
9	e.g. you can change directories in the child context, do imports, change
                    
10	the classpath, etc. and it will not affect the calling context.
                    
35{
                    
36	// Our local namespace is going to be the new root (global)
                    
37	// make local copies of the system stuff.
                    
40	// this is problematic...  probably need more here...
                    
41	this.bsh=extend(global.bsh); 
                    
42	this.bsh.help=extend(bsh.help);
                    
47
                    
48	// Cut us off... make us the root (global) namespace for this command
                    
49	// Prune() will also create a new class manager for us.
                    
                
histcache.py https://bitbucket.org/beqa/nvdadependencyvirtualenvironment.git | Python | 262 lines
                    
23#-----------------------------------------------------------------------------#
                    
24# Imports
                    
25
                    
26#-----------------------------------------------------------------------------#
                    
27# Globals
                    
28HIST_CACHE_UNLIMITED = -1
                    
                
replace_dimensions.py https://bitbucket.org/iimarckus/pokered-greenified.git | Python | 245 lines
                    
3#replace dimensions with constants
                    
4import sys #for non-newline-terminated output :/
                    
5from add_map_labels_to_map_headers import find_with_start_of_line
                    
5from add_map_labels_to_map_headers import find_with_start_of_line
                    
6from pretty_map_headers import map_name_cleaner, spacing, offset_to_pointer, map_constants
                    
7from connection_helper import print_connections
                    
7from connection_helper import print_connections
                    
8from ctypes import c_int8
                    
9
                    
39def load_asm():
                    
40    global asm, asm_lines
                    
41    asm = open("../main.asm", "r").read()
                    
73def find_line_starting_with(value):
                    
74    global asm_lines
                    
75    id = 0
                    
                
test_dummy_thread.py https://bitbucket.org/x893/sirflive.git | Python | 181 lines
                    
7"""
                    
8import dummy_thread as _thread
                    
9import time
                    
9import time
                    
10import Queue
                    
11import random
                    
11import random
                    
12import unittest
                    
13from test import test_support
                    
169
                    
170def test_main(imported_module=None):
                    
171    global _thread, DELAY
                    
171    global _thread, DELAY
                    
172    if imported_module:
                    
173        _thread = imported_module
                    
                
test_context.py https://github.com/ioggstream/pysmbc.git | Python | 195 lines
                    
1#!/usr/bin/env python
                    
2import os
                    
3import smbc
                    
3import smbc
                    
4import settings
                    
5import nose
                    
5import nose
                    
6from nose.plugins.skip import SkipTest
                    
7
                    
30def setUp():
                    
31    global ctx
                    
32    ctx = smbc.Context()
                    
37def tearDown():
                    
38    global ctx
                    
39    del ctx
                    
                
__init__.py https://github.com/ichiro101/l2adena-l2j-datapack.git | Python | 210 lines
                    
3# Visit http://www.l2jdp.com/forum/ for more details
                    
4import sys
                    
5from com.l2jserver.gameserver.model.quest import State
                    
5from com.l2jserver.gameserver.model.quest import State
                    
6from com.l2jserver.gameserver.model.quest import QuestState
                    
7from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
                    
7from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
                    
8from com.l2jserver.gameserver.network.serverpackets import SocialAction
                    
9
                    
113     st.giveItems(MARK_OF_RAIDER,1)
                    
114     isFinished = st.getGlobalQuestVar("1ClassQuestFinished")
                    
115     if isFinished == "" : 
                    
125     st.exitQuest(False)
                    
126     st.saveGlobalQuestVar("1ClassQuestFinished","1")
                    
127     st.playSound("ItemSound.quest_finish")
                    
                
otl2table.py https://github.com/companygardener/vimoutliner.git | Python | 222 lines
                    
39
                    
40import sys
                    
41from string import *
                    
41from string import *
                    
42#from time import *
                    
43
                    
44###########################################################################
                    
45# global variables
                    
46
                    
96def getArgs():
                    
97  global inputfile, debug, noTrailing, formatMode
                    
98  if (len(sys.argv) == 1): 
                    
158def closeLevels():
                    
159  global level,columns,noTrailing,formatMode
                    
160  if noTrailing == 1 :
                    
                
pyenv.py https://gitlab.com/ricardo.hernandez/salt | Python | 326 lines
                    
10'''
                    
11from __future__ import absolute_import
                    
12
                    
12
                    
13# Import python libs
                    
14import os
                    
14import os
                    
15import re
                    
16import logging
                    
18try:
                    
19    from shlex import quote as _cmd_quote  # pylint: disable=E0611
                    
20except ImportError:
                    
20except ImportError:
                    
21    from pipes import quote as _cmd_quote
                    
22
                    
                
test_Counter.py https://gitlab.com/grayhamster/pycrypto | Python | 155 lines
                    
28
                    
29import sys
                    
30if sys.version_info[0] == 2 and sys.version_info[1] == 1:
                    
30if sys.version_info[0] == 2 and sys.version_info[1] == 1:
                    
31    from Crypto.Util.py21compat import *
                    
32from Crypto.Util.py3compat import *
                    
33
                    
34import unittest
                    
35
                    
37    def setUp(self):
                    
38        global Counter
                    
39        from Crypto.Util import Counter
                    
147def get_tests(config={}):
                    
148    from Crypto.SelfTest.st_common import list_test_cases
                    
149    return list_test_cases(CounterTests)
                    
                
test_example_iauthfunctions.py https://gitlab.com/iislod/ckan | Python | 261 lines
                    
3'''
                    
4import paste.fixture
                    
5import pylons.test
                    
5import pylons.test
                    
6import pylons.config as config
                    
7import webtest
                    
8
                    
9import ckan.model as model
                    
10import ckan.tests.legacy as tests
                    
10import ckan.tests.legacy as tests
                    
11import ckan.plugins
                    
12import ckan.tests.factories as factories
                    
25        # Return a test app with the custom config.
                    
26        app = ckan.config.middleware.make_app(config['global_conf'], **config)
                    
27        app = webtest.TestApp(app)
                    
                
graph_visitor.py https://github.com/srossross/Meta.git | Python | 402 lines
                    
5'''
                    
6from meta.asttools import Visitor, visit_children
                    
7
                    
7
                    
8import _ast
                    
9from meta.asttools.visitors.symbol_visitor import get_symbols
                    
10try:
                    
11    from networkx import DiGraph
                    
12except ImportError:
                    
162
                    
163class GlobalDeps(object):
                    
164    def __init__(self, gen, nodes):
                    
182    def depends_on(self, nodes):
                    
183        return GlobalDeps(self, set(nodes))
                    
184
                    
                
Create.py https://github.com/PerilousApricot/WMCore.git | Python | 357 lines
                    
6
                    
7import threading
                    
8
                    
8
                    
9from WMCore.Database.DBCreator import DBCreator
                    
10
                    
39                 valid_status      VARCHAR2(20),
                    
40                 global_tag        VARCHAR2(255),
                    
41                 parent            VARCHAR2(500),
                    
                
pytracer.py https://gitlab.com/jorjpimm/lldb | Python | 328 lines
                    
1import sys
                    
2import inspect
                    
2import inspect
                    
3from collections import OrderedDict
                    
4
                    
201def enable(t=None):
                    
202	global tracer_impl
                    
203	if t:
                    
                
test_plot3d.py https://github.com/thearn/OpenMDAO-Framework.git | Python | 214 lines
                    
4
                    
5import logging
                    
6import os.path
                    
6import os.path
                    
7import tempfile
                    
8import shutil
                    
8import shutil
                    
9import unittest
                    
10
                    
10
                    
11from openmdao.lib.datatypes.domain import read_plot3d_q, write_plot3d_q, \
                    
12                                          read_plot3d_f, write_plot3d_f, \
                    
14
                    
15from openmdao.lib.datatypes.domain.test.wedge import create_wedge_2d, \
                    
16                                                     create_wedge_3d
                    
                
poly.py https://github.com/tnorth/PyTables.git | Python | 192 lines
                    
8
                    
9import os
                    
10import sys
                    
10import sys
                    
11from time import time
                    
12import numpy as np
                    
12import numpy as np
                    
13import tables as tb
                    
14import numexpr as ne
                    
22
                    
23# Global variable for the x values for pure numpy & numexpr
                    
24x = None
                    
57    """Populate the values in x axis for numpy."""
                    
58    global x
                    
59    # Populate x in range [-1, 1]
                    
                
xpath.py https://github.com/openhatch/oh-mainline.git | Python | 333 lines
                    
14try:
                    
15    import cStringIO as StringIO
                    
16except ImportError:
                    
16except ImportError:
                    
17    import StringIO
                    
18
                    
103    klassname = "_%s_Function" % fname
                    
104    c = globals()[klassname]()
                    
105    return c
                    
280        self.queryStr = queryStr
                    
281        from twisted.words.xish.xpathparser import parse
                    
282        self.baseLocation = parse('XPATH', queryStr)
                    
                
args.py https://gitlab.com/pooja043/Globus_Docker_3 | Python | 398 lines
                    
10
                    
11import os
                    
12from sys import argv
                    
12from sys import argv
                    
13from glob import glob
                    
14from collections import OrderedDict
                    
16def _expand_path(path):
                    
17    """Expands directories and globs in given path."""
                    
18
                    
28    else:
                    
29        paths.extend(glob(path))
                    
30
                    
356    def not_files(self):
                    
357        """Returns a list of all arguments that aren't files/globs."""
                    
358
                    
                
0004_auto__add_heading__add_genericcontent__add_link__add_field_remote_styl.py https://bitbucket.org/mohjive/automagically.git | Python | 152 lines
                    
1# -*- coding: utf-8 -*-
                    
2import datetime
                    
3from south.db import db
                    
3from south.db import db
                    
4from south.v2 import SchemaMigration
                    
5from django.db import models
                    
69        },
                    
70        'core.globalvariable': {
                    
71            'Meta': {'object_name': 'GlobalVariable'},
                    
135            'Meta': {'object_name': 'VariableValue', '_ormbases': ['remote.Widget']},
                    
136            'var': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.GlobalVariable']"}),
                    
137            'widget_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['remote.Widget']", 'unique': 'True', 'primary_key': 'True'})
                    
                
XDMF.py https://bitbucket.org/pefarrell/dolfin.git | Python | 239 lines
                    
34            mesh2 = Mesh("output/mesh.xdmf")
                    
35            self.assertEqual(mesh.size_global(0), mesh2.size_global(0))
                    
36            dim = mesh.topology().dim()
                    
36            dim = mesh.topology().dim()
                    
37            self.assertEqual(mesh.size_global(dim), mesh2.size_global(dim))
                    
38
                    
43            mesh2 = Mesh("output/mesh_2D.xdmf")
                    
44            self.assertEqual(mesh.size_global(0), mesh2.size_global(0))
                    
45            dim = mesh.topology().dim()
                    
45            dim = mesh.topology().dim()
                    
46            self.assertEqual(mesh.size_global(dim), mesh2.size_global(dim))
                    
47
                    
52            mesh2 = Mesh("output/mesh_3D.xdmf")
                    
53            self.assertEqual(mesh.size_global(0), mesh2.size_global(0))
                    
54            dim = mesh.topology().dim()
                    
                
test_hog.py https://github.com/neurodebian/scikits.image-1.git | Python | 142 lines
                    
1import numpy as np
                    
2from scipy import ndimage
                    
2from scipy import ndimage
                    
3from skimage import data
                    
4from skimage import feature
                    
4from skimage import feature
                    
5from skimage import img_as_float
                    
6from skimage import draw
                    
6from skimage import draw
                    
7from numpy.testing import (assert_raises,
                    
8                           assert_almost_equal,
                    
66        if False:
                    
67            import matplotlib.pyplot as plt
                    
68            plt.figure()
                    
122        if False:
                    
123            import matplotlib.pyplot as plt
                    
124            plt.figure()
                    
                
test_poisson_extravacuum.py https://gitlab.com/asod/gpaw | Python | 178 lines
                    
1import pytest
                    
2from gpaw.mpi import world
                    
2from gpaw.mpi import world
                    
3import time
                    
4import numpy as np
                    
5
                    
6from gpaw.poisson import PoissonSolver
                    
7from gpaw.poisson_extended import ExtendedPoissonSolver
                    
7from gpaw.poisson_extended import ExtendedPoissonSolver
                    
8from gpaw.poisson_extravacuum import ExtraVacuumPoissonSolver
                    
9from gpaw.grid_descriptor import GridDescriptor
                    
26    else:
                    
27        from gpaw.test import equal
                    
28
                    
49        if gd.comm.rank == 0:
                    
50            import matplotlib.pyplot as plt
                    
51            fig, ax_ij = plt.subplots(3, 4, figsize=(20, 10))
                    
                
abc.py https://github.com/atoun/jsrepl.git | Python | 185 lines
                    
5
                    
6import types
                    
7
                    
7
                    
8from _weakrefset import WeakSet
                    
9
                    
80
                    
81    # A global counter that is incremented each time a class is
                    
82    # registered as a virtual subclass of anything.  It forces the
                    
                
fileutils.py https://gitlab.com/mattyhead/easyengine | Python | 268 lines
                    
1"""EasyEngine file utils core classes."""
                    
2import shutil
                    
3import os
                    
4import sys
                    
5import glob
                    
6import shutil
                    
6import shutil
                    
7import pwd
                    
8import fileinput
                    
8import fileinput
                    
9from ee.core.logging import Log
                    
10
                    
                
tagreading.py https://github.com/MM294/Soprano-Player.git | Python | 232 lines
                    
1from mutagenx.mp3 import MP3
                    
2from mutagenx.id3 import ID3
                    
2from mutagenx.id3 import ID3
                    
3from mutagenx.mp4 import MP4
                    
4from mutagenx.oggvorbis import OggVorbis
                    
4from mutagenx.oggvorbis import OggVorbis
                    
5from mutagenx.flac import FLAC
                    
6from mutagenx.asf import ASF
                    
7import os.path, magic
                    
8from settings import sopranoGlobals, settings
                    
9
                    
55	def radioInfo(self, filepath):
                    
56		self.editPref = settings.IconoPrefs(sopranoGlobals.RADIO_DATA)
                    
57		stations = self.editPref.get_radioStations()
                    
91	def id3Info(self, filepath):
                    
92		#from time import time as systime
                    
93		#systime1 = systime()
                    
                
Stream.py https://github.com/randfb/sim42.git | Python | 310 lines
                    
7"""
                    
8from sim.solver.Error import SimError
                    
9from sim.solver.Variables import *
                    
9from sim.solver.Variables import *
                    
10from sim.solver import S42Glob
                    
11from sim.solver.Ports import SIGNAL_TYPE_NONE
                    
11from sim.solver.Ports import SIGNAL_TYPE_NONE
                    
12from sim.solver.Messages import MessageHandler
                    
13import UnitOperations
                    
254                if PropTypes[currName].unitType != PropTypes[validateName].unitType:
                    
255                    equivalent = S42Glob.unitSystem.IsEquivalentType(PropTypes[currName].unitType, PropTypes[validateName].unitType)
                    
256            except:
                    
                
formats.py https://gitlab.com/benji-bou/urotechchallenge-Serenity | Python | 258 lines
                    
1import datetime
                    
2import decimal
                    
3import unicodedata
                    
3import unicodedata
                    
4from importlib import import_module
                    
5
                    
5
                    
6from django.conf import settings
                    
7from django.utils import dateformat, datetime_safe, numberformat, six
                    
7from django.utils import dateformat, datetime_safe, numberformat, six
                    
8from django.utils.encoding import force_str
                    
9from django.utils.functional import lazy
                    
9from django.utils.functional import lazy
                    
10from django.utils.safestring import mark_safe
                    
11from django.utils.translation import (
                    
                
test_http_connection.py https://gitlab.com/shpeely/game-stats | Python | 207 lines
                    
1from integration_tests.http_test import HttpBaseTest
                    
2import json
                    
2import json
                    
3import pytz
                    
4from datetime import datetime
                    
4from datetime import datetime
                    
5from unittest.mock import MagicMock
                    
6from game_stats.connection import Mutation, Query
                    
95
                    
96    def test_set_global_meta(self):
                    
97        # given
                    
105        self.connection.handle_request.assert_called_with(
                    
106            Mutation.set_global_meta, meta
                    
107        )
                    
108
                    
109    def test_set_global_meta_datetime(self):
                    
110        # given
                    
                
gradient_descent_test.py https://gitlab.com/hrishikeshvganu/tensorflow | Python | 169 lines
                    
16"""Functional test for GradientDescent."""
                    
17from __future__ import absolute_import
                    
18from __future__ import division
                    
18from __future__ import division
                    
19from __future__ import print_function
                    
20
                    
20
                    
21import numpy as np
                    
22import tensorflow as tf
                    
115
                    
116  def testWithGlobalStep(self):
                    
117    for dtype in [tf.half, tf.float32]:
                    
125            zip([grads0, grads1], [var0, var1]),
                    
126            global_step=global_step)
                    
127        tf.initialize_all_variables().run()
                    
                
scrobbler.py https://github.com/andersbll/sonata.git | Python | 222 lines
                    
5Example usage:
                    
6import scrobbler
                    
7self.scrobbler = scrobbler.Scrobbler(self.config)
                    
7self.scrobbler = scrobbler.Scrobbler(self.config)
                    
8self.scrobbler.import_module()
                    
9self.scrobbler.init()
                    
13
                    
14import logging
                    
15import os
                    
15import os
                    
16import sys
                    
17import threading # init, np, post start threads init_thread, do_np, do_post
                    
17import threading # init, np, post start threads init_thread, do_np, do_post
                    
18import time
                    
19
                    
                
test_funcattrs.py https://github.com/lalitjsraks/pypy.git | Python | 414 lines
                    
1from test.test_support import verbose, TestFailed, verify
                    
2import types
                    
122
                    
123from UserDict import UserDict
                    
124d = UserDict({'four': 44, 'five': 55})
                    
134# im_func may not be a Python method!
                    
135import new
                    
136F.id = new.instancemethod(id, None, F)
                    
272
                    
273def test_func_globals():
                    
274    def f(): pass
                    
274    def f(): pass
                    
275    verify(f.func_globals is globals())
                    
276    cantset(f, "func_globals", globals())
                    
287    verify(f.func_name == "h")
                    
288    cantset(f, "func_globals", 1)
                    
289    cantset(f, "__name__", 1)
                    
                
test_rule_management_views.py https://github.com/plone/plone.app.contentrules.git | Python | 156 lines
                    
4from plone.app.contentrules.rule import Rule
                    
5from plone.app.contentrules.tests.base import ContentRulesTestCase
                    
6from plone.contentrules.engine.interfaces import IRuleStorage
                    
6from plone.contentrules.engine.interfaces import IRuleStorage
                    
7from zope.component import getMultiAdapter
                    
8from zope.component import getUtility
                    
145
                    
146        portal.restrictedTraverse("@@contentrule-globally-enable").globally_enable()
                    
147        self.assertTrue(storage.active)
                    
148
                    
149        portal.restrictedTraverse("@@contentrule-globally-disable").globally_disable()
                    
150        self.assertFalse(storage.active)
                    
151
                    
152        portal.restrictedTraverse("@@contentrule-globally-enable").globally_enable()
                    
153        self.assertTrue(storage.active)
                    
                
evolution.py https://gitlab.com/hassanbot/NEATram | Python | 228 lines
                    
1import copy  # For copying genome
                    
2import collections  # For making Population into a list with MutableSequence
                    
2import collections  # For making Population into a list with MutableSequence
                    
3import logging
                    
4import random
                    
49        """Constructor: Creates a new minimal individual, or from genome if supplied"""
                    
50        global next_gene_id
                    
51        global next_neuron_id
                    
125                return
                    
126        global next_gene_id
                    
127        new_connection = Connection(from_neuron, to_neuron, weight, next_gene_id, enabled=enabled)
                    
136        The old connection is disabled"""
                    
137        global next_neuron_id
                    
138        x_pos = (connection.to_neuron.position[0] + connection.from_neuron.position[0]) / 2.0
                    
                
hibeamlattice.py https://bitbucket.org/berkeleylab/warp.git | Python | 179 lines
                    
2# DPG 7/22/99
                    
3import re
                    
4import string
                    
122    def __init__(self,parent,**changes):
                    
123        self.parent = eval(parent,globals())
                    
124        self.__dict__.update(changes)
                    
176            if mfinish.group('u'):
                    
177                return eval(mfinish.group('use'),globals())
                    
178        else:
                    
178        else:
                    
179            exec(d,globals())
                    
180
                    
                
templating.py https://github.com/bowlingb/flask.git | Python | 310 lines
                    
11
                    
12import flask
                    
13import unittest
                    
13import unittest
                    
14from flask.testsuite import FlaskTestCase
                    
15
                    
256
                    
257    def test_add_template_global(self):
                    
258        app = flask.Flask(__name__)
                    
258        app = flask.Flask(__name__)
                    
259        @app.template_global()
                    
260        def get_stuff():
                    
261            return 42
                    
262        self.assert_in('get_stuff', app.jinja_env.globals.keys())
                    
263        self.assert_equal(app.jinja_env.globals['get_stuff'], get_stuff)
                    
                
mock_objects.py https://github.com/wdzhou/mantid.git | Python | 215 lines
                    
1from __future__ import (absolute_import)
                    
2
                    
2
                    
3from ui.sans_isis.sans_data_processor_gui import SANSDataProcessorGui
                    
4from ui.sans_isis.settings_diagnostic_tab import SettingsDiagnosticTab
                    
4from ui.sans_isis.settings_diagnostic_tab import SettingsDiagnosticTab
                    
5from ui.sans_isis.masking_table import MaskingTable
                    
6from sans.gui_logic.presenter.run_tab_presenter import RunTabPresenter
                    
6from sans.gui_logic.presenter.run_tab_presenter import RunTabPresenter
                    
7from sans.common.enums import (RangeStepType, OutputMode)
                    
8from sans.test_helper.test_director import TestDirector
                    
9
                    
10import sys
                    
11if sys.version_info.major == 3:
                    
11if sys.version_info.major == 3:
                    
12    from unittest import mock
                    
13else:
                    
                
conversion.py https://github.com/mcahriman/Skype4Py.git | Python | 526 lines
                    
5
                    
6import os
                    
7
                    
7
                    
8import enums
                    
9
                    
13# are included in the package built by py2exe. The tool looks just at
                    
14# the imports, it ignores the 'if' statement.
                    
15#
                    
18if False:
                    
19    import lang
                    
20    
                    
513        try:
                    
514            self._Module = __import__('lang.%s' % Language, globals(), locals(), ['lang'])
                    
515            self._Language = str(Language)
                    
                
0002_auto__add_localprofile__add_localflusurvey.py https://github.com/asdahlborg/epiwork-website.git | Python | 199 lines
                    
1# encoding: utf-8
                    
2import datetime
                    
3from south.db import db
                    
3from south.db import db
                    
4from south.v2 import SchemaMigration
                    
5from django.db import models
                    
189            'Meta': {'object_name': 'SurveyUser'},
                    
190            'global_id': ('django.db.models.fields.CharField', [], {'default': "'83aac21f-dc32-44d9-894d-54f72337a890'", 'unique': 'True', 'max_length': '36'}),
                    
191            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
                    
                
Vtf.py https://gitlab.com/envieidoc/Clover | Python | 197 lines
                    
17#
                    
18from GenFdsGlobalVariable import GenFdsGlobalVariable
                    
19import Common.LongFilePathOs as os
                    
19import Common.LongFilePathOs as os
                    
20from CommonDataClass.FdfClass import VtfClassObject
                    
21from Common.LongFilePathSupport import OpenLongFilePath as open
                    
74                               " = " + \
                    
75                               GenFdsGlobalVariable.MacroExtend(GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.ResetBin)) + \
                    
76                               T_CHAR_LF)
                    
124            if BinPath != '-':
                    
125                BinPath = GenFdsGlobalVariable.MacroExtend(GenFdsGlobalVariable.ReplaceWorkspaceMacro(BinPath))
                    
126            BsfInf.writelines ("COMP_BIN" + \
                    
132            if SymPath != '-':
                    
133                SymPath = GenFdsGlobalVariable.MacroExtend(GenFdsGlobalVariable.ReplaceWorkspaceMacro(SymPath))
                    
134            BsfInf.writelines ("COMP_SYM" + \
                    
                
unsupervised.py https://github.com/bvtrach/scikit-learn.git | Python | 193 lines
                    
6
                    
7import numpy as np
                    
8
                    
8
                    
9from ...utils import check_random_state
                    
10from ..pairwise import pairwise_distances
                    
50        The generator used to initialize the centers. If an integer is
                    
51        given, it fixes the seed. Defaults to the global numpy random
                    
52        number generator.
                    
                
0025_auto__add_valuehistorymem__add_valuehistory.py https://bitbucket.org/mohjive/automagically.git | Python | 186 lines
                    
1# -*- coding: utf-8 -*-
                    
2import datetime
                    
3from south.db import db
                    
3from south.db import db
                    
4from south.v2 import SchemaMigration
                    
5from django.db import models
                    
73            'command': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Command']"}),
                    
74            'condition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.GlobalVariable']", 'null': 'True', 'blank': 'True'}),
                    
75            'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Device']"}),
                    
79        },
                    
80        'core.globalvariable': {
                    
81            'Meta': {'object_name': 'GlobalVariable'},
                    
123            'command': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Command']"}),
                    
124            'condition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.GlobalVariable']", 'null': 'True', 'blank': 'True'}),
                    
125            'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Device']"}),
                    
                
compat.py https://gitlab.com/billyprice1/tribler | Python | 146 lines
                    
6
                    
7import io
                    
8import os
                    
8import os
                    
9import glob
                    
10import json
                    
10import json
                    
11import pickle
                    
12import cPickle
                    
17from Tribler.Core.SessionConfig import SessionStartupConfig
                    
18from Tribler.Main.globals import DefaultDownloadStartupConfig
                    
19from Tribler.Core.simpledefs import PERSISTENTSTATE_CURRENTVERSION
                    
122    if os.path.exists(checkpoint_dir):
                    
123        for old_filename in glob.glob(os.path.join(checkpoint_dir, '*.pickle')):
                    
124            old_checkpoint = None
                    
                
thunk.py https://github.com/alemacgo/pypy.git | Python | 223 lines
                    
3    $ py.py -o thunk
                    
4    >>> from __pypy__ import thunk, lazy, become
                    
5    >>> def f():
                    
30
                    
31from pypy.objspace.proxy import patch_space_in_place
                    
32from pypy.interpreter import gateway, baseobjspace, argument
                    
32from pypy.interpreter import gateway, baseobjspace, argument
                    
33from pypy.interpreter.error import OperationError
                    
34from pypy.interpreter.function import Method
                    
122def become(space, w_target, w_source):
                    
123    """Globally replace the target object with the source one."""
                    
124    w_target = force(space, w_target)
                    
208    # for now, always make up a wrapped StdObjSpace
                    
209    from pypy.objspace import std
                    
210    space = std.Space(*args, **kwds)
                    
                
test_fixedwidth.py https://github.com/jiffyclub/astropy.git | Python | 408 lines
                    
1import re
                    
2import glob
                    
3import numpy as np
                    
3import numpy as np
                    
4from ... import ascii as asciitable
                    
5
                    
7
                    
8from .common import (raises,
                    
9                     assert_equal, assert_almost_equal, assert_true,
                    
                
debugger.py https://github.com/kumaryu/IronLanguages-main.git | Python | 203 lines
                    
1import sys, traceback, string
                    
2
                    
2
                    
3from win32com.axscript import axscript
                    
4from win32com.axdebug import codecontainer, axdebug, gateways, documents, contexts, adb, expressions
                    
4from win32com.axdebug import codecontainer, axdebug, gateways, documents, contexts, adb, expressions
                    
5from win32com.axdebug.util import trace, _wrap, _wrap_remove
                    
6
                    
6
                    
7import pythoncom
                    
8import win32api, winerror
                    
8import win32api, winerror
                    
9import os
                    
10
                    
123        expressionProvider = _wrap(expressions.ProvideExpressionContexts(), axdebug.IID_IProvideExpressionContexts)
                    
124        self.expressionCookie = self.app.AddGlobalExpressionContextProvider(expressionProvider)
                    
125
                    
                
generatedssuper.py https://github.com/botondus/generateds.git | Python | 210 lines
                    
1
                    
2import sys
                    
3from generateds_definedsimpletypes import Defined_simple_type_table
                    
6#
                    
7# Globals
                    
8
                    
                
labels.py https://github.com/arianepaola/tg2jython.git | Python | 195 lines
                    
1import testenv; testenv.configure_for_tests()
                    
2from sqlalchemy import *
                    
2from sqlalchemy import *
                    
3from sqlalchemy import exc as exceptions
                    
4from testlib import *
                    
4from testlib import *
                    
5from sqlalchemy.engine import default
                    
6
                    
19    def setUpAll(self):
                    
20        global metadata, table1, table2, maxlen
                    
21        metadata = MetaData(testing.db)
                    
                
ascii_colossal.py https://github.com/al8/sublimetext-colossal.git | Python | 201 lines
                    
1from __future__ import absolute_import
                    
2from __future__ import division
                    
2from __future__ import division
                    
3from __future__ import print_function
                    
4from __future__ import unicode_literals
                    
5
                    
6import string
                    
7
                    
147def load(debug_print = False):
                    
148    global g_char_dict
                    
149    print("ASCII COLOSSAL: Loading")
                    
172if __name__ != "__main__":
                    
173    import sublime, sublime_plugin
                    
174
                    
                
node_minimal.py https://github.com/exosite-garage/synapse_nodes.git | Python | 121 lines
                    
37# Use Synapse Evaluation Board definitions
                    
38from synapse.evalBase import *
                    
39
                    
74#------------------------------------------------------------------------------
                    
75    global secondCounter, timerCounter, node_name
                    
76    secondCounter = 0 # Used by the system for one second count
                    
90#------------------------------------------------------------------------------
                    
91    global secondCounter
                    
92    secondCounter += 1
                    
100#------------------------------------------------------------------------------
                    
101    global timerCounter
                    
102    timerCounter += 1
                    
111#------------------------------------------------------------------------------
                    
112    global node_name
                    
113    mcastRpc(DEVICE_GROUP, 10, "publishData",node_name,resource_name,resource_value)
                    
                
GlobalOptions.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 103 lines
✨ Summary

This Java class, GlobalOptions, extends OptionsDialog and provides a global options dialog for the jEdit text editor. It creates an option tree model with two main groups: “jedit” and “browser”, which contain various options related to editing, syntax highlighting, and browser settings. The dialog is customizable through its constructors and can be used to store user preferences.

                    
1/*
                    
2 * GlobalOptions.java - Global options dialog
                    
3 * :tabSize=8:indentSize=8:noTabs=false:
                    
24
                    
25//{{{ Imports
                    
26import java.awt.Dialog;
                    
26import java.awt.Dialog;
                    
27import java.awt.Frame;
                    
28import org.gjt.sp.jedit.gui.OptionsDialog;
                    
28import org.gjt.sp.jedit.gui.OptionsDialog;
                    
29import org.gjt.sp.jedit.options.*;
                    
30import org.gjt.sp.jedit.*;
                    
30import org.gjt.sp.jedit.*;
                    
31import org.gjt.sp.util.Log;
                    
32//}}}
                    
                
test_pkg.py https://github.com/akheron/cpython.git | Python | 295 lines
                    
6import textwrap
                    
7import unittest
                    
8from test import support
                    
35# __init__ importing submodule
                    
36# __init__ importing global module
                    
37# __init__ defining variables
                    
39# submodule importing global module
                    
40# submodule import submodule via global name
                    
41# from package import submodule
                    
68    def run_code(self, code):
                    
69        exec(textwrap.dedent(code), globals(), {"self": self})
                    
70
                    
117        s = """
                    
118            import t2
                    
119            from t2 import *
                    
                
test_threads.py https://github.com/openhatch/oh-mainline.git | Python | 164 lines
                    
9
                    
10from weakref import ref
                    
11import gc
                    
12
                    
13from twisted.internet.test.reactormixins import ReactorBuilder
                    
14from twisted.python.threadpool import ThreadPool
                    
163
                    
164globals().update(ThreadTestsBuilder.makeTestCaseClasses())
                    
165
                    
                
pasterapp.py https://gitlab.com/chaifegn/myblog | Python | 210 lines
                    
4# See the NOTICE for more information.
                    
5from __future__ import print_function
                    
6
                    
12    import configparser as ConfigParser
                    
13except ImportError:
                    
14    import ConfigParser
                    
29
                    
30def paste_config(gconfig, config_url, relative_to, global_conf=None):
                    
31    # add entry to pkg_resources
                    
36    cx = loadwsgi.loadcontext(SERVER, config_url, relative_to=relative_to,
                    
37                              global_conf=global_conf)
                    
38    gc, lc = cx.global_conf.copy(), cx.local_conf.copy()
                    
68    return loadapp(config_url, relative_to=relative_to,
                    
69            global_conf=global_conf)
                    
70
                    
                
test_plugins.py https://bitbucket.org/WscriChy/vim-configuration.git | Python | 213 lines
                    
2import unittest
                    
3import tools
                    
4
                    
88    def test_plugin_oder(self):
                    
89        self.app.install(MyPlugin()).add_content = ';global-1'
                    
90        self.app.install(MyPlugin()).add_content = ';global-2'
                    
97        def a(): return 'plugin'
                    
98        self.assertBody('plugin;global-2;global-1', '/a')
                    
99        self.assertBody('plugin;local-2;local-1;global-2;global-1', '/b')
                    
102        g1 = self.app.install(MyPlugin())
                    
103        g1.add_content = ';global-1'
                    
104        g2 = self.app.install(MyPlugin())
                    
112        def a(): return 'plugin'
                    
113        self.assertBody('plugin;global-1', '/a')
                    
114        self.assertBody('plugin;local-1;global-1', '/b')
                    
                
test_interpnd.py https://github.com/mantidproject/3rdpartylibs-win64.git | Python | 216 lines
                    
1import numpy as np
                    
2from numpy.testing import assert_equal, assert_allclose, assert_almost_equal, \
                    
4
                    
5import scipy.interpolate.interpnd as interpnd
                    
6import scipy.spatial.qhull as qhull
                    
7
                    
8import pickle
                    
9
                    
94
                    
95class TestEstimateGradients2DGlobal(object):
                    
96    def test_smoketest(self):
                    
111            z = func(x[:,0], x[:,1])
                    
112            dz = interpnd.estimate_gradients_2d_global(tri, z, tol=1e-6)
                    
113
                    
                
fix_next.py https://github.com/atoun/jsrepl.git | Python | 103 lines
                    
7
                    
8# Local imports
                    
9from ..pgen2 import token
                    
9from ..pgen2 import token
                    
10from ..pygram import python_symbols as syms
                    
11from .. import fixer_base
                    
11from .. import fixer_base
                    
12from ..fixer_util import Name, Call, find_binding
                    
13
                    
13
                    
14bind_warning = "Calls to builtin next() possibly shadowed by global binding"
                    
15
                    
30    |
                    
31    global=global_stmt< 'global' any* 'next' any* >
                    
32    """
                    
                
test_formextender.py https://github.com/plone/plone.app.portlets.git | Python | 266 lines
                    
3from plone.app.portlets.portlets import news
                    
4from plone.app.portlets.storage import PortletAssignmentMapping
                    
5from plone.app.portlets.tests.base import PortletsTestCase
                    
5from plone.app.portlets.tests.base import PortletsTestCase
                    
6from plone.portlets.interfaces import IPortletAssignment
                    
7from plone.portlets.interfaces import IPortletAssignmentSettings
                    
12from plone.z3cform.fieldsets.interfaces import IFormExtender
                    
13from z3c.form import field
                    
14from zope import schema
                    
15from zope.component import adapter
                    
16from zope.component import getGlobalSiteManager
                    
17from zope.component import getMultiAdapter
                    
165        # Register our schemaextender
                    
166        gsm = getGlobalSiteManager()
                    
167        gsm.registerAdapter(PortletCssClassAdapter, (IPortletAssignment,))
                    
                
query.py https://github.com/vitormazzi/django-jython.git | Python | 136 lines
                    
6
                    
7import datetime
                    
8from django.db.backends import util
                    
18    The 'Database' module (cx_Oracle) is passed in here so that all the setup
                    
19    required to import it only needs to be done by the calling module.
                    
20    """
                    
20    """
                    
21    global _classes
                    
22    try:
                    
35        def convert_values(self, value, field):
                    
36            from django.db.models.fields import DateField, DateTimeField, \
                    
37                 TimeField, BooleanField, NullBooleanField, DecimalField, FloatField, Field
                    
                
Install.py https://github.com/dtgit/dtedu.git | Python | 170 lines
                    
6from Products.Archetypes import listTypes
                    
7from Products.FAQ import PROJECTNAME,product_globals
                    
8
                    
23    @type _layer: string
                    
24    @ivar _prodglobals: Globals from this Product.
                    
25    @type _propglobals: mapping object
                    
32        @type skinsdir: string
                    
33        @param prodglobals: Globals from this Product.
                    
34
                    
36
                    
37            C{product_globals = globals()}
                    
38
                    
43        self._skinsdir = skinsdir
                    
44        self._prodglobals = prodglobals
                    
45        return
                    
                
symtable.py https://github.com/atoun/jsrepl.git | Python | 242 lines
                    
3import _symtable
                    
4from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM,
                    
5     DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC,
                    
5     DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC,
                    
6     SCOPE_OFF, SCOPE_MASK, FREE, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT, CELL, LOCAL)
                    
7
                    
144
                    
145    def get_globals(self):
                    
146        if self.__globals is None:
                    
146        if self.__globals is None:
                    
147            glob = (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
                    
148            test = lambda x:((x >> SCOPE_OFF) & SCOPE_MASK) in glob
                    
192    def is_global(self):
                    
193        return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT))
                    
194
                    
                
test_content.py https://github.com/kcleong/plone.app.page.git | Python | 85 lines
                    
1import unittest2 as unittest
                    
2
                    
14    def test_attributes_and_reindexing(self):
                    
15        from zope.lifecycleevent import modified
                    
16
                    
33    def test_behavior_registered(self):
                    
34        from zope.component import getUtility
                    
35        from plone.behavior.interfaces import IBehavior
                    
35        from plone.behavior.interfaces import IBehavior
                    
36        from plone.app.blocks.layoutbehavior import ILayoutAware
                    
37
                    
43    def test_behavior_defaults(self):
                    
44        from plone.app.blocks.layoutbehavior import ILayoutAware
                    
45        
                    
58        from zope.component import provideUtility
                    
59        from zope.component import getGlobalSiteManager
                    
60        
                    
                
trail.py https://gitlab.com/pgeorgiev_vmw/idem-aws | Python | 334 lines
                    
1import copy
                    
2from collections import OrderedDict
                    
2from collections import OrderedDict
                    
3from typing import Any
                    
4from typing import Dict
                    
4from typing import Dict
                    
5from typing import List
                    
6
                    
77    sns_topic_name: str,
                    
78    include_global_service_events: bool,
                    
79    is_multi_region_trail: bool,
                    
93            "SnsTopicName": sns_topic_name,
                    
94            "IncludeGlobalServiceEvents": include_global_service_events,
                    
95            "IsMultiRegionTrail": is_multi_region_trail,
                    
136            "SnsTopicName": "sns_topic_name",
                    
137            "IncludeGlobalServiceEvents": "include_global_service_events",
                    
138            "IsMultiRegionTrail": "is_multi_region_trail",
                    
                
cob_exporter.py https://gitlab.com/brian0218/rk3188_rk3066_r-box_android4.4.2_sdk | Python | 75 lines
                    
1import os, bpy, struct
                    
2from bpy_extras.io_utils import ExportHelper
                    
2from bpy_extras.io_utils import ExportHelper
                    
3from bpy.props import StringProperty, BoolProperty, EnumProperty
                    
4
                    
20        "tracker_url": "",
                    
21        "category": "Import-Export"
                    
22        }
                    
25    '''Exports the current scene into a Compressed Object format.'''
                    
26    bl_idname = "export.cob_exporter"  # this is important since its how bpy.ops.export.cob_exporter is constructed
                    
27    bl_label = "COB Exporter"
                    
30
                    
31    filter_glob = StringProperty(default="*.cob", options={'HIDDEN'})
                    
32
                    
                
DuckLib.py https://github.com/vranki/wiishooter.git | Python | 426 lines
                    
7
                    
8import pygame, random
                    
9pygame.init()
                    
326        self.negaCounter  = 0
                    
327        global score
                    
328
                    
334
                    
335        global score
                    
336
                    
                
test_current_flow_betweenness_centrality_subset.py https://bitbucket.org/shenli/socialgraph.git | Python | 181 lines
                    
1#!/usr/bin/env python
                    
2from nose.tools import *
                    
3from nose import SkipTest
                    
3from nose import SkipTest
                    
4import networkx
                    
5from nose.plugins.attrib import attr
                    
6
                    
7from networkx import edge_current_flow_betweenness_centrality \
                    
8    as edge_current_flow
                    
9
                    
10from networkx import edge_current_flow_betweenness_centrality_subset \
                    
11    as edge_current_flow_subset
                    
16    def setupClass(cls):
                    
17        global np
                    
18        try:
                    
                
Visitor.py https://github.com/tylergreen/mython.git | Python | 296 lines
                    
11# ______________________________________________________________________
                    
12# Module imports
                    
13
                    
57    """
                    
58    global flags
                    
59    retVal = []
                    
                
test_zcml.py https://github.com/plone/plone.resource.git | Python | 111 lines
                    
1# -*- coding: utf-8 -*-
                    
2import os.path
                    
3import unittest
                    
4
                    
5from plone.resource.interfaces import IResourceDirectory
                    
6from six import StringIO
                    
6from six import StringIO
                    
7from zope.component import getUtility
                    
8from zope.component.testing import tearDown
                    
8from zope.component.testing import tearDown
                    
9from zope.configuration.exceptions import ConfigurationError
                    
10from zope.configuration.xmlconfig import XMLConfig, xmlconfig
                    
14    # Copy from ``zope.component.tests.examples``
                    
15    from zope.configuration.xmlconfig import XMLConfig
                    
16    import zope.component
                    
                
meta.py https://github.com/ashwoods/Python-Markdown.git | Python | 96 lines
                    
10
                    
11    >>> import markdown
                    
12    >>> text = '''Title: A Test Doc.
                    
42"""
                    
43import re
                    
44
                    
44
                    
45import markdown
                    
46
                    
46
                    
47# Global Vars
                    
48META_RE = re.compile(r'^[ ]{0,3}(?P<key>[A-Za-z0-9_-]+):\s*(?P<value>.*)')
                    
53
                    
54    def extendMarkdown(self, md, md_globals):
                    
55        """ Add MetaPreprocessor to Markdown instance. """
                    
                
ShortcutScopeExample.py https://github.com/rwl/muntjac.git | Python | 92 lines
                    
1
                    
2from muntjac.api import \
                    
3    VerticalLayout, HorizontalLayout, Panel, TextField, Button
                    
4
                    
5from muntjac.event.shortcut_listener import ShortcutListener
                    
6from muntjac.ui.component import IFocusable
                    
6from muntjac.ui.component import IFocusable
                    
7from muntjac.ui.abstract_field import FocusShortcut
                    
8from muntjac.event.shortcut_action import KeyCode, ModifierKey
                    
8from muntjac.event.shortcut_action import KeyCode, ModifierKey
                    
9from muntjac.ui.button import ClickShortcut, IClickListener
                    
10
                    
40
                    
41        # Using firstname.addShortcutListener() would add globally,
                    
42        # but we want the shortcut only in this panel:
                    
                
transaction.py https://github.com/GoodCloud/johnny-cache.git | Python | 318 lines
                    
3
                    
4from django.db import transaction as django_transaction
                    
5from django.db import connection
                    
6try:
                    
7    from django.db import DEFAULT_DB_ALIAS
                    
8except:
                    
11try:
                    
12    from functools import wraps
                    
13except ImportError:
                    
13except ImportError:
                    
14    from django.utils.functional import wraps  # Python 2.3, 2.4 fallback.
                    
15
                    
16
                    
17import django
                    
18
                    
                
test_properties.py https://github.com/geojeff/kivy.git | Python | 393 lines
                    
4
                    
5import unittest
                    
6from kivy.event import EventDispatcher
                    
6from kivy.event import EventDispatcher
                    
7from functools import partial
                    
8
                    
19    def test_base(self):
                    
20        from kivy.properties import Property
                    
21
                    
31    def test_observer(self):
                    
32        from kivy.properties import Property
                    
33
                    
37        self.assertEqual(a.get(wid), -1)
                    
38        global observe_called
                    
39        observe_called = 0
                    
                
analytical_solver.py https://gitlab.com/gmarciani/pydes | Python | 215 lines
                    
1from core.analytical.analytical_solution import AnalyticalSolution
                    
2from core.utils.logutils import ConsoleHandler
                    
2from core.utils.logutils import ConsoleHandler
                    
3from core.simulation.model.scope import TaskScope
                    
4from core.utils.report import SimpleReport as Report
                    
4from core.utils.report import SimpleReport as Report
                    
5from core.random.rndvar import Variate
                    
6from core.simulation.model.scope import SystemScope
                    
6from core.simulation.model.scope import SystemScope
                    
7from core.markov import markovgen
                    
8import logging
                    
146        self.solution.performance_metrics.population[SystemScope.SYSTEM][TaskScope.TASK_2] = N_sys_2
                    
147        self.solution.performance_metrics.population[SystemScope.SYSTEM][TaskScope.GLOBAL] = N_sys
                    
148        self.solution.performance_metrics.response[SystemScope.SYSTEM][TaskScope.TASK_1] = T_sys_1
                    
149        self.solution.performance_metrics.response[SystemScope.SYSTEM][TaskScope.TASK_2] = T_sys_2
                    
150        self.solution.performance_metrics.response[SystemScope.SYSTEM][TaskScope.GLOBAL] = T_sys
                    
151        self.solution.performance_metrics.throughput[SystemScope.SYSTEM][TaskScope.TASK_1] = X_sys_1
                    
                
hw2_part2_sol1.py https://github.com/andrewdyates/CSE-630.git | Python | 304 lines
                    
3
                    
4import sys
                    
5
                    
5
                    
6# GLOBAL AGENT STATES
                    
7item1 = 0 # int >= 0, 0: empty
                    
24  """
                    
25  global item1
                    
26  global item2
                    
26  global item2
                    
27  global hand
                    
28  
                    
                
ssh.py https://gitlab.com/github-cloud-corp/aws-cli | Python | 187 lines
                    
20from awscli.customizations.emr import sshutils
                    
21from awscli.customizations.emr.command import Command
                    
22
                    
42                session=self._session,
                    
43                parsed_globals=parsed_globals,
                    
44                cluster_id=parsed_args.cluster_id)
                    
81            session=self._session,
                    
82            parsed_globals=parsed_globals,
                    
83            cluster_id=parsed_args.cluster_id)
                    
127            session=self._session,
                    
128            parsed_globals=parsed_globals,
                    
129            cluster_id=parsed_args.cluster_id)
                    
166            session=self._session,
                    
167            parsed_globals=parsed_globals,
                    
168            cluster_id=parsed_args.cluster_id)
                    
                
DTField.py https://gitlab.com/liuxin429go/H2D2-tools | Python | 268 lines
                    
9
                    
10from . import FEMesh
                    
11from . import DTData
                    
12try:
                    
13    from .DTReducOperation    import REDUCTION_OPERATION as Operation
                    
14except ImportError:
                    
14except ImportError:
                    
15    from .DTReducOperation_pp import REDUCTION_OPERATION as Operation
                    
16
                    
16
                    
17import numpy as np
                    
18
                    
257        import os
                    
258        p = 'E:/Projets_simulation/EQ/Dry-Wet/Simulations/GLOBAL_01/Simulation/global01_0036'
                    
259        f = os.path.join(p, 'simul000.pst.sim')
                    
                
SearchAction.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 219 lines
✨ Summary

This Java code defines an Action class called SearchAction, which is used to open a search dialog for a selected directory or project in a text editor. When executed, it searches for files within the specified path and allows users to filter results by file type. The action also handles recursive searching of directories and excludes binary files if configured to do so.

                    
20
                    
21//{{{ Imports
                    
22import java.io.FileInputStream;
                    
22import java.io.FileInputStream;
                    
23import java.io.InputStream;
                    
24import java.io.IOException;
                    
24import java.io.IOException;
                    
25import java.io.Reader;
                    
26
                    
26
                    
27import java.util.HashSet;
                    
28import java.util.Enumeration;
                    
29
                    
30import java.util.regex.Matcher;
                    
31import java.util.regex.Pattern;
                    
                
trainer.py https://gitlab.com/hrishikeshvganu/tensorflow | Python | 75 lines
                    
15
                    
16from __future__ import absolute_import
                    
17from __future__ import division
                    
21
                    
22from tensorflow.python.framework import ops
                    
23from tensorflow.python.ops import init_ops
                    
23from tensorflow.python.ops import init_ops
                    
24from tensorflow.python.ops import clip_ops
                    
25from tensorflow.python.ops import control_flow_ops
                    
27from tensorflow.python.ops import variables
                    
28from tensorflow.python.ops import variable_scope as vs
                    
29from tensorflow.contrib.layers import optimizers
                    
47    loss: Tensor, loss value.
                    
48    global_step: Tensor, global step of the model.
                    
49    feed_dict_fn: Function that will return a feed dictionary.
                    
                
test_gibbs.py https://github.com/arokem/dipy.git | Python | 265 lines
                    
1import numpy as np
                    
2from dipy.denoise.gibbs import (_gibbs_removal_1d, _gibbs_removal_2d,
                    
3                                gibbs_removal, _image_tv)
                    
4from numpy.testing import (assert_, assert_array_almost_equal, assert_raises)
                    
5
                    
8    """Module-level setup"""
                    
9    global image_gibbs, image_gt, image_cor, Nre
                    
10
                    
                
updateMismatchAndMiddleFlatOLD.py https://github.com/JasonAng/ResearchScripts.git | Python | 91 lines
                    
1import bioLibCG
                    
2import cgNexusFlat
                    
2import cgNexusFlat
                    
3import cgPeaks
                    
4import cgAlignmentFlat
                    
88if __name__ == "__main__":
                    
89        import sys
                    
90        bioLibCG.submitArgs(globals()[sys.argv[1]], sys.argv[1:])
                    
                
operation_tracker.py https://github.com/heyman/django-debug-toolbar-mongo.git | Python | 236 lines
                    
1import functools
                    
2import traceback
                    
2import traceback
                    
3import time
                    
4import inspect
                    
4import inspect
                    
5import os
                    
6import SocketServer
                    
7
                    
8import django
                    
9from django.conf import settings
                    
10
                    
11import pymongo
                    
12import pymongo.collection
                    
12import pymongo.collection
                    
13import pymongo.cursor
                    
14
                    
                
storage.py https://github.com/koder-ua/megarepo.git | Python | 98 lines
                    
1import glob
                    
2
                    
18try:
                    
19    import couchdb
                    
20        
                    
81            
                    
82except ImportError:
                    
83    CouchDBStorage = None
                    
91    for name, hwip in s.get_all():
                    
92        if glob.fnmatch.fnmatchcase(name, template):
                    
93            yield name, hwip
                    
                
test_numpad.py https://bitbucket.org/abotev/ssnasa_r2_simulator.git | Python | 183 lines
                    
13
                    
14import math
                    
15import roslib
                    
17
                    
18import sys, unittest
                    
19import os, os.path, threading, time
                    
19import os, os.path, threading, time
                    
20import rospy, rostest
                    
21
                    
21
                    
22from std_msgs.msg import String
                    
23from helper import *
                    
23from helper import *
                    
24from gazebo_taskboard.msg import *
                    
25from gazebo_taskboard.srv import *
                    
                
utils.py https://github.com/opevans/Sahana-Timeline.git | Python | 192 lines
                    
35
                    
36import rpy2.rinterface as r
                    
37
                    
48            r.initr ()
                    
49            R._execute = r.globalEnv.get
                    
50            R._library = R._execute ('library')
                    
56    @staticmethod
                    
57    def importLibrary (string):
                    
58        R._start ()
                    
110def Group (arg=None):
                    
111    global groupCounter
                    
112    if arg is None:
                    
                
murphy.py https://bitbucket.org/imotai/diffviewer.git | Python | 80 lines
                    
11
                    
12from pygments.style import Style
                    
13from pygments.token import Keyword, Name, Comment, String, Error, \
                    
44        Name.Variable.Class:       "#ccf",
                    
45        Name.Variable.Global:      "#f84",
                    
46        Name.Constant:             "bold #5ed",
                    
                
ScatterPlot.py https://gitlab.com/pkormos/phase_python | Python | 102 lines
                    
8## Add path to library (just for examples; you do not need this)
                    
9import initExample
                    
10
                    
10
                    
11from pyqtgraph.Qt import QtGui, QtCore
                    
12import pyqtgraph as pg
                    
12import pyqtgraph as pg
                    
13import numpy as np
                    
14
                    
48def clicked(plot, points):
                    
49    global lastClicked
                    
50    for p in lastClicked:
                    
98if __name__ == '__main__':
                    
99    import sys
                    
100    if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
                    
                
caabatools.py https://gitlab.com/RolfSander/caaba-mecca | Python | 70 lines
                    
8
                    
9import sys, os
                    
10assert sys.version_info >= (3, 6)
                    
10assert sys.version_info >= (3, 6)
                    
11import re # regexp
                    
12from netCDF4 import Dataset
                    
41                 Dataset('caaba_mecca_rr.nc', 'w', format='NETCDF3_CLASSIC') as ncid_out2:
                    
42                # copy global attributes all at once via dictionary:
                    
43                ncid_out1.setncatts(ncid_in.__dict__)
                    
                
pystone.py https://bitbucket.org/x893/sirflive.git | Python | 266 lines
                    
117            IntLoc1 = IntLoc1 + 1
                    
118        Proc8(Array1Glob, Array2Glob, IntLoc1, IntLoc3)
                    
119        PtrGlb = Proc1(PtrGlb)
                    
160def Proc3(PtrParOut):
                    
161    global IntGlob
                    
162
                    
170def Proc4():
                    
171    global Char2Glob
                    
172
                    
178    global Char1Glob
                    
179    global BoolGlob
                    
180
                    
208def Proc8(Array1Par, Array2Par, IntParI1, IntParI2):
                    
209    global IntGlob
                    
210
                    
                
test_attribute_customize.py https://bitbucket.org/mdavid/dlr.git | Python | 272 lines
                    
15
                    
16from iptest.assert_util import *
                    
17
                    
17
                    
18global flag
                    
19
                    
63def test_setattr_alone():
                    
64    global flag
                    
65    
                    
68    def f(self): self.x = 10
                    
69    def simply_record(self, name, value): global flag; flag = "%s %s" % (name, value)
                    
70    def simply_throw(self, name, value):  raise AssertionError
                    
                
jedit_gui.props https://jedit.svn.sourceforge.net/svnroot/jedit | MSBuild | 1824 lines
                    
15	<!-- Add lines like the following, one for each edit mode you add: -->\n\
                    
16	<!-- <MODE NAME="foo" FILE="foo.xml" FILE_NAME_GLOB="*.foo" /> -->\n\
                    
17	\n\
                    
54	undo redo cut copy paste - find find-next - new-view unsplit \
                    
55	split-horizontal split-vertical - buffer-options global-options - \
                    
56	plugin-manager - help
                    
73buffer-options.icon=Properties24.gif
                    
74global-options.icon=Preferences24.gif
                    
75plugin-manager.icon=BeanAdd24.gif
                    
118	Host24.gif \
                    
119	Import24.gif \
                    
120	Information24.gif \
                    
532buffer-options.label=$Buffer Options...
                    
533global-options.label=$Global Options...
                    
534#}}}
                    
                
ArrayVariableDeclaration.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 161 lines
✨ Summary

This Java class represents an array variable declaration in a PHP script. It extends the Expression class and contains two expressions: a key and a value, which can be either another expression or null. The class provides methods to analyze code, get modified variables, used variables, and more, allowing it to work with PHP’s syntax tree.

                    
22
                    
23import gatchan.phpparser.parser.PHPParser;
                    
24import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
                    
25
                    
26import java.util.List;
                    
27
                    
103	/**
                    
104	 * Get the variables from outside (parameters, globals ...)
                    
105	 *
                    
                
Mode.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 285 lines
✨ Summary

This Java class, Mode, represents an edit mode for a text editor. It defines settings and properties for editing specific types of files, such as syntax highlighting and folding. The class provides methods to initialize, load, and set properties, as well as check if the current buffer matches the specified file name and first line.

                    
64		{
                    
65			String filenameGlob = (String)getProperty("filenameGlob");
                    
66			if(filenameGlob != null && filenameGlob.length() != 0)
                    
71
                    
72			String firstlineGlob = (String)getProperty("firstlineGlob");
                    
73			if(firstlineGlob != null && firstlineGlob.length() != 0)
                    
226		String filenameGlob = (String)this.props.get("filenameGlob");
                    
227		String firstlineGlob = (String)this.props.get("firstlineGlob");
                    
228		String filename = (String)this.props.get("file");
                    
230		if(filenameGlob != null)
                    
231			props.put("filenameGlob",filenameGlob);
                    
232		if(firstlineGlob != null)
                    
232		if(firstlineGlob != null)
                    
233			props.put("firstlineGlob",firstlineGlob);
                    
234		if(filename != null)
                    
                
qt_cocoa_helpers_mac.mm https://bitbucket.org/ultra_iter/qt-vtl.git | Objective C++ | 1824 lines
                    
101
                    
102Q_GLOBAL_STATIC(QMacWindowFader, macwindowFader);
                    
103
                    
237
                    
238Q_GLOBAL_STATIC(DnDParams, currentDnDParameters);
                    
239DnDParams *macCurrentDnDParameters()
                    
440
                    
441Q_GLOBAL_STATIC(QMacTabletHash, tablet_hash)
                    
442QMacTabletHash *qt_mac_tablet_hash()
                    
913                NSRect contentRect = [window contentRectForFrameRect:frameRect];
                    
914                qglobalPoint = QPoint(flipPoint(globalPoint).toPoint());
                    
915                QWidget *w = widgetToGetEvent->childAt(widgetToGetEvent->mapFromGlobal(qglobalPoint));
                    
918                if (fakeNCEvents || (!NSMouseInRect(globalPoint, contentRect, NO) && !w)) {
                    
919                    qglobalPoint = QPoint(flipPoint(globalPoint).toPoint());
                    
920                    qlocalPoint = widgetToGetEvent->mapFromGlobal(qglobalPoint);
                    
                
ViewOptionPane.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 213 lines
✨ Summary

This Java code defines a custom dialog box for editing view options in an editor application. It includes settings such as dock layout, toolbar layout, showing full path and search bar, and buffer switcher behavior. The dialog box updates the application’s properties when changed and provides buttons to toggle between different layouts.

                    
24
                    
25import javax.swing.border.*;
                    
26import javax.swing.*;
                    
26import javax.swing.*;
                    
27import java.awt.event.*;
                    
28import java.awt.*;
                    
28import java.awt.*;
                    
29import org.gjt.sp.jedit.*;
                    
30import org.gjt.sp.jedit.bufferset.BufferSet;
                    
30import org.gjt.sp.jedit.bufferset.BufferSet;
                    
31import org.gjt.sp.jedit.bufferset.BufferSetManager;
                    
32
                    
124		defaultBufferSet = new JComboBox();
                    
125		defaultBufferSet.addItem(BufferSet.Scope.global);
                    
126		defaultBufferSet.addItem(BufferSet.Scope.view);
                    
                
actionscript.xml https://jedit.svn.sourceforge.net/svnroot/jedit | XML | 830 lines
                    
135
                    
136			<!-- Global functions -->
                    
137			<LITERAL2>Boolean</LITERAL2>
                    
209			<LITERAL2>getDepth</LITERAL2>
                    
210			<LITERAL2>globalToLocal</LITERAL2>
                    
211			<LITERAL2>hitTest</LITERAL2>
                    
211			<LITERAL2>hitTest</LITERAL2>
                    
212			<LITERAL2>localToGlobal</LITERAL2>
                    
213			<LITERAL2>setMask</LITERAL2>
                    
419			<!-- Function -->
                    
420			<LITERAL2>_global</LITERAL2>
                    
421			<LITERAL2>apply</LITERAL2>
                    
803
                    
804			<KEYWORD2>import</KEYWORD2>
                    
805			<KEYWORD1>instanceof</KEYWORD1>
                    
                
example-vc.vcproj https://swig.svn.sourceforge.net/svnroot/swig | Unknown | 159 lines
                    
38				SubSystem="2"
                    
39				ImportLibrary="$(OutDir)/example-vc.lib"
                    
40				TargetMachine="1"/>
                    
85				EnableCOMDATFolding="2"
                    
86				ImportLibrary="$(OutDir)/example-vc.lib"
                    
87				TargetMachine="1"/>
                    
155	</Files>
                    
156	<Globals>
                    
157	</Globals>
                    
                
perlkw.swg https://swig.svn.sourceforge.net/svnroot/swig | Unknown | 252 lines
                    
126PERLBN(fcntl);
                    
127PERLBN(glob);
                    
128PERLBN(ioctl);
                    
162PERLKW(caller);
                    
163PERLKW(import);
                    
164PERLKW(local);
                    
202PERLKW(do);
                    
203PERLKW(import);
                    
204PERLKW(no);
                    
227PERLBN(formline);
                    
228PERLBN(glob);
                    
229PERLBN(import);
                    
                
perl.xml https://jedit.svn.sourceforge.net/svnroot/jedit | XML | 733 lines
                    
179
                    
180		<!-- file globs / IO operators -->
                    
181		<SEQ_REGEXP HASH_CHAR="&lt;" TYPE="KEYWORD4">&lt;[\p{Punct}\p{Alnum}_]*&gt;</SEQ_REGEXP>
                    
432			<KEYWORD3>fcntl</KEYWORD3>
                    
433			<KEYWORD3>glob</KEYWORD3>
                    
434			<KEYWORD3>ioctl</KEYWORD3>
                    
465			<!--<KEYWORD1>caller</KEYWORD1>-->
                    
466			<!--<KEYWORD1>import</KEYWORD1>-->
                    
467			<KEYWORD1>local</KEYWORD1>
                    
503			<!--<KEYWORD1>do</KEYWORD1>-->
                    
504			<KEYWORD1>import</KEYWORD1>
                    
505			<KEYWORD1>no</KEYWORD1>
                    
                
build.xml https://jedit.svn.sourceforge.net/svnroot/jedit | XML | 207 lines
                    
21		 command line by adding '-Ddocs-proc.target=xalan' or in any of the
                    
22		 build.properties files that are imported. If you do not have any
                    
23		 documentation, set the 'build-docs.not-required' property to any value and
                    
40			 because it allows you to specify properties that affect all plugins.
                    
41		 - ${user.home}/.build.properties : Allows you to specify global properties
                    
42			 that are to be shared across all Ant projects.  This file is hidden by
                    
43			 unix file standard.
                    
44		 - ${user.home}/.build.properties : Allows you to specify global properties
                    
45			 that are to be shared across all Ant projects.
                    
117		<echo file="docbook-wrapper.xsl" append="true"
                    
118			message="&lt;xsl:import href='${docbook.xsl}/html/chunk.xsl'/&gt;"/>
                    
119		<echo file="docbook-wrapper.xsl" append="true"
                    
                
freemarker.xml https://jedit.svn.sourceforge.net/svnroot/jedit | XML | 205 lines
                    
69    <SPAN_REGEXP TYPE="KEYWORD1" DELEGATE="EXPRESSION" HASH_CHAR="&lt;">
                    
70      <BEGIN>&lt;#?(if|elseif|switch|foreach|list|case|assign|local|global|setting|include|import|stop|escape|macro|function|transform|call|visit|recurse)(\s|/|$)</BEGIN>
                    
71      <END>&gt;</END>
                    
74    <SEQ_REGEXP TYPE="KEYWORD1" HASH_CHAR="&lt;/"
                    
75	>&lt;/#?(assign|local|global|if|switch|foreach|list|escape|macro|function|transform|compress|noescape)&gt;</SEQ_REGEXP>
                    
76
                    
                
P4FileInfoAction.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 81 lines
✨ Summary

This Java code defines a custom action for a Perforce plugin, allowing users to view file information by executing a customizable p4 command. The action retrieves the selected node’s path and passes it as an argument to the chosen command, displaying the output in a dialog box if desired. It also handles configuration settings and provides a visible menu item based on the node type.

                    
22
                    
23import java.awt.event.ActionEvent;
                    
24
                    
24
                    
25import org.gjt.sp.jedit.jEdit;
                    
26
                    
26
                    
27import projectviewer.vpt.VPTNode;
                    
28
                    
29import p4plugin.Perforce;
                    
30import p4plugin.config.P4GlobalConfig;
                    
31
                    
68        if ("diff".equals(getCommand()) &&
                    
69            P4GlobalConfig.getInstance().getIgnoreDiffOutput())
                    
70        {
                    
                
host-design.xml https://jedit.svn.sourceforge.net/svnroot/jedit | XML | 474 lines
                    
16  plugins by outlining how jEdit loads and displays them. This section
                    
17  only provides a broad overview of the more important components that
                    
18  make up jEdit; specifics of the API will be documented in
                    
278  <classname>View</classname> class
                    
279  performs two important operations that deal
                    
280  with plugins: creating plugin menu items, and managing dockable
                    
335  manager iterates through the list of registered dockable windows and
                    
336  examines options supplied by the user in the <guilabel>Global
                    
337  Options</guilabel> dialog box. It displays any windows that the user
                    
                
Literal.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 40 lines
✨ Summary

This Java class represents a superclass of literal expressions in an abstract syntax tree (AST). It provides methods to retrieve variables from outside, modified variables, and used variables, as well as a method to get an expression at a specific line and column. The class is abstract, meaning it cannot be instantiated directly, and serves as a base for concrete subclasses that implement its methods.

                    
2
                    
3import java.util.List;
                    
4
                    
15  /**
                    
16   * Get the variables from outside (parameters, globals ...)
                    
17   *
                    
                
FieldDeclaration.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 249 lines
✨ Summary

This Java class represents a Field Declaration in PHP, which is a variable declaration for a php class. It extends Statement and implements various interfaces to provide information about the field, such as its name, path, and variables. It also provides methods to analyze code and get the field’s expression at a specific line and column.

                    
2
                    
3import gatchan.phpparser.parser.PHPParser;
                    
4import gatchan.phpparser.project.itemfinder.PHPItem;
                    
4import gatchan.phpparser.project.itemfinder.PHPItem;
                    
5import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
                    
6import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
                    
6import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;
                    
7import org.gjt.sp.jedit.GUIUtilities;
                    
8import sidekick.IAsset;
                    
9
                    
10import javax.swing.*;
                    
11import javax.swing.text.Position;
                    
11import javax.swing.text.Position;
                    
12import java.util.List;
                    
13
                    
                
NATObject.java http://ambienttalk.googlecode.com/svn/ | Java | 1012 lines
✨ Summary

This Java code defines a class for an object in a programming language, likely called “ChibiML”. It provides methods for accessing and manipulating objects’ properties, such as fields and methods, as well as their inheritance hierarchy. The class also includes type testing and flag management functionality.

                    
29
                    
30import edu.vub.at.actors.ATActorMirror;
                    
31import edu.vub.at.actors.ATAsyncMessage;
                    
31import edu.vub.at.actors.ATAsyncMessage;
                    
32import edu.vub.at.eval.Evaluator;
                    
33import edu.vub.at.exceptions.InterpreterException;
                    
33import edu.vub.at.exceptions.InterpreterException;
                    
34import edu.vub.at.exceptions.XArityMismatch;
                    
35import edu.vub.at.exceptions.XDuplicateSlot;
                    
35import edu.vub.at.exceptions.XDuplicateSlot;
                    
36import edu.vub.at.exceptions.XSelectorNotFound;
                    
37import edu.vub.at.exceptions.XTypeMismatch;
                    
37import edu.vub.at.exceptions.XTypeMismatch;
                    
38import edu.vub.at.objects.ATBoolean;
                    
39import edu.vub.at.objects.ATClosure;
                    
                
JEditMode.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 106 lines
✨ Summary

This Java class, JEditMode, represents a mode for the jEdit text editor. It extends the Mode class and provides methods to retrieve properties from the mode’s configuration, load the mode from disk if necessary, and handle loading issues. The class is designed to work with jEdit’s configuration system.

                    
24
                    
25import org.gjt.sp.util.Log;
                    
26
                    
73
                    
74		String global = jEdit.getProperty("buffer." + key);
                    
75		if(global != null)
                    
78			{
                    
79				return new Integer(global);
                    
80			}
                    
82			{
                    
83				return global;
                    
84			}
                    
                
totop.php http://sewebar-cms.googlecode.com/svn/trunk/ | PHP | 34 lines
✨ Summary

This PHP code defines a custom feature for the Joomla framework, specifically for the RocketTheme Quasar Template. It adds a “To Top” button to the page that links back to the top of the content when clicked. The script and HTML are generated dynamically based on the feature’s settings.

                    
13
                    
14gantry_import('core.gantryfeature');
                    
15
                    
19	function init() {
                    
20		global $gantry;
                    
21		
                    
                
jEdit.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 4373 lines
✨ Summary

This Java code is part of a text editor application, managing views and user interactions. It handles view creation, closing, and switching between views. It also manages settings, garbage collection, and memory usage. The code provides methods for getting and setting various properties, such as the number of open views, the currently active view, and whether jEdit is running in background mode.

                    
23
                    
24//{{{ Imports
                    
25import org.gjt.sp.jedit.visitors.JEditVisitor;
                    
25import org.gjt.sp.jedit.visitors.JEditVisitor;
                    
26import java.awt.Color;
                    
27import java.awt.Component;
                    
27import java.awt.Component;
                    
28import java.awt.DefaultKeyboardFocusManager;
                    
29import java.awt.Font;
                    
29import java.awt.Font;
                    
30import java.awt.Frame;
                    
31import java.awt.KeyboardFocusManager;
                    
31import java.awt.KeyboardFocusManager;
                    
32import java.awt.Toolkit;
                    
33import java.awt.Window;
                    
                
ForeachStatement.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 110 lines
✨ Summary

This Java class represents a Foreach statement in a programming language, encapsulating an expression, variable, and associated statement. It provides methods to convert the statement to a string representation, retrieve variables from outside the statement, track modified variables, and identify used variables. The class extends another Statement class and is part of a larger compiler or interpreter system.

                    
2
                    
3import java.util.List;
                    
4
                    
78  /**
                    
79   * Get the variables from outside (parameters, globals ...).
                    
80   * 
                    
                
Jamroot.jam http://hadesmem.googlecode.com/svn/trunk/ | text | 0 lines
                    
8
                    
9if [ glob ../../../boost-build.jam ]
                    
10{
                    
14{
                    
15    import modules ;
                    
16    use-project /boost : [ MATCH --boost=(.*) : [ modules.peek : ARGV ] ] ;
                    
18
                    
19if ! [ glob ../src/process_jam_log.cpp ]
                    
20{
                    
                
malloc_extension.h http://google-perftools.googlecode.com/svn/trunk/ | C Header | 403 lines
✨ Summary

This is a C header file that defines an interface for a memory allocation system, specifically a malloc extension. It provides functions and data structures for managing memory pools, tracking allocations, and sampling allocation points. The code appears to be part of a larger project, possibly a browser or operating system, and is used to implement a custom memory allocator.

                    
54
                    
55// Annoying stuff for windows -- makes sure clients can import these functions
                    
56#ifndef PERFTOOLS_DLL_DECL
                    
57# ifdef _WIN32
                    
58#   define PERFTOOLS_DLL_DECL  __declspec(dllimport)
                    
59# else
                    
92
                    
93  // Call this very early in the program execution -- say, in a global
                    
94  // constructor -- to set up parameters and state needed by all
                    
                
perl.xml https://jedit.svn.sourceforge.net/svnroot/jedit | XML | 547 lines
                    
270			<KEYWORD3>fcntl</KEYWORD3>
                    
271			<KEYWORD3>glob</KEYWORD3>
                    
272			<KEYWORD3>ioctl</KEYWORD3>
                    
304			<!--<KEYWORD1>caller</KEYWORD1>-->
                    
305			<!--<KEYWORD1>import</KEYWORD1>-->
                    
306			<KEYWORD1>local</KEYWORD1>
                    
341			<!--<KEYWORD1>do</KEYWORD1>-->
                    
342			<KEYWORD1>import</KEYWORD1>
                    
343			<KEYWORD1>no</KEYWORD1>
                    
                
progress.xml https://jedit.svn.sourceforge.net/svnroot/jedit | XML | 1040 lines
                    
49		    <!-- Preprocessor keywords. -->
                    
50            <COMMENT2>&amp;GLOB</COMMENT2>
                    
51            <COMMENT2>&amp;GLOBAL-DEFINE</COMMENT2>
                    
214            <KEYWORD1>FIND-CASE-SENSITIVE</KEYWORD1>
                    
215            <KEYWORD1>FIND-GLOBAL</KEYWORD1>
                    
216            <KEYWORD1>FIND-NEXT-OCCURRENCE</KEYWORD1>
                    
235            <KEYWORD1>GET-KEY-VALUE</KEYWORD1>
                    
236            <KEYWORD1>GLOBAL</KEYWORD1>
                    
237            <KEYWORD1>GO-ON</KEYWORD1>
                    
241            <KEYWORD1>IMAGE</KEYWORD1>
                    
242            <KEYWORD1>IMPORT</KEYWORD1>
                    
243            <KEYWORD1>IN</KEYWORD1>
                    
                
gtest.h https://bitbucket.org/ultra_iter/qt-vtl.git | C++ Header | 2053 lines
                    
36//
                    
37// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
                    
38// leave some internal implementation details in this header file.
                    
70//
                    
71// The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
                    
72// ::string is available AND is a distinct type to ::std::string, or
                    
75// If the user's ::std::string and ::string are the same class due to
                    
76// aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0.
                    
77//
                    
77//
                    
78// If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined
                    
79// heuristically.
                    
99
                    
100// This flag sets up the filter to select by name using a glob pattern
                    
101// the tests to run. If the filter is not given all tests are executed.
                    
                
Name.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 1067 lines
✨ Summary

This Java code is part of a BeanShell interpreter, which allows users to execute dynamic Java code. It handles method invocations, command loading, and error handling for a scripting language. The code parses user input, resolves compound names (e.g., “this.myMethod”), and invokes methods or commands accordingly.

                    
36
                    
37import java.lang.reflect.Array;
                    
38import java.lang.reflect.InvocationTargetException;
                    
232			Doing this first gives the correct Java precedence for vars 
                    
233			vs. imported class names (at least in the simple case - see
                    
234			tests/precedence1.bsh).  It should also speed things up a bit.
                    
537
                    
538		if ( varName.equals("global") )
                    
539			obj = thisNameSpace.getGlobal( interpreter );
                    
625		@throws ClassPathException (type of EvalError) on special case of 
                    
626		ambiguous unqualified name after super import. 
                    
627	*/
                    
879		If the method is not already declared in the namespace then try
                    
880		to load it as a resource from the imported command path (e.g.
                    
881		/bsh/commands)
                    
                
Display_Abbreviations.bsh https://jedit.svn.sourceforge.net/svnroot/jedit | Unknown | 386 lines
                    
29 * in a dialog.  A combo box lists all eidting modes for which abbreviations
                    
30 * are currently defined, as well as the "global" abbreviation set.
                    
31 *
                    
36 *
                    
37 * The macro has two global constants defined to permit customization of the
                    
38 * script's behavior.  STARTING_SET contains the name of the abbreviation set
                    
44 * The table being displayed at any time is not updated if changes are made to
                    
45 * the abbreviation set in the "Global Options" dialog.  If EXCLUDE_EMPTY_SETS
                    
46 * is set to true, the drop-down list will not by updated.  Clsoing the dialog
                    
53
                    
54import javax.swing.table.*;
                    
55
                    
58 * This returns an array with the names of the abbreviation sets
                    
59 * (beginning with "global").  If EXCLUDE_EMPTY_SETS is set to true, only sets
                    
60 * with abbreviations are included.
                    
                
SessionPropertiesDialog.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 279 lines
✨ Summary

This Java code defines a dialog for managing session properties, displaying registered property panes and allowing users to save changes. It creates a tree view of property groups and panes, with buttons for applying and canceling changes. When a pane is selected, its settings are initialized and displayed in the dialog.

                    
4 *
                    
5 * Based on GlobalOptionsDialog.java
                    
6 * Copyright (C) 1998, 1999, 2000, 2001 Slava Pestov
                    
26
                    
27import javax.swing.*;
                    
28import javax.swing.border.*;
                    
28import javax.swing.border.*;
                    
29import javax.swing.tree.*;
                    
30import javax.swing.event.*;
                    
30import javax.swing.event.*;
                    
31import java.awt.*;
                    
32import java.awt.event.*;
                    
32import java.awt.event.*;
                    
33import java.util.Enumeration;
                    
34import java.util.Vector;
                    
                
DockableWindowManager.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 754 lines
✨ Summary

This Java code defines a docking area for an integrated development environment (IDE). It provides functionality to show and hide dockable windows, manage keyboard shortcuts, and save/load layouts of window arrangements. The layout is stored in XML files and can be loaded from the IDE’s settings directory. The code uses various classes and interfaces to implement the docking area’s behavior.

                    
2
                    
3// {{{ imports
                    
4import java.awt.event.KeyAdapter;
                    
4import java.awt.event.KeyAdapter;
                    
5import java.awt.event.KeyEvent;
                    
6import java.awt.event.KeyListener;
                    
6import java.awt.event.KeyListener;
                    
7import java.io.File;
                    
8import java.io.FilenameFilter;
                    
8import java.io.FilenameFilter;
                    
9import java.util.*;
                    
10import java.util.Map.Entry;
                    
11
                    
12import javax.swing.JComponent;
                    
13import javax.swing.JPanel;
                    
                
VFSBrowser.java https://jedit.svn.sourceforge.net/svnroot/jedit | Java | 1700 lines
✨ Summary

This Java code is part of a file manager application, specifically a VFS (Virtual File System) browser. It handles events such as directory changes, selection updates, and action invocations for various actions like opening files, creating directories, and filtering files. The code uses BeanShell scripting and interacts with the underlying GUI components to provide functionality for navigating and managing files in a virtual file system.

                    
24
                    
25//{{{ Imports
                    
26import bsh.*;
                    
26import bsh.*;
                    
27import gnu.regexp.*;
                    
28import javax.swing.border.EmptyBorder;
                    
28import javax.swing.border.EmptyBorder;
                    
29import javax.swing.event.*;
                    
30import javax.swing.tree.DefaultMutableTreeNode;
                    
30import javax.swing.tree.DefaultMutableTreeNode;
                    
31import javax.swing.*;
                    
32import java.awt.event.*;
                    
32import java.awt.event.*;
                    
33import java.awt.*;
                    
34import java.io.File;
                    
                
makeplots.py git://github.com/clawpack/clawpack-4.x.git | Python | 56 lines
✨ Summary

This Python script generates plots and .rst files for each setplot function in a directory. It searches for all files named setplot_*.py, loops over them, creates plots using the plotclaw function, and writes documentation for each example to an accompanying .rst file. The resulting files are used to generate HTML documentation.

                    
11
                    
12import os, glob, re
                    
13from pyclaw.plotters.plotclaw import plotclaw
                    
19
                    
20filenames = glob.glob('setplot_*.py')
                    
21
                    
                
compile.el git://github.com/emacsmirror/emacs.git | Emacs Lisp | 2829 lines
✨ Summary

This code starts a compilation process by creating a new buffer and setting its major mode to compilation-mode'. It also sets the default directory to the current directory, as specified in thedefault-directory’ variable. The `compilation-environment’ variable is used to set environment variables for the compilation process.

The code then checks if there is already a running compilation process in the current buffer. If so, it prompts the user whether to kill the process or not. If the user chooses to kill the process, the code deletes it using the `delete-process’ function.

After checking for any existing processes, the code creates a new process and sets its query on exit flag to nil. This means that when the process exits, Emacs will prompt the user whether to kill it or not. The code then runs the compilation command in the new process using the `start-process’ function.

Finally, the code displays the output of the compilation process in a separate window using the `display-buffer’ function.

                    
275    (makepp
                    
276     "^makepp\\(?:\\(?:: warning\\(:\\).*?\\|\\(: Scanning\\|: [LR]e?l?oading makefile\\|: Imported\\|log:.*?\\) \\|: .*?\\)\
                    
277`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)"
                    
317
                    
318    ;; "during global destruction": This comes out under "use
                    
319    ;; warnings" in recent perl when breaking circular references
                    
322     " at \\([^ \n]+\\) line \\([0-9]+\\)\\(?:[,.]\\|$\\| \
                    
323during global destruction\\.$\\)" 1 2)
                    
324
                    
782(defcustom compilation-skip-threshold 1
                    
783  "Compilation motion commands skip less important messages.
                    
784The value can be either 2 -- skip anything less than error, 1 --
                    
955;; Internal function for calculating the text properties of a directory
                    
956;; change message.  The compilation-directory property is important, because it
                    
957;; is the stack of nested enter-messages.  Relative filenames on the following
                    
                
exception_partial_info_runme.lua https://swig.svn.sourceforge.net/svnroot/swig | Lua | 13 lines
✨ Summary

This Lua code tests an exception handling implementation by attempting to call two throwing methods (f1 and f2) on an object imp. The pcall function is used to catch any exceptions that might be thrown, and if the method call succeeds, it returns true, otherwise false. If the code runs without errors, it indicates a potential issue with the exception handling implementation.

                    
1require("import")	-- the import fn
                    
2import("exception_partial_info")	-- import code
                    
3
                    
4-- catch "undefined" global variables
                    
5setmetatable(getfenv(),{__index=function (t,i) error("undefined global variable `"..i.."'",2) end})
                    
                
Prime Numbers, Factorization and Euler Function .html http://mycila.googlecode.com/svn/ | HTML | 784 lines
✨ Summary

This HTML code is a TopCoder competition page, displaying problem information and related content. It includes a table with problem details, a right column with additional content, and a footer with copyright information and links to other TopCoder resources. The page also tracks user interactions using Google Analytics.

                    
50<div id="shortcutBar">
                    
51    <div class="icon"><a href="http://www.topcoder.com/tc"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scHome.png" alt="" onmouseover="postPopUpText('globalPopupText','Home'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
52    <div class="icon"><a href="javascript:arena();"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scAlgo.png" alt="" onmouseover="postPopUpText('globalPopupText','Algorithm Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
52    <div class="icon"><a href="javascript:arena();"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scAlgo.png" alt="" onmouseover="postPopUpText('globalPopupText','Algorithm Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
53    <div class="icon"><a href="http://www.topcoder.com/tc?module=ActiveContests&amp;pt=23"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scConceptualization.png" alt="" onmouseover="postPopUpText('globalPopupText','Software Conceptualization Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
54    <div class="icon"><a href="http://www.topcoder.com/tc?module=ActiveContests&amp;pt=6"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scSpecification.png" alt="" onmouseover="postPopUpText('globalPopupText','Software Specification Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
54    <div class="icon"><a href="http://www.topcoder.com/tc?module=ActiveContests&amp;pt=6"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scSpecification.png" alt="" onmouseover="postPopUpText('globalPopupText','Software Specification Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
55    <div class="icon"><a href="http://www.topcoder.com/tc?module=ActiveContests&amp;pt=7"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scArchitecture.png" alt="" onmouseover="postPopUpText('globalPopupText','Software Architecture Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
56    <div class="icon"><a href="http://www.topcoder.com/tc?module=ViewActiveContests&amp;ph=112"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scDesign.png" alt="" onmouseover="postPopUpText('globalPopupText','Component Design Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
56    <div class="icon"><a href="http://www.topcoder.com/tc?module=ViewActiveContests&amp;ph=112"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scDesign.png" alt="" onmouseover="postPopUpText('globalPopupText','Component Design Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
57    <div class="icon"><a href="http://www.topcoder.com/tc?module=ViewActiveContests&amp;ph=113"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scDevelopment.png" alt="" onmouseover="postPopUpText('globalPopupText','Component Development Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
58
                    
58
                    
59    <div class="icon"><a href="http://www.topcoder.com/tc?module=ViewAssemblyActiveContests"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scAssembly.png" alt="" onmouseover="postPopUpText('globalPopupText','Software Assembly Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
60    <div class="icon"><a href="javascript:arena();"><img src="Prime%20Numbers,%20Factorization%20and%20Euler%20Function%20_files/scTCHS.png" alt="" onmouseover="postPopUpText('globalPopupText','High School Competitions'); popUp(this,'globalPopup');" onmouseout="popHide()"></a></div>
                    
                
 

Source

Language