seed
stringlengths
1
14k
source
stringclasses
2 values
# # print(idx) # # # print(data) # # for item in data: # # print(item) # # rms = [np.sqrt(np.mean(block**2)) for block in # # sf.blocks(PATH, blocksize=1024, overlap=512)] # # print(rms) import numpy as np import soundfile as sf wav_path = "/Users/alireza/Downloads/U+ _ にしな【Music Video】.wav" audio_...
ise-uiuc/Magicoder-OSS-Instruct-75K
!isset($_POST['voornaam']) || !isset($_POST['achternaam']) || !isset($_POST['initialen']) || !isset($_POST['geslacht']) || !isset($_POST['mail']) || !isset($_POST['woonplaats']) || !isset($_POST['straat']) || !isset($_POST['huisnummer']) || !isset($_POST['postcode']) ||
ise-uiuc/Magicoder-OSS-Instruct-75K
class SignUpViewModel { let emailValidation: Driver<ValidationResult> let usernameValidation: Driver<ValidationResult> let passwordValidation: Driver<ValidationResult> let passwordConfirmValidation: Driver<ValidationResult>
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.util.List; import org.cloudfoundry.autoscaler.scheduler.entity.RecurringScheduleEntity; import org.cloudfoundry.autoscaler.scheduler.util.error.DatabaseValidationException; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; @Repository...
ise-uiuc/Magicoder-OSS-Instruct-75K
cloth_test.apply_modifiers = True cloth_test.run_all_tests() break elif cmd == "--run-test": cloth_test.apply_modifiers = False index = int(command[i + 1]) cloth_test.run_test(index) break if __name__ == "__main__": main()...
ise-uiuc/Magicoder-OSS-Instruct-75K
function mkcd () { mkdir -p "$@" && eval cd "\"\$$#\""; }
ise-uiuc/Magicoder-OSS-Instruct-75K
# // If you use this code, please cite the corresponding publications as
ise-uiuc/Magicoder-OSS-Instruct-75K
public static final int MINIMUM_VERSION_CAPABILITIES_API = 0x08010000; // 8.1 private static final int MINIMUM_VERSION_WITH_NOT_RESHAREABLE_FEDERATED = 0x09010000; // 9.1 private static final int MAX_DOTS = 3;
ise-uiuc/Magicoder-OSS-Instruct-75K
indices = random.sample(range(len(segments[segment_id])), select_size) for index in indices: report = self.content['clients'][index].report_segment(self.content['segment_size'], segment_id) ret_item.append(report) ret.append(ret_item) return re...
ise-uiuc/Magicoder-OSS-Instruct-75K
return db_name def sql_table_creation_suffix(self): """ a lot of tests expect case sensitivity """ return 'COLLATE Latin1_General_100_CS_AS_SC '
ise-uiuc/Magicoder-OSS-Instruct-75K
public class AttributesViewModel : List<AttributeViewModel> { public AttributesViewModel(IEnumerable<AttributeViewModel> attributes) { AddRange(attributes);
ise-uiuc/Magicoder-OSS-Instruct-75K
return name in Connector.services def get_instance( self: T, verification: Optional[int] = None, expiration: Optional[int] = None, **kwargs: str, ) -> T: if not Connector.check_availability(self.name): raise ServiceUnavailable(f"Service {self.name} ...
ise-uiuc/Magicoder-OSS-Instruct-75K
</div> `)} <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2"> <mwc-formfield label="Select All" nowrap> <mwc-checkbox .checked=${this.allChecked} @change=${this.toggleAllCheck}></mwc-checkbox> </mwc-formfield> </div> ...
ise-uiuc/Magicoder-OSS-Instruct-75K
class TestSize(unittest.TestCase): # Need to be able to export lists from Glow fused nodes
ise-uiuc/Magicoder-OSS-Instruct-75K
columns = glob(f'{path_to_scratch}/**/*.npy',recursive=True) numcols = len(columns) num_cells = len(latgrid)*len(longrid) if numcols==num_cells:
ise-uiuc/Magicoder-OSS-Instruct-75K
with open(self.yaml_path, encoding='utf8') as fin:
ise-uiuc/Magicoder-OSS-Instruct-75K
df_new[msk1].to_csv('./train_amazon.csv', header=None, index=False) # validation dataset msk2 = np.random.rand(len(df_new[~msk1])) < 0.5 df_new[~msk1][msk2].to_csv('./validation_amazon.csv', header=None, index=False) # test dataset
ise-uiuc/Magicoder-OSS-Instruct-75K
it( `should register $provide via value/service/factory if provider is ProviderLiteral`, () => { @Injectable() class HelloSvc{} const providers = [ { provide: 'myValToken', useValue: 'lorem' }, { provide: 'myHelloSvc', useClass: HelloSvc }, { provide: 'myHelloFactory', us...
ise-uiuc/Magicoder-OSS-Instruct-75K
listResp = VirtualMachine.list(self.user_apiclient, id=self.vm_user.id) self.assertEqual(listResp[0].state, VirtualMachine.RUNNING, "Regular is not able to Stop Vm in a disabled Pod! ") @attr("disruptive", "simulator_only", tags=["advanced"], requi...
ise-uiuc/Magicoder-OSS-Instruct-75K
<button type="button" class="btn btn-danger btn-xs">{{ $errors->get('email')['0'] }}</button> @endif {!! Form::email('email', null, ['class' => 'form-control']) !!} </div> {!! Form::submit('验证邮箱', ['class'=>"btn btn-pr...
ise-uiuc/Magicoder-OSS-Instruct-75K
private let enumElementKey = "MGCXEnumElement" private let enumElementDefaultText = "<#Description of element #$0#>" struct CXEnumElement : CXNameType
ise-uiuc/Magicoder-OSS-Instruct-75K
'former', 'mill', 'as', 'contains', 'at', 'trying', 'looking', 'eleven', 'you', 'detail', 'i\'ve', 'much', 'appropriate', 'be',
ise-uiuc/Magicoder-OSS-Instruct-75K
class BotConfig(RequiredConfigMixin): required_config = ConfigOptions() required_config.add_option('flask_loglevel', parser=str, default='info', doc='Set the log level for Flask.') required_config.add_option('flask_password', parser=str, doc='Password for HTTP authentication in Flask.') required_config....
ise-uiuc/Magicoder-OSS-Instruct-75K
--TEST-- Nullable return value --FILE-- <?php function foo($x) : ?array {
ise-uiuc/Magicoder-OSS-Instruct-75K
def handle_starttag(self, tag, attrs): formatted_attrs = "" for k, v in attrs: formatted_attrs += f' {k}="{v}"' if k == "y": y = float(v) if self.record_next_y: self.y_limit = y self.record_next_y = False...
ise-uiuc/Magicoder-OSS-Instruct-75K
* This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License ...
ise-uiuc/Magicoder-OSS-Instruct-75K
case string(String) case number(Double) case bool(Bool) case null }
ise-uiuc/Magicoder-OSS-Instruct-75K
mybook["kontakt"] = 0 mybook["netzwerk"] = 0 for geschoss in haus.geschosse: geschoss.book = mybook.copy() haus.geschoss_count += 1 for room in geschoss.rooms: room.book = mybook.copy()
ise-uiuc/Magicoder-OSS-Instruct-75K
__email__ = """<EMAIL> {at} caltech.edu""" __version__ = '0.0.1' name = 'evo_mwc'
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>crates/test-rust-wasm/src/bin/async_functions.rs<gh_stars>10-100 include!("../../../../tests/runtime/async_functions/wasm.rs");
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace SdvCode.Services.Profile.Pagination.AllUsers.RecommendedUsers { using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Threading.Tasks; using AutoMapper;
ise-uiuc/Magicoder-OSS-Instruct-75K
int min = Math.Min(x, y); return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); } public static bool IsOutsideView(uint oldx, uint newx, uint oldy, uint newy)
ise-uiuc/Magicoder-OSS-Instruct-75K
allowed_list.append(ranges[0]) else: allowed_list += list(range(ranges[0], ranges[1] + 1)) return allowed_list
ise-uiuc/Magicoder-OSS-Instruct-75K
adduser vagrant docker
ise-uiuc/Magicoder-OSS-Instruct-75K
} /// Adds a call to the batch and returns a future that resolves once it gets /// executed. fn call<I, O>(&mut self, method: &'static str, params: I) -> impl Future<Output = Result<O>> where I: Serialize,
ise-uiuc/Magicoder-OSS-Instruct-75K
bus: Arc<Mutex<Bus<SignaldResponse>>>, } impl TestSignaldSocket { pub fn new(bus_size: usize) -> TestSignaldSocket { let bus = Arc::new(Mutex::new(Bus::new(bus_size)));
ise-uiuc/Magicoder-OSS-Instruct-75K
valores = int(input("Escribe un valor:")) listavalores = [] listavalores.append(valores) while limite > sum(listavalores): valores = int(input("Escribe otro valor")) listavalores.append(valores)
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.talend.commons.exception.ExceptionHandler; import org.talend.commons.exception.PersistenceException; import org.talend.commons.ui.runtime.image.ECoreImage; import org.talend.commons.ui.runtime.image.IImage; import org.talend.core.model.properties.FileItem; import org.talend.core.model.properties.Item; import...
ise-uiuc/Magicoder-OSS-Instruct-75K
try: (scan_dir / "b").symlink_to(scan_dir / "a")
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.util.Map.Entry; import java.util.Set; public class DelegateClassAdapterTest { private MockLog mLog; private static final String NATIVE_CLASS_NAME = ClassWithNative.class.getCanonicalName();
ise-uiuc/Magicoder-OSS-Instruct-75K
var filePath: String! var fileHelper: FileHelperInterface! var starsHelper: StarsHelperInterface!
ise-uiuc/Magicoder-OSS-Instruct-75K
state.frame_window,
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(count*3): print("@"*(count)," "*(count*3),"@"*(count),sep="") for i in range(count): print("@"*(count*5))
ise-uiuc/Magicoder-OSS-Instruct-75K
""" import sys import unittest import python_msx_sdk from python_msx_sdk.model.device import Device globals()['Device'] = Device from python_msx_sdk.model.devices_page_all_of import DevicesPageAllOf
ise-uiuc/Magicoder-OSS-Instruct-75K
notice('Downloading the function with the following parameters: \n' 'Name: {f_name}\n' 'function_id: {f_id}\n' 'version_id: {v_id}\n'.format(f_name=f_name, f_id=format_uuid(f_uuid), v_id=format_uuid(v_...
ise-uiuc/Magicoder-OSS-Instruct-75K
test_for_zero(int fd, off_t start, off_t end) { while (start < end) { char buffer[4096]; size_t length = std::min((size_t)(end - start), sizeof(buffer)); if (pread(fd, buffer, length, start) != (ssize_t)length) { perror("reading failed"); exit(1); } for (size_t i = 0; i < length; i++) { if (buff...
ise-uiuc/Magicoder-OSS-Instruct-75K
# turn off polyfit ranking warnings import warnings warnings.filterwarnings('ignore') def _prepare_pdf_data(means, stds, range, norm=True): x_vals = np.linspace(range[0], range[1], 250) y_vals = np.zeros_like(x_vals) # create and sum all PDF of stellar abundances for d_m, d_s in zip(means, stds): ...
ise-uiuc/Magicoder-OSS-Instruct-75K
//! Hints: #298, #310 //! /// Primary Implementation /// /// A modified binary search, first identifying which of the left and right halves /// are in-order, by comparing the mid-point and end-points. /// pub fn search_in_rotated_array(arr: &[isize], targ: isize) -> Option<usize> { if arr.is_empty() {
ise-uiuc/Magicoder-OSS-Instruct-75K
use core::fmt::Write; use core::mem::size_of;
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertEqual(len(hook_loader._hooks), 2) def test_lazy_load_hooks_from_variable(self): class ndarray: pass nd_array = ndarray() var = Variable("nd_array", 2, nd_array) with patch("frosch.type_hooks.HookLoader._lazy_load_hooks") as lazy_hook_mock:
ise-uiuc/Magicoder-OSS-Instruct-75K
url(r'^contact_us/$', views.contact_us, name='contact_us'), )
ise-uiuc/Magicoder-OSS-Instruct-75K
class Form(forms.Form): def get_value(self, name):
ise-uiuc/Magicoder-OSS-Instruct-75K
}; }); } /** * Helper to run the specified callback in a single transaction on the * specified store. * The helper focuses on transaction wrapping into a promise. * * @param db {IDBDatabase} The database instance. * @param name {String} The store name. * @param callback {Functio...
ise-uiuc/Magicoder-OSS-Instruct-75K
download_url='https://github.com/ParhamP/Autism_Treatment_Assistance/tarball/0.1', keywords=['data science, emotion recognition, psychology, autism, speech emotion recognition'], # arbitrary keywords classifiers=[], install_requires=['SimpleAudioIndexer', 'watson_developer_cloud', ...
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>10-100 export * from './has-class';
ise-uiuc/Magicoder-OSS-Instruct-75K
vcons!( fte!(VInt(3)), vcons!(fte!(VInt(2)), vcons!(fte!(VInt(1)), fte!(VNil))) ) ) ), (ex5, "true", fte!(VBool(true))), ( ex6, r#"(let ([pr (pair 1 2)] [f fst] ...
ise-uiuc/Magicoder-OSS-Instruct-75K
path = '/home/foodcy/foodspark' # use your own PythonAnywhere username here if path not in sys.path: sys.path.append(path) os.environ['DJANGO_SETTINGS_MODULE'] = 'foodspark.settings' from django.core.wsgi import get_wsgi_application from django.contrib.staticfiles.handlers import StaticFilesHandler application ...
ise-uiuc/Magicoder-OSS-Instruct-75K
lambda02.contour_2d({"plate_imp": 3, "fab_class": 2, "f_yield": 1}, "lpf", ax=ax[1, 0]) lambda02.contour_2d({"plate_imp": 4, "fab_class": 2, "f_yield": 1}, "lpf", ax=ax[1, 1]) lambda02.contour_2d({"plate_imp": 5, "fab_class": 2, "f_yield": 1}, "lpf", ax=ax[1, 2]) return
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 from flask_marshmallow import Marshmallow{% if cookiecutter.use_celery == 'yes'%} from celery import Celery celery = Celery(){% endif %} ma = Marshmallow()
ise-uiuc/Magicoder-OSS-Instruct-75K
$url ); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# by creating multiple screens and running the train script # fetch the argments list and the names list
ise-uiuc/Magicoder-OSS-Instruct-75K
def perform_create(self, serializer):
ise-uiuc/Magicoder-OSS-Instruct-75K
* @param type The entity type for the handler or the Name of the * Baqend code
ise-uiuc/Magicoder-OSS-Instruct-75K
responseBody = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); Console.WriteLine($"Response.Code={response.StatusCode}, Response.Body={responseBody}"); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
vector: InstantVector, labels: Option<Aggregate<'_>>, parameter: f64, ) -> InstantVector { let InstantVector(old_vec) = vector; let new_vec = match labels { Some(l) => format!("quantile {} ({}, {})", l.to_string(), parameter, old_vec), None => format!("quantile ({}, {})", parameter,...
ise-uiuc/Magicoder-OSS-Instruct-75K
int min_price = input[0]; // min price seen till now (on left) max_profits_left[0] = 0; int max_on_left = 0; for(int i=1; i<length; i++) { int current_profit; // max profit right now (if we sell today) 0....i if(input[i] > min_price) { current_profit = input[i] - min_price; if(current...
ise-uiuc/Magicoder-OSS-Instruct-75K
references('id')-> on('filials')-> onDelete('cascade'); $table->string('nome', 100); $table->Date('datanascimento')->unsigned(NULL); $table->string('sexo', 20); $table->string('cpf', 15)->unique(); $table->string('endereco', 10...
ise-uiuc/Magicoder-OSS-Instruct-75K
$unitPrice = null, $projectId = null, $description = null, $quantity = null, $taxed = null, $taxed2 = null ) { $uri = "invoices/" . $invoiceId;
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @param reportStartDate the report start date of this report */ public void setReportStartDate(Date reportStartDate); /** * Returns the report end date of this report. * * @return the report end date of this report */ public Date getReportEndDate();
ise-uiuc/Magicoder-OSS-Instruct-75K
def add(self,a,b): print(a+b) #要求你们对这个add类里面的函数进行测试 #1 2/-1 -2/0 0/-1 2/不输入数据a/不输入数据b/两个数据都不输入 #小数
ise-uiuc/Magicoder-OSS-Instruct-75K
ent2_vector = np.array(ent2_vector / lens) vector = np.concatenate((ent1_vector, rel_vector, ent2_vector), axis=-1) graph_vector[case_id] = vector return graph_vector
ise-uiuc/Magicoder-OSS-Instruct-75K
FAN_MODE_ENUM_TO_STR_MAP = {
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.io.InputStream; import java.io.OutputStream;
ise-uiuc/Magicoder-OSS-Instruct-75K
# redis_conn.setex(key, 过期时间, value) # redis_conn.setex('sms_%s' % mobile, constants.SMS_CODE_REDIS_EXPIRES, sms_code) pl.setex('sms_%s' % mobile, constants.SMS_CODE_REDIS_EXPIRES, sms_code) # 存储此手机已发送短信标记 # redis_conn.setex('send_flag_%s' % mobile, constants.SEND_SMS_CODE_INTER...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// </summary> public class Document { public Document()
ise-uiuc/Magicoder-OSS-Instruct-75K
return new object(); }); Assert.False(isFactoryMethodCalled); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- ''' Escreva a sua solução aqui Code your solution here
ise-uiuc/Magicoder-OSS-Instruct-75K
Console.WriteLine("\n=> ReadToEndFileAsync():"); using StreamReader reader = new StreamReader(path);
ise-uiuc/Magicoder-OSS-Instruct-75K
(( ${left:-0} > 0 )) && arrows+="%F{red}⇡%f" echo $arrows
ise-uiuc/Magicoder-OSS-Instruct-75K
self.data = data else: exit() def draw(self): if not self.showing: return Window.draw(self) if not self.data: self.window.addstr(1, 1, "No data")
ise-uiuc/Magicoder-OSS-Instruct-75K
if (skinningCache.mode != SkinningMode.Character) { skinningCache.mode = SkinningMode.Character; skinningCache.events.skinningModeChanged.Invoke(SkinningMode.Character); } } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
yield 'pkgin -y update'
ise-uiuc/Magicoder-OSS-Instruct-75K
let container = try decoder.container(keyedBy: CodingKeys.self) text = try container.decodeIfPresent(RSString.self, forKey: .text) resultInfo = try container.decodeIfPresent(RSStreamedActionResultInfo.self, forKey: .resultInfo) sectionIndex = try container.decode(RSInt.self, for...
ise-uiuc/Magicoder-OSS-Instruct-75K
) vaporised_coords = set() last_angle = None vaporised = 0 while vaporised != 200: for asteroid, info in sorted_asteroids.items(): angle = info[0] if angle == last_angle or asteroid in vaporised_coords: continue last_angle = angle vaporised_coords.add(asteroid) v...
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>vulnerability_modules/javascript/json_stringify.py from colorama import Fore, Style from vulnerability_tool.framework.resources.types import ResourceType TEST_NAME = "Generate Document Variable from JSON.Stringify()" TEST_DESCRIPTION = """ This test checks that JSON.stringify is not called from within a...
ise-uiuc/Magicoder-OSS-Instruct-75K
super.didReceiveMemoryWarning()
ise-uiuc/Magicoder-OSS-Instruct-75K
certfilepath = os.path.join(certpath, certfile) if os.access(certfilepath, os.R_OK): VOSPACE_CERTFILE = certfilepath break
ise-uiuc/Magicoder-OSS-Instruct-75K
plt.ylim(-1.1, 1.1) plt.grid() plt.show()
ise-uiuc/Magicoder-OSS-Instruct-75K
def scheduled_update(): from indico_livesync.plugin import LiveSyncPlugin if LiveSyncPlugin.settings.get('disable_queue_runs'):
ise-uiuc/Magicoder-OSS-Instruct-75K
.whitelist_function("CBLDatabase_.*") .whitelist_function("CBLDocument_.*") .whitelist_function("CBL_Release") .whitelist_function("CBLQuery_.*") .whitelist_function("CBLResultSet_.*") .whitelist_function("FLValue_GetType") .whitelist_function("FLValue_AsString") ...
ise-uiuc/Magicoder-OSS-Instruct-75K
export NOSE_NOLOGCAPTURE=1 export MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" cat > target/swiftproxy-saio.conf <<EOF swiftproxy.endpoint=http://127.0.0.1:8080 jclouds.provider=openstack-swift jclouds.endpoint=http://${DOCKER_IP}:8080/auth/v1.0
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Command for writing or updating a configuration file. Configuration file path will default to instance/config.json. * config_path (str) - Path to the configuration file
ise-uiuc/Magicoder-OSS-Instruct-75K
<lighting>1</lighting> <script>
ise-uiuc/Magicoder-OSS-Instruct-75K
[1, 2],
ise-uiuc/Magicoder-OSS-Instruct-75K
res = {} stdout = host.shell("portstat -j")['stdout'] match = re.search("Last cached time was.*\n", stdout) if match: stdout = re.sub("Last cached time was.*\n", "", stdout)
ise-uiuc/Magicoder-OSS-Instruct-75K
# time.sleep(2)
ise-uiuc/Magicoder-OSS-Instruct-75K
read files """ def __init__(self, file_path): self.path = file_path def get_random_iter(self): """ get file contents in random """
ise-uiuc/Magicoder-OSS-Instruct-75K
curves.""" rpath = [] nextmove = Path.LINETO for move, pos in path[::-1]: rpath.append((nextmove, pos)) nextmove = move return rpath # Concatenate subpathes in correct order path = urpath + revert(lrpath) + llpath + revert(ulpath) codes, vert...
ise-uiuc/Magicoder-OSS-Instruct-75K
CFWS::SingleFws(ref _fws ) => { handle.write_fws(); } } Ok( () ) } fn boxed_clone(&self) -> Box<EncodableInHeader> { Box::new(self.clone()) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
for (int i = 0; i < n; i++) { int diff = target - nums[i]; // 找到差值 if (maps.count(diff) && maps[diff] != i) { result.push_back(i); result.push_back(maps[diff]);
ise-uiuc/Magicoder-OSS-Instruct-75K