text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
#!/usr/bin/env python # -*- coding: utf-8 -*- # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Inse...
markofu/scripts
nmap/nmap/zenmap/zenmapGUI/higwidgets/higspinner.py
Python
gpl-2.0
21,689
0.000277
from __future__ import absolute_import # Copyright (c) 2010-2017 openpyxl """Write the workbook global settings to the archive.""" from copy import copy from openpyxl.utils import absolute_coordinate, quote_sheetname from openpyxl.xml.constants import ( ARC_APP, ARC_CORE, ARC_WORKBOOK, PKG_REL_NS, ...
htwenhe/DJOA
env/Lib/site-packages/openpyxl/writer/workbook.py
Python
mit
5,683
0.003519
import random from .exceptions import ClientError def catch_client_error(func): """ Decorator to catch the ClientError exception and translate it into a reply. """ def inner(message): try: return func(message) except ClientError as e: # If we catch a client er...
amureki/lunch-with-channels
core/utils.py
Python
mit
2,997
0
# -*- coding: utf-8 -*- from resources.lib.gui.gui import cGui from resources.lib.gui.guiElement import cGuiElement from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.parser import cParser from resources.lib.handler.ParameterHandler import ParameterHandler from resources.lib import logg...
xStream-Kodi/plugin.video.xstream
sites/animes-stream24_tv.py
Python
gpl-3.0
12,975
0.019352
#!/usr/bin/python # -*- coding: utf-8 -*- # =========================================================================== # iDevice Para Saber más creado para la FPD por José Ramón Jiménez Reyes # =========================================================================== """ Para Saber mas iDevice """ import logging fr...
luisgg/iteexe
exe/engine/parasabermasfpdidevice.py
Python
gpl-2.0
5,051
0.009114
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to LOOM files. # Modules import numpy as np import pandas as pd from singlet.config import config # Parser def parse_dataset( path, obsm_keys=None, ): import anndata ...
iosonofabio/singlet
singlet/io/h5ad/__init__.py
Python
mit
1,069
0
# =========================================================================== # # Library: PyCTK # Filename: test_axeswidget.py # # Copyright (c) 2015 Lamond Lab # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ...
lamondlab/pyctk
tests/test_axeswidget.py
Python
apache-2.0
1,326
0.008296
from typing import Any, Dict, List, Optional, Set from annotypes import add_call_types, stringify_error from cothread import cothread from p4p import Value from p4p.server import DynamicProvider, Server, ServerOperation from p4p.server.cothread import Handler, SharedPV from malcolm.core import ( APublished, B...
dls-controls/pymalcolm
malcolm/modules/pva/controllers/pvaservercomms.py
Python
apache-2.0
14,734
0.000882
# Copyright 2015 Rackspace # # 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 t...
gotostack/neutron-lbaas
neutron_lbaas/tests/tempest/v2/api/base.py
Python
apache-2.0
14,152
0.000071
DATASET_DIR = '/tmp' BRAIN_DIR = '/tmp' GENRES = [ 'blues', 'classical', 'country', 'disco', 'hiphop', 'jazz', 'metal', 'pop', 'reggae', 'rock' ] NUM_BEATS = 10 KEEP_FRAMES = 0 TRAIN_TEST_RATIO = [7, 3] MODE = 'nn' PCA = False FEATURES = ['mfcc', 'dwt', 'beat'] MFCC_EXTRA = ['delta', 'ddelta', 'energy'...
kapilgarg1996/gmc
gmc/conf/global_settings.py
Python
mit
1,053
0.021842
#!/usr/bin/python # # Copyright 2014 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/licenses/LICENSE-2.0 # # Unless required b...
jdilallo/jdilallo-test
examples/adwords/v201309/campaign_management/get_all_disapproved_ads_with_awql.py
Python
apache-2.0
1,927
0.008822
from __future__ import print_function import pickle, os, sys, glob, hashlib from sklearn.ensemble import RandomForestClassifier import pandas as pd test_files = set(pd.read_csv('./data/sampleSubmission_v2.csv').file.values) train = pd.read_csv('./data/train_v2.csv') df_full = pickle.load(open( "df_full.p", "rb")) ...
carlsonp/kaggle-TrulyNative
scikit_generate_prediction2.py
Python
gpl-3.0
1,784
0.01065
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.textfont" _valid_props = {"color", "family", "si...
plotly/python-api
packages/python/plotly/plotly/graph_objs/scattermapbox/_textfont.py
Python
mit
8,586
0.000582
from typing import NamedTuple, List from data import crossword class Clue(str): def __init__(self, value) -> None: super(Clue, self).__init__(value) self._tokens = crossword.tokenize_clue(value) class _Node(object): _clue: Clue _occupied: int def __init__(self, clue: Clue, occupied: int) -> None: ...
PhilHarnish/forge
src/puzzle/problems/crossword/_cryptic_nodes.py
Python
mit
437
0.011442
import logging from gettext import gettext as _ from .l_connector import ConnectorBase from .l_net import ModuleStrategyBase from .main import OptionsWIFI logger = logging.getLogger(__name__) # noinspection PyAbstractClass class Connector(ConnectorBase): opti_: OptionsWIFI class Module(ModuleStrategyBase): ...
AnTAVR/aai2
src/modules/net/m_wifi.py
Python
gpl-2.0
517
0
from django.shortcuts import render from services.genomics_test_generator.fhir_genomics_test_gene import * from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext, loader import json from home.task_runner import perform_t...
ideaworld/FHIR_Tester
FHIR_Tester_backend/home/views.py
Python
mit
7,138
0.008826
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. 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 ...
apporc/cinder
cinder/volume/drivers/zfssa/zfssaiscsi.py
Python
apache-2.0
45,567
0.000044
#!/usr/bin/env python # 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 distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import buildconfig from mozbuild.preprocessor import preprocess # By default, the pre-processor...
Yukarumya/Yukarum-Redfoxes
browser/themes/preprocess-tab-svgs.py
Python
mpl-2.0
1,392
0.002874
# Licensed under GPL version 3 - see LICENSE.rst import numpy as np from astropy.io import ascii from .base import FlatOpticalElement, FlatStack from ..math.utils import norm_vector, e2h, h2e class FlatBrewsterMirror(FlatOpticalElement): '''Flat mirror operated at the Brewster angle. Calculation of the Fres...
hamogu/marxs
marxs/optics/multiLayerMirror.py
Python
gpl-3.0
7,308
0.004379
""" Bulk-deletable cache objects. """ __author__ = "Individual contributors (see AUTHORS file)" __date__ = "$DATE$" __rev__ = "$REV$" __license__ = "AGPL v.3" __copyright__ = """ This file is part of ArgCache. Copyright (c) 2015 by the individual contributors (see AUTHORS file) This program is free s...
luac/django-argcache
src/argcache.py
Python
agpl-3.0
22,405
0.00308
#!/usr/bin/env python """ Download NLTK data """ __author__ = "Manan Kalra" __email__ = "manankalr29@gmail.com" import nltk nltk.download()
manankalra/Twitter-Sentiment-Analysis
demo/download.py
Python
mit
145
0.006897
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_import_data.ui' # # Created: Thu Nov 13 16:30:03 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fro...
olivierdalang/stdm
ui/ui_import_data.py
Python
gpl-2.0
14,198
0.002043
############################################################################# ## ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this f...
duythanhphan/qt-creator
tests/system/suite_HELP/tst_HELP06/test.py
Python
lgpl-2.1
8,439
0.009835
import numpy as np def rainbow(n): """ Returns a list of colors sampled at equal intervals over the spectrum. Parameters ---------- n : int The number of colors to return Returns ------- R : (n,3) array An of rows of RGB color values Notes ----- Converts f...
hlin117/statsmodels
statsmodels/graphics/plottools.py
Python
bsd-3-clause
634
0.009464
import time from copy import copy import numpy as np from gridworld import Gridworld, Position from utilities.utils import argmax_random_tie # START rows = 7 cols = 10 world = Gridworld(rows, cols) moveset = [ # Position(1, 1), # Position(1, -1), # Position(-1, -1), # Position(-1, 1), Position(1,...
peheje/baselines
toy_examples/windy_gridworld/q_learning.py
Python
mit
1,351
0.00148
"""Tests for greeneye_monitor sensors.""" from unittest.mock import AsyncMock, MagicMock from homeassistant.components.greeneye_monitor.sensor import ( DATA_PULSES, DATA_WATT_SECONDS, ) from homeassistant.const import STATE_UNKNOWN from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_...
jawilson/home-assistant
tests/components/greeneye_monitor/test_sensor.py
Python
apache-2.0
7,421
0.00283
def extractFaelicyTumblrCom(item): ''' Parser for 'faelicy.tumblr.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('the scum villain\'s self saving system', 'the scum villain\'s self sa...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractFaelicyTumblrCom.py
Python
bsd-3-clause
674
0.02819
import os from conans.client.file_copier import FileCopier, report_copied_files from conans.model.manifest import FileTreeManifest from conans.paths import CONANINFO from conans.util.files import mkdir, save def export_pkg(conanfile, package_id, src_package_folder, hook_manager, conanfile_path, ref): # NOTE: Th...
conan-io/conan
conans/client/packager.py
Python
mit
1,979
0.002527
# coding: utf-8 #import pygame from Tkinter import * import ttk import time from PIL import ImageTk,Image from functools import partial import os import tkMessageBox from urllib2 import * from threading import Thread import urllib as u from window import * #############################################################...
notesoftware/notestudio
main.py
Python
gpl-2.0
8,246
0.02877
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('customers', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='address', name='re...
davogler/POSTv3
customers/migrations/0002_auto_20150405_1041.py
Python
mit
1,800
0.002778
# ENH quadpy-optimize import pathlib from ...helpers import article from .._helpers import _read, register _source = article( authors=["KyoungJoong Kim", "ManSuk Song"], title="Symmetric quadrature formulas over a unit disk", journal="Korean J. Comp. & Appl. Math.", year="1997", volume="4", pa...
nschloe/quadpy
src/quadpy/s2/_kim_song/__init__.py
Python
mit
1,946
0
""" download a file named filename from the atsc301 downloads directory and save it as a local file with the same name. command line example:: python -m a301utils.a301_readfile photon_data.csv module example:: from a301utils.a301_readfile import download download('photon_data.csv') """ import a...
a301-teaching/a301_code
a301utils/a301_readfile.py
Python
mit
2,239
0.011166
""" Sensors of a KNX Device. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/knx/ """ from enum import Enum import logging import voluptuous as vol from homeassistant.const import ( CONF_NAME, CONF_MAXIMUM, CONF_MINIMUM, CONF_TYPE, TEMP_CELSIUS ...
MungoRae/home-assistant
homeassistant/components/sensor/knx.py
Python
apache-2.0
5,476
0
import subprocess as sp import os import stat import shutil import tempfile import pwd import time import json import yaml _NORMUSER = 'normuser' _RUNNER_LOG_FILE_FOR_ROOT = '/root/.jobber-log' _RUNNER_LOG_FILE_FOR_NORMUSER = '/home/{0}/.jobber-log'.\ format(_NORMUSER) _CONFIG_PATH = '/etc/jobber.conf' _OLD_CONFIG...
dshearer/jobber
platform_tests/keywords/testlib.py
Python
mit
27,023
0.001887
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import importlib import inspect import json import logging import os import sys import types from azure.common.credentials import BasicTokenAuthentication from azure.core.credentials import AccessToken from azure.identity import (AzureCliC...
alfredgamulo/cloud-custodian
tools/c7n_azure/c7n_azure/session.py
Python
apache-2.0
14,857
0.001952
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Martz <matt@sivel.net> # # This file is part of Ansible # # Ansible 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, ...
grimmjow8/ansible
lib/ansible/modules/commands/expect.py
Python
gpl-3.0
7,744
0.000646
__all__ = ['Kane'] from sympy import Symbol, zeros, Matrix, diff, solve_linear_system_LU, eye from sympy.utilities import default_sort_key from sympy.physics.mechanics.essential import ReferenceFrame, dynamicsymbols from sympy.physics.mechanics.particle import Particle from sympy.physics.mechanics.point import Point f...
ichuang/sympy
sympy/physics/mechanics/kane.py
Python
bsd-3-clause
37,447
0.001762
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
js0701/chromium-crosswalk
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
Python
bsd-3-clause
27,322
0.003221
from Tools.HardwareInfo import HardwareInfo from Tools.BoundFunction import boundFunction from config import config, ConfigSubsection, ConfigSelection, ConfigFloat, \ ConfigSatlist, ConfigYesNo, ConfigInteger, ConfigSubList, ConfigNothing, \ ConfigSubDict, ConfigOnOff, ConfigDateTime from enigma import eDVBSatellit...
pli3/enigma2-git
lib/python/Components/NimManager.py
Python
gpl-2.0
63,253
0.034623
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 License, or (at your option) any later version. # # This program is distrib...
AndrewPeelMV/Blender2.78c
2.78/scripts/startup/bl_ui/space_userpref.py
Python
gpl-2.0
50,089
0.001437
import httpbenchmark from unuk.benchmarks.base import runtests
pombredanne/unuk
src/unuk/benchmarks/__init__.py
Python
bsd-3-clause
63
0
__author__ = 'gloryofrobots' from arza.compile.code.opcode import * from arza.compile.parse import parser from arza.compile import simplify from arza.compile.parse import nodes from arza.compile.parse.basic import IMPORT_NODES from arza.compile.parse.nodes import (node_type, imported_name_to_s, ...
gloryofrobots/obin
arza/compile/compiler.py
Python
gpl-2.0
43,248
0.000694
# -*- coding: utf-8 -*- ################################################################### # This widget will display the next appointment on your calendar in # the qtile status bar. Appointments within the "reminder" time will be # highlighted. Authentication credentials are stored on disk. # # This widget uses the k...
de-vri-es/qtile
libqtile/widget/khal_calendar.py
Python
mit
5,419
0.000554
from unittest import mock from bgmi.downloader.aria2_rpc import Aria2DownloadRPC _token = "token:2333" @mock.patch("bgmi.config.ARIA2_RPC_URL", "https://uuu") @mock.patch("bgmi.config.ARIA2_RPC_TOKEN", "token:t") def test_use_config(): with mock.patch("xmlrpc.client.ServerProxy") as m1: m1.return_value....
BGmi/BGmi
tests/downloader/test_aria2.py
Python
mit
609
0
# -*- coding: iso-8859-1 -*- """ MoinMoin - Text CAPTCHAs This is just asking some (admin configured) questions and checking if the answer is as expected. It is up to the wiki admin to setup questions that a bot can not easily answer, but humans can. It is recommended to setup SITE SPECIFIC ...
Glottotopia/aagd
moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/security/textcha.py
Python
mit
8,873
0.003043
# sqlalchemy/__init__.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from . import util as _util # noqa from .inspection import inspect # noqa f...
skarra/PRS
libs/sqlalchemy/__init__.py
Python
agpl-3.0
4,621
0
from django.contrib import admin # Register your models here. from .models import Engine admin.site.register(Engine)
electblake/python-lipsumation
lipsumation/engines/admin.py
Python
mit
119
0.008403
from __future__ import absolute_import import itertools from django.contrib import messages from django.core.context_processors import csrf from django.db import transaction from django.http import HttpResponseRedirect from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf...
alexm92/sentry
src/sentry/web/frontend/account_notification.py
Python
bsd-3-clause
3,360
0.001488
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingMedian'] , ['Seasonal_Minute'] , ['LSTM'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingMedian_Seasonal_Minute_LSTM.py
Python
bsd-3-clause
161
0.049689
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2021 Satpy developers # # This file is part of satpy. # # satpy 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 Licens...
pytroll/satpy
satpy/tests/reader_tests/test_avhrr_l0_hrpt.py
Python
gpl-3.0
8,951
0.001452
from __future__ import with_statement import os from setuptools import setup # Do not update the version manually - it is managed by `bumpversion`. version = '2.0.1rc' setup( name='pydocstyle', version=version, description="Python docstring style checker", long_description=open('README.rst').read(), ...
Nurdok/pep257
setup.py
Python
mit
1,105
0
from funtests import transport class test_redis(transport.TransportCase): transport = "redis" prefix = "redis" def after_connect(self, connection): client = connection.channel().client client.info() def test_cant_connect_raises_connection_error(self): conn = self.get_connecti...
mzdaniel/oh-mainline
vendor/packages/kombu/funtests/tests/test_redis.py
Python
agpl-3.0
399
0
from copy import deepcopy, copy from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.contrib.contenttypes.admin import GenericTabularInline, GenericStackedInline from django.forms import ModelForm, NumberInput from django.db import models class SortableModelAdminBase(obj...
82Flex/DCRM
suit/sortables.py
Python
agpl-3.0
6,638
0.000452
# Copyright 2017 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...
tensorflow/tensorflow
tensorflow/python/pywrap_dlopen_global_flags.py
Python
apache-2.0
1,919
0.003127
from cyclone.web import asynchronous from sockjs.cyclone import proto from sockjs.cyclone.transports import streamingbase # HTMLFILE template HTMLFILE_HEAD = r''' <!doctype html> <html><head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8...
flaviogrossi/sockjs-cyclone
sockjs/cyclone/transports/htmlfile.py
Python
mit
2,041
0
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA =...
alxgu/ansible
lib/ansible/modules/database/postgresql/postgresql_membership.py
Python
gpl-3.0
12,662
0.002369
import os from setuptools import setup from setuptools import find_packages version_file = 'VERSION.txt' version = open(version_file).read().strip() description_file = 'README.txt' description = open(description_file).read().split('\n\n')[0].strip() description = description.replace('\n', ' ') long_description_file =...
pombreda/ximenez
setup.py
Python
gpl-3.0
1,457
0
import os from twisted.trial import unittest from scrapy.contrib.djangoitem import DjangoItem, Field from scrapy import optional_features os.environ['DJANGO_SETTINGS_MODULE'] = 'scrapy.tests.test_djangoitem.settings' if 'django' in optional_features: from .models import Person, IdentifiedPerson class BasePe...
rahul-c1/scrapy
scrapy/tests/test_djangoitem/__init__.py
Python
bsd-3-clause
2,978
0
""" Module for the Colorado Alliance of Research Libraries Metadata 2013 Presentation Copyright (C) 2013 Jeremy Nelson 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 Licens...
jermnelson/metadata-day-2013
web.py
Python
gpl-2.0
3,972
0.004532
import numpy as np from esdl.cube_provider import CubeSourceProvider from esdl.cube_config import CubeConfig class TestCubeSourceProvider(CubeSourceProvider): """ CubeSourceProvider implementation used for testing cube generation without any source files. The following usage generates a cube with two var...
CAB-LAB/cablab-core
esdl/providers/test_provider.py
Python
gpl-3.0
1,856
0.003233
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
google/dynamic-video-depth
loggers/html_template.py
Python
apache-2.0
2,786
0.001436
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '#zw#k0g76&a!ulj820of0+i#y(-y4%)sed3k-3q9mw8kzn7)jf' DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contentty...
MattBlack85/django-gruyere
gruyere/settings.py
Python
mit
1,620
0
#! /usr/bin/python # -*- coding: utf8 -*- import tensorflow as tf import os from sys import platform as _platform import collections import random import numpy as np import warnings from six.moves import xrange from tensorflow.python.platform import gfile import re ## Iteration functions def generate_skip_gram_bat...
arcyfelix/ML-DL-AI
Supervised Learning/GANs/dcgan-tensorflayer/tensorlayer/nlp.py
Python
apache-2.0
32,641
0.00432
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-usuario', version='0.4', ...
dyachan/django-usuario
setup.py
Python
mit
1,204
0.001661
from djangothis.app import read_yaml, read_yaml_file, watchfile
amitu/djangothis
djangothis/__init__.py
Python
bsd-3-clause
64
0
#!/usr/bin/env python from pythran import tables TITLE = "Supported Modules and Functions" DEPTHS = '=*-+:~#.^"`' print(DEPTHS[0]*len(TITLE)) print(TITLE) print(DEPTHS[0]*len(TITLE)) print("") def format_name(name): if name.endswith('_') and not name.startswith('_'): name = name[:-1] return name ...
pombredanne/pythran
website/support.py
Python
bsd-3-clause
1,151
0
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-02 21:54 from __future__ import unicode_literals from decimal import Decimal from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('round', '0013_plot_batch'), ] operations = [ mi...
adminq80/Interactive_estimation
game/round/migrations/0014_auto_20161102_2154.py
Python
mit
509
0.001965
from django.test.testcases import TestCase from django.utils import timezone from edc_visit_schedule.site_visit_schedules import site_visit_schedules from edc_visit_tracking.constants import SCHEDULED from ba_namotswe.models import Appointment, SubjectVisit, RequisitionMetadata, CrfMetadata, SubjectConsent, Registere...
botswana-harvard/ba-namotswe
ba_namotswe/tests/test_enrollment_model.py
Python
gpl-3.0
3,230
0.002786
"""nushellx_lpt/metafitter_abs.py Function definitions for an abstract *.lpt metafitter """ from __future__ import print_function, division, unicode_literals import numpy as np from deprecated.int.metafitter_abs import single_particle_metafit_int from constants import DPATH_SHELL_RESULTS, DPATH_PLOTS from deprecated....
dilynfullerton/tr-A_dependence_plots
src/deprecated/nushellx_lpt/metafitter_abs.py
Python
cc0-1.0
4,879
0
#! /usr/bin/env python # -*- coding: utf-8 -*- from subprocess import Popen, PIPE from cmdb.models import Host, HostGroup from django.shortcuts import render from django.http import HttpResponse import os from config.views import get_dir from django.contrib.auth.decorators import login_required from accounts.permissio...
cindywang0728/adminset
setup/ansible.py
Python
apache-2.0
8,413
0.000713
#!/usr/bin/env python # coding: utf-8 from .src import * def plugin_loaded(): distractionless.plugin_loaded(reload=False) def plugin_unloaded(): distractionless.plugin_unloaded()
jrappen/sublime-distractionless
main.py
Python
isc
195
0
#!/usr/bin/python """Test of radio buttons in Java's SwingSet2.""" from macaroon.playback import * import utils sequence = MacroSequence() ########################################################################## # We wait for the demo to come up and for focus to be on the toggle button # #sequence.append(WaitForW...
pvagner/orca
test/keystrokes/java/role_radio_button.py
Python
lgpl-2.1
16,318
0.003003
#****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the...
grlee77/scipy
scipy/linalg/tests/test_interpolative.py
Python
bsd-3-clause
8,973
0.000223
import os from datetime import timedelta BROKER_URL = os.environ['CELERY_BROKER_URL'] CELERY_IMPORTS = ('app.cabotapp.tasks', ) CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler" CELERY_TASK_SERIALIZER = "json" CELERY_ACCEPT_CONTENT = ['json', 'msgpack', 'yaml'] CELERYBEAT_SCHEDULE = { 'run-all-checks...
JensRantil/cabot
app/celeryconfig.py
Python
mit
703
0
import unittest import mock import SMBSR import xs_errors import XenAPI import vhdutil import util import errno class FakeSMBSR(SMBSR.SMBSR): uuid = None sr_ref = None mountpoint = None linkpath = None path = None session = None remoteserver = None def __init__(self, srcmd, none): ...
germanop/sm
tests/test_SMBSR.py
Python
lgpl-2.1
3,181
0.006602
# -*- 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 the...
xrg/openerp-server
bin/tools/amount_to_text.py
Python
agpl-3.0
7,774
0.012223
# -*- coding:utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.utils.text import slugify from django.contrib.auth.models import User ROOM_TYPE = ( (1, u'Privado'), (2, u'Grupo'), ) class Room(models.Model): name = models.TextField(...
nicolaszein/chat
chat/models.py
Python
bsd-3-clause
2,028
0.00642
""" Import all modules and packages in the serverFeatures package ['account', 'connection', 'interface', 'package', 'process'] """ from pycaf.architecture.devices.server import Server from pycaf.architecture.devices.lists.serverList import ServerList from pycaf.architecture.devices.server_windows import ServerWindows...
maximeolivier/pyCAF
pycaf/architecture/devices/__init__.py
Python
gpl-3.0
378
0
#!/usr/bin/python # -*- coding: utf-8 -*- from multiplexer.clients import connect_client from obci.control.peer.peer_control import PeerControl, ConfigNotReadyError import obci.control.common.config_message as cmsg from obci.utils.openbci_logging import get_logger, log_crash import sys class ConfiguredClient(object)...
BrainTech/openbci
obci/control/peer/configured_client.py
Python
gpl-3.0
3,186
0.003766
# -*- coding: utf-8 -*- # scrapy_web # Copyright (C) 2016-2017 Matteo.Redaelli@gmail.com> # # 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 # ...
matteoredaelli/scrapy_tyres
scrapy_tyres/spiders/auto-doc_it.py
Python
gpl-3.0
4,693
0.012785
# mammon - utility/third-party stuff, each thing has it's own header and provenance # information. # CaseInsensitiveDict from requests. # # Copyright 2015 Kenneth Reitz # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
nasonfish/mammon
mammon/utility.py
Python
isc
7,875
0.002159
""" To create an Attribute Editor template using python, do the following: 1. create a subclass of `uitypes.AETemplate` 2. set its ``_nodeType`` class attribute to the name of the desired node type, or name the class using the convention ``AE<nodeType>Template`` 3. import the module AETemplates which do not meet o...
yaoyansi/mymagicbox
common/mymagicbox/AETemplateBase.py
Python
mit
2,176
0.011029
#!/usr/bin/env python3 # Biligrab-Danmaku2ASS # # Author: Beining@ACICFG https://github.com/cnbeining # Author: StarBrilliant https://github.com/m13253 # # Biligrab is licensed under MIT licence # Permission has been granted for the use of Danmaku2ASS in Biligrab # # Copyright (c) 2014 # # Permission is hereby granted...
doublehou/BiliDan
bilidan.py
Python
mit
23,014
0.003825
#!/usr/bin/env python # coding=UTF-8 __author__ = "Pierre-Yves Langlois" __copyright__ = "https://github.com/pylanglois/uwsa/blob/master/LICENCE" __credits__ = ["Pierre-Yves Langlois"] __license__ = "BSD" __maintainer__ = "Pierre-Yves Langlois" from uwsas.common import * from uwsas.commands.abstract_command import A...
pylanglois/uwsa
uwsas/commands/command_manager.py
Python
bsd-3-clause
619
0.004847
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para nolomires.com by Bandavi # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import o...
superberny70/plugin.video.pelisalacarta-3-9X
pelisalacarta/channels/nolomires.py
Python
gpl-3.0
24,186
0.027578
"""""" from __future__ import annotations from typing import TYPE_CHECKING, Any, Callable, Dict if TYPE_CHECKING: from .extension import Admin class AdminPanel: """Base classe for admin panels. Currently this class does nothing. It may be useful in the future either as just a marker interface (for ...
abilian/abilian-core
src/abilian/web/admin/panel.py
Python
lgpl-2.1
1,333
0.0015
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
shlomif/PySolFC
pysollib/games/klondike.py
Python
gpl-3.0
55,884
0
# 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...
cmouse/buildbot
master/buildbot/steps/source/svn.py
Python
gpl-2.0
17,366
0.000921
# Copyright 2017 IBM Corp. from zvmconnector import connector import os import time print("Setup client: client=connector.ZVMConnector('9.60.18.170', 8080)\n") client=connector.ZVMConnector('9.60.18.170', 8080) print("Test: send_request('vswitch_get_list')") list = client.send_request('vswitch_get_list') print("Resu...
mfcloud/python-zvm-sdk
sample/vlan/createvm_vlan_v1s2.py
Python
apache-2.0
4,094
0.005374
#!/usr/bin/env python2.7 import cgi import json import os import re import SimpleHTTPServer import SocketServer import subprocess import sys import threading VERSION = 'v0.14.6' hostname = '' try: command = "bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || wget -q -O - icanhazip.com'" hostname = s...
alexquick/dokku
contrib/dokku-installer.py
Python
mit
13,390
0.002315
# 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 distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import unicode_literals import os import unittest from shutil import rmtree from tempfile import ( ...
cstipkovic/spidermonkey-research
python/mozbuild/mozbuild/test/test_mozconfig.py
Python
mpl-2.0
17,780
0.000675
# Copyright 2019 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...
karllessard/tensorflow
tensorflow/tools/ci_build/linux/mkl/set-build-env.py
Python
apache-2.0
12,236
0.007682
#!/usr/bin/env python ''' Copyright (C) 2005 Aaron Spike, aaron@ekips.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 License, or (at your option) any later version. Thi...
step21/inkscape-osx-packaging-native
packaging/macosx/Inkscape.app/Contents/Resources/extensions/radiusrand.py
Python
lgpl-2.1
3,583
0.014792
# Problem name: 12148 Electricity # Problem url: https://uva.onlinejudge.org/external/121/12148.pdf # Author: Andrey Yemelyanov import sys import math import datetime def readline(): return sys.stdin.readline().strip() def main(): while True: n_readings = int(readline()) if n_readings == 0: ...
andrey-yemelyanov/competitive-programming
cp-book/ch1/adhoc/time/12148_Electricity.py
Python
mit
1,212
0.005776
import os import sys from django.core.management import setup_environ thisdir = os.path.dirname(os.path.abspath(__file__)) appdir = os.path.realpath(os.path.join(thisdir, '..', '..', '..', 'lot')) sys.path.append(appdir) import settings setup_environ(settings) ############################## import pandas as pd from dj...
Ecotrust/forestplanner
idb_import/treelive_summary/unpivoted/local_util_test_dbh_flexibility.py
Python
bsd-3-clause
3,275
0.00855
# Copyright 2011 OpenStack Foundation # 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 requ...
silenceli/nova
nova/api/openstack/compute/limits.py
Python
apache-2.0
15,344
0.000065
from celery.exceptions import Ignore from django.urls import reverse from oioioi.base.tests import TestCase from oioioi.contests.models import Contest, ProblemInstance, Submission from oioioi.evalmgr.tasks import create_environ from oioioi.programs.controllers import ProgrammingContestController from oioioi.suspendjud...
sio2project/oioioi
oioioi/suspendjudge/tests.py
Python
gpl-3.0
3,682
0.000543
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
vlegoff/tsunami
src/secondaires/navigation/equipage/ordres/lever_ancre.py
Python
bsd-3-clause
2,720
0.000369
# coding=utf-8 # Copyright 2019 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...
googleinterns/lasertagger
tagging_converter_test.py
Python
apache-2.0
4,946
0.002431
# coding: utf-8 # Copyright 2017 CERN. This software is distributed under the # terms of the GNU General Public Licence version 3 (GPL Version 3), # copied verbatim in the file LICENCE.md. # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergo...
blond-admin/BLonD
unittests/beams/test_beam_object.py
Python
gpl-3.0
14,105
0.001347