* Embed.ly supported sites worker
488626
function (param, options, callback) {
              // dailymotion make call toservice every time einsted of vidmeo and youtube
              embedProcessor.log(param.worker + ' started with parameters = ', param);
              var sourceUrl = encodeURIComponent(param.url);
              var api_url = '//api.embed.ly/1/oembed?key=c6544dc839bd11e088ae4040f9f86dcd&url=' + sourceUrl + (that.autoplay ? "":"&autoplay=1") + '&callback=?';
              $.getJSON(api_url, function (data) {
                if(data && data.html) {
                  param.status = true;
                  param.duration = false;
                  param.duration_formatted = false;
                  param.thumbnail_url = data.thumbnail_url ? data.thumbnail_url : '';
                  param.favicon_url = data.favicon_url;
                  if (param.source === 'dailymotion') {
                    param.favicon_url = '//favicon.yandex.net/favicon/dailymotion.com';
                  }
                  param.service_name = data.provider_name;
                  param.provider_url = data.provider_url;
                  param.html = data.html;
                  param.title = data.title || '';
                  param.views = false;
                  if (embedProcessor._sources[param.source] && embedProcessor._sources[param.source].prepareEmbedCode) {
                    param = embedProcessor._sources[param.source].prepareEmbedCode(param);
                  }
                  param.author = data.author_name || "";
                  param = embedProcessor._paramEmbedCodeNormalizer(param);
                } else {
                  /* prepare data from appData */
                  if(param.appData && param.appData.id && param.source === "dailymotion") {
                    param.status = true;
                    param.duration = false;
                    param.duration_formatted = false;
                    param.thumbnail_url = param.appData.thumbnail_small_url;
                    param.favicon_url = '//favicon.yandex.net/favicon/dailymotion.com';
                    param.service_name = "Dailymotion";
                    param.provider_url = "http://www.dailymotion.com";
                    param.html = '<iframe src="http://www.dailymotion.com/embed/video/' + param.appData.id + (that.autoplay ? "" : "?autoPlay=1") + '" width="480" height="301" frameborder="0"></iframe>';
                    param.title = param.appData.title || '';
                    param.views = false;
                    if (embedProcessor._sources[param.source] && embedProcessor._sources[param.source].prepareEmbedCode) {
                      param = embedProcessor._sources[param.source].prepareEmbedCode(param);
                    }
                    param.author = data.author_name || "";
                    param = embedProcessor._paramEmbedCodeNormalizer(param);
                  } else {
                    param.status = false;
                  }
                }
                embedProcessor.log(param.worker + ' receive parameters = ', param);
                callback(param);
              });
            }
160217
def _embed(self, request, response):
        """"""
        if self._match(request, response):
            # Render the <link> and the <script> tags to include Chosen.
            head = render_to_string(
                "chosenadmin/_head_css.html",
                {"chosen_css": self._chosen_css()}
            )
            body = render_to_string(
                "chosenadmin/_script.html",
                {"chosen_js": self._chosen_js()}
            )

            # Re-write the Response's content to include our new html
            content = response.rendered_content
            content = content.replace('</head>', head)
            content = content.replace('</body>', body)
            response.content = content
        return response
1235790
function (param, options, callback) {
              embedProcessor.log(param.worker + ' started with parameters = ', param);
              param.status = true;
              param.duration = false;
              param.duration_formatted = false;
              param.thumbnail_url = false;
              param.favicon_url = '';
              param.service_name = '';
              param.provider_url = '';
              param.html = false;
              param.views = false;
              if (embedProcessor._sources[param.source] && embedProcessor._sources[param.source].prepareEmbedCode) {
                param = embedProcessor._sources[param.source].prepareEmbedCode(param);
              }
              param = embedProcessor._paramEmbedCodeNormalizer(param);
              embedProcessor.log(param.worker + ' receive parameters = ', param);
              callback(param);
            }
929105
function generateEmbeds(config) {
  glob(config.src + '/**/*.html', {}, (err, files) => {
    files.forEach(file => generateEmbed(config, file));
  });
}
378616
def require_plugin_files
      unless site.safe
        plugins_path.each do |plugin_search_path|
          plugin_files = Utils.safe_glob(plugin_search_path, File.join("**", "*.rb"))
          Jekyll::External.require_with_graceful_fail(plugin_files)
        end
      end
    end
1154729
function(params, options) {
      var t = this,
          port = t.get('port'),
          server = t.get('server'),
          templates = t.get('templates'),
          siteDbPath = t.get('siteDbPath'),
          parentPath = siteDbPath.indexOf('.') === 0 ? process.cwd() : '';

      // Distribute the site path to probes that need it
      t.set('siteDbPath', Path.join(parentPath, siteDbPath));

      // Initialize probes
      SyncProbe.Config.defaultProbe = 'FileSyncProbe';
      SyncProbe.FileSyncProbe.setRootPath(siteDbPath);

      // Expose the current instance so probes running
      // in this process can communicate with the server
      UI.Server.currentServer = t;

      // Internal (non-model) attributes
      t.apps = {};  // Hash appName -> app data
      t.site = null;   // Site model associated with the server

      // Create a connect server if no custom server was specified
      if (!server) {
        server = new Connect();
        t.set({server: server});
      }

      // Attach server components
      server.use(t.siteRoute.bind(t));
      server.use(Connect['static'](Path.join(__dirname, '/../..')));

      // Create a static server to the monitor distribution
      var monitorDistDir = require.resolve('monitor').replace(/lib[\\\/]index.js/, 'dist');
      t.monitorDist = Connect['static'](monitorDistDir);

      // Initialize the template library
      var gruntModules = GruntConfig.MODULE_DEF;
      gruntModules.templates.sort().forEach(function(template){
        var path = Path.normalize(__dirname + '/../../' + template);
        var id = Path.basename(path, '.html');
        templates.add({id:id, path:path});
      });

      // Build the page parameters from the config file
      var styles = "", scripts="";
      gruntModules.client_css.forEach(function(cssFile) {
        styles += CSS_TEMPLATE({cssFile: cssFile.replace('lib/','/static/')});
      });
      var clientScripts = gruntModules.client_ext.concat(gruntModules.shared_js.concat(gruntModules.client_js));
      clientScripts.forEach(function(file) {
        scripts += JS_TEMPLATE({scriptFile: file.replace('lib/','/static/')});
      });
      _.extend(PAGE_PARAMS, {
        styles: styles, scripts: scripts, version: PACKAGE_JSON.version
      });
    }
1129422
function generateEmbed(id, source, html) {
        id = id || Embedo.utils.uuid();
        var container = document.createElement('div');

        container.setAttribute('id', id);
        container.setAttribute('data-embedo-id', id);
        container.setAttribute('data-embedo-source', source);

        if (Embedo.utils.validateElement(html)) {
          container.appendChild(html);
        } else {
          container.innerHTML = html || '';
        }

        return container;
      }
196132
public static function EmbedFactory($src, $windowWidth, $windowHeight, $thumb="", $title = "", $caption="", $width="", $height="")
	{
		/*
		if (strpos($src, "?") !== false)
		{
			$src .= "&amp;";
		}
		else
		{
			$src .= "?";
		}
		$src .= "width=$windowWidth&amp;height=$windowHeight";
		*/

		return new XmlnukeMediaItem($src, $thumb, $title, $caption, $width, $height);
	}
645015
function createInjectionShim(scriptUrl, workerId) {
    // Hacky handling for blob URLs.
    // Unfortunately Chrome doesn't like importScript on blobs inside of the
    // workers, so we need to embed it.
    var resolvedScriptUrl = null;
    var scriptContents = null;
    if (goog.string.startsWith(scriptUrl, 'blob:')) {
      var xhr = new (goog.global['XMLHttpRequest']['raw'] || XMLHttpRequest)();
      xhr.open('GET', scriptUrl, false);
      xhr.send();
      scriptContents = xhr.response;
    } else {
      resolvedScriptUrl = goog.Uri.resolve(baseUri, scriptUrl).toString();
    }

    var shimScriptLines = [
      'this.WTF_WORKER_ID = ' + workerId + ';',
      'this.WTF_WORKER_BASE_URI = "' + goog.global.location.href + '";',
      'importScripts("' + wtfUrl + '");',
      'wtf.trace.prepare({',
      '});',
      'wtf.trace.start();'
    ];

    // Add the script import or directly embed the contents.
    if (resolvedScriptUrl) {
      shimScriptLines.push('importScripts("' + resolvedScriptUrl + '");');
    } else if (scriptContents) {
      shimScriptLines.push('// Embedded: ' + scriptUrl);
      shimScriptLines.push(scriptContents);
    }

    var shimBlob = new Blob([shimScriptLines.join('\n')], {
      'type': 'text/javascript'
    });
    var shimScriptUrl = goog.fs.createObjectUrl(shimBlob);

    return shimScriptUrl;
  }
337809
def supports_site(url):
        

        # Follow redirects
        opener = urllib2.build_opener(urllib2.HTTPRedirectHandler)
        redirect = opener.open(url).url
        response = urllib2.urlopen(redirect).read()

        # Check if a standard rss feed exists
        return re.search(re_rss, response.decode('utf-8')) is not None
326978
function urlEmbed(str) {

                    var urlRegex = /((href|src)=["']|)(\b(https?|ftp|file):\/\/[-A-Z0-9+()&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;

                    var strReplaced = str.replace(urlRegex, function (match) {
                            return '<a href="' + match + '" target="' + options.linkTarget + '">' + match + '</a>';
                        }
                    );
                    return strReplaced;
                }
177831
public function registerEmbedHandlerForWeb() {
		wp_embed_register_handler(
			self::EMBED_ID,
			self::EMBED_URL_REGEX,
			function ( $matches, $attr, $url, $rawattr ) {
				$embed = sprintf(
					'<iframe src="https://phet.colorado.edu/sims/html/%1$s" width="800" height="600" scrolling="no" allowfullscreen></iframe>',
					esc_attr( $matches[1] )
				);
				return apply_filters( 'embed_' . self::EMBED_ID, $embed, $matches, $attr, $url, $rawattr );
			}
		);
	}
903443
function startSites(config){
        config.siteNames.forEach(function(item){
            var cmd = 'iisexpress /site:"'  + item + '"';

            if(config.configFile !== ""){
                cmd += ' /config:"' + config.configFile + '"';
            }

            if (config.sysTray){
                cmd += ' /systray:true';
            }else{
                cmd += ' /systray:false';
            }

            gulp.src('')
                .pipe(shell([
                    cmd
                ],{
                    cwd: config.iisExpressPath
                }))
                .on('error', util.log);
        });

        return gulp.src('');
    }
86407
def _mp_embeds_into(mp1, mp2):
    """"""
    sc_matches = []
    if mp1.monomer.name != mp2.monomer.name:
        return False
    # Check that all conditions in mp2 are met in mp1
    for site_name, site_state in mp2.site_conditions.items():
        if site_name not in mp1.site_conditions or \
           site_state != mp1.site_conditions[site_name]:
            return False
    return True
975118
function(site_path, arg, cmd, done) {
    var start = Date.now();
    var nell_site = {
      site_path: site_path
    };

    async.series([
      function(callback) {
        nell_site.config_path = path.join(site_path, 'nell.json');
        fs.exists(nell_site.config_path, function(exists) {
          if (!exists) {
            return callback(new Error(__('Unable to load nell.json config file')));
          }
          callback();
        });
      },
      function(callback) {
        nell_site.config = require(nell_site.config_path);
        nell_site.output_path =  (nell_site.config.output && nell_site.config.output.path) ? path.join(nell_site.site_path, nell_site.config.output.path) : path.join(nell_site.site_path, 'output');
        async.forEach(Object.keys(nell_site.config), function(key, key_done) {
          nell_site[key] = nell_site.config[key] || {};
          key_done();
        }, callback);
      },
      function(callback) {
        loadSwig(nell_site, callback);
      },
      function(callback) {
        loadItems(nell_site, 'post', callback);
      },
      function(callback) {
        loadItems(nell_site, 'page', callback);
      },
      function(callback) {
        if (nell_site.config.output && nell_site.config.output.delete) {
          fs.unlink(nell_site.output_path, callback);
        } else {
          callback();
        }
      },
      function(callback) {
        outputItems(nell_site, 'post', callback);
      },
      function(callback) {
        outputItems(nell_site, 'page', callback);
      },
      function(callback) {
        outputIndex(nell_site, callback);
      },
      function(callback) {
        moveStatic(nell_site, callback);
      }
    ], function(err) {
      var end = Date.now();
      if (err) {
        return done(err);
      }
      done(null, __('Site "%s" generated in %ds', nell_site.site.title, (end - start) / 1000));
    });
  }
1232294
async function _process(args, { fetch }) {
  const url = args[0]
  try {
    const res = await fetch(`https://noembed.com/embed?url=${url}`)
    return await res.json()
  } catch (e) {
    return {
      html: url
    }
  }
}
472622
def allow(self, comment, content_object, request):
        """"""
        
        POST = urlencode({
                "blog": settings.AKISMET_BLOG.encode("utf-8"),
                "user_ip": comment.ip_address,
                "user_agent": request.META.get('HTTP_USER_AGENT', "").
                                                encode("utf-8"),
                "referrer": request.META.get('HTTP_REFERRER', "").
                                                encode("utf-8"),
                "comment_author": comment.user_name.encode("utf-8"),
                "comment_author_email": comment.user_email.encode("utf-8"),
                "comment_author_url": comment.user_url.encode("utf-8"),
                "comment_content": comment.comment.encode("utf-8")})
        connection = HTTPConnection(AKISMET_URL, AKISMET_PORT)
        connection.request("POST", AKISMET_PATH, POST,
                           {"User-Agent": AKISMET_USERAGENT,
                            "Content-type":"application/x-www-form-urlencoded"
                            })
        response = connection.getresponse()
        status, result = response.status, response.read()
        if result == "false":
            return True
        elif result == "true" and settings.DISCARD_SPAM:
            return False
        elif result == "true":
            comment.is_removed = True
            comment.is_public = False
            return True
        else:
            raise AkismetError(status, result)