content
stringlengths
5
1.05M
import scrapy class BossJobCategoriesSpider(scrapy.Spider): name = 'JobCategories' start_urls = [ 'https://www.zhipin.com/' ] def parse(self,response): for jobcategory in response.xpath('//div[contains(@class,"sub-content")]//a'): job_cname = jobcategory.xpath('text()').extract(); ...
#!/usr/bin/env python class SnapfetchError(Exception): """Base class for all exceptions raised by Snapfetch.""" pass class NoSuchKeyError(SnapfetchError): """The requested key does not exist in S3.""" pass class ExceededQuotaError(SnapfetchError): """The operation failed due to too many recent restorations.""" ...
# # Copyright (c) 2015 NSONE, Inc. # # License under The MIT License (MIT). See LICENSE in project root. # from . import resource class Plan(resource.BaseResource): ROOT = 'account/plan' PASSTHRU_FIELDS = ['type', 'period', 'notes'] def retrieve(self, callback=None, errback=None): return self._m...
""" A cookie-cutter guide for creating your own extension. """ from pynwb.spec import NWBDatasetSpec, NWBNamespaceBuilder, NWBGroupSpec, NWBAttributeSpec, RefSpec namespace = 'template [CHANGE TO NAME]' ns_path = namespace + ".namespace.yaml" ext_source = namespace + ".extensions.yaml" spec = NWBGroupSpec( neuro...
from marshmallow.validate import ContainsNoneOf as ContainsNoneOf from marshmallow.validate import ContainsOnly as ContainsOnly from marshmallow.validate import Email as Email from marshmallow.validate import Equal as Equal from marshmallow.validate import Length as Length from marshmallow.validate import NoneOf as Non...
import models.resnet import models.densenet import models.googlenet import models.vgg import models.mobilenetv2 import models.inceptionv3 import models.inceptionv4 import models.inception_resnetv2 from bag_of_local_features_models.bagnets.pytorchnet import bagnet9, bagnet17, bagnet33 from timm.models import create_m...
import functools import tensorflow as tf from hanzi_helper.hanzi_feat.hanzi_char_featurizer.featurizers.four_corner import FourCorner from hanzi_helper.hanzi_feat.hanzi_char_featurizer.featurizers.pinyin_parts import PinYinParts class Featurizor(object): def __init__(self, featurizers=None): self.featur...
import cv2 import numpy as np def find_if_close(cnt1,cnt2): row1,row2 = cnt1.shape[0],cnt2.shape[0] for i in xrange(row1): for j in xrange(row2): dist = np.linalg.norm(cnt1[i]-cnt2[j]) if abs(dist) < 50 : return True elif i==row1-1 and j==row2-1: ...
import logging import os from typing import Tuple, Dict, Any, Generator, Iterator import dfs logger = logging.getLogger() DICT = Dict[str, Any] DICT_GENERATOR = Generator[DICT, None, None] def resolve(spec: dfs.DataSetSpec, **kwargs) -> Iterator[Tuple[DICT, str]]: # initialize empty parameters with default value...
name = raw_input() print name
#Falla Coulibaly #Simple implementation of the fractal compression. #The algorithm used is not optimal and average error #is quite high because of the mapping algorithm. from FractalEncoder import * import time import sys #Setup variables imagePath="" if len(sys.argv) < 2: print("Path to image to compress ...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class ConditionalVariantPkg(Package): """This package is used to test conditional varian...
# Copyright 2021 Casey Devet # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute,...
from datetime import datetime from dateutil.relativedelta import relativedelta from sys import stderr from urllib.parse import urlparse import os, tempfile import json import requests import yaml # Read the YAML config file and return a hash. def read_config(config_file): with open(config_file, 'r') as y: ...
import glob import os import sys import time try: sys.path.append(glob.glob('../carla/dist/carla-*%d.%d-%s.egg' % ( sys.version_info.major, sys.version_info.minor, 'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0]) except IndexError: pass import carla from carla import VehicleLi...
# Dependencies from Models import Models from Info import Info # Instatntiate the required classes db = Models() info = Info() # Page title print("Show all registered students.") # Check for existense if not db.fetch_students(): print("No Students Found Or Student doesn't exist!") exit() # P...
import os, sys, getopt, subprocess def main(argv): inputfile = '' outdir = '' program='' try: opts, args = getopt.getopt(argv,"hi:o:",["ifile=","odir="]) except getopt.GetoptError: print 'test.py -i <inputfile> -o <outputfile>' sys.exit(2) #Take input file and output directory fo...
""" -*- coding: utf-8 -*- Time : 2019/7/20 15:02 Author : Hansybx """ import re import requests from bs4 import BeautifulSoup from flask import jsonify from app.models.error import PasswordFailed from app.models.pe_score import PEScore from app.utils.common_utils import put_to_mysql headers = { 'User-Agen...
from PyQt5.QtWidgets import * import sys class Window(QWidget): def __init__(self): QWidget.__init__(self) layout = QGridLayout() self.setLayout(layout) self.buttongroup = QButtonGroup() #Window size modify function self.setWindowTitle("!!!Aasai Applicati...
class Node: """represent a node of binary search tree""" def _init_(self,key): self.key=key self.left=None self.right=None self.parent=None class BSTtree: def _init_(self,root=None,size=0): self.root=root self.size=size def insert(self,add_node): ...
# import copy import os import cv2 import tarfile import numpy as np import torch.utils.data as data import torch from PIL import Image import torchvision.transforms as transforms from data.util.mypath import Path from data.util.google_drive import download_file_from_google_drive import data.dataloaders.custom_trans...
# coding: utf-8 from Fasta_entry import Fasta_entry class Fasta_reader(): def __init__(self, filename, start_reading = 0, end_reading = -1): # TODO: add long start_reading and end_reading self.end_reading = end_reading if filename == "-": filename = "/dev/fd/0" # read from stdin ...
from django.shortcuts import render from mainsite.serializers import UserSerializer from mainsite.serializers import SessionTypeSerializer from mainsite.serializers import CustomerSerializer from mainsite.serializers import PhoneSerializer from mainsite.serializers import SessionSerializer from mainsite.serializers imp...
# Generated by Django 3.0.4 on 2020-04-02 11:34 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('news', '0002_profile'), ...
from .screen import *
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # 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 app...
#Conversion of HEMS_Plant code to more OOP style # Author: Chris Crouch and Ninad Gaikwad #import libraries import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt #import functions #class creation class SmartCommunity_Plant: #inputs X_k_Plant,W_k_Plant,U_k,HEMSPlant_Params,HEMSHouse_Params,C...
from flask import Flask, Blueprint, url_for, jsonify, make_response, request, Response from flask_restplus import Api, Resource, reqparse from flask_login import login_required, login_user, logout_user, current_user from itsdangerous import JSONWebSignatureSerializer import json from sqlalchemy.orm import aliased from...
#! /bin/env python # -*- coding: utf-8 -*- """ A little script to download images from 'http://girl-atlas.com/' Written for fun by Reverland(lhtlyy@gmail.com) Free to use and with no warranty, BSD License. """ from gevent import monkey monkey.patch_all() import requests #import urllib import os #import urllib2 import...
def backward(self, grad_output): input, _ = self.saved_tensors intersect, union = self.intersect, self.union target = self.target_ gt = torch.div(target, union) IoU2 = intersect/(union*union) pred = torch.mul(input[:, 1], IoU2) dDice = torch.add(torch.mul(...
# ./_xmlmime.py # -*- coding: utf-8 -*- # PyXB bindings for NM:fea1cf329f0f855e4df4fec1b9d504f220530c48 # Generated 2014-09-01 15:23:39.635106 by PyXB version 1.2.3 # Namespace http://www.w3.org/2005/05/xmlmime [xmlns:xmlmime] import pyxb import pyxb.binding import pyxb.binding.saxer import io import pyxb.utils.utilit...
from webdavclient import WebDavClient import logging class SinkFactory: def __init__(self,sinks): self.Sinks = [] for sink in sinks: keys = sink.keys() if not "Name" in keys: logging.warning("Sink missing name:\n" + str(sink)) continue ...
# Generated by Django 1.11.15 on 2018-08-16 14:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [("misago_legal", "0002_agreement_useragreement")] operations = []
import sys from codecs import open # To use a consistent encoding from os import path # Always prefer setuptools over distutils from setuptools import (setup, find_packages) here = path.abspath(path.dirname(__file__)) install_requirements = [ 'pyobjc-framework-ScriptingBridge >= 5.1.2', ] # The following are me...
from simulater import Environment as en from view import ArrayView as av env=en.Environment() env.step(0) env.step(1) env.step(0) env.step(1) env.step(2) env.step(3) #env.step(0) av.visualize_space(env.SPACE.RESULTS)
# -*- coding: utf-8 -*- #Description """ ============================================================================== created : 07/16/2020 Last update: 07/17/2020 Developer: Yishan Tsai Lite Version 1 @Yishan05212020 Filename: logging.py Description: set logging config =======================================...
# # @lc app=leetcode id=4 lang=python3 # # [4] Median of Two Sorted Arrays # # @lc code=start class Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: if not (nums1 == [] and nums2 ==[]): midpoint = (len(nums1) + len(nums2))/2 count = 0 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from charmhelpers.core import files import mock import unittest import tempfile import os class FileTests(unittest.TestCase): @mock.patch("subprocess.check_call") def test_sed(self, check_call): files.sed("/tmp/test-sed-file", "replace", "this") ...
import logging from ..custom_model_form import CustomModelForm from ...models import MediaFile logger = logging.getLogger(__name__) class MediaFileForm(CustomModelForm): """ Form for modifying media file objects """ class Meta: """ This class contains additional meta configuration o...
import Rhino.Geometry as rg class OffsetType(object): def __init__(self, count = 2, direction = "outside", distance = 1.1, boundary = 1.0): # # key values: # self.cnt = 0.0 # self.dis = 0.0 # self.bou_dis = 0.0 # self.dis_set = [] self.cnt_min = 1 ...
import mock import numbers import unittest import copy import json import builder.build import builder.execution from builder.tests.tests_jobs import * from builder.build import BuildManager from builder.execution import Executor, ExecutionManager, ExecutionResult, _submit_from_json from builder.expanders import Tim...
i = int(input()) result = 0 for a in range(0, i): result += int(input()) print(result)
from abc import ABC, abstractmethod class SeldonianAlgorithm(ABC): """ Abstract class which represents the basic functions of a Seldonian Algorithm. This class can be considered as a starting point for implementing your own Seldonian algorithm. Read more about the Seldonian Approach in `Preventin...
#!/usr/bin/env python # coding: utf-8 # In[1]: import re man = open('mbox-short.txt') for linea in man: linea = linea.rstrip() if re.search('From:', linea): print(linea) # In[3]: # Usar el ^ hace que se retornen solamente las lineas que inicien con la palabra from man = open('mbox-short.txt') for...
from glypy.algorithms.subtree_search.inclusion import subtree_of from glypy.io import glycoct import multiprocessing # from . import __init__ from . import glycan_io from . import json_utility # def profile_loader(profile_dict, name): # return glycan_profile_obj(profile_dict['glycan'], # ...
from django.test import TestCase #test # Create your tests here.
import enum import json from check_python_cla.exceptions import CheckCLAException BPO_URL = "https://bugs.python.org/user?@template=clacheck&github_names=" class Status(enum.Enum): """The CLA status of the contribution.""" signed = 1 not_signed = 2 username_not_found = 3 async def check_cla(sessi...
class Solution: def XXX(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ sorted_id = sorted(range(len(nums)), key=lambda k: nums[k]) head = 0 tail = len(nums) - 1 sum_result = nums[sorted_id[head]] + nums[...
import logging import os import re from concurrent.futures import ThreadPoolExecutor from html.parser import HTMLParser from json import dumps from time import sleep from requests.exceptions import ConnectionError from tqdm.auto import tqdm from .auth import create_session from .geo import metadata_to_gdf, transform_...
from lexer.tokens import Token_type from .global_vars import * from .utils import * from .SymbolTable import SymbolTable symbolTable = SymbolTable() def parse(token_list): for token in token_list: assert_token_valid(token) token_list_updated = Z(token_list) last_token = token_list_updated.he...
from gui.mainWindow import MainWindow from gui.configWindow import ConfigWindow from gui.trayIcon import TrayIconMenu from gui.actionWidget import ActionWidget from gui import icon_picker
import os import ctypes import threading import logging import qt5reactor from pathlib import Path from PyQt5 import QtCore, QtGui, QtWidgets from threading import Thread from imminent.setting.setting_handling import JSON from imminent.utilities.file_handling import FileHandler from imminent.user_interface.pop_up impor...
from joblib import Parallel, delayed import networkx as nx from collections import defaultdict import numpy as np import os from Bio import SeqIO from Bio import AlignIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord import itertools as iter from tqdm import tqdm from panaroo.generate_alignments import * ...
""" """ def Enum(*names): ##assert names, "Empty enums are not supported" # <- Don't like empty enums? Uncomment! class EnumClass(object): __slots__ = names def __iter__(self): return iter(constants) def __len__(self): return len(constants) def __getitem__(self, ...
""" File: draw_line.py Name: Hsuan Tung, Lin ------------------------- When user clicks the window twice, the function can draw a line on a canvas (window). At the first click, a circle appears; at the second click, the circle disappears while a line appears. The line is drawn from the position of first click to ...
''' @Author: ZM @Date and Time: 2020/6/7 9:38 @File: FPFLU.py ''' import torch from torch import nn from torch.autograd import Function ''' https://doi.org/10.1016/j.neucom.2020.11.068 PFLU and FPFLU: Two novel non-monotonic activation functions in convolutional neural networks ''' class FPFLUFunction...
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField from wtforms.validators import DataRequired class WordForm(FlaskForm): submit = SubmitField('Перевести', render_kw={"class": "btn btn-primary"}) word_for_translate = StringField('Введите слово для перевода', validators=[DataRequired(...
# class HistogramLUTItem2(pg.HistogramLUTItem): # def __init__(self, image=None, fillHistogram=True): # pg.HistogramLUTItem.__init__(self,image,fillHistogram) # btn=pg.ButtonItem(pg.pixmaps.getPixmap('auto'), 14,self.axis) # # # # class PlotItem2(pg.GraphicsWidget): # """pyqtgraph....
# -*- coding: utf-8 -*- """Error classes for ati.""" class InvalidRemoteError(Exception): """When data is invalid for the chosen remote.""" pass
from smlibppm.core.pixel import put_pixel from smlibppm.core.utils import generate_rand_color def draw_line_rand_colors(pixels: list, w: int, start: tuple, end: tuple) -> list: """[draw a line between two points random color sequence] Args: color (list): [rgb value of the line] pixels (list):...
nodes = {} def getnode(name): " Return the node with the given name, creating it if necessary. " if name in nodes: node = nodes[name] else: node = nodes[name] = node(name) return node class node(object): " A node has a name and a list of edges emanating from it. " def __init__(s...
frontend.json( "sessions/current", expect={ "user": None, "type": None, "fields": [{ "identifier": "username", "label": "Username:", "hidden": False, "description": None }, { "identifier": "password", "label"...
from datetime import datetime time_now = datetime.now() print(time_now.strftime('%B/%d/%Y:%H/%M'))
import configparser from pyrogram import Client from multiprocessing import shared_memory from apscheduler.schedulers.background import BackgroundScheduler config = configparser.ConfigParser() config.read('config.ini') kuma = Client( 'kuma', api_id=config['kuma']['api_id'], api_hash=config['kuma']['api_ha...
# -*- coding: utf-8 -*- # !/usr/bin/python ################################### PART0 DESCRIPTION ################################# # Filename: class_create_model_of_bayes.py # Description: # # Author: Shuai Yuan # E-mail: ysh329@sina.com # Create: 2015-12-21 21:04:53 # Last: __author__ = 'yuens' ####################...
class Credentials(object): def __init__(self, authurl, user, password, tenant_name, region, endpoint_type): self.authurl = authurl self.user = user self.password = password self.tenant_name = tenant_name self.region = region self.endpoint_type = endpoint_t...
import sys prog = input("enter your program: ").encode("latin-1") open(f"{sys.argv[1]}", "wb").write(prog[:4000])
#!/usr/bin/python # # Copyright (C) 2006 Google Inc. # # 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 ...
# Copyright (C) 2016 The Android Open Source Project # # 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 ...
from __future__ import print_function, division, absolute_import import pytest from distributed.utils_test import gen_cluster from distributed.utils_comm import (scatter_to_workers, pack_data, gather_from_workers) def test_pack_data(): data = {'x': 1} assert pack_data(('x', 'y'), data) == (1, 'y') ...
__version__ = '0.5.0' __version_tuple__ = (0, 5, 0)
import os from PIL import Image directory = '/Users/hannes/PetImages/' directory_suffix = 'training_set/' folders = ['Cat/', 'Dog/'] color_schema = 'L' # L - grayscale resized_px = 200 if not os.path.exists(directory + directory_suffix): os.makedirs(directory + directory_suffix) for folder in folders: _in...
from unittest.mock import patch from django.test import TestCase, override_settings from .. import tasks from ..models import Render class RenderTest(TestCase): def test_get_source_url(self): render = Render.objects.create(source_type="arxiv", source_id="1234.5678v2") self.assertEqual(render.get_s...
#!/usr/bin/env python3 import os import subprocess import sys import tempfile import time import json from datetime import datetime from jinja2 import Template class HealthError(Exception): """ This gets thrown if there is something wrong with the health of a service.""" def get_options(): options = {} ...
import os import cloudpickle as cp import sys import time from py4j.java_gateway import JavaGateway, GatewayParameters from twister2.tset.KeyedTSet import KeyedTSet from twister2.tset.TSet import TSet from twister2.tset.fn.SourceFunc import SourceFunc from twister2.tset.fn.factory.TSetFunctions import TSetFunctions f...
# Copyright 2008 The Tor Project, Inc. See LICENSE for licensing information. import os import sys import getopt import time import thandy.keys import thandy.formats import thandy.util json = thandy.util.importJSON() def tstamp(): return time.strftime("%Y%m%d_%H%M%S", time.localtime()) def snarf(fname): "...
from __future__ import annotations import logging import os from typing import Union from handler.model.base import _SUB_MODEL_BASE_T from handler.model.base.base import COLLECTION_TO_MODEL from .name_util import ResourceName logger = logging.getLogger(os.path.basename(__file__)) def parse_resource_name(name: str...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- import builtins from tinyAPI.base.config import ConfigManager __all__ = [ 'refv' ] # ----- Public...
import sys import math collected = [] def sm(x): a = math.exp(x[1]) b = math.exp(x[2]) return b/(a+b+1e-8) ofh = open(sys.argv[2], 'w', encoding='utf-8') for line in open(sys.argv[1], encoding='utf-8'): chunks = line.strip().split('\t') chunks[1] = float(chunks[1]) chunks[2] = float(chunks[2])...
import psutil import pynvml def get_cpu_temp(): if hasattr(psutil, 'sensors_temperatures'): temp_info = psutil.sensors_temperatures() core_info = temp_info['coretemp'] core_temps = [info.current for info in core_info] return core_temps else: return 0 class NvGPUMonito...
# -*- coding: utf-8 -*- from sklearn_export.estimator.classifier.Classifier import Classifier class LinearSVC(Classifier): """ See also -------- sklearn.svm.LinearSVC http://scikit-learn.org/stable/modules/generated/ sklearn.svm.LinearSVC.html """ # @formatter:on def __init__(s...
# This code was adapted from LigGPT https://github.com/devalab/molgpt # with modifications. import pandas as pd import argparse import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader from torch.nn import functional as F from torch.cuda.amp import GradScaler from model_reg impo...
from __future__ import annotations import operator from functools import partial from numbers import Number from typing import TYPE_CHECKING, Any, Callable import awkward as ak import numpy as np from awkward._v2._connect.numpy import NDArrayOperatorsMixin from awkward._v2.tmp_for_testing import v1_to_v2 from dask.ba...
#!/usr/bin/env python # encoding: utf-8 import mdbm import random print("[*] Deleting records in-place") path = "/tmp/test1.mdbm" flags = mdbm.MDBM_O_RDWR mode = 0o644 # means 0644 dbm = mdbm.open(path, flags, mode) for i in range(0, 10): k = str(random.randrange(0, 65534)) rv = dbm.delete(k) if not ...
# Generated by Django 3.1.7 on 2021-04-06 04:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clients', '0007_client_invoice_current_count'), ] operations = [ migrations.RemoveField( model_name='client', name='...
import copy import random HIGH_CARD, ONE_PAIR, TWO_PAIR, THREE_OF_A_KIND, STRAIGHT, FLUSH, FULL_HOUSE, FOUR_OF_A_KIND, STRAIGHT_FLUSH = range(9) class Deck(object): def __init__(self, num_decks=1): """ Generate a list of cards for num_decks decks, 52 cards per deck. codes: ...
from __future__ import unicode_literals from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.AppointmentList.as_view(), name='appointment_list', ), url(r'^csv/$', views.CSVAppointmentList.as_view(), name='csv_appointmen...
#!/usr/bin/python """Weather Recorder This module reads the temperature and hunidity from a DHT22 sensor attached to a raspberry pi. In the future there will also be a hook for a BMP180 pressure sensor. The result is send to a REST interface which saves the data from the sensors in a database. The configiguration of ...
""" shape_presentation_instances.py """ population = [ # Grid Diagnostic {'Asset': 'row boundary', 'Presentation': 'default', 'Drawing type': 'Grid Diagnostic', 'Line style': 'grid'}, {'Asset': 'column boundary', 'Presentation': 'default', 'Drawing type': 'Grid Diagnostic', 'Line style': 'grid'},...
#Brian Stamm #CSC 110 #HW 1 - Mad Lips #9.29.14 v2 #Original story #The other day, I was walking with my dog, and then the most amazing thing happened! #We were in the middle of Discovery Park, and then a leprechaun jumped out of the bushes! #“Hello, my name is Patrick! And I will grant you 1 wish(es)!” #“...
import random import secrets import hashlib import uuid def hash_function(password): #generate a random uuid as salt salt = uuid.uuid4().hex print("\nsalt = "+salt) return hashlib.sha256(salt.encode("ascii", "replace")+password.encode("ascii", "replace")).hexdigest()+':'+salt def chec...
from restclients.cache_implementation import TimedCache from restclients.models import CacheEntryTimed import re class RestClientsCache(TimedCache): """ A custom cache implementation for MSCA Provisioner """ kws_url_current_key = '/key/v1/type/%s/encryption/current' kws_url_key = '/key/v1/encryption/%s.j...
"""Box class. Represents a container that can be used to group other widgets. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from .domwidget import DOMWidget from .widget import Widget, register, widget_serialization from traitlets import Unicode, Tuple, Int,...
from django.apps import AppConfig class LtiExampleConfig(AppConfig): name = 'lti_example' verbose_name = 'LTI_Example' def ready(self): # Load our receivers # This is important as receiver hooks are not connected otherwise. from . import receivers # NOQA
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals from datetime import datetime from os import chdir, listdir, remove from os.path import expanduser, isdir, isfile from shutil import rmtree import pytz import sqlite3 import unicodedata tzinfo = pytz.timezone('CET') def iso8601(): now = d...
from opentrons import protocol_api # Rename to 'purification_template' and paste into 'template_ot2_scripts' folder in DNA-BOT to use metadata = { 'apiLevel': '2.8', 'protocolName': 'purification_template', 'description': 'Implements magbead purification reactions for BASIC assembly using an opentrons ...
from ptrlib import * elf = ELF("./seccomp") """ sock = Process("./seccomp") libc = ELF("/lib/x86_64-linux-gnu/libc-2.27.so") """ sock = Socket("211.239.124.246", 12403) #sock = Socket("0.0.0.0", 9999) libc = ELF("./libc.so.6") #""" rop_pop_rdi = 0x00400eb3 # libc leak payload = b'A' * 0x118 payload += p64(rop_pop_rd...
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np import mpl_toolkits.mplot3d as a3 from matplotlib import colors import scipy as sp xyz=np.zeros((1311,3)) xyz[0][0]=-1.000000; xyz[0][1]=-1.000000; xyz[0][2]=0.000000; xyz[1][0]=1.000000; xyz[1][1]=-1.000000; xyz[1][2]=0.0000...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
import logging as log import os import errno from threading import Thread try: from urllib import urlopen from urlparse import urlparse import unicodecsv as csv except ImportError: from urllib.request import urlopen from urllib.parse import urlparse import csv class FolderCreationError(Excep...