seed
stringlengths
1
14k
source
stringclasses
2 values
cur = batch_zeros batch_ind = torch.arange(batch_size).long() lb, ub = torch.unbind(dataset['timew'], -1) for i in range(graph_size - 1): next = pi[:, i] t = torch.max(t + dist[batch_ind, cur, next], lb[batch_ind, next]) assert (t <= ub[batch_ind, next]).all()
ise-uiuc/Magicoder-OSS-Instruct-75K
import sys, psycopg2, psycopg2.extras def generate(user_id, db): try: with db.cursor(cursor_factory = psycopg2.extras.DictCursor) as cursor: cursor.execute(""" INSERT INTO minicloud_auths (user_id) VALUES (%s) RETURNING token """, [int(user_id)]) data = cursor.fetchone() db.commit() return data['token'] except Exception as e: db.rollback()
ise-uiuc/Magicoder-OSS-Instruct-75K
export default readonly }
ise-uiuc/Magicoder-OSS-Instruct-75K
ItemObserversData[observer][type].OnItemDestroyed(instance); } catch (Exception e) { Log.LogError(e); } } } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
"Illusion_Type": "Congruent" if illusion_strength > 0 else "Incongruent", "Rectangle_Top": colors[0], "Rectangle_Bottom": colors[1], "Background_Top": colors[2], "Background_Bottom": colors[3], "Rectangle_Top_RGB": rgb[0], "Rectangle_Bottom_RGB": rgb[1], "Background_Top_RGB": rgb[2], "Background_Bottom_RGB": rgb[3], }
ise-uiuc/Magicoder-OSS-Instruct-75K
sh -c "echo Hi my name is $INPUT_MY_NAME"
ise-uiuc/Magicoder-OSS-Instruct-75K
factory::TransactionFactory::create_transaction(entry) }
ise-uiuc/Magicoder-OSS-Instruct-75K
STATUS_FAILED, STATUS_PYWPS_IDS, STATUS_RUNNING,
ise-uiuc/Magicoder-OSS-Instruct-75K
Returns: child indicator policy """ return CHILD_INDICATOR_POLICY.inverse[self.childIndicatorPolicy()] if __name__ == "__main__": item = TreeWidgetItem() item[0] item.setData(0, 1000, "test")
ise-uiuc/Magicoder-OSS-Instruct-75K
@MappedSuperclass public abstract class DvObjectContainer extends DvObject { public void setOwner(Dataverse owner) { super.setOwner(owner); } @Override
ise-uiuc/Magicoder-OSS-Instruct-75K
expect(result).toEqual([35, 35]); secondary.kill();
ise-uiuc/Magicoder-OSS-Instruct-75K
"program": {"version": "fortran"}, "estimation": {"maxfun": np.random.randint(0, 50)}, } params_spec, options_spec = generate_random_model(point_constr=constr) # If delta is a not fixed, we need to ensure a bound-constraint optimizer. # However, this is not the standard flag_estimation as the number of function # evaluation is possibly much larger to detect and differences in the updates of
ise-uiuc/Magicoder-OSS-Instruct-75K
private var requestListener: ListenerRegistration! private var userListener: ListenerRegistration! private var currentUser: User! private var project: Project? var db: Firestore! @IBOutlet private weak var nameProject: UILabel! @IBOutlet private weak var requestsCollectionView: UICollectionView! @IBOutlet private weak var projectsCollectionView: ScalingCarouselView!
ise-uiuc/Magicoder-OSS-Instruct-75K
"`I come for peace!`", "Ahoy, matey!", "`Hi !`", ] CONGRATULATION = [ "`Congratulations and BRAVO!`", "`You did it! So proud of you!`",
ise-uiuc/Magicoder-OSS-Instruct-75K
from .poincare_ball import PoincareBall
ise-uiuc/Magicoder-OSS-Instruct-75K
if (!WindowSystem::windowStillExists(win.handle)) return; m_contextIsValid = ContextHelper::makeContextCurrent(win); if (!m_contextIsValid) log::warn("Context is no longer valid."); } context_guard::~context_guard() { if (!m_contextIsValid) return; ContextHelper::makeContextCurrent(nullptr);
ise-uiuc/Magicoder-OSS-Instruct-75K
@app.post("/", tags=["users"], response_model=BugoutUser) async def create_user_handler( username: str = Form(...), email: str = Form(...), password: str = Form(...) ) -> BugoutUser: try: user: BugoutUser = bc.create_user( username=username, email=email,
ise-uiuc/Magicoder-OSS-Instruct-75K
from mashcima.annotation_to_image import multi_staff_annotation_to_image from mashcima.primus_adapter import load_primus_as_mashcima_annotations from app.generate_random_annotation import generate_random_annotation
ise-uiuc/Magicoder-OSS-Instruct-75K
private MultiValueMap<R, L> rightMap; public BipartiteGraph() { this.leftMap = new MultiValueMap<>(); this.rightMap = new MultiValueMap<>(); } /** * Replaces the left side of the graph with the value inside the provided set.
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Getter * * @return first name */ public String getFirstName() { return firstName; }
ise-uiuc/Magicoder-OSS-Instruct-75K
# decode URIs of the extracted files #mvn compile #mvn exec:java -e -Dexec.mainClass="org.dbpedia.spotlight.lucene.index.external.utils.SSEUriDecoder" -Dexec.args=$INDEX_CONFIG_FILE > out_SSEUriDecoder.log 2>&1 java -Xmx$JAVA_XMX -cp index-06.jar org.dbpedia.spotlight.lucene.index.external.utils.SSEUriDecoder $INDEX_CONFIG_FILE > out_SSEUriDecoder.log 2>&1
ise-uiuc/Magicoder-OSS-Instruct-75K
lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True )
ise-uiuc/Magicoder-OSS-Instruct-75K
def verify_request(func): """ verify user request """ def wrapper(request): if not request.POST.get('uid', ''): return HttpResponseForbidden() return func(request) return wrapper
ise-uiuc/Magicoder-OSS-Instruct-75K
@property @pulumi.getter(name="eC2SecurityGroupName") def e_c2_security_group_name(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "e_c2_security_group_name") @property @pulumi.getter(name="eC2SecurityGroupOwnerId") def e_c2_security_group_owner_id(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "e_c2_security_group_owner_id")
ise-uiuc/Magicoder-OSS-Instruct-75K
# A = np.tanh(Z) up = np.exp(Z) - np.exp(-Z) dn = np.exp(Z) + np.exp(-Z) A = up / dn return A def backward(self, Z):
ise-uiuc/Magicoder-OSS-Instruct-75K
/// - Parameters: ///
ise-uiuc/Magicoder-OSS-Instruct-75K
i += 1 elif dirlist == 'CN': name = str(i) + ' ' + os.path.join(dirlist, imagelist) + '\n' name2 = str(i) + ' 1\n'
ise-uiuc/Magicoder-OSS-Instruct-75K
// IWYU pragma: no_forward_declare NewtonianEuler::Tags::Pressure // IWYU pragma: no_forward_declare NewtonianEuler::Tags::SpecificInternalEnergy // IWYU pragma: no_forward_declare NewtonianEuler::Tags::Velocity
ise-uiuc/Magicoder-OSS-Instruct-75K
{ internal class RemoveFromTradePileRequest : FutRequestBase, IFutRequest<byte> { private readonly AuctionInfo _auctioninfo; public RemoveFromTradePileRequest(AuctionInfo auctioninfo) { auctioninfo.ThrowIfNullArgument(); _auctioninfo = auctioninfo; } public async Task<byte> PerformRequestAsync() { var uriString = string.Format(Resources.FutHome + Resources.RemoveFromTradePile, _auctioninfo.TradeId);
ise-uiuc/Magicoder-OSS-Instruct-75K
return res_obj
ise-uiuc/Magicoder-OSS-Instruct-75K
'submitted':'1', 'csrf_token': '' } if not test_mode:
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- """This module handles API endpoints"""
ise-uiuc/Magicoder-OSS-Instruct-75K
from django import template from ..models import Ouser from comment.models import CommentUser register = template.Library()
ise-uiuc/Magicoder-OSS-Instruct-75K
go build -o cicerone
ise-uiuc/Magicoder-OSS-Instruct-75K
from wikidataintegrator import wdi_core, wdi_login import getpass username = "djow2019" password = <PASSWORD>("<PASSWORD>") count = 0 d_strain = "272561" l2_strain = "471472" sparql = WD_Utils.WDSparqlQueries() login = wdi_login.WDLogin(user=username, pwd=password)
ise-uiuc/Magicoder-OSS-Instruct-75K
return ""
ise-uiuc/Magicoder-OSS-Instruct-75K
RuntimeError: If the variational_params argument is not a 2-tuple. """ # We expect a 2D input tensor, as in standard in fully-connected layers x.get_shape().assert_has_rank(2)
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Calculate GIoU loss on anchor boxes Reference Paper: "Generalized Intersection over Union: A Metric and A Loss for Bounding Box Regression"
ise-uiuc/Magicoder-OSS-Instruct-75K
from . import prot
ise-uiuc/Magicoder-OSS-Instruct-75K
<p><NAME> on Twitter, credited the security man's efforts to scale the barrier, writing: '10 out of 10 for aspiration.' </p> <p>However, Tom Pine was more concerned for the plastic barrier involved, joking: 'I hope the barrier is ok.'</p> <p>The man flips backwards, landing on his head in an excruciatingly painful fall</p> <?php $__env->stopSection(); ?> <?php echo $__env->make('_layouts.post', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
ise-uiuc/Magicoder-OSS-Instruct-75K
# Given equal covariance, FID is just the squared norm of difference assert fid_value == np.sum((m1 - m2)**2) def test_compute_statistics_of_path(mocker, tmp_path, device): model = mocker.MagicMock(inception.InceptionV3)() model.side_effect = lambda inp: [inp.mean(dim=(2, 3), keepdim=True)]
ise-uiuc/Magicoder-OSS-Instruct-75K
funcionario.add(f); } return funcionario; } catch (SQLException e) { throw new SQLException("Erro ao buscar funcionário! " + e.getMessage()); } finally { con.close(); stat.close(); } } public ArrayList<FuncionarioVO> filtrar(String query) throws SQLException { Connection con = ConexaoBanco.getConexao();
ise-uiuc/Magicoder-OSS-Instruct-75K
let topology_permit = self.topology_access.get_read_permit().await; let topology = match topology_permit
ise-uiuc/Magicoder-OSS-Instruct-75K
// 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.
ise-uiuc/Magicoder-OSS-Instruct-75K
print(len(self.list)) lista1=[1,2,3,4,5] lista(lista1).tamaño()
ise-uiuc/Magicoder-OSS-Instruct-75K
import android.content.Context; import android.content.Intent; import com.android.sidebar.SideBarService; /** * launch the sidebar service * @author majh */ public class ServiceGo { public static void launchAccessibility(Context context) { Intent intent = new Intent(context, SideBarService.class);
ise-uiuc/Magicoder-OSS-Instruct-75K
import nvidia.dali.types as types
ise-uiuc/Magicoder-OSS-Instruct-75K
// The following are highly recommended additional parameters. Remove the slashes in front to use. var disqus_identifier = '@Model.DisqusID'; var disqus_url = '@Model.Permalink'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function () { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
ise-uiuc/Magicoder-OSS-Instruct-75K
self.treated__proba = model_for_treated_predict_proba(self.args, self.df, self.uplift_models_dict) self.untreated__proba = model_for_untreated_predict_proba(self.args, self.df, self.uplift_models_dict) self.cate_estimated = compute_cate(self.treated__proba, self.untreated__proba) self.df = add_cate_to_df(self.args, self.df, self.cate_estimated) return self._separate_train_test() def estimate_recommendation_impact(
ise-uiuc/Magicoder-OSS-Instruct-75K
super(fuel, consumption + AIR_CONDITIONER_ADDITIONAL_CONSUMPTION); } @Override public void refuel(double liters) { super.refuel(liters * 0.95); }
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ pub fn to_value(value: impl Serialize) -> impl Value { to_value::ToValue(value) } /**
ise-uiuc/Magicoder-OSS-Instruct-75K
WP_AUTH_NONCE_SALT=put_a_secure_key_here EOT echo -e "${GREEN}Done.${NC}"
ise-uiuc/Magicoder-OSS-Instruct-75K
Returns ------- str vColumn DB type. """ return self.transformations[-1][1].lower() dtype = ctype # ---# def date_part(self, field: str): """ --------------------------------------------------------------------------- Extracts a specific TS field from the vColumn (only if the vColumn type is date like). The vColumn will be transformed.
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Constuctor. Prueba de Middleware *
ise-uiuc/Magicoder-OSS-Instruct-75K
u'MeterName': u'Standard IO - Page Blob/Disk (GB)', u'MeterRegion': u'All Regions',
ise-uiuc/Magicoder-OSS-Instruct-75K
from __future__ import (division, print_function, absolute_import, unicode_literals)
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- from ImFEATbox.config import parameters_ImFEATBox_def
ise-uiuc/Magicoder-OSS-Instruct-75K
return b cur.close() def findall(sql): db = p.conntion() cur = db.cursor() cur.execute(sql) listfile = cur.fetchall() cur.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
self.get_item('community','intertie')[0].\ replace(' ','_').replace("'",'')\ + '_intertie.yaml' it_file = os.path.join(rt_path[0], it_file)
ise-uiuc/Magicoder-OSS-Instruct-75K
""" with warnings.catch_warnings(record=True) as warning: warnings.filterwarnings('ignore') macs = device.cli(['show ethernet-switching table']) mac_entry = re.findall(RE_SWITCHING_TABLE, macs.values()[0]) mac_result = list()
ise-uiuc/Magicoder-OSS-Instruct-75K
export { version };
ise-uiuc/Magicoder-OSS-Instruct-75K
* Class ApiLanguage. * * @author <NAME> <<EMAIL>> * @license MIT License * @package \Siçjot\Http\Middleware
ise-uiuc/Magicoder-OSS-Instruct-75K
template <typename T>
ise-uiuc/Magicoder-OSS-Instruct-75K
# Finds all tests in submodules ending in *tests.py and runs them
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 #!/bin/bash # packages = audit rm -f /etc/audit/rules.d/* > /etc/audit/audit.rules true
ise-uiuc/Magicoder-OSS-Instruct-75K
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DND_Monster { public static class Oni { public static void Add() { // new OGL_Ability() { OGL_Creature = "Oni", Title = "", attack = null, isDamage = false, isSpell = false, saveDC = 0, Description = "" }, //new OGL_Ability() { OGL_Creature = "Oni", Title = "Innate Spellcasting", attack = null, isDamage = false, isSpell = true, saveDC = 17,
ise-uiuc/Magicoder-OSS-Instruct-75K
main
ise-uiuc/Magicoder-OSS-Instruct-75K
self.ylist_key_names = [] self._child_classes = OrderedDict([("cipslaUdpEchoTmplEntry", ("cipslaudpechotmplentry", CISCOIPSLAECHOMIB.CipslaUdpEchoTmplTable.CipslaUdpEchoTmplEntry))]) self._leafs = OrderedDict() self.cipslaudpechotmplentry = YList(self) self._segment_path = lambda: "cipslaUdpEchoTmplTable"
ise-uiuc/Magicoder-OSS-Instruct-75K
</Alert> ); return; } const items = props.authenticationReducer.isAuthenticated ? ( <Redirect to={{ pathname: '/' }} /> ) : ( <StyledForm>
ise-uiuc/Magicoder-OSS-Instruct-75K
# Generated by Django 1.10.3 on 2017-01-14 03:50 from __future__ import unicode_literals import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion
ise-uiuc/Magicoder-OSS-Instruct-75K
def is_file_executable(path): executable = stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH if not os.path.isfile(path): return False st = os.stat(path) mode = st.st_mode if not mode & executable:
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>JamesMusyoka/Blog /usr/lib/python3.6/encodings/unicode_escape.py
ise-uiuc/Magicoder-OSS-Instruct-75K
pub use crate::policies::default::{Default, DefaultCell}; /// Fixed point in time used with some cache policies. pub mod timestamp;
ise-uiuc/Magicoder-OSS-Instruct-75K
return k2 if __name__ == '__main__': t = AVLTree() t.insert(10) t.insert(15) t.insert(20) t.insert(25) t.insert(30) p = t.search(20) print p, p.left, p.right, p.height, p.parent p = t.search(15) print p, p.left, p.right, p.height, p.parent
ise-uiuc/Magicoder-OSS-Instruct-75K
class Login_model extends My_model { function __construct(){ parent::__construct(); $this->setTabela('user'); } public function checaLogin($user, $pass){ $this->db->select('*'); $this->db->from('user'); $this->db->where('login', $user); $this->db->where('senha', $pass); $this->db->where('status', 1);
ise-uiuc/Magicoder-OSS-Instruct-75K
# Split the data into those with cancer and those without cancer
ise-uiuc/Magicoder-OSS-Instruct-75K
terrain->getGlobalColourMap()->getBuffer()->unlock(); } //-----------------------------------------------------------------------------------------
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public boolean trivialEnd() {
ise-uiuc/Magicoder-OSS-Instruct-75K
dispatchTakePictureIntent(); } }); mShoppingRecycleView = view.findViewById(R.id.shopping_recycler_view); linearLayout = new LinearLayoutManager(getContext()); mShoppingRecycleView.setLayoutManager(linearLayout); updateUI();
ise-uiuc/Magicoder-OSS-Instruct-75K
using Heinzman.BusinessObjects; using Heinzman.CentralUnitService.Settings; using Heinzman.VirtualControllerService; namespace Heinzman.CentralUnitService.LevelModifier.GearShift { public class GearHandler : IGearHandler {
ise-uiuc/Magicoder-OSS-Instruct-75K
return_patterns: bool = True, compress: bool = True, use_tqdm: bool = True, available_cuda_list: Optional[List[int]] = None, resource_config: Optional[Dict[str, Any]] = None, task_meta_kwargs: Optional[Dict[str, Any]] = None, is_fix: bool = False, **kwargs: Any, ) -> RepeatResult: if os.path.isdir(workplace) and not is_fix: print(f"{WARNING_PREFIX}'{workplace}' already exists, it will be erased") shutil.rmtree(workplace) kwargs = shallow_copy_dict(kwargs) if isinstance(models, str):
ise-uiuc/Magicoder-OSS-Instruct-75K
uvicorn service.conductor:api --reload
ise-uiuc/Magicoder-OSS-Instruct-75K
private String principalPersonId; // 负责人ID private User principalPerson; //负责人
ise-uiuc/Magicoder-OSS-Instruct-75K
T = int(input()) for i in range(T): conv = input() r, g, b = map(int, input().split(' ')) if conv == 'min':
ise-uiuc/Magicoder-OSS-Instruct-75K
pyautogui.click(x, y) time.sleep(1) except: img_location = pyautogui.locateOnScreen('H:\msteamsbot\microsoft-teams.PNG', confidence=0.6) image_location_point = pyautogui.center(img_location) x, y = image_location_point pyautogui.click(x, y) time.sleep(1)
ise-uiuc/Magicoder-OSS-Instruct-75K
--decay_step 20 \ --device_idx 2
ise-uiuc/Magicoder-OSS-Instruct-75K
<noscript><link rel="stylesheet" href="<?= base_url('assets/css/noscript.css') ?>" /></noscript> </head> <body class="is-loading"> <!-- Wrapper --> <div id="wrapper" class="fade-in"> <!-- Intro --> <div id="intro"> <h1>Welcome to<br /> Bali massive shuffle</h1> <h2>official website</h2>
ise-uiuc/Magicoder-OSS-Instruct-75K
from btmacd.binance_fetcher import BinanceFetcher def main(): fetcher = BinanceFetcher("BTCUSDT", filename="binance_ohlc.csv", start_date="01.01.2018") fetcher.fetch() if __name__ == "__main__": main()
ise-uiuc/Magicoder-OSS-Instruct-75K
func translateCamera(using translation: float2, sensitivity: Float) { camera.position.x += Float(translation.x) * sensitivity camera.position.y += Float(translation.y) * sensitivity } }
ise-uiuc/Magicoder-OSS-Instruct-75K
, disconnectEvent_(new Subject("goodbye")) , observer_(new FriendListObserver(*this)) { friendList_ = new QListWidget(); usernameLabel_ = new QLabel(""); addFriendButton_ = new QPushButton("+"); disconnectButton_ = new QPushButton("disconnect"); callWidget_ = QSharedPointer<CallWidget>(new CallWidget(notifHandler_)); userProfilWidget_ = QSharedPointer<QWidget>(new QWidget());
ise-uiuc/Magicoder-OSS-Instruct-75K
struct OldPrice: Codable {
ise-uiuc/Magicoder-OSS-Instruct-75K
static void sound_updatechanvol(int chan, const vec *loc)
ise-uiuc/Magicoder-OSS-Instruct-75K
// Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. }
ise-uiuc/Magicoder-OSS-Instruct-75K
let _TEMP1 = SELF.GROUP_REF(eREPRESENTATION_RELATIONSHIP.self) let _TEMP2 = _TEMP1?.REP_1 let _TEMP3 = SELF.GROUP_REF(eREPRESENTATION_RELATIONSHIP.self) let _TEMP4 = _TEMP3?.REP_2 let _TEMP5 = _TEMP2 .!=. _TEMP4 return _TEMP5
ise-uiuc/Magicoder-OSS-Instruct-75K
:type cc: list() :type bcc: list() :type from_email: str :rtype: EmailMessage() """ if bcc is None: bcc = [] else: bcc = bcc
ise-uiuc/Magicoder-OSS-Instruct-75K
except IndexError as e: print("Skipping sensor %i, %s" % (sensor, str(e))) continue except FileNotFoundError as e: print("Skipping sensor %i, %s" % (sensor, str(e))) continue # DataX[:,1:] = normalize(DataX[:,1:],axis=0); DataY[sensor] = DataY[sensor][mk] #take subset to match x values
ise-uiuc/Magicoder-OSS-Instruct-75K
} [ConditionalAttribute("CONTRACTS_FULL")] [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)] public static void EndContractBlock () { // Marker method, no code required. } [ConditionalAttribute("CONTRACTS_FULL")]
ise-uiuc/Magicoder-OSS-Instruct-75K
if int(balance) >= fee:
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.contrib import admin from dicoms.models import Subject from dicoms.models import Session from dicoms.models import Series admin.site.register(Session) admin.site.register(Subject) admin.site.register(Series)
ise-uiuc/Magicoder-OSS-Instruct-75K
public string HealthCheckMethod { get; set; } = "GET"; public int HealthCheckInterval { get; set; } = 10; public int HealthCheckTimeout { get; set; } = 10;
ise-uiuc/Magicoder-OSS-Instruct-75K