seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
row['full_comment'] = re.sub(r'[.|?,،!؟]', ' ', row['full_comment'])
full_comment = row['full_comment'].split()
for word in full_comment:
# Take out emails, urls and numbers from words
if re.match(r'^[-+]?[0-9]+$', word) or re.match(r'https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+', word) or re.match(
r'(?:[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
} else {
cell = outlineView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "menuCell"), owner: self, menuItem: menuItem)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.encoding = encoding;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
data = [line.strip() for line in f.readlines()]
print(f"Solution 1: {solution1(data)}")
print(f"Solution 2: {solution2(data)}")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$this->taskLog = $taskLog;
}
public function execute()
{
}
public function updateTask()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace EveryWorkflow\DataGridBundle\Tests;
use EveryWorkflow\DataFormBundle\Factory\FieldOptionFactory;
use EveryWorkflow\DataFormBundle\Field\Select\Option;
use EveryWorkflow\DataFormBundle\Model\FormInterface;
use EveryWorkflow\DataFormBundle\Tests\BaseFormTestCase;
use Symfony\Component\DependencyInjection\ContainerInterface;
class BaseGridTestCase extends BaseFormTestCase
{
public function getExampleUserData(): array
{
$userData = [];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.map(|path| app_writer().load_config(path))
.transpose()?
.map(|app_config| app_config.state)
.unwrap_or_else(new_zs::Config::ephemeral);
info!(?base_config, "state copy base config");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>peacebot/core/plugins/Miscellaneous/__init__.py<gh_stars>1-10
import lightbulb
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from peacebot.core.utils.time import TimeConverter
| ise-uiuc/Magicoder-OSS-Instruct-75K |
plt.axis("off")
plt.figure()
plt.imshow(back_coloring, interpolation="bilinear")
plt.axis("off")
plt.show()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
};
self.write_delta(output, &delta_to_first)
}
}
/// Compare two JSON nodes and returns their `Delta`.
fn compare_values<'a>(val1: &'a Value, val2: &'a Value) -> Delta<'a> {
match (val1, val2) {
(Value::Null, Value::Null) => Delta::Equal(val1),
(Value::Bool(_), Value::Bool(_)) => Delta::new(val1, val2),
(Value::Number(_), Value::Number(_)) => Delta::new(val1, val2),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# required inputs (fail early w/ nounset)
GIT_BRANCH="${GIT_BRANCH}"
DOCKER_USER="${DOCKER_USER}"
DOCKER_PASS="${DOCKER_PASS}"
APP_ID="${APP_ID}" # ex: /docs-site/docs2-dev
DCOS_URL="${DCOS_URL}" # ex: https://leader.mesos
DCOS_USER_NAME="${DCOS_USER_NAME}" # ex: docs-bot
DCOS_USER_PRIVATE_KEY_PATH="${DCOS_USER_PRIVATE_KEY_PATH}" # ex: docs-bot-private.pem
DCOS_CRT="${DCOS_CRT}" # ex: docs-us.crt
# optional inputs
# CONTAINER_NAME # default: dcos-docs-site
ci/site/1-setup-env.sh
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub fn picker_clear_stash_sys(mut entity_picker: EntityPickerViewMut) -> Option<EntityId> {
entity_picker.0.take()
}
//For debug - don't scissor, or stash, and do draw at the end
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private func ms_sleep(_ ms: Int) {
usleep(useconds_t(ms * 1000))
}
}
private class Caller: CocoaMQTTDeliverProtocol {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for t in reversed(xrange(s_new.shape[1])):
w = F.minimum(s[:, t].reshape(-1, 1), ur)
r += V[:, t] * F.broadcast_to(w, V[:, t].shape)
x = ur - s[:, t].reshape(-1, 1)
ur = F.maximum(Variable(np.zeros_like(x.data)), x)
return V, s, r
batch_size = 3
stack_element_size = 2
V = Variable(np.zeros((batch_size, 1, stack_element_size)))
s = Variable(np.zeros((batch_size, 1)))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
process = subprocess.run('fitdump ./temp/'+filename+' -n device_info -t json', shell=True, check=True, stdout=subprocess.PIPE, universal_newlines=True)
output = process.stdout
data = json.loads(output)
content = {}
for i in range(len(data)):
index = (data[i]['data']['device_index'])
version = (data[i]['data']['software_version'])
manufacturer = (data[i]['data']['manufacturer'])
serial = (data[i]['data']['serial_number'])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
NO_DEBUG_INFO_TESTCASE = True
def test_read_memory_c_string(self):
"""Test corner case behavior of SBProcess::ReadCStringFromMemory"""
self.build()
self.dbg.SetAsync(False)
self.main_source = "main.c"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tmpDownloadPath: string,
installDir: string,
symlinkPath: string
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
config=self.config_path,
framework=self.framework,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return env.add_object(urdf, pose)
def add_fixture(self, env):
"""Add L-shaped fixture to place block."""
size = (0.1, 0.1, 0.04)
urdf = 'insertion/fixture.urdf'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == "__main__":
amazon = Amazon()
dropbox = Dropbox()
amazon.get_file("Baba")
dropbox.store_file("Baba")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
scene->addChild(layer);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
y2 = np.sin(Y*np.log(n1+1))/np.sin(Y*np.log(n1))*(1+1/n1)**(-1/2)
plt.plot(n1,y1)
plt.plot(n1,y2)
plt.show()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public show () {
element ("popup").prepend (this.tile);
this.destructAfter (this.timeout);
}
public destructAfter (timeout : number) {
if (timeout > 0 && timeout < 300) { // from 1 to 300 seconds
setTimeout (() => this.delete (), timeout * 1000);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return os.path.join('mnt', 'data', 'resin-data', _get_resin_app_id())
def _get_resin_app_id() -> str:
if not config.IS_ROBOT:
raise RuntimeError('Resin app id is only available on the pi')
p1_env = open('/proc/1/environ').read()
# /proc/x/environ is pretty much just the raw memory segment of the
# process that represents its environment. It contains a
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* @since 0.1.0
*/
export interface IViolation<R, T, S = string | number> {
/**
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"--batch_size", type=int, default=16, help="model config: batch size"
)
parser.add_argument(
"--input_res", type=int, default=512, help="model config: input resloution"
)
parser.add_argument("--fp16", action="store_true", help="model config: FP16")
args = parser.parse_args()
main(args)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TestMCT(QiskitAquaTestCase):
@parameterized.expand([
[1],
[2],
[3],
[4],
[5],
[6],
[7],
])
def test_mct(self, num_controls):
c = QuantumRegister(num_controls, name='c')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if codestring and codestring[-1] != '\n':
codestring = codestring + '\n'
try:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
storage, stream,
indent=indent, ensure_ascii=ensure_ascii
)
elif suffix in [".yml", ".yaml"]:
yaml.dump(storage, stream)
def type_from_str(dtype: str) -> Type:
"""Returns type by giving string
Args:
dtype (str): string representation of type
Returns:
(Type): type
Examples:
>>> type_from_str("str")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
desc=progress_prefix+' %s'%epoch,
ncols=0)
# Iterate through the data set
update_sum = dict()
# Create empty tensor for each leaf that will be filled with new values
for leaf in tree.leaves:
update_sum[leaf] = torch.zeros_like(leaf._dist_params)
for i, (xs, ys) in train_iter:
xs, ys = xs.to(device), ys.to(device)
#Train leafs without gradient descent
| ise-uiuc/Magicoder-OSS-Instruct-75K |
kb_seqs_link += kb_seqs
labels_link += labels
return None, (text_seqs_link, kb_seqs_link, labels_link)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const { updated, state } = store.update(testUpdate);
expect(updated).toBe(false);
expect(state).toBeNull();
});
it("should hold state, when synced", function () {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
double *ptr = (double *)buf.ptr;
int numObservations = buf.shape[0];
int numFeatures = buf.shape[1];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public void addEmailAccount(EmailAccount emailAccount){
emailAccounts.add(emailAccount);
EmailTreeItem<String> treeItem = new EmailTreeItem<String>(emailAccount.getAdress());
treeItem.setGraphic(iconResolver.getIconForFolder(emailAccount.getAdress()));
FetchFoldersService fetchFoldersService = new FetchFoldersService(emailAccount.getStore(),treeItem, folderList);
fetchFoldersService.start();
foldersRoot.getChildren().add(treeItem);
}
public void setRead() {
try {
selectedMessage.setRead(true);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*
* for int i <- 0; if i is lower than array length; i++
* if array[i] is not equal to clone[i]
* count++
* end if
* end for
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.filename = filename
if filename is not None:
filexml = minidom.parse(filename)
# we have no use for all the xml data in the file. We only care
# about what is between the "description" tags
templatedata = filexml.getElementsByTagName('templatedata')
if len(templatedata):
desc_xml = templatedata[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Implementation of whole image prediction with variable overlap.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.skimage = skimage
self.np = np
self.model = None
self.prep_image = None
self.orig_image = None
@staticmethod
def __extact_alpha_channel__(image):
"""
Extracts alpha channel from RGBA image
:param image: RGBA pil image
:return: RGB Pil image
"""
# Extract just the alpha channel
| ise-uiuc/Magicoder-OSS-Instruct-75K |
swamp_prob = CardDrawnProbability(80, swamps, 7, 3, turn, 1)
print("swamp prob on turn: ", swamp_prob)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"nonce": nonce,
"aud": "aud2",
"acr": "http://mockauth:8000/LoginHaka",
"nsAccountLock": "false",
"eduPersonScopedAffiliation": "<EMAIL>;<EMAIL>",
"auth_time": 1606579533,
"name": f"{user_given_name} {user_family_name}",
"schacHomeOrganization": "test.what",
"exp": 9999999999,
"iat": 1561621913,
"family_name": user_family_name,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
foreach ($refClass->getProperties() as $refProperty)
{
$propertyName = $refProperty->getName();
foreach (self::$reader->getPropertyAnnotations($refProperty) as $annotation)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>PaperDevil/pyconfigger<gh_stars>1-10
import os
splited_path = os.path.realpath(__file__).split('\\')[:-1]
fish_path = '\\'.join(splited_path)
fish_json_name = "fish.json"
fish_json_path = os.path.join(fish_path, fish_json_name)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if ((Path.GetExtension(file) != ".jpg") && (Path.GetExtension(file) != ".png"))
continue;
var label = Path.GetFileName(file);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
name: 'youtube',
viewBox: '0 0 20 20',
icon: `<path d="M15,4.1c1,0.1,2.3,0,3,0.8c0.8,0.8,0.9,2.1,0.9,3.1C19,9.2,19,10.9,19,12c-0.1,1.1,0,2.4-0.5,3.4c-0.5,1.1-1.4,1.5-2.5,1.6 c-1.2,0.1-8.6,0.1-11,0c-1.1-0.1-2.4-0.1-3.2-1c-0.7-0.8-0.7-2-0.8-3C1,11.8,1,10.1,1,8.9c0-1.1,0-2.4,0.5-3.4C2,4.5,3,4.3,4.1,4.2 C5.3,4.1,12.6,4,15,4.1z M8,7.5v6l5.5-3L8,7.5z" />`
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace LicenseManager.Infrastructure.Services
{
public interface IUserService
{
Task<IEnumerable<UserDto>> BrowseAsync();
Task<UserDto> GetAsync(Guid userId);
Task<UserDto> GetAsync(string name, string surname);
Task AddAsync(string name, string surname);
Task RemoveAsync(Guid userId);
Task UpdateAsync(Guid userId, string name, string surname);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// <summary>
/// Officially assigned birth number
/// </summary>
BirthNumber,
/// <summary>
/// Officially assigned replacement number
/// </summary>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$defaultColor = '#F7786B';
$primaryColor = esc_html( get_theme_mod( 'sentry-color', $defaultColor ) );
$defaultFontSize = '16';
$fontSize = absint( get_theme_mod( 'article_font_size', $defaultFontSize ) );
$fontSizeH2 = absint( $fontSize*1.25);
$contentHeadlineStyle = "default";
$output = '';
$output .= "body#tinymce a{ color: {$primaryColor};}";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ctx.project_description = {"text": "bold description", "bold": True}
ctx.project_author = "Fizzy"
ctx.project_version = "1.2.3"
ctx.data.description = ["override for ", {"text": "data pack", "color": "red"}]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
integer i=3
{ i+=4;} 2> /dev/null
if (( i != 7 ))
then err_exit '3+4!=7'
fi
iarray=( one two three )
{ iarray+= (four five six) ;} 2> /dev/null
if [[ ${iarray[@]} != 'one two three four five six' ]]
then err_exit 'index array append fails'
fi
unset iarray
iarray=one
{ iarray+= (four five six) ;} 2> /dev/null
if [[ ${iarray[@]} != 'one four five six' ]]
then err_exit 'index array append to scalar fails'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import math
import numpy as np
import matplotlib.pyplot as plt
#Constants
GNa = 120 #Maximal conductance(Na+) ms/cm2
Gk = 36 #Maximal condectance(K+) ms/cm2
Gleak = 0.3 #Maximal conductance(leak) ms/cm2
cm = 1 #Cell capacitance uF/cm2
delta = 0.01 #Axon condectivity ms2
ENa = 50 #Nernst potential (Na+) mV
Ek = -77 #Nernst potential (K+) mV
Eleak = -54.4 #Nernst potential (leak) mV
| ise-uiuc/Magicoder-OSS-Instruct-75K |
while guess != secret_word and guess_count < guess_limit:
guess = input("Enter guess: ")
guess_count += 1
if guess_count < guess_limit:
print("Out of Guesses, You Lose!")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// RUN: not %target-swift-frontend %s -typecheck
var e: Int -> Int = {
return $0
struct d<f : e, g: e where g.h = f.h> { : C {
func g<T where T>(f: B<T>) {
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return mask
def to_gpu(x):
x = x.contiguous()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
file_path: &Path,
requested_bps: &[SourceBreakpoint],
) -> Result<Vec<Breakpoint>, Error> {
let BreakpointsState {
ref mut source,
ref mut breakpoint_infos,
..
} = *self.breakpoints.borrow_mut();
let file_path_norm = normalize_path(file_path);
let existing_bps = source.entry(file_path.into()).or_default();
let mut new_bps = HashMap::new();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
edges.show()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
long_description=LONG_DESCRIPTION,
install_requires=[
'numpy',
'numba',
'scipy',
'hdbscan'
],
classifiers=[
'Programming Language :: Python',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</div>
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu" data-widget="tree">
<li class="header">Hlavné menu</li>
<li>
<a href="/brigady">
<i class="fa fa-dashboard"></i> <span>Úvod</span>
<span class="pull-right-container">
</span>
</a>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print("[INFO] Processing image: {}/{}".format(ind, len(imagePaths)))
# load the image
image = cv2.imread(imagePath)
# resize the image
image = imutils.resize(image, width=300)
# copy the image
image_copy = image.copy()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .app import app
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for _ in range(num_samples)]
# Begin the benchmark
start_time = datetime.datetime.now()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ALL_CLUSTER_NETTAGS=$(gcloud compute instances list --format=json | jq -r '.[].tags.items[0]' | uniq | awk -vORS=, '{ print $1 }' | sed 's/,$/\n/')
# allow direct traffic between pods in both gcp and onprem clusters
gcloud compute firewall-rules create istio-multicluster-pods \
--allow=tcp,udp,icmp,esp,ah,sctp \
--direction=INGRESS \
--priority=900 \
--source-ranges="${ALL_CLUSTER_CIDRS}" \
--target-tags="${ALL_CLUSTER_NETTAGS}" --quiet
echo "🔥 Updating onprem firewall rule to support discovery from GCP Istio..."
# update onprem firewall rule to allow traffic from all sources
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>sommoMicc/react-simple-keyboard<gh_stars>100-1000
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let packet = packets.next().expect("peeked");
match packet.tag() {
$(
Tag::$subkey_tag => {
let subkey: $inner_subkey_type = err_opt!(packet.try_into());
let mut sigs = Vec::new();
while let Some(true) =
packets.peek().map(|packet| packet.tag() == Tag::Signature)
{
let packet = packets.next().expect("peeked");
let sig: Signature = err_opt!(packet.try_into());
sigs.push(sig);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Create a speech recognizer
recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config)
# Connect up the recognized event
| ise-uiuc/Magicoder-OSS-Instruct-75K |
y1 = min(self.start_pos.y, self.end_pos.y)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
frame = inspect.currentframe(1)
self = frame.f_locals['self']
methodName = frame.f_code.co_name
method = getattr(super(cls, self), methodName, None)
if inspect.ismethod(method):
return method(*args, **kwargs)
super = classmethod(super)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
await self.container.execute_async(
self.container.solve(Dependant(callback))
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
_TEST_UID = 10000
_TEST_FILE = 'file'
_OWNER_GROUP_RE = re.compile(r'^group::([r-][w-][x-])$', re.MULTILINE)
@pytest.mark.parametrize('mode,user_perms,group_perms', [
('770', 'r-x', 'rwx'), ('640', 'r--', 'r--')])
def test_set_unset_uids_file(uids: list[int], target_file: str, mode: str,
user_perms: str, group_perms: str) -> None:
owner_gid = os.stat(target_file).st_gid
subprocess.run(('chmod', mode, target_file), check=True)
set_uids(target_file, uids)
result = subprocess.run(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Client:
@staticmethod
def request(method: str, url: str, **kwargs) -> Response:
"""
Request method
method: method for the new Request object: GET, OPTIONS, HEAD, POST, PUT, PATCH, or DELETE. # noqa
url – URL for the new Request object.
**kwargs:
params – (optional) Dictionary, list of tuples or bytes to send in the query string for the Request. # noqa
json – (optional) A JSON serializable Python object to send in the body of the Request. # noqa
headers – (optional) Dictionary of HTTP Headers to send with the Request.
"""
return requests.request(method, url, **kwargs) | ise-uiuc/Magicoder-OSS-Instruct-75K |
df.loc[df['response_hand'] == 2, 'response_hand'] = 'right'
df.to_csv(tsv, sep='\t', index=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* \brief Access the handled value.
*
* \return handle as \c float without conversion.
*/
explicit constexpr operator T() const noexcept;
/**
* \brief \e Cast operator to \c Degree with proper conversion.
*
* \return \c Degree converted from \c Radian.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
result_dict[anchor_time].append((anchor_freq, point[1], point[0] - anchor_time))
return result_dict
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.write(cmd)
return self.check()
def check(self):
"""Checks and returns the board response for a single command."""
rsp = self.read().split(maxsplit=1)
if rsp[0] == 'NAK':
self.write('RST')
self.read()
print(f'ERR: {rsp[1]}')
sys.exit(1)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
count = longest(frac)
if count > maxi:
maxi = count
maxidx = d
print '%d : %d' % (d, maxi)
print maxidx | ise-uiuc/Magicoder-OSS-Instruct-75K |
XCTAssertEqual(Product.uiTests.toJSON().toString(), "\"uiTests\"")
XCTAssertEqual(Product.appExtension.toJSON().toString(), "\"appExtension\"")
XCTAssertEqual(Product.watchApp.toJSON().toString(), "\"watchApp\"")
XCTAssertEqual(Product.watch2App.toJSON().toString(), "\"watch2App\"")
XCTAssertEqual(Product.watchExtension.toJSON().toString(), "\"watchExtension\"")
XCTAssertEqual(Product.watch2Extension.toJSON().toString(), "\"watch2Extension\"")
XCTAssertEqual(Product.tvExtension.toJSON().toString(), "\"tvExtension\"")
XCTAssertEqual(Product.messagesApplication.toJSON().toString(), "\"messagesApplication\"")
XCTAssertEqual(Product.messagesExtension.toJSON().toString(), "\"messagesExtension\"")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// 在运行每个测试之前,使用 TestInitialize 来运行代码
// [TestInitialize()]
// public void MyTestInitialize() { }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (parameters.Length > 0 && parameters[0] is string message)
GetClient(@this).SendServerMessage(message);
return NetUndefined.Instance;
}
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
cd tapyrus-$HOST
./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
if [ "$RUN_TESTS" = "true" ]; then LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; fi
if [ "$RUN_BENCH" = "true" ]; then LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/depends/$HOST/lib $OUTDIR/bin/bench_tapyrus -scaling=0.001 ; fi
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
if [ "$DEBUD_MODE" = "true" ]; then debugscripts="--debugscripts"; fi
if [ "$RUN_TESTS" = "true" ]; then test/functional/test_runner.py --combinedlogslen=4000 --coverage --failfast --quiet ${extended} ${debugscripts}; fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
def utf_detection_logic(detection_list):
# todo: Add a logic to account for cases were two top ranked items are too close
| ise-uiuc/Magicoder-OSS-Instruct-75K |
email = request.args.get('email', '')
is_new_user = 'recover' not in request.args
if request.method == 'POST':
captcha_passed, captcha_error_message = verify_captcha()
email = request.form['email'].strip()
if utils.is_invalid_email(email):
flash(gettext('The email address is invalid.'))
elif not captcha_passed:
flash(captcha_error_message)
else:
computer_code = get_computer_code()
computer_code_hash = utils.calc_sha256(computer_code)
user = User.query.filter_by(email=email).one_or_none()
if user:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class PostTokenizer:
def __init__(self, lif_filename, ann_filename):
self.input_filename = lif_filename
self.ann_filename = ann_filename
self.lif_loader = LifFileParser(lif_filename)
def load_ann(self):
ann_file = open(self.ann_filename)
self.ann_data = json.load(ann_file)
def extract_tag(self):
annotations = self.lif_loader.loadAnnotation("Token")
annotations = parse_hyphen(annotations)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
contact_form = ContactForm(request.POST)
if contact_form.is_valid():
return HttpResponseRedirect('/thanks/')
else:
contact_form = ContactForm(auto_id=False)
context = {
"form": contact_form
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
title: string;
tags: string;
body: string;
position?: Vector2;
colorID?: number;
}
export const dialogue: Record<string, DialogueNode[]> = { dialogue: dlg };
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def request(url):
try:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, env: 'HttpdTestEnv'):
super().__init__(env=env)
self.add_source_dir(os.path.dirname(inspect.getfile(TlsTestSetup)))
self.add_modules(["tls", "http2", "cgid", "watchdog", "proxy_http2"])
class TlsCipher:
def __init__(self, id: int, name: str, flavour: str,
min_version: float, max_version: float = None,
openssl: str = None):
self.id = id
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if "workload" in os.environ:
self.args.workload = os.environ["workload"]
if "num_records" in os.environ:
self.args.recordcount = os.environ["num_records"]
if "num_operations" in os.environ:
self.args.operationcount = os.environ["num_operations"]
def run(self):
ycsb_wrapper_obj = Trigger_ycsb(self.args)
yield ycsb_wrapper_obj
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ax2.set_ylabel('Superficial feed velocity [m/s]')
ax2.set_xlabel('Cycle time [h]')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
String request= "KafkaTest-Request:" + key;
try {
kAdapter.directInvoke(producerProps, request, 0, recordProps);
}
catch (AdapterException | ConnectionException e) {
// TODO Auto-generated catch block
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_future_value_annuity_semi_annual():
test_e = FutureValue(200000, 6.7, 10, 6, True)
assert round(test_e.calculate()) == 5569558.0, "Should be $5,569,558"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[derive(Clone, Deserialize, Debug)]
pub struct ValidatorConfig {
/// Address of the validator (`tcp://` or `unix://`)
pub addr: net::Address,
/// Chain ID of the Tendermint network this validator is part of
pub chain_id: chain::Id,
/// Automatically reconnect on error? (default: true)
#[serde(default = "reconnect_default")]
pub reconnect: bool,
/// Path to our Ed25519 identity key (if applicable)
pub secret_key: Option<PathBuf>,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
#mkdir -p pubchem
#cd pubchem
#wget -r -A ttl.gz -nH --cut-dirs=2 ftp://ftp.ncbi.nlm.nih.gov/pubchem/RDF/substance/pc_substance2compound*
#wget -r -A ttl.gz -nH --cut-dirs=2 ftp://ftp.ncbi.nlm.nih.gov/pubchem/RDF/substance/pc_substance2descriptor*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mod link_style;
mod sectionmap;
pub use clog::Clog;
pub use link_style::LinkStyle;
pub use sectionmap::SectionMap;
// The default config file
const CLOG_CONFIG_FILE: &'static str = ".clog.toml";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cleared = false;
}
void drawable_rectangle::clear() {
if (cleared) return;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let _ = bind::SDL_SetClipRect(surface.as_ptr().as_ptr(), &raw_rect as *const _);
}
Self { surface, area }
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// name: "RulesDSL",
// targets: ["RulesDSL"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
// .package(url: "https://github.com/Realm/SwiftLint", from: "0.28.1")
],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
export OLDNVMIMMUSRC=$PWD
export DBBENCH=$OLDNVMIMMUSRC/build
export TEST_TMPDIR=/mnt/ssd
export TEST_MEMDIR=/mnt/pmemdir
#DRAM buffer size in MB
export DRAMBUFFSZ=4
#NVM buffer size in MB
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from operator import add
from pyspark.sql import SparkSession
def computeContribs(urls, rank):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def select():
backend = get_backend()
selection_id = int(request.args.get('selection'))
if selection_id == -1:
return
selected_item = backend.select(userid(), selection_id)
ordered_item = backend.schema.get_ordered_item(selected_item)
displayed_message = format_message("You selected: {}".format(", ".join([v[1] for v in ordered_item])), True)
return jsonify(message=displayed_message)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for steps in 200000 300000; do
for model in annealedvae betavae betatcvae factorvae dipvae_i dipvae_ii; do
bsub -g /disent_baseline -R "rusage[mem=16000,ngpus_excl_p=1]" \
python baselines/train_baseline.py --base_dir exp_steps_full1/steps_"$steps" \
--output_dir steps_"$steps"_n_4 --dim 64 --model "$model" --seed "$seed" \
--steps "$steps"
done
done | ise-uiuc/Magicoder-OSS-Instruct-75K |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.