*do the frankenstein magic!*
175779
def get(self):
        
        self.log.info('starting the ``get`` method')

        self._copy_folder_and_get_directory_listings()
        self._join_all_filenames_and_text()
        self._collect_placeholders_required()
        self._populate_dynamic_placeholders()
        self._fill_placeholders_from_settings()
        self._request_remaining_placeholders()
        self._populate_placeholders_in_files()
        self._move_template_to_destination(ignoreExisting=self.ignoreExisting)

        self.log.info('completed the ``get`` method')
        return None
1173420
def do_interact(self, arg):
        
        ns = self.curframe.f_globals.copy()
        ns.update(self.curframe_locals)
        code.interact("*interactive*", local=ns)
908141
def is_magic(s):
    
    if not is_identifier(s):
        return False
    return len(s) > 4 and s.startswith('__') and s.endswith('__')
1120571
function(things) {
				var els = things,
					target = this.spirit.element,
					parent = target.parentNode;
				els.reverse().forEach(function(el) {
					parent.insertBefore(el, target);
					maybespiritualize(el);
				});
			}
624273
def make_thing():
    
    cwd = os.getcwd()
    main_dir = cwd + '/SPD'
    try:
        import new_lj_thellier_gui_spd as tgs
        gui = tgs.Arai_GUI('/magic_measurements.txt', main_dir)
        specimens = list(gui.Data.keys())
        thing = PintPars(gui.Data, '0238x6011044', 473., 623.)
        thing.calculate_all_statistics()
        #new_thing = PintPars(gui.Data, '0238x5721062', 100. + 273., 525. + 273.)
        #new_thing.calculate_all_statistics()
        gui2 = tgs.Arai_GUI('/magic_measurements.txt', '/Users/nebula/Desktop/MagIC_experiments/ODP-SBG_1')
        thing2 = PintPars(gui2.Data, '0335x1031411', 273., 743.)
        return thing, thing2
    except Exception as ex:
        print('could not make standard specimen objects')
        print(ex)
1196095
function run(transformFn, code, url, options) {
  const scriptEl = document.createElement('script');
  scriptEl.text = transformCode(transformFn, code, url, options);
  headEl.appendChild(scriptEl);
}
631454
def Magic(self):

        #self.view.setFixedSize(self.width(), self.width())

        self.WholeData = []

        self.x_scale = self.width_plot / self.width_load

        self.y_scale = self.height_plot / self.height_load

        self.z_scale = self.depth_plot / self.depth_load


        # print(self.x_scale,' and ',self.x_scale)

        raw = self._df

        a = int(self.x_element.value())

        b = int(self.y_element.value())

        c = int(self.z_element.value())

        self.x_element_label.setText(self.items[a])
        self.y_element_label.setText(self.items[b])
        self.z_element_label.setText(self.items[c])


        if (self.Left != self.Right) and (self.Down != self.Up) and abs(self.Left) + abs(self.Right) + abs(
                self.Down) + abs(self.Up) != 0:
            self.extent = [self.Left, self.Right, self.Down, self.Up]
        elif (self.Left == self.Right and abs(self.Left) + abs(self.Right) != 0):
            reply = QMessageBox.warning(self, 'Warning', 'You set same value to Left and Right limits.')
            self.extent = 0

        elif (self.Down == self.Up and abs(self.Down) + abs(self.Up) != 0):
            reply = QMessageBox.warning(self, 'Warning', 'You set same value to Up and Down limits.')
            self.extent = 0
        else:
            self.extent = 0

        standardnamechosen = self.StandardsName[int(self.norm_slider.value())]
        standardchosen = self.Standards[standardnamechosen]

        self.norm_slider_label.setText(standardnamechosen)


        PointLabels = []
        XtoDraw = []
        YtoDraw = []
        ZtoDraw = []
        Colors=[]
        Alphas=[]
        Markers=[]
        Names=[]

        for i in range(len(raw)):
            # raw.at[i, 'DataType'] == 'User' or raw.at[i, 'DataType'] == 'user' or raw.at[i, 'DataType'] == 'USER'

            TmpLabel = ''

            #   self.WholeData.append(math.log(tmp, 10))

            if (raw.at[i, 'Label'] in PointLabels or raw.at[i, 'Label'] == ''):
                TmpLabel = ''
            else:
                PointLabels.append(raw.at[i, 'Label'])
                TmpLabel = raw.at[i, 'Label']

            x, y ,z = 0, 0, 0
            xuse, yuse,zuse = 0, 0, 0

            x, y,z = raw.at[i, self.items[a]], raw.at[i, self.items[b]],raw.at[i, self.items[c]]


            try:
                xuse = x
                yuse = y
                zuse = z

                self.xlabel = self.items[a]
                self.ylabel = self.items[b]
                self.zlabel = self.items[c]

                if (self.Normalize_cb.isChecked()):

                    self.xlabel = self.items[a] + ' Norm by ' + standardnamechosen
                    self.x_element_label.setText(self.xlabel)

                    self.ylabel = self.items[b] + ' Norm by ' + standardnamechosen
                    self.y_element_label.setText(self.ylabel)

                    self.zlabel = self.items[c] + ' Norm by ' + standardnamechosen
                    self.z_element_label.setText(self.zlabel)


                    if self.items[a] in self.Element:
                        xuse = xuse / standardchosen[self.items[a]]

                    if self.items[b] in self.Element:
                        yuse = yuse / standardchosen[self.items[b]]

                    if self.items[c] in self.Element:
                        zuse = zuse / standardchosen[self.items[c]]

                if (self.logx_cb.isChecked()):
                    xuse = math.log(x, 10)
                    self.xlabel = '$log10$ ' + self.xlabel


                if (self.logy_cb.isChecked()):
                    yuse = math.log(y, 10)

                    self.ylabel = '$log10$ ' + self.ylabel

                if (self.logz_cb.isChecked()):
                    zuse = math.log(z, 10)

                    self.zlabel = '$log10$ ' + self.zlabel

                XtoDraw.append(xuse)
                YtoDraw.append(yuse)
                ZtoDraw.append(zuse)
                Colors.append(raw.at[i, 'Color'])
                Alphas.append(raw.at[i, 'Alpha'])
                Names.append(raw.at[i, 'Label'])
                Markers.append(raw.at[i, 'Marker'])


            except(ValueError):
                pass


        if self.LimSet==False:
            self.Xleft, self.Xright, self.Ydown, self.Yup, self.Tail, self.Head = min(XtoDraw), max(XtoDraw), min(YtoDraw), max(YtoDraw), min(ZtoDraw), max(ZtoDraw)





        xmin, xmax = min(XtoDraw), max(XtoDraw)
        ymin, ymax = min(YtoDraw), max(YtoDraw)
        zmin, zmax = min(ZtoDraw), max(ZtoDraw)

        xmean = np.mean(XtoDraw)
        ymean = np.mean(YtoDraw)
        zmean = np.mean(ZtoDraw)

        Xoriginal = np.arange(xmin, xmax, (xmax - xmin) / 10)
        Yoriginal = np.arange(ymin, ymax, (ymax - ymin) / 10)
        Zoriginal = np.arange(zmin, zmax, (zmax - zmin) / 10)

        XonPlot = self.GetASequence(tail=self.ShapeGroups)
        YonPlot = self.GetASequence(tail=self.ShapeGroups)
        ZonPlot = self.GetASequence(tail=self.ShapeGroups)

        XonStick = []
        YonStick = []
        ZonStick = []

        for i in range(len(XonPlot)):
            XonStick.append([XonPlot[i], Xoriginal[i]])
            YonStick.append([YonPlot[i], Yoriginal[i]])
            ZonStick.append([ZonPlot[i], Zoriginal[i]])
            pass




        #print(XtoDraw,'\n', YtoDraw,'\n', ZtoDraw)

        toDf = {self.xlabel:XtoDraw,
                self.ylabel:YtoDraw,
                self.zlabel:ZtoDraw}




        newdf = pd.DataFrame(toDf)

        pos = newdf.as_matrix()

        print(pos)

        ThreeDimView = gl.GLScatterPlotItem(pos=pos, color=(100, 255, 255, 88), size=0.1, pxMode=False)


        print(xmean,'\n', ymean,'\n', zmean,'\n')

        self.view.pan(xmean, ymean, zmean)


        xgrid = gl.GLGridItem(size=QtGui.QVector3D(10, 10, 1), color=1)
        ygrid = gl.GLGridItem(size=QtGui.QVector3D(20, 20, 2), color=2)
        zgrid = gl.GLGridItem(size=QtGui.QVector3D(30, 30, 3), color=3)

        ## rotate x and y grids to face the correct direction
        xgrid.rotate(90, 0, 1, 0)
        ygrid.rotate(90, 1, 0, 0)



        xgrid.translate(xmean, ymean, zmean)
        ygrid.translate(xmean, ymean, zmean)
        zgrid.translate(xmean, ymean, zmean)


        ## scale each grid differently

        '''
        
        '''

        # xgrid.setTransform(xmean,ymean,zmean)

        self.view.addItem(xgrid)
        self.view.addItem(ygrid)
        self.view.addItem(zgrid)
        self.view.addItem(ThreeDimView)
1158548
def add!(char)
      left, cursor, right = abbrev_segments
      @abbrev = left + char + cursor + right
      @col += 1
      redraw
    end
1245100
function run(transformFn, script) {
  const scriptEl = document.createElement('script');
  scriptEl.text = transformCode(transformFn, script);
  headEl.appendChild(scriptEl);
}
715473
def populate_and_check_magic
      magic = @raw_data[0..3].unpack("N").first

      raise MagicError, magic unless Utils.magic?(magic)
      raise FatBinaryError if Utils.fat_magic?(magic)

      @endianness = Utils.little_magic?(magic) ? :little : :big

      magic
    end
921829
def append!(view_or_constant, style=nil, opts = {}, &block)
      opts[:raw_block] = block if block
      append(view_or_constant, style, opts).get
    end
648259
public function run() {
		if (count($this->items) > 0) {
			echo Html::beginTag('ol', ['class' => 'dd-list']);
			echo $this->renderItems();
			echo Html::endTag('ol');
		}
		echo Html::endTag('div');
	}
1102136
def replace!(oth)
      if self.class != oth.class
        raise ArgumentError, "expected #{self.class} object"
      end

      component.each do |c|
        self.__send__("#{c}=", oth.__send__(c))
      end
    end
610508
function magicBuffer(buf, cb) {
  try {
    buf = bufferUtils.toBuffer(buf);
    magic(buf, cb);
  } catch(err) {
    cb(err);
  }
}
716699
def do_retval(self, arg):
        
        locals = self.get_locals(self.curframe)
        if '__return__' in locals:
            self.message(bdb.safe_repr(locals['__return__']))
        else:
            self.error('Not yet returned!')
521222
function(dream) {
  const newListItem = document.createElement('li');
  newListItem.innerHTML = dream;
  dreamsList.appendChild(newListItem);
}
234039
function(things) {
				var els = things,
					element = this.spirit.element;
				els.forEach(function(el) {
					element.appendChild(el);
					maybespiritualize(el);
				});
			}