This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
env_name="venv" | |
source ${env_name}/bin/activate | |
${env_name}/bin/jupyter notebook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
env_name="venv" | |
python3 -m venv ${env_name} | |
source ${env_name}/bin/activate | |
if [ ! -f requirements.txt ]; then | |
pip install numpy pandas matplotlib scipy scikit-learn jupyter jupyter-datatables | |
pip freeze > requirements.txt | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
env_name="venv" | |
python3 -m venv ${env_name} | |
source ${env_name}/bin/activate | |
if [ ! -f requirements.txt ]; then | |
pip install numpy pandas matplotlib scipy scikit-learn jupyter jupyter-datatables | |
pip freeze > requirements.txt | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a workaround for https://issues.apache.org/jira/browse/WSS-584 | |
* | |
* Implemented based on the following conversation with a core developer of wss4j | |
* https://www.mail-archive.com/[email protected]/msg00404.html | |
* | |
* Created by lcsontos on 11/28/16. | |
*/ | |
public class CachingWss4jSecurityInterceptor extends Wss4jSecurityInterceptor implements DisposableBean { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Database agnostic unique ID generator inspired by | |
* <a href="https://engineering.instagram.com/sharding-ids-at-instagram-1cf5a71e5a5c"> | |
* Sharding & IDs at Instagram</a> | |
* | |
* <p>Going to the most to the least significant bits | |
* <ul> | |
* <li>the first bit (sign) is always zero | |
* <li>the next 7 bits represent the shard ID | |
* <li>the next 40 bits represent the elapsed milliseconds from a custom Epoch (2017-02-20) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = "http://{hostname}/service/v4_1/rest.php"; | |
$username = "username"; | |
$password = "password"; | |
ob_start(); | |
$curl_request = curl_init(); | |
curl_setopt($curl_request, CURLOPT_URL, $url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Facebook 170 x 170 | |
Twitter 200 x 200 | |
Pinterest 156 x 156 | |
GitHub 230 x 230 | |
Google+ 124 x 124 | |
Instagram 152 x 152 | |
Vimeo 150 x 150 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long getUID(byte sid, long time, byte tid, byte serial) { | |
return (sid & 0x7fL) << 56 | (time & 0xffffffffffL) << 16 | (tid & 0xff) << 8 | (serial & 0xff); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.xml.namespace.QName | |
import javax.xml.soap.* | |
import javax.xml.ws.Dispatch | |
import javax.xml.ws.Service | |
import javax.xml.ws.soap.SOAPBinding | |
import javax.xml.xpath.XPath | |
import javax.xml.xpath.XPathConstants | |
import javax.xml.xpath.XPathFactory | |
// Create the message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.xml.namespace.*; | |
import javax.xml.soap.*; | |
import org.w3c.dom.*; | |
// Create the message | |
MessageFactory factory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL); | |
SOAPMessage requestMessage = factory.createMessage(); | |
// Add a header | |
SOAPHeader header = requestMessage.getSOAPHeader(); |
NewerOlder