text
stringlengths
17
737k
#!/usr/bin/env python try: import cjson as jsonlib jsonlib.dumps = jsonlib.encode jsonlib.loads = jsonlib.decode except ImportError: try: from django.utils import simplejson as jsonlib except ImportError: try: import simplejson as jsonlib except ImportError: ...
#Copyright (C) 2016 Paolo Galeone <nessuno@nerdz.eu> # Based on Tensorflow cifar10_train.py file # https://github.com/tensorflow/tensorflow/blob/r0.11/tensorflow/models/image/cifar10/cifar10_train.py # #This Source Code Form is subject to the terms of the Mozilla Public #License, v. 2.0. If a copy of the MPL was not di...
# # Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U # # This file is part of IoT orchestrator # # IoT orchestrator is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # L...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os, sys, shutil, argparse, subprocess import pexpect, pexpect.replwrap from tempfile import TemporaryFile, mkdtemp TEST_DIR = os.path.abspath(os.path.dirname(__file__)) BASE_DIR = o...
#!/usr/bin/env python """A wrapper script around clang-format, suitable for linting multiple files and to use for continuous integration. This is an alternative API for the clang-format command line. It runs over multiple files and directories in parallel. A diff output is produced and a sensible exit code is returned...
""" viscount.users.forms Note: these are handled by flask-security and exist just for the API """ from flask_wtf import Form from wtforms import StringField, TextAreaField from wtforms.validators import Required, Optional, Email, AnyOf from ..services import users __all__ = ['NewUserForm', 'UpdateUserForm'] class...
#!/usr/bin/env python from __future__ import division import shutil import optparse from sys import * import os,sys,re from optparse import OptionParser import glob import subprocess from os import system import linecache import time #========================= def setupParserOptions(): parser = optparse.Opt...
# -*- coding: utf-8 -*- from abc import abstractmethod from datetime import datetime, date from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models, transaction, IntegrityError from django.db.models.fields import FieldDoesNotExist from django.db.models.query ...
#!/usr/bin/python # http://bt3gl.github.io/black-hat-python-infinite-possibilities-with-the-scapy-module.html import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) import pefile from scapy.all import * from scapy.error import Scapy_Exception #returns [(stream,header,http_payload)] def get_http_ht...
#!/usr/bin/env python """ Configuration program for botan (C) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 Jack Lloyd (C) 2015,2016,2017 Simon Warta (Kullo GmbH) Botan is released under the Simplified BSD License (see license.txt) This script is regularly tested with CPython 2.7 and 3.5, and occasionally teste...
import json from pyramid.response import Response from src.sgd.frontend import config from urllib.request import Request, urlopen from urllib.error import URLError patmatch_url = "https://patmatch.yeastgenome.org/" def do_patmatch(request): p = dict(request.params) if p.get('conf'): ...
from __future__ import print_function, absolute_import import spylon.spark.launcher as sparklauncher import os import sys import pytest @pytest.mark.skip(True, reason="Test state leakage not fixed yet") @pytest.mark.xfail(sys.version_info[0] >= 3, reason="setattr fails on python 3") def test_set_spark_property(): ...
from tornado.options import define,options import tornado.gen import pymongo import logging import time __all__=["get_list","get_one","update","insert","delete","exsit","count"] class BaseModel(): def __init__(): self.db_client = options.db_client; self.module = self.__module__ self.class_...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A tool to kill any leftover test processes, executed by buildbot. Only works on Windows.""" import optparse import os import r...
""" test framework utilities """ import abc import socket from socket import AF_INET6 import six import sys import os.path import scapy.compat from scapy.layers.l2 import Ether from scapy.layers.inet import IP from scapy.layers.inet6 import IPv6, IPv6ExtHdrFragment, IPv6ExtHdrRouting,\ IPv6ExtHdrHopByHop from sca...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
#!/usr/bin/python3 # # Copyright (c) 2019 Valve Corporation # Copyright (c) 2019 LunarG, Inc. # Copyright (c) 2019 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://w...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
#!/usr/bin/python # glib-client-gen.py: "I Can't Believe It's Not dbus-binding-tool" # # Generate GLib client wrappers from the Telepathy specification. # The master copy of this program is in the telepathy-glib repository - # please make any changes there. # # Copyright (C) 2006, 2007 Collabora Limited # # This libra...
''' The static grains, these are the core, or built in grains. When grains are loaded they are not loaded in the same way that modules are loaded, grain functions are detected and executed, the functions MUST return a dict which will be applied to the main grains dict. This module will always be executed first, so tha...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Mikhail Fedosov (tbs.micle@gmail.com)" __version__ = "0.1.3.4" # http://code.activestate.com/recipes/577708-check-for-package-updates-on-pypi-works-best-in-pi/ # http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python import pip ...
import sys import StringIO import tempfile import numpy as np import zlib import h5py import os import cStringIO import re import empaths import restargs import anncube import anndb import dbconfig import annproj import h5ann from ann_cy import assignVoxels_cy from annerror import ANNError from pprint import pprint ...
# Copyright (C) 2006 by Jelmer Vernooij # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distribut...
from google.appengine.api import urlfetch from google.appengine.ext import ndb import csv import re import os from cStringIO import StringIO import webapp2 import jinja2 JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), ...
#!/usr/bin/env python3 import ytlib import youtube_dl import threading import os from time import sleep import tempfile PLAYER = 'gst-play-1.0' def download(res): print("Putting: {0}".format( ytlib.tostring(res) )) ydl_opts = {'format' : 'bestaudio', 'outtmpl': '%(id)s.tmp', 'quiet': True} with youtube_d...
''' Compare local fonts against fonts available on fonts.google.com ''' from __future__ import print_function from flask import Flask, request, render_template, redirect, url_for from fontTools.ttLib import TTFont from fontTools.pens.areaPen import AreaPen from glob import glob from uuid import uuid4 from collections i...
# coding=utf-8 import datetime __author__ = 'TIF' def tick(): print('Tick! The time is: %s' % datetime.now())
import os import subprocess from tempfile import mkstemp from shutil import move from os import remove, close ######### CHECK IF UPGRADED ############### #updateToLatest = False #inputCorrect = False #while inputCorrect == False: # update = raw_input("Do you want to upgrade Raspbian to latest update (might take up ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import logging import os import sys import pyotherside import smartcard import struct import types import getpass import urllib.parse import ykman.logging_setup from base64 import b32decode from binascii import b2a_hex, a2b_hex from fido2.ctap...
#!/usr/bin/python import os PARENT = os.path.abspath(os.path.dirname(__file__)) def install_file(name, dest_dir = os.path.expanduser('~'), dot = True): if not os.path.isdir(dest_dir): os.makedirs(dest_dir) if dot: dest = os.path.join(dest_dir, '.' + name) else: dest = os.path.join(dest...
import os import importlib from .. import exceptions def process(filename): """This is the core function used for parsing. It routes the filename to the appropriate parser and returns the result. """ # get the filename extension, which is something like .docx for # example, and import the mo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Usage: $ urlwait [SERVICE URL] [TIMEOUT] SERVICE URL is a connection url, e.g. a typical value for $DATABASE_URL. TIMEOUT is a number of seconds to try to connect to the host and port specified in the SERVICE URL. These values may also be specified in...
4bf17666-2d5c-11e5-893c-b88d120fff5e
#!/usr/bin/env python """ $Id$ Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/) See the file 'doc/COPYING' for copying permission """ import httplib import re import socket import time import urllib2 import urlparse import traceback from lib.contrib import multipartpost from lib.core.commo...
from datetime import datetime from collections import namedtuple import locale import csv import warnings from sys import exit #TODO: # 1. Make this file also function as a script. # - specify a bank and input path + call bank2ynab # 1. create a mapping from companies in the 'trasaction' field to ynab payees # 2. ...
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # <danneh@danneh.net> wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth...
from collections import defaultdict, OrderedDict import os import pickle import copy import numpy as np from .analysis import NetworkG, NetworkK, NetworkF from . import util from libpysal import cg, examples, weights try: from libpysal import open except ImportError: import libpysal open = libpysal.io.open ...
from willie import module import datetime import random import os import sys # sys.path.append(‘/path/to/allianceauth’) #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "alliance_auth.settings") #from services.managers.openfire_manager import OpenfireManager # @module.rule('hello!?') # def hi(bot, trigger): # ...
# -*- coding: utf-8 -*- ''' Support for rpm ''' # Import python libs from __future__ import absolute_import import logging import os import re import time import datetime # Import Salt libs import salt.utils import salt.utils.itertools import salt.utils.decorators as decorators import salt.utils.pkg.rpm # pylint: dis...
import warnings from collections import OrderedDict from itertools import izip from tables import * import pandas as pd import pandas.lib as lib import numpy as np import pandas.io.pytables as pdtables from trtools.io.common import _filename MIN_ITEMSIZE = 10 def convert_frame(df): """ Input: DataFrame ...
import sys, traceback, functools, weakref, wx import async class WxScheduler(async.Scheduler): def do_call(self, func, args, kwargs): if wx.Thread_IsMain(): try: func(*args, **kwargs) except SystemExit: raise except: sys.st...
""" Default matrix (login) script for x/84. This script is the default session entry point for all connections. Or simply put, the login program. It is configured in default.ini file, under section 'matrix'. Alternative matrices may be considered by their connection type, using script_{telnet,ssh} In legacy era, a m...
#!/usr/bin/python # vim: tabstop=4 shiftwidth=4 expandtab """ vctools is a Python module using pyVmomi which aims to simplify command-line operations inside VMWare vCenter. https://github.com/mdechiaro/vctools/ """ # pylint: disable=no-name-in-module from __future__ import print_function import os import sys import ya...
import os from unittest import mock import asyncio from subprocess import check_output import pytest from . import FakeSleeper def have_root(): print(dict(os.environ)) destroy = os.environ.get('ZGRES_DESTROY_MACHINE', 'false').lower() if destroy in ['t', 'true']: user = check_output(['whoami']) ...
# -*- coding: utf-8 -*- ''' Manage client ssh components .. note:: This module requires the use of MD5 hashing. Certain security audits may not permit the use of MD5. For those cases, this module should be disabled or removed. ''' # Import python libs import os import re import hashlib import binascii import ...
import os import re import sys cmd_folder = '/home/jluttine' #cmd_folder = '/home/jluttine/tuhlaajapojat' if cmd_folder not in sys.path: sys.path.insert(0, cmd_folder) os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from stats.models import * def get_addresses(list): print 'Trying to match a list: ' + lis...
#!/usr/bin/python from tumblpy import Tumblpy as T from builtins import input try: from urllib.parse import urlparse, parse_qs except ImportError: from urlparse import urlparse, parse_qs # obtain authorization token info from Tumblr def authorize(KEY, SECRET, CALLBACK): # STEP 1: Obtain the authorization p...
""" Copyright 2010 Tamas Marki. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the followi...
# -*- coding: utf-8 -*- ''' Operations on regular files, special files, directories, and symlinks ===================================================================== Salt States can aggressively manipulate files on a system. There are a number of ways in which files can be managed. Regular files can be enforced wit...
""" Copyright 2010 Tamas Marki. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the followi...
import os from torchvision.datasets import CIFAR100, CIFAR10, MNIST, QMNIST, KMNIST, FashionMNIST, ImageNet, ImageFolder try: from torchvision.datasets import Places365 has_places365 = True except ImportError: has_places365 = False try: from torchvision.datasets import INaturalist has_inaturalist =...
"Utilities for loading models and the modules that contain them." from collections import defaultdict, OrderedDict import os import sys import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache from django.utils.module_loading import im...
#!/usr/bin/env python3 """ ⛼ tinychain putting the rough in "rough consensus" Some terminology: - Chain: an ordered list of Blocks, each of which refers to the last and cryptographically preserves a history of Transactions. - Transaction (or tx or txn): a list of inputs (i.e. past outputs being spent) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Alignak - Arbiter, Scheduler and Broker modules for the Alignak backend """ # Package name __pkg_name__ = u"alignak_module_backend" # Module type for PyPI keywords # Used for: # - PyPI keywords __module_type__ = u"backend" # Application manifest __version__ = u"0....
from neopixel import NeoPixel from machine import Pin num_pixels = 0 pixels = [] def hue_to_rgb(h): return hsb_to_rgb(h, 1.0, 1.0) def hsb_to_rgb(h, s, b): if s == 0.0: return b, b, b i = int(h * 6.0) f = (h * 6.0) - i p = b * (1.0 - s) q = b * (1.0 - s * f) t = b * (1.0 - s * (1.0 - f)...
#!/usr/bin/env python # # 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, subl...
ciphertext = 'commonsenseisnotsocommon' key = 'pizza' def itoc(x): return chr(x + ord('a')) def ctoi(x): return (ord(x) - ord('a')) % 26 #print ctoi('a'), ctoi('z') #print itoc(0), itoc(25) while(len(key) < len(ciphertext)): key = key + key print "+ve: " for i in xrange(0, len(ciphertext)): print itoc((ctoi...
# -*- coding: utf-8 -*- ''' Management of user accounts =========================== The user module is used to create and manage user settings, users can be set as either absent or present .. code-block:: yaml fred: user.present: - fullname: Fred Jones - shell: /bin/zsh - home: /hom...
# coding: utf-8 import ui, console, time, motion import threading, queue from contextlib import closing from datetime import datetime import re, urllib import atexit # This demo allows to open webvr content in true fullscreen mode in Pythonista. # Two vr contents are available : # - the first one comes from sketchfa...
# -*- coding: utf-8 -*- ''' Management of user accounts =========================== The user module is used to create and manage user settings, users can be set as either absent or present .. code-block:: yaml fred: user.present: - fullname: Fred Jones - shell: /bin/zsh - home: /hom...
# -*- coding: utf-8 -*- """ Created on Sun Jan 3 00:30:36 2016 @author: p """ from __future__ import absolute_import, division, print_function, unicode_literals import pandas as pd from datetime import datetime try: from httplib import BadStatusLine except ImportError: from http.client import BadS...
# -*- coding: utf-8 -*- __author__ = "Mosky <http://mosky.tw>" __version__ = '0.7'
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import gevent.monkey from geojson import Feature, FeatureCollection gevent.monkey.patch_all() import click import logging import os from pathlib import Path import json from flask import Flask, request, Response, url_for from flask_sqlalchemy import SQLAlchemy from fla...
''' Jinja loading utils to enable a more powerful backend for jinja templates ''' # Import python libs from os import path import logging import json # Import third party libs from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes from jinja2.environment import TemplateModule from jinja2.ext import Extension ...
import abc import uuid import warnings import base64 import io import json from textwrap import dedent from collections import defaultdict import jinja2 import numpy as np import matplotlib.axis from matplotlib.lines import Line2D from matplotlib.image import imsave from matplotlib.path import Path from matplotlib.t...
# -*- coding: utf-8 -*- ''' Jinja loading utils to enable a more powerful backend for jinja templates ''' # Import python libs from __future__ import absolute_import import json import pprint import logging from os import path from functools import wraps # Import third party libs import salt.ext.six as six from jinja...
# -*- coding: utf-8 -*- ''' Library for interacting with Slack API .. versionadded:: 2016.3.0 :configuration: This module can be used by specifying the name of a configuration profile in the minion config, minion pillar, or master config. For example: .. code-block:: yaml slack: a...
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
#!/bin/env python3 """ Watch unseen videos in a folder automatically """ import os import re import json import subprocess as sp import argparse FOLDER = os.path.expanduser('~/new/') class Watcher: """ Shows unwatched videos in a folder. """ def __init__(self, files, folder, nosave=False): s...
# coding: utf-8 import math import re import urllib2 from datetime import timedelta from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.auth.forms import AuthenticationForm from django.contrib.sites.models import...
import random def random_line(afile, max_chars = 123, min_chars = 5): line = next(afile) for num, aline in enumerate(afile): aline = aline.strip() if (len(aline) < min_chars or aline[0].islower() or len(aline) > max_chars) or random.randrange(num + 2): continue line = aline ...
from functools import partial from txpoloniex import base, commands, queue, util class ConfigError(Exception): def __init__(self, api_key, secret): missing = [] if not api_key: missing.append('api_key') if not secret: missing.append('secret') self.messag...
#!/usr/bin/env python '''Instantiate the ENCODE ChIP-seq workflow''' import pdb import os.path, sys, subprocess, logging, re import dxpy EPILOG = '''Notes: Examples: %(prog)s ''' WF_TITLE = 'tf_chip_seq' WF_DESCRIPTION = 'ENCODE TF ChIP-Seq Pipeline' MAPPING_REFERENCE_TAR_FILE_IDENTIFIER = 'E3 ChIP-seq:/Referenc...
# Django settings for mygpo project. # # This file is part of my.gpodder.org. # # my.gpodder.org is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at your # option) an...
#!/usr/bin/python import os import sys import cgi import time import json import random import string import Cookie import urlparse import datetime sys.path.append("../db") sys.path.append("../") import config import db import aesjsonfile def json_print(obj, header=None): print "Content-type: application/json" ...
import binascii import json import logging import os import subprocess from datetime import datetime, timedelta from functools import update_wrapper from logging.handlers import TimedRotatingFileHandler from multiprocessing import Process import git import pushover import strictyaml from flask import (Flask, Response,...
def refine_STATICS(original): original['GENERAL']['css']['files'] += [ 'schnippjs/styles/schnipp.ui.dialog.css', 'schnippjs/styles/dynforms.css', 'schnippjs/styles/dynforms/fields.css', 'schnippjs/styles/dynforms/fields/dropdownselect.css', 'schnippjs/styles/dynforms/field...
class Website: def __init__(self): self.dh = DataHandler() def json_data(self): return self.dh.get_data() def json_data_with_links(self): return self.dh.get_data_with_links() def display_root(self): # from json import dumps # return dumps(self.dh.get_data(), s...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from os.path import normpath, expanduser, join, exists import os import sys import getpass import pipes import platform import shlex import six import subprocess # import itertools as it from six.moves...
#!/usr/bin/env python import random # Not supposed to be something dynamic, for now. class Load_Balancer(object): def __init__(self): # Edge output ports in order of preference # It will be calculated in the load_balance method self.edge_out_ports = {} def lb_policy(self, edge_core): ...
''' (c) 2016, Vsevolod Kolchinsky ''' import requests from cached_property import cached_property class UGS3Client(object): ''' minimal client implementation ''' def __init__(self,host='ugs3.universinet.org'): self.ugs3_base_url = 'https://{}'.format(host) self.default_headers = {...
# Copyright 2009-Present The Graphite Development Team # Copyright 2008 Orbitz WorldWide # # 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 # # U...
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator from astropy.io import fits from astropy.time import Time from PyAstronomy import pyasl from scipy import ndimage import pandas as pd import gaussfitter as gf import BF_functions as bff...
import googlemaps import json import threading import time from pgoapi import PGoApi from pgoapi.utilities import f2i, h2f from math import radians, sqrt, sin, cos, atan2 GOOGLEMAPS_KEY = "AIzaSyAZzeHhs-8JZ7i18MjFuM35dJHq70n3Hx4" working_thread=None gmaps = googlemaps.Client(key=GOOGLEMAPS_KEY) rest_time=1 pokemon_...
import os import platform import shutil import subprocess import sys import tarfile import urllib from config import BASE_PATH UNIX_INSTALL_MONO = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'install_mono.sh') WRAPREC_PATH = os.path.join(BASE_PATH, 'wraprec') WRAPREC_BIN = os....
#!/usr/bin/python # -*- coding: utf-8 -*- """ Scripts to manage categories. Syntax: python category.py action [-option] where action can be one of these: * add - mass-add a category to a list of pages * remove - remove category tag from all pages in a category * move - move all pages in a categ...
#!/usr/bin/python """ Script to manage categories. Syntax: python pwb.py category action [-option] where action can be one of these * add - mass-add a category to a list of pages. * remove - remove category tag from all pages in a category. * move - move all pages in a category to anot...
import codecs import calendar import datetime import hashlib import hmac import io import json import logging import mimetypes import sys import urllib import urllib2 import uuid FACEBOOK_API = 'https://graph.facebook.com' logger = logging.getLogger(__name__) class MultipartFormdataEncoder(object): def __init__...
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by ...
{ 'target_defaults': { 'default_configuration': 'Release' }, 'targets': [ { 'target_name': 'scddetect', 'type': 'executable', 'sources': [ 'src/scddetect.c', ], 'libraries': [ '-L/app/vendor/libccv', '-lccv -lm -lpng -ljpeg -lpthread -lgsl -lgslcblas -...
{ "targets": [ { "target_name": "bulb", "sources": [ "bulb.c", "lib_gpio.c", "bulb-module.cpp" ], 'link_settings': { 'libraries': [] }, } ] }
{ "targets": [{ "target_name": "opencv" , "sources": [ "src/init.cc" , "src/Matrix.cc" , "src/OpenCV.cc" , "src/CascadeClassifierWrap.cc" , "src/Contours.cc" , "src/Point.cc" , "src/VideoCaptureWrap.cc" , "src/CamShift.cc" , "src/Hi...
#!/usr/bin/env python import urllib2 import getopt, sys, os, shutil import WeatherPrinter, BingWallpaperDownloader, FunFactPrinter from enum import Enum from random import randint ''' Check if internet is on ''' def isInternetOn(): googleUrl = 'http://216.58.192.142' try: urllib2.urlopen(googleUrl, ...
""" birthday.py Author: Kezar Berger Credit: Kotz Assignment: Your program will ask the user the following questions, in this order: 1. Their name. 2. The name of the month they were born in (e.g. "September"). 3. The year they were born in (e.g. "1962"). 4. The day they were born on (e.g. "11"). If the user's birt...
#!/usr/bin/env python # -*- coding: utf-8 -*- import ansible.module_utils.urls as urls import urllib2 allowed_user_params = [ 'email', 'password', 'username', 'name', 'skype', 'linkedin', 'twitter', 'website_url', 'projects_limit', 'extern_uid', 'provider', 'bio', 'can_create_group' ] required_user_create_par...
#!/usr/bin/python # -*- coding: utf-8 -*- """ This script understands various command-line arguments: Task commands: -featured use this script for featured articles. Default task if no task command is specified -good use this script for good articles. -lists use thi...
# # arcus-python-client - Arcus python client drvier # Copyright 2014 NAVER Corp. # # 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 req...
#!/usr/bin/env python """ Computes sizes related to ZFS pool using iostats -v - pool - ZIL cache - L2ARC cache Assumes mirror pool with mirror ZIL and L2ARC stripe over 2 disks """ import sys, os, traceback import re from optparse import OptionParser # ================================================================...
#!/usr/bin/env python3 """ Script to train agent through imitation learning using demonstrations. """ import os import argparse import csv import copy import gym import time import datetime import numpy as np import sys import babyai.utils as utils from babyai.algos.imitation import ImitationLearning import torch # ...
import collections class KeyValues(collections.MutableMapping): """Class for representing Key Values objects, with container behavior. This class implements the tree data structure used by KeyValues, exposing method for acting like a python Dictionary, but keeping the key order. It also implements me...