seed
stringlengths
1
14k
source
stringclasses
2 values
raise CallbackAfterResponse(None, _shutdown) def reboot_server(at_time="now"): def _reboot(): console_log.info("Initiating server reboot per manager request") # reboot(8) just calls shutdown anyhow.
ise-uiuc/Magicoder-OSS-Instruct-75K
__author__ = 'cr0hn - cr0hn<-at->cr0hn.com (@ggdaniel)'
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>1-10 # Importing required libraries, obviously import streamlit as st import cv2 from PIL import Image import numpy as np
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>antopen/alipay-sdk-python-all<filename>alipay/aop/api/response/AlipayCommerceLogisticsWaybillIstddetailQueryResponse.py #!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse
ise-uiuc/Magicoder-OSS-Instruct-75K
AUTHOR = '<EMAIL>' MONGODB_VIEW_NAME = 'experiment_view' DESCRIPTION = 'Experiment and parental lineage'
ise-uiuc/Magicoder-OSS-Instruct-75K
# if last_collum_from_line.find(atom) > -1: #found atom # return_list.append(line.rstrip()) f_file.close() return return_list """ This function save a text file from List """ def save_text_file_from_list(path_file_for_saving, list_of_tupla_ref): f_file = open(path_file_for_saving,"w") for item in list_...
ise-uiuc/Magicoder-OSS-Instruct-75K
if b > end: count += 1 end = b return count
ise-uiuc/Magicoder-OSS-Instruct-75K
STREET_BLACKLIST = { 'Street North',
ise-uiuc/Magicoder-OSS-Instruct-75K
if not os.path.exists(path_analysis_temp): os.makedirs(path_analysis_temp) return path_analysis_temp
ise-uiuc/Magicoder-OSS-Instruct-75K
/bin/rm -f support/db/ftdb.*.db
ise-uiuc/Magicoder-OSS-Instruct-75K
from .normalize_email_mixin import NormalizeEmailSerializerMixin
ise-uiuc/Magicoder-OSS-Instruct-75K
def setUp(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
return dets def export_frozenPB(): tf.reset_default_graph() dets = build_detection_graph() saver = tf.train.Saver() with tf.Session() as sess: print("we have restred the weights from =====>>\n", CKPT_PATH) saver.restore(sess, CKPT_PATH)
ise-uiuc/Magicoder-OSS-Instruct-75K
mkdir MyIcon.iconset ; sips -z 16 16 Icon1024.png --out MyIcon.iconset/icon_16x16.png ; sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_16x16@2x.png ; sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_32x32.png ; sips -z 64 64 Icon1024.png --out MyIcon.iconset/icon_32x32@2x.png ; sips -z 128 128 Icon1024.png -...
ise-uiuc/Magicoder-OSS-Instruct-75K
* Creates an array of n items with a custom filler * Shortcut for new Array(n).fill(undefined).map(fillerFunction) */ export function nafum <T> (n: number, filler: (i: number) => T): T[] { return new Array(n).fill(undefined as unknown as string).map((_, i) => filler(i)) }
ise-uiuc/Magicoder-OSS-Instruct-75K
"""build subdomain list. Using the JSON from the event consumer, we can easily build a unique list of subdomains for module use. Keyword Arguments: valid_only {bool} -- filter only valid subdomains (default: {True})
ise-uiuc/Magicoder-OSS-Instruct-75K
public const string SOURCESYSTEM = "ContactDetailsAPI"; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, x: Union[Decimal, float, str], y: Union[Decimal, float, str]): self.x = x if isinstance(x, Decimal) else Decimal(x) self.y = y if isinstance(y, Decimal) else Decimal(y) def __str__(self): return f'POINT({self.x} {self.y})'
ise-uiuc/Magicoder-OSS-Instruct-75K
assert a_sum.tolist() == 2 assert a_sum.requires_grad assert a.grad.tolist() == [1, 1, 1] def test_tensor_sum_backward2(): a = tensor(data=[-1, 1, 2.0], requires_grad=True) a_sum = a.sum() a_sum.backward(tensor(3))
ise-uiuc/Magicoder-OSS-Instruct-75K
generates b-reference codes for given league, season and date to crawl """ self.reg_s_codes_, self.post_s_codes_ = [], [] base_url = LEAGUES_TO_PATH['nba'].format(self.season.split('-')[1]) for month in ['october', 'november', 'december', 'january', 'februar...
ise-uiuc/Magicoder-OSS-Instruct-75K
[RequireComponent(typeof(Camera))] public class FollowCamera : MonoBehaviour { public GameObject FollowAxisLocation;
ise-uiuc/Magicoder-OSS-Instruct-75K
ys.append(p[1]) for item in xs: x = x + int(item) media_x = x / len(xs) for item in ys:
ise-uiuc/Magicoder-OSS-Instruct-75K
if(!empty($data["message"]["items"]) && is_array($data["message"]["items"])){ foreach ($data["message"]["items"] as $recordCrossref) {
ise-uiuc/Magicoder-OSS-Instruct-75K
# set date as index df = df.set_index("date") ############################################################### # Ajout des 4 premiers et 4 derniers jours de l'année scolaire (grosse incertitude) ############################################################# ind = [] temp = []
ise-uiuc/Magicoder-OSS-Instruct-75K
TOPIC_POKEMONS = 'pokemons' TOPIC_USERS = 'users' GROUP_DASHBOARD = 'dashboard' GROUP_LOGIN_CHECKER = 'checker' DATA = 'data/pokemon.csv' COORDINATES = { 'GAUSS_LAT_MADRID': {'mu': 40.45, 'sigma': 0.2}, 'GAUSS_LON_MADRID': {'mu': -3.60, 'sigma': 0.4}, 'GAUSS_LAT_SEGOVIA': {'mu': 40.95, 'sigma': 0.1}, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
path: "Source", exclude: [ "Tests", "MakeDistribution.sh",
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument('--config', type=str, required=True, help='path to yaml config') args = parser.parse_args() with open(args.config, 'r') as f: config = yaml.safe_load(f) asigning_variables(config) print('.... Start formatting') path = osp.join(config['path'], config['offres']) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
msg = f"GET /{url_path} HTTP/1.1\nHost: {host}\n\n" dos.send(msg.encode()) except socket.error: print(f"[ERROR] Site may be down | {socket.error}") finally:
ise-uiuc/Magicoder-OSS-Instruct-75K
List<YoFrameQuaternion> foundYoTuple3Ds = new ArrayList<>(); for (YoDouble xCoordinateCandidate : xCoordinateCandidates) { String varName = xCoordinateCandidate.getName(); String varNameLowerCase = varName.toLowerCase(); String namespace = xCoordinateCandidate.getNamespace(...
ise-uiuc/Magicoder-OSS-Instruct-75K
import time import sys from functools import wraps from pytest import mark from zmq.tests import BaseZMQTestCase from zmq.utils.win32 import allow_interrupt def count_calls(f): @wraps(f)
ise-uiuc/Magicoder-OSS-Instruct-75K
class VEGGG(CnnModel): def __init__(self, model_name): super().__init__() self.MODEL_NAME = model_name def build_model(self): layers = BasicLayers(relu_version='parametric') input_tensor = Input(shape=self.INPUT_SHAPE) x = input_tensor
ise-uiuc/Magicoder-OSS-Instruct-75K
// Add title $title = 'Poll Results'; $title_dimensions = imagettfbbox($title_size, 0, $font_name, $title); $title_length = $title_dimensions[2] - $title_dimensions[0]; $title_height = abs($title_dimensions[7] - $title_dimensions[1]); $title_above_line = abs($title_dimensions[7]); $title_x = ($width-$title_length)/2; ...
ise-uiuc/Magicoder-OSS-Instruct-75K
if len(out_hours): return "; ".join(out_hours) def parse(self, response): paths = [response.urljoin(x.xpath("@href").extract_first()) for x in response.css(".c-directory-list-content-item-link")] for path in paths: yield scrapy.Request(url=path, call...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Imports standard input a = Input()\
ise-uiuc/Magicoder-OSS-Instruct-75K
ith elements of the input vectors""" n = len(vectors) return scalar_multiply(1 / n, vector_sum(vectors)) def dot(v, w): """v_1 * w_1 + ... + v_n * w_n""" return sum(v_i * w_i for v_i, w_i in zip(v, w)) def sum_of_squares(v): """v_1 * v_1 + ... + v_n * v_n""" return dot(v, v) def ...
ise-uiuc/Magicoder-OSS-Instruct-75K
stdev = np.std(input_data) for val in input_data: score = abs(val-med) if score < 500: processed_data.append(val) # z_score = abs(((val) - avg)/stdev) # if z_score < treshold: # processed_data.append(val) return processed_data def filterData(in...
ise-uiuc/Magicoder-OSS-Instruct-75K
fog = Fog() for key, value in row.items(): setattr(fog, key, value) fogs.append(fog) for row in peer_data: peer = Peer() for key, value in row.items(): setattr(peer, key, value) peers.append(peer) ret...
ise-uiuc/Magicoder-OSS-Instruct-75K
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
ise-uiuc/Magicoder-OSS-Instruct-75K
} var mapType: MapType { set { defaults.set(newValue.rawValue, forKey: "MapType") } get { if defaults.object(forKey: "MapType") != nil { return MapType(rawValue: defaults.integer(forKey: "MapType"))! }
ise-uiuc/Magicoder-OSS-Instruct-75K
'--experiments=shuffle_mode=auto', '--machine_type=n1-standard-8', ] # Number of epochs in training. train_steps = data_types.RuntimeParameter( name='train_steps', default=10000, ptype=int, ) # Number of epochs in evaluation. eval_steps = data_types.RuntimeParameter(
ise-uiuc/Magicoder-OSS-Instruct-75K
time.sleep(3) k = pykeyboard.PyKeyboard() k.press_key(k.left_key) time.sleep(1) # Hold down left key for 1 second. k.release_key(k.left_key)
ise-uiuc/Magicoder-OSS-Instruct-75K
// 1 2 3 4 5 6 7 8 //345678901234567890123456789012345678901234567890123456789012345678901234567890 /********************************************************************/ /* */ ...
ise-uiuc/Magicoder-OSS-Instruct-75K
$items = ''; foreach ($images as $item) { $item = $item->toRawArray(); $items .= self::getEditorItem($item); }
ise-uiuc/Magicoder-OSS-Instruct-75K
tx = Tx()
ise-uiuc/Magicoder-OSS-Instruct-75K
self.toxic_level = 0 self.add_score = 2
ise-uiuc/Magicoder-OSS-Instruct-75K
'created_at', 'from', 'id', 'to', 'updated_at', 'user_id' ]
ise-uiuc/Magicoder-OSS-Instruct-75K
root_path = os.path.dirname(Chamaeleo.__file__) file_paths = { "<NAME>.jpg": os.path.join(root_path, "data", "pictures", "<NAME>.jpg") } coding_schemes = { "Base": BaseCodingAlgorithm(), "Church et al.": Church() } error_corrections = { "None": None, "Hamming"...
ise-uiuc/Magicoder-OSS-Instruct-75K
apt install bash-completion -y
ise-uiuc/Magicoder-OSS-Instruct-75K
def is_setup(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
import json class QConfigWidget(QWidget):
ise-uiuc/Magicoder-OSS-Instruct-75K
where T: PartialEq<U>, { #[inline] fn eq(&self, other: &Array<U>) -> bool { self[..] == other[..] } }
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="form-group"> <input type="submit" value="Ajouter" class="btn btn-primary" /> </div> </form> </div> </div> <div> <a asp-action="Index">Retourner à la liste</a> </div> @section Scripts { @{await Html.RenderPartialAsync("_ValidationScriptsPartial");...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// - Parameters:
ise-uiuc/Magicoder-OSS-Instruct-75K
ROOT = os.path.dirname( os.path.dirname( os.path.dirname( os.path.abspath(__file__) )))
ise-uiuc/Magicoder-OSS-Instruct-75K
gopherjs build
ise-uiuc/Magicoder-OSS-Instruct-75K
from tempfile import NamedTemporaryFile from typing import Optional, Sequence from pydantic import BaseModel, Field, FilePath
ise-uiuc/Magicoder-OSS-Instruct-75K
class Dirección: def __init__(self, índice, xOffset, yOffset, símbolo): self.Índice = índice self.XOffset = xOffset self.YOffset = yOffset self.Símbolo = símbolo def mover_de(self, ubicación, distancia=1): return Ubicación(ubicación.X + distancia * self.XOffset, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ static class URLHelpers {
ise-uiuc/Magicoder-OSS-Instruct-75K
password, host, port,
ise-uiuc/Magicoder-OSS-Instruct-75K
return [('Accept', mimetype)] @pytest.fixture def accept_mimetype(mimetype): return _make_accept_header(mimetype) @pytest.fixture def accept_json(request): return _make_accept_header('application/json') @pytest.fixture def accept_jsonp():
ise-uiuc/Magicoder-OSS-Instruct-75K
self.linear1 = nn.Linear(state_dim, 20) self.linear2 = nn.Linear(20, num_actions) # self.W1 = nn.Parameter(torch.randn(state_dim, 20)) # self.b1 = nn.Parameter(torch.randn(20)) # self.W2 = nn.Parameter(torch.randn(20, num_actions)) # self.b2 = nn.Parameter(torch.randn(nu...
ise-uiuc/Magicoder-OSS-Instruct-75K
update = Some(up); } // Every time the profile updates, rebuild the distribution, reusing // services that existed in the prior state.
ise-uiuc/Magicoder-OSS-Instruct-75K
def add_label(img, text, org, color, thickness): return cv2.putText(img=img, text=text, org=org, fontFace=cv2.FONT_HERSHEY_SIMPLEX, fontScale=0.5, color=color, thickness=thickn...
ise-uiuc/Magicoder-OSS-Instruct-75K
import pandas as pd # Start writing code Grouped = airbnb_contacts.groupby('id_guest').sum().reset_index().sort_values(by=['n_messages'], ascending =False) Grouped['ranking'] = Grouped['n_messages'].rank(method='dense',ascending =False)
ise-uiuc/Magicoder-OSS-Instruct-75K
password1 = self.cleaned_data['password'] password2 = self.cleaned_data['<PASSWORD>'] name = self.cleaned_data['operator_name'] modes = self.cleaned_data['modes'] homepage = self.cleaned_data['homepage'] api_url = self.cleaned_data['api_url'] miptaurl = self.clean...
ise-uiuc/Magicoder-OSS-Instruct-75K
from platform import machine MANIFESTS_DIR_NAME = 'manifests'
ise-uiuc/Magicoder-OSS-Instruct-75K
void Start () { // Get the game controller. gameCon = (GameController) GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>(); sprRen = GetComponent<SpriteRenderer>(); deathTime = Mathf.Clamp(1.5f * gameCon.getDifficulty(), 5.0f, 20.0f); // Make sure deathTime can't be below 5 sec...
ise-uiuc/Magicoder-OSS-Instruct-75K
REQUIRE(compare[i] == value); ++i; } } SECTION("inverse values") { sigma::Bar compare[] = { sigma::Bar::Zero, sigma::Bar::Two }; int i = 0; for (sigma::Bar value : inv) { REQUIRE(compare[i] == value); ++i; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
var timer: Timer? /** Information we were able to discern from the Homebrew info command (as JSON). */ var brewPhpPackage: HomebrewPackage? = nil { didSet { self.brewPhpVersion = self.brewPhpPackage!.version } } /** The version that the `php` form...
ise-uiuc/Magicoder-OSS-Instruct-75K
class TestArbitraryIntervals(object):
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "Starting..."; npm i && npm start
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php echo $comment['comment_date']; ?> </td> <td> <?php echo $comment['author']; ?> </td> <td> <?php echo $comment['comment']; ?> </dt> </tr>
ise-uiuc/Magicoder-OSS-Instruct-75K
setuptools.setup( name="seg1d", version= __version__, author="<NAME>", author_email="<EMAIL>", description="Automated one-dimensional subsequence segmentation", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/cadop/seg1d", p...
ise-uiuc/Magicoder-OSS-Instruct-75K
def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('role', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.String(length=50), nullable=True),
ise-uiuc/Magicoder-OSS-Instruct-75K
assert len(tree.success) == 1
ise-uiuc/Magicoder-OSS-Instruct-75K
[TestCase("")] [TestCase(null)] [TestCase(" ")] public void Validate_InvalidUserName_ReturnsFailure(string projectName) { ProjectModel model = DataHelper.CreateProjectModel();
ise-uiuc/Magicoder-OSS-Instruct-75K
if request.method == 'GET': carPositions = [{"x": x, "y":1, "z":z} for (a, x, z) in trafficModel.grid.coord_iter() if isinstance(a, ObstacleAgent)] return jsonify({'positions':carPositions}) @app.route('/update', methods=['GET']) def updateModel(): global currentStep, trafficModel
ise-uiuc/Magicoder-OSS-Instruct-75K
std::cerr << "exception: " << e.what() << std::endl;
ise-uiuc/Magicoder-OSS-Instruct-75K
/// <param name="httpVersion">Indicates the HTTP version type used.</param> /// <param name="isRequestPartialContent">Indicates it is requesting partical content or not.</param>
ise-uiuc/Magicoder-OSS-Instruct-75K
DEFAULT_OCI_CONFIG_FILE = "~/.oci/config" DEFAULT_PROFILE = "DEFAULT" DEFAULT_CONDA_PACK_FOLDER = "~/conda" CONDA_PACK_OS_PREFIX_FORMAT = "oci://<bucket>@<namespace>/<prefix>"
ise-uiuc/Magicoder-OSS-Instruct-75K
let p1: Provider<T1> = p.provider() return Provider { Element { argument in elementFactory(p1.get(), argument) } } }) } // 2-arity `to(elementFactory:)` function. public func to<T1, T2>(file: StaticString=#file...
ise-uiuc/Magicoder-OSS-Instruct-75K
'description': 'A Leaderboard web app for hackers contributing to the projects hosted by GNOME.', 'author': { 'name': '<NAME>',
ise-uiuc/Magicoder-OSS-Instruct-75K
lmax = [0]*n rmax = [0]*n lmax[0] = a[0] for i in range(1, n): lmax[i] = max(lmax[i-1], a[i])
ise-uiuc/Magicoder-OSS-Instruct-75K
SQL_TEMPLATE = """Select a.dateTime as StartTime, b.datetime as EndTime, b.dateTime-a.dateTime as TimeChange, b.ch8_a_energy2-a.ch8_a_energy2 as ValueChange FROM archive a, archive b WHERE b.dateTime = (Select MAX(c.dateTime) FROM archive c WHERE c.dateTime<=(1573245000+600)) AND a.dateTime = (SELECT MIN(dateTime) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
approval_tasks = [] for address in self._addresses_to_contracts.keys(): contract_event_logger: ContractEventLogger = self._contract_event_loggers[address] transfer_tasks.append( contract_event_logger.get_new_entries_from_log...
ise-uiuc/Magicoder-OSS-Instruct-75K
Props
ise-uiuc/Magicoder-OSS-Instruct-75K
I2CDevice.__init__(self, 1, 0x00, config='tcs3472_i2c.yaml') # Gets base values for comparisons to future readings. self.get_baseline() @property def color(self): """Actual color currently being viewed.
ise-uiuc/Magicoder-OSS-Instruct-75K
return true } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it be...
ise-uiuc/Magicoder-OSS-Instruct-75K
def kernel(mp, mo_energy=None, mo_coeff=None, eris=None, with_t2=WITH_T2, verbose=logger.NOTE): if mp.mo_energy is None or mp.mo_coeff is None: #if mo_energy is None or mo_coeff is None: # raise RuntimeError('mo_coeff, mo_energy are not initialized.\n' # ...
ise-uiuc/Magicoder-OSS-Instruct-75K
$Post = Post::where('id', $id); $Post->delete(); return redirect('/'); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
export { Dock } from "./Dock"
ise-uiuc/Magicoder-OSS-Instruct-75K
if(jtableFornecedor.getSelectedRow() == -1){ JOptionPane.showMessageDialog(null, "Selecione um registro!"); } else { int i = JOptionPane.showOptionDialog(null, "Deseja realmente excluir o registro? Você perderá todos os dados!", "AVISO:", ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def signature_width(img, user='@MotivateMeBot', footer_font_file='AppleGothic.ttf', min_font_size=14): boundary = get_boundary(img)
ise-uiuc/Magicoder-OSS-Instruct-75K
).convert() self.rect = self.image.get_rect() self.rect.x = pos_tuple[1] * C.A_MOVE self.rect.y = pos_tuple[0] * C.A_MOVE @staticmethod
ise-uiuc/Magicoder-OSS-Instruct-75K
### Copyright (C) 2019-2022 VMware, Inc. All rights reserved. ### SPDX-License-Identifier: BSD-2-Clause ################################################################################ import json
ise-uiuc/Magicoder-OSS-Instruct-75K
self?.viewModel.inputs.setCurrentLanguage(language) }
ise-uiuc/Magicoder-OSS-Instruct-75K
from tensorflow.keras.models import Model from tensorflow.keras.backend import clear_session
ise-uiuc/Magicoder-OSS-Instruct-75K
@property def geotype(self): '''Return GeoJSON geometry type. Returns: str: GeoJSON geometry type ''' return self.geometry.type
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Initialize the test.""" self.species = [] for checklist in checklists: for entry in checklist['entries']: self.species.append((entry['species'], checklist['source'])) def test_name_type(self): """Verify the species name is a unicode string.""" ...
ise-uiuc/Magicoder-OSS-Instruct-75K
///<param name="indexType"></param> ///<returns></returns> internal static XPathNodeIterator Search(string searchText, bool useWildcards, LuceneSearcher provider, string indexType) {
ise-uiuc/Magicoder-OSS-Instruct-75K