src stringlengths 721 1.04M |
|---|
# ----------------------------------------------------------
# Introdução a Programação de Computadores - IPC
# Universidade do Estado do Amazonas - UEA
# Prof. Jucimar Jr
#
# Carlos Eduardo Tapudima de Oliveira 1715310030
# Frederico Victor Alfaia Rodrigues 1515200030
# Joelson Pereira Lima ... |
from __future__ import absolute_import
from datetime import timedelta
from django.core.urlresolvers import reverse
from sentry.incidents.logic import get_incident_aggregates
from sentry.incidents.models import IncidentStatus, IncidentTrigger, INCIDENT_STATUS
from sentry.utils.assets import get_asset_url
from sentry.u... |
##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... |
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# police-uum.py
# Author: Maxim Dubinin (sim@gis-lab.info)
# About: Grab 112.ru data on участковые, creates two tables linked with unique id, policemen and locations they are responsible for.
# Created: 13:26 07.05.201... |
# Copyright (c) Mathias Kaerlev 2011-2012.
# This file is part of pyspades.
# pyspades 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... |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'SessionStats'
db.create_table('core_sessionstats', (
('stats', self.gf('py... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Board'
db.create_table(u'core_board', (
(u'id... |
import unittest
import _mysql
import MySQLdb
from MySQLdb.constants import FIELD_TYPE
from configdb import connection_factory
import warnings
warnings.simplefilter("ignore")
class TestDBAPISet(unittest.TestCase):
def test_set_equality(self):
self.assertTrue(MySQLdb.STRING == MySQLdb.STRING)
def test... |
import os
import os.path
import glob
import shutil
import datetime
from fnmatch import fnmatch
PROJECT_NAME = "draggin"
if 'PROJECT_NAME' in ARGUMENTS:
PROJECT_NAME = ARGUMENTS["PROJECT_NAME"]
env = Environment(tools = [])
#the full path to this SConscript file
this_sconscript_file = (lambda x:x).func_code.co_filen... |
# IM - Infrastructure Manager
# Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia
#
# 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... |
#
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2005-2006 Async Open Source
#
# 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, ... |
"""Moderate Ray Tune run (32 trials, 4 actors).
This training run will start 32 Ray Tune trials, each starting 4 actors.
The cluster comprises 32 nodes.
Test owner: krfricke
Acceptance criteria: Should run through and report final results, as well
as the Ray Tune results table. No trials should error. All trials sho... |
import time
import datetime
import csv
import os
import json
import sys
import logging
import send2trash
logging.basicConfig(filename='program_Log.txt', level=logging.INFO, format=' %(asctime)s - %(levelname)s - %(message)s')
MASTER_PASSWORD = 'minjun5627'
MASTERUSERNAME = 'minjun'
MASTERUSERPASSWORD = '2005'
#os.c... |
import os as _os
import matplotlib as _mpl
import pylab as _pylab
from functools import partial as _partial
try: from . import _pylab_tweaks
except: import _pylab_tweaks
import spinmob as _s
_qtw = _s._qtw
_qt = _s._qt
_qtcore = _s._qtc
# make sure... |
import unittest
from aim.utilities import *
from numpy import allclose
from math import sqrt
class Test_utilities(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_wind_field(self):
"""test_wind_field - Test conversions to windfield
Tes... |
# coding: utf-8
# # <center> 나라장터 입찰공고 크롤링 with Python3</center>
#
# 나라장터에 올라오는 입찰공고를 모니터링하기 위해 개발된 간단한 프로그램으로, 검색어 리스트를 설정하면 그에 따라 최근 7일간 공고된 입찰공고 리스트를 가져와 엑셀파일로 정리해줍니다. 크롤링 프로그램이지만, BeautifulSoup을 사용하지 않습니다.
# In[18]:
import pandas as pd
import numpy as np
import requests
import os
import datetime, time
import s... |
# -*- coding: utf-8 -*-
#
# clearinghoused documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 20 15:45:40 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... |
# Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Test CF-NetCDF file loading and saving.
"""
# Import iris tests first so that some things can be initialised before
# imp... |
import sublime, sublime_plugin
from datetime import datetime
# Date to be shown as example in the formats list
EXAMPLE_DATE = datetime(1970, 12, 31)
class QuickdatesformatterFormatDatesCommand(sublime_plugin.WindowCommand):
# Needed to find the dates in the chosen format within the text
date_to_regex = {
'%d/%... |
from fractions import Fraction
from unittest import SkipTest
import os
from av import AudioResampler, Codec, Packet
from av.codec.codec import UnknownCodecError
import av
from .common import TestCase, fate_suite
def iter_frames(container, stream):
for packet in container.demux(stream):
for frame in pack... |
# Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... |
# -*- coding: utf-8 -*-
"""
This code uses a loop along with our set of coupled differential equations and
matrix math to create arrays of 4-vector quaternions.
The old plotting functions need to be updated and incorperated into the end of
this code or a better visualization solution needs to be found.
"""
... |
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import range
from builtins import str
from builtins import object
from past.builtins import basestring
import pytest
import os
try:
import subprocess32 as subprocess
except:
import subproce... |
import os.path
from random import choice
from string import ascii_uppercase
import sys
import yaml # pyyaml
from ..blocks import loadblocks as lb
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, ... |
"""Various spawn patterns within the given bounds."""
import numpy as np
from heuristic_optimization.util.util import clamp_into_bounds
def random(num_points, lower_bound, upper_bound):
"""Return random locations."""
return np.random.uniform(low=lower_bound, high=upper_bound, size=(num_points, len(lower_bou... |
#
# utility functions using libnm
#
# Copyright (C) 2018 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distri... |
#
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
#
# 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; version 2 of the License.
#
# This program is distributed in th... |
import requests
from datetime import datetime, timedelta
from mesh.standard import ForbiddenError, OK
from spire.core import Unit, Configuration, Dependency
from spire.mesh import MeshDependency
from spire.support.logs import LogHelper
from scheme.fields import *
from tap.security.password import PasswordManager
__a... |
"""The WaveBlocks Project
This file contains the class for representing the hypercubic basis shape
which is the full dense basis set.
@author: R. Bourquin
@copyright: Copyright (C) 2012, 2013, 2014, 2015 R. Bourquin
@license: Modified BSD License
"""
from numpy import array, eye, vstack, integer
from WaveBlocksND.B... |
import unittest
import random
import dcpu_16
from dcpu_16 import CPU
class TestInstructions(unittest.TestCase):
"""Instruction set"""
def setUp(self):
pass
def test_SET(self):
dcpu_16.SET.opcode = (0x1,)
c = CPU()
c.a = 0x0
c.b = 0x42
dcpu_16.SET(c, c._poin... |
from __future__ import absolute_import
from __future__ import unicode_literals
from builtins import str
from builtins import object
from unittest import TestCase
from django.test.client import RequestFactory
from django.contrib.contenttypes.models import ContentType
from django.db import models
import rdflib, datetime... |
# PMR WebServices
# Copyright (C) 2016 Manhoi Hur, Belyaeva, Irina
# This file is part of PMR WebServices API.
#
# PMR API 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 2 of the License, or
... |
import time
import urllib2
import json
import sys
Default_Lat = 40.697017
Default_Lon = -73.995267
Request_Url = "https://api.forecast.io/forecast"
def getWeather(key, lat = Default_Lat, lon = Default_Lon):
request = "%s/%s/%s,%s" % (Request_Url, key, lat, lon)
u = urllib2.urlopen(request)
return json.loads(u.... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import optparse
from thumbor.context import ServerParameters
from t... |
import unittest
import warnings
import numpy
import cupy
from cupy import testing
import cupyx.scipy.linalg
if cupyx.scipy._scipy_available:
import scipy.linalg
@testing.gpu
@testing.parameterize(*testing.product({
'shape': [(1, 1), (2, 2), (3, 3), (5, 5), (1, 5), (5, 1), (2, 5), (5, 2)],
}))
@testing.fix_ra... |
import string
import numpy as np
from pandas import (
DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range)
import pandas.util.testing as tm
class GetNumericData:
def setup(self):
self.df = DataFrame(np.random.randn(10000, 25))
self.df['foo'] = 'bar'
self.df['bar'] =... |
#! /usr/bin/python
import os
def main(folder):
#vectors = []
#f = open('../dictionary/vectors.txt')
#for line in f:
# representation = line.strip('\n')
# vectors.append(representation)
#f.close()
for d, ds, fs in os.walk(folder):
for fname in fs:
if fname[-... |
# 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 or agreed to in writing, software
# d... |
#!/usr/bin/python
import os
import sys
from pstep import PStep
import paramiko
cmd = sys.argv[1]
ps = PStep('CALVALUS')
# lc2-step ql noaa11 AVHRR_AC 1993 /calvalus/eodata/AVHRR_L1B/noaa11/1993 /calvalus/projects/lc/ql-noaa11-AVHRR_L1B/1993
if cmd == 'ql-orbit':
variables = {
'mission' : sys.argv[2],
... |
# #
# Copyright 2014-2019 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... |
from django.shortcuts import render, get_object_or_404
from .models import Category, Product, Value
from django.contrib import messages
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.core.exceptions import ObjectDoesNotExist
from cart.forms import CartAddProductForm
def catalog_i... |
import numpy as np
from bokeh.plotting import *
from bokeh.objects import Range1d, ServerDataSource
"""
In order to run this example, you have to execute
./bokeh-server -D remotedata
the remote data directory in the bokeh checkout has the sample data for this example
In addition, you must install ArrayManagement from... |
# -*- coding: UTF-8 -*-
"""
history
Music genres, performers, recordings, venues
--------------------------------------------------------------------
3.0.0 - split all the content into babycontents
evb - note: only one dictionary named 'content' allowed per module
this limitation is to spe... |
# This file is part of the Hotwire Shell user interface.
#
# Copyright (C) 2007,2008 Colin Walters <walters@verbum.org>
#
# 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 2 of the ... |
# Copyright (c) 2014 VMware, 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 or a... |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
#!/usr/bin/env python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... |
"""
Copyright (c) 2016 Alan Yorinks All right reserved.
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 library is distri... |
#!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... |
from app import db
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.sql import select, func
from app.model.outstandingError import OutstandingError
import numpy
import decimal
class Batch(db.Model):
id = db.Column(db.Integer, primary_key=True)
robot = db.Column(db.String(20))
temperature ... |
# -*- coding: utf-8 -*-
import sys, os, pytest
from distutils import dir_util
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../gramophone')))
from gramophone import gp
@pytest.fixture
def datadir(tmpdir, request):
'''
Fixture responsible for searching a folder with the same n... |
import pygame.mixer as pm
from pygame_play_tone import Note
from time import sleep
#Default volume for Notes
DEFAULT_VOLUME=0.2
# Notes that can be called on, where C4 is middle C
C0 = 16.35
C0_SHARP = 17.32
D0 = 18.35
D0_SHARP = 19.45
E0 = 20.6
F0 = 21.83
F0_SHARP = 23.12
G0 = 24.5
G0_SHARP = 25.96
A0 = 27.5
A0_SHAR... |
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
# 因為 publishconf.py 在 pelicanconf.py 之後, 因此若兩處有相同變數的設定, ... |
"""This module contains method to handle varios URI scheme."""
import os, sys
import re
import itertools
import urllib2
import ftplib
import socket
import netrc
from warnings import warn
from radist.helpers import R_SUB2
scheme = re.compile('(?P<scheme>[a-z]+)://(?P<host>[a-z:0-9.]+)/(?P<path>.*)')
localhost = socket.g... |
import asyncio
import random
from slot import requires
from slot.handlers import BaseHandler, MessageHandled, command, unhandled_messages
class PoemHandler(BaseHandler):
def generate_poem(self, start=None):
textgen = self.bot.extensions["textgen"]
rhyme = self.bot.extensions["rhyme"]
line... |
# Built-in modules
from glob import glob
import re
# Third-party modules
import numpy as np
import pandas as pd
# Hand-made modules
from .base import DataFrameHandlerBase, BloscpackMixin
REGEX_FLAG_NAME_PREFIX = "f_"
class DatasetHandler(DataFrameHandlerBase, BloscpackMixin):
def __init__(self, columns_y):
... |
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us>
#
# 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, m... |
"""
For CommonsCloud copyright information please see the LICENSE document
(the "License") included with this software package. This file may not
be used in any manner except in compliance with the License
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed... |
#!/usr/bin/env python2
###############################################################################
# ------------------------- Description ---------------------------------------
###############################################################################
# The purpose of this script is read the hdf5 GFED4s dat... |
# coding=utf-8
#
# Copyright 2014-2016 F5 Networks 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 la... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 30 08:45:53 2015
@author: ABerner
"""
from __future__ import print_function
# Ex 1
import numpy as np
import scipy as sp
import scipy.stats as stats
import quantecon as qe
import matplotlib.pyplot as plt
alpha = 0.1
beta = 0.1
P = np.array([[1-alpha,alpha],[beta,1-be... |
"""
=========================================
Defenition to draw RDKIT mol object (:mod:`pgradd.DrawMol`)
=========================================
Coverts a rdkit mol object to a svg image and display.
"""
from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
from IPython.... |
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Student"),
"items": [
{
"type": "doctype",
"name": "Student"
},
{
"type": "doctype",
"name": "Guardian"
},
{
"type": "doctype",
"name": "Student Log"
},
... |
# Copyright 2008-2014 Nokia Solutions and Networks
#
# 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 l... |
'''
The basic setup here is to have an Adafruit Feather HUZZAH ESP8266 plus a Featherwing OLED SSD1306
This is a non-specific script that writes the MQTT message to the OLED display.
The MQTT broker is running on an EC2 instance.
The esp8266+OLED that subscribes to the topic can be used to turn on and off a Data Logg... |
# Copyright 2020 The TensorFlow Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... |
"""
This tutorial introduces denoising auto-encoders (dA) using Theano.
Denoising autoencoders are the building blocks for SdA.
They are based on auto-encoders as the ones used in Bengio et al. 2007.
An autoencoder takes an input x and first maps it to a hidden representation
y = f_{\theta}(x) = s(Wx+b), paramete... |
from qgis.PyQt.QtCore import Qt
from qgis.PyQt.QtGui import QColor
from ThreeDiToolbox.models import base_fields
import mock
def test_row_field_value_set_value():
row = mock.Mock()
field = mock.Mock()
row_field_value = base_fields.RowFieldValue(row, field, 42)
# For coverage, test that setting a valu... |
import numpy as np
from scipy.stats import dirichlet
import random, math
dir_alpha = 100.0
scaler_alpha = 1.25
epsilon = 1e-10
def mvDirichlet(pi):
pi_new = dirichlet.rvs(dir_alpha*pi)[0]
#print(pi, pi_new)
hastings_ratio = dirichlet.logpdf(pi, pi_new) - dirichlet.logpdf(pi_new, pi)
return pi_new, has... |
# -*- coding: utf-8 -*-
"""
eve.methods.post
~~~~~~~~~~~~~~~~
This module implements the POST method, supported by the resources
endpoints.
:copyright: (c) 2017 by Nicola Iarocci.
:license: BSD, see LICENSE for more details.
"""
from datetime import datetime
from flask import current_app as ... |
'''**********************************************************************
Copyright (C) 2009-2016 The Freeciv-web project
This program 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, eithe... |
# Copyright 2021 Google LLC. 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 applicable law o... |
"""Classes used to import/export data to mongoDB
"""
from Hellas.Thebes import format_header
xlrd = None # reserved to import xlrd on demand
def _xlrd_on_demand():
global xlrd
if xlrd is None:
try:
import xlrd
except ImportError:
print ("this module requires xlrd lib... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009, MARIMORE Inc Tokyo, Japan.
# Contributed by
# Iqbal Abdullah <iqbal@marimore.co.jp>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following condit... |
#!/usr/bin/env python3
from bs4 import BeautifulSoup as bs
import requests as r
import arrow
from datetime import timedelta
import re
class Comic:
def __init__(self, date_str):
self.date = arrow.get(date_str)
self._url = get_url(self.date_path())
self.last_checked = arrow.now()
def c... |
#!/usr/bin/env python3
import unittest
from pyversion.version import Version, Comparison, valid
# if set to True tests will be verbose
DEBUG = True
# tuple structure: (version, version, desired_result, strict)
versions_to_compare_lt = [ ('2.0.0', '3.0.0', True, True),
('3.0.1', '3.1... |
"""Tests for the SmartThings component init module."""
from uuid import uuid4
from aiohttp import ClientConnectionError, ClientResponseError
from asynctest import Mock, patch
from pysmartthings import InstalledAppStatus, OAuthToken
import pytest
from homeassistant.components import cloud, smartthings
from homeassista... |
# Copyright 2021 The TensorFlow 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 applica... |
import os
import datetime
import json
import csv
import pandas as pd
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def save_dict_as_csv(data, filename, mode='w'):
"""
Given nested dict `data`, write to CSV file
where rows are timesteps and columns are links/nodes as appropriate.
:param data: (dict... |
#!/usr/bin/env python
# (C) Copyright 2011 Brandyn A. White
#
# 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
# any later version.
#
# This program is distrib... |
'''
This file is part of evopy.
Copyright 2012, Jendrik Poloczek
evopy 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.
evopy is distribut... |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... |
__author__ = 'mpetyx'
from rdflib import Graph
# import rdflib.plugin
from django.conf import settings
import datetime
import os
# register('SQLite', Store, 'rdflib.store.SQLite', 'SQLite')
def random_file_generating():
basename = "deepGraphFile"
suffix = datetime.datetime.now().strftime("%y%m%d_%H%M%S")
... |
# Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
"""hug/interface.py
Defines the various interface hug provides to expose routes to functions
Copyright (C) 2016 Timothy Edmund Crosley
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 re... |
# -*- coding: utf-8 -*-
# EFILTER Forensic Query Language
#
# Copyright 2015 Google Inc. 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/li... |
#!/usr/bin/env python
"""Test client RDFValues."""
from grr.lib import rdfvalue
from grr.lib.rdfvalues import test_base
from grr.proto import jobs_pb2
class UserTests(test_base.RDFValueTestCase):
"""Test the User ProtoStruct implementation."""
rdfvalue_class = rdfvalue.User
USER_ACCOUNT = dict(
userna... |
# ----------------------------------------------------------------------------
# This file is part of qarbon (http://qarbon.rtfd.org/)
#
# Copyright (c) 2013 European Synchrotron Radiation Facility, Grenoble, France
#
# Distributed under the terms of the GNU Lesser General Public License,
# either version 3 of the Lice... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Eduard Trott
# @Date: 2018-05-02 13:53:10
# @Email: etrott@redhat.com
# @Last Modified by: maybelinot
# @Last Modified time: 2018-05-02 13:53:10
import re
from httplib2 import Http
from apiclient import discovery, errors
import gspread
from .utils import... |
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 28 07:54:17 2017
@author: tih
"""
import os
import sys
from DataAccess import DownloadData
def main(Dir, Startdate='', Enddate='', latlim=[-60, 70], lonlim=[-180, 180], Waitbar = 1):
"""
This function downloads monthly ALEXI data
Keyword arguments:
Dir -... |
import functools
import json
import urllib
from django import http
from django.conf import settings
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, redirect, render
from django.views.decorators.http import require_POST
import commonware
... |
"""
CMake-based build system
"""
from rez.build_system import BuildSystem
from rez.build_process_ import BuildType
from rez.resolved_context import ResolvedContext
from rez.exceptions import BuildSystemError
from rez.util import create_forwarding_script
from rez.packages_ import get_developer_package
from rez.utils.pla... |
#
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import posix, sys
import traceback
from reclass.defaults import PARAMETER_INTERPOLATION_SENTINELS
clas... |
from nose.tools import assert_raises
from pysubs2 import SSAFile, SSAStyle, SSAEvent, make_time
def test_repr_default():
subs = SSAFile()
ref = "<SSAFile with 0 events and 1 styles>"
assert repr(subs) == ref
def test_repr_simple():
subs = SSAFile()
subs.append(SSAEvent(start=make_time(m=5), end=m... |
import logging; _L = logging.getLogger('openaddr.ci')
from ..compat import standard_library, expand_uri
from .. import jobs, render
from .objects import (
add_job, write_job, read_job, complete_set, update_set_renders,
add_run, set_run, copy_run, read_completed_set_runs,
get_completed_file_run, get_comple... |
#! /usr/bin/python
# -*- coding: utf-8 -*-
import re
import os
import string
import ConfigParser
import xml.dom.minidom
from data.EintData import EintData
from data.GpioData import GpioData
from utility.util import log
from utility.util import LogLevel
from utility.util import compare
from obj.ModuleObj import Modu... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
"""
Test suite highly borrowed^Wsteal from python-mpd2 [0] project.
[0] https://github.com/Mic92/python-mpd2
"""
import itertools
import os
import sys
import types
import unittest
import warnings
import musicpd
try:
import unitt... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-06-18 22:21
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('feedback', '0042_auto_20180608_1423'),
]
operatio... |
import sys
import copy
import heapq
import collections
import functools
import numpy as np
from scipy._lib._util import MapWrapper
class LRUDict(collections.OrderedDict):
def __init__(self, max_size):
self.__max_size = max_size
def __setitem__(self, key, value):
existing_key = (key in self)... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import subprocess
import time
import socket
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from mainwindow4 import Ui_MainWindow
#On cree un thread pour les operations de ping
class pingThread(QThread):
def ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.