code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#!/usr/bin/env python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # sinkelement.py # (c) 2005 Edward Hervey <edward@fluendo.com> # Licensed under LGPL # # Small test application to show how to write a sink element # in 20 lines in python # # Run this script with GST_DEBUG=python:5 to see the debug # messages fr...
thammi/ledwallfoo
gstvideo.py
Python
gpl-3.0
16,522
#!/usr/bin/env python # SABnzbd post-processing script to rename files based on info found in rename.sh-like scripts # based on https://github.com/clinton-hall/GetScripts/blob/master/SafeRename.py import os import sys import re import shlex # because we need ignoring spaces within quotes def rename_script(dirname): ...
sanderjo/SAB-SafeRename
SAB-SafeRename.py
Python
gpl-2.0
1,858
#!/usr/bin/env python ############################################################ # ConfigScanner - A buildbot config scanner and updater # # Also does ReviewBoard (and at some point Bugzilla?) # # Built for Python 3, works with 2.7 with a few tweaks # #####################################################...
sebbASF/infrastructure-puppet
modules/buildbot_asf/files/configscanner.py
Python
apache-2.0
10,952
from __future__ import absolute_import import io import json import logging import os import re import socket import sys import time from django.core.servers.basehttp import WSGIServer from django.test import LiveServerTestCase from django.test.testcases import QuietWSGIRequestHandler from django.utils import six imp...
safarijv/sbo-selenium
sbo_selenium/testcase.py
Python
bsd-2-clause
27,455
# RSVP layer # This file is part of Scapy # Scapy 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 # any later version. # # Scapy is distributed in the hope that it will be ...
smainand/scapy
scapy/contrib/rsvp.py
Python
gpl-2.0
7,317
input = """ a(S,T,Z) :- #count{X: r(T,X)} = Z, #count{W: q(W,S)} = T, #count{K: p(K,Y)} = S. q(1,1). q(2,2). r(1,1). r(1,2). r(1,3). r(2,2). r(3,3). p(1,1). p(2,2). %out{ a(2,1,3) } %repository error """ output = """ a(S,T,Z) :- #count{X: r(T,X)} = Z, #count{W: q(W,S)} = T, #count{K: p(K,Y)} = S. q(1,1). q(2,2)...
veltri/DLV2
tests/parser/aggregates.count.assignment.17.test.py
Python
apache-2.0
421
""" Django settings for cache_stampede project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ im...
eflglobal/cache-stampede-protection
cache_stampede/settings.py
Python
mit
3,134
import sys,os import time import serial timing_map = {"720x480i@59.94Hz" : "480i29", "720x480i@60.00Hz" : "480i30", "720x480i@120.00Hz" : "480i60", "720x480p@59.94Hz" : "480p59", "720x480p@60.00Hz" : "480p60", "...
264768502/QD780_Control
QD780.py
Python
apache-2.0
14,721
""" PostGIS to GDAL conversion constant definitions """ # Lookup to convert pixel type values from GDAL to PostGIS GDAL_TO_POSTGIS = [None, 4, 6, 5, 8, 7, 10, 11, None, None, None, None] # Lookup to convert pixel type values from PostGIS to GDAL POSTGIS_TO_GDAL = [1, 1, 1, 3, 1, 3, 2, 5, 4, None, 6, 7, None, No...
yephper/django
django/contrib/gis/db/backends/postgis/const.py
Python
bsd-3-clause
1,527
import sys sys.path.insert(1, "../../") import h2o, tests def pubdev_2041(): iris = h2o.import_file(h2o.locate("smalldata/iris/iris.csv")) s = iris.runif(seed=12345) train1 = iris[s >= 0.5] train2 = iris[s < 0.5] m1 = h2o.deeplearning(x=train1[0:4], y=train1[4], epochs=100) # update m1 wit...
brightchen/h2o-3
h2o-py/tests/testdir_jira/pyunit_pubdev_2041.py
Python
apache-2.0
494
import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm from quantecon import LSS phi_1, phi_2, phi_3, phi_4 = 0.5, -0.2, 0, 0.5 sigma = 0.1 A = [[phi_1, phi_2, phi_3, phi_4], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]] C = [sigma, 0, 0, 0] G =...
chenxulong/quanteco
examples/tsh_hg.py
Python
bsd-3-clause
848
#! /usr/bin/env python # Copyright (C) 2012 Club Capra - capra.etsmtl.ca # # This file is part of CapraVision. # # CapraVision 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 versio...
clubcapra/Ibex
src/seagoatvision_ros/scripts/CapraVision/server/filters/implementation/undistort.py
Python
gpl-3.0
1,975
""" Various complex queries that have been problematic in the past. """ from django.db import models from django.db.models.functions import Now class DumbCategory(models.Model): pass class ProxyCategory(DumbCategory): class Meta: proxy = True class NamedCategory(DumbCategory): name = models.Ch...
theo-l/django
tests/queries/models.py
Python
bsd-3-clause
18,063
# coding: utf-8 """ An API to insert and retrieve metadata on cloud artifacts. No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1alpha1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ ...
grafeas/client-python
grafeas/models/api_alias_context_kind.py
Python
apache-2.0
2,669
"""Support to interface with the Plex API.""" from functools import wraps import json import logging import plexapi.exceptions import requests.exceptions from homeassistant.components.media_player import DOMAIN as MP_DOMAIN, MediaPlayerEntity from homeassistant.components.media_player.const import ( MEDIA_TYPE_MU...
kennedyshead/home-assistant
homeassistant/components/plex/media_player.py
Python
apache-2.0
19,439
# -*- coding: iso-8859-1 -*- from random import random, randint as _randint from os.path import split, realpath, abspath import sys from wxgeometrie.param import tolerance as EPSILON _module_path = split(realpath(sys._getframe().f_code.co_filename))[0] ROOTDIR = abspath(_module_path + '/..') # /.../nom_du_projet/ WX...
wxgeo/geophar
tools/testlib.py
Python
gpl-2.0
2,254
import bcrypt def hash_password(password): default_rounds = 14 bcrypt_salt = bcrypt.gensalt(default_rounds) hashed_password = bcrypt.hashpw(password, bcrypt_salt) return hashed_password def check_password(password, hashed): return bcrypt.checkpw(password, hashed)
fdemian/Morpheus
api/Crypto.py
Python
bsd-2-clause
288
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, publ...
sidzan/netforce
netforce_general/netforce_general/controllers/listen.py
Python
mit
3,954
# -*- 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 field 'Customer.telephone_clean' db.add_column(u'frontend_custom...
the0forge/sp
frontend/migrations/0033_auto__add_field_customer_telephone_clean.py
Python
gpl-3.0
21,819
''' This will store any menus all inherited from a prototype with two functions update and execute. Update will change display based on cursor position, while execute will process button clicks. ''' import pygame, ai from pygame.locals import * from scrabble import DISPLAYSURF, CLICK class Menu(): def __init__(sel...
grokcore/dev.lexycross
wordsmithed/menu.py
Python
mit
7,437
def fannkuch(n): maxFlipsCount = 0 permSign = True checksum = 0 perm1 = list(range(n)) count = perm1[:] rxrange = range(2, n - 1) nm = n - 1 while 1: k = perm1[0] # print k if k: perm = perm1[:] flipsCount = 1 kk = perm[k] ...
rjpower/falcon
benchmarks/fannkuch.py
Python
apache-2.0
1,455
# -*- coding: utf-8 -*- from .context import null import unittest import tempfile class FileTestSuite(unittest.TestCase): """Basic test cases.""" def setUp(self): # Create a temporary file and File object self.test_file = tempfile.NamedTemporaryFile(suffix='.zip') self.file = null.F...
SilverStrange/Null-File-Detector
tests/test_file.py
Python
mit
1,055
from collections import defaultdict import numpy as np def matML_dot(state, taxa, ll_mats): LL_mat = defaultdict() root = state["root"] p_t = state["transitionMat"] pi = state["pi"] edges = state["postorder"] for parent, child in edges[::-1]: if child in taxa: if paren...
PhyloStar/PyBayes
ML.py
Python
gpl-2.0
3,629
import matplotlib.pyplot as plt import numpy as np import pandas as pd from copy import deepcopy from geom import geom from pandas.lib import Timestamp class geom_bar(geom): VALID_AES = ['x', 'color', 'alpha', 'fill', 'label', 'weight'] def plot_layer(self, layer): layer = {k: v for k, v in layer.ite...
hadley/ggplot
ggplot/geoms/geom_bar.py
Python
bsd-2-clause
1,566
#!/usr/bin/env vpython3 # Copyright 2015 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. """Utility for reading / writing command-line flag files on device(s).""" from __future__ import print_function import argparse imp...
ric2b/Vivaldi-browser
chromium/build/android/adb_command_line.py
Python
bsd-3-clause
3,358
from ability import Ability,AbilityException class MediaCenter(object): """ Media Center for controling mplayer Linux only Attributes: _player - Player instance """ def __init__(self): import lowlevel if lowlevel.is_linux(): try: ...
0x1001/jarvis
jarvis/abilities/a_mediacenter.py
Python
gpl-2.0
2,456
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
Cisco-Talos/pyrebox
volatility/volatility/plugins/linux/getcwd.py
Python
gpl-2.0
1,396
"""Test for vumi.transport.infobip.infobip.""" import json from twisted.internet.defer import inlineCallbacks, returnValue from vumi.tests.helpers import VumiTestCase from vumi.utils import http_request from vumi.transports.infobip.infobip import InfobipTransport, InfobipError from vumi.message import TransportUserM...
TouK/vumi
vumi/transports/infobip/tests/test_infobip.py
Python
bsd-3-clause
11,097
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
ghislainp/iris
docs/iris/example_tests/test_lineplot_with_legend.py
Python
gpl-3.0
1,371
# ##### BEGIN MIT LICENSE BLOCK ##### # # Copyright (c) 2015 - 2021 Pixar # # 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 u...
adminradio/RenderManForBlender
rman_presets/__init__.py
Python
mit
1,417
""" Tree based methods of learning (classification and regression) """ import abc import numpy as np import networkx as nx from scipy.stats import mode class BaseTree(object): """ Base Tree for classification/regression. Written for single variable/value binary split critereon. Many methods needs to be ...
christopherjenness/ML-lib
ML/treemethods.py
Python
mit
31,697
# ============================================================================== # zero.py # ============================================================================== import os import sys ERROR = False def main(function): try: arguments = sys.argv[1:] assert arguments for path in arg...
ActiveState/code
recipes/Python/578205_Zero_Batch_Programs/recipe-578205.py
Python
mit
5,050
# # 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 "License"); you may not us...
tgroh/incubator-beam
sdks/python/apache_beam/runners/worker/statesampler.py
Python
apache-2.0
3,815
d = {'a': 1, 'b': 2, 'c': 3} d['d'] = d['a'] + d['b'] print(d['d'])
skariel/pythonium
tests/dict-manipulation.py
Python
lgpl-2.1
68
#! /usr/bin/env python import random class Node(object): def __init__(self, data, left=None, right=None, parent=None): """Creates a node for the Bst class""" self.data = data self.left = left self.right = right self.parent = parent def depth(self, depth=1): if s...
edpark13/data_structure2
bst.py
Python
mit
8,090
from __future__ import print_function from __future__ import unicode_literals from django.shortcuts import get_object_or_404, render from django.core.urlresolvers import reverse from django.views.generic.edit import FormView from django.http import HttpResponseRedirect from django.contrib import messages from pttrack....
SaturdayNeighborhoodHealthClinic/osler
referral/views.py
Python
gpl-3.0
8,753
from __future__ import print_function, division, absolute_import import struct import sys import os import re import warnings import llvmlite.binding as ll IS_WIN32 = sys.platform.startswith('win32') MACHINE_BITS = tuple.__itemsize__ * 8 IS_32BITS = MACHINE_BITS == 32 # Python version in (major, minor) tuple PYVERS...
GaZ3ll3/numba
numba/config.py
Python
bsd-2-clause
5,949
# -*- coding: utf-8 -*- # This file contains settings for a week's schedule from block import Block from series import Series # EXAMPLE BLOCK testBlock = Block() testBlock.picker = 'default' testBlock.ad_picker = 'default' testBlock.autoAd("test") testBlock.use_ads = True testBlock.old_episodes = True testBlock.series...
bombpersons/MYOT
schedule_settings.py
Python
gpl-3.0
590
#!/usr/bin/env python import os, sys, argparse from rects import Rect, load_rect_from_path def main(args): checkfile(args.targetfile) checkfile(args.stickyfile) target_list = load_rect_from_path(args.targetfile) sticky_list = load_rect_from_path(args.stickyfile) for rect in target_list: ...
jeoygin/gadget
algorithms/rect/sticky-rect.py
Python
mit
1,627
#!/usr/bin/python #========================================================================== # # Copyright Insight Software Consortium # # 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...
itkvideo/ITK
Utilities/Maintenance/FindRedundantHeaderIncludes.py
Python
apache-2.0
6,011
# Copyright 2016 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 by applicable law or a...
panmari/tensorflow
tensorflow/python/ops/math_grad_test.py
Python
apache-2.0
2,297
from datetime import datetime import os from flask import render_template, redirect, url_for, jsonify, request from flask import current_app as app from werkzeug.utils import secure_filename from . import main, report from .. import db from .forms import HostForm, ImportForm from .utils import parse_csv from ..models i...
shaggyloris/Device-Monitor-Dashboard
app/main/views.py
Python
mit
3,235
# # 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 # ...
openstack/python-dracclient
dracclient/resources/lifecycle_controller.py
Python
apache-2.0
11,191
"""Factories for testing the Dictionary app.""" import factory from dictionary import models class LanguageFactory(factory.django.DjangoModelFactory): """Factory to generate a Language.""" language = 'English' class Meta: model = models.Language django_get_or_create = ('language',) cla...
studybuffalo/studybuffalo
study_buffalo/dictionary/tests/factories.py
Python
gpl-3.0
2,422
''' Created on 12.12.2011 @author: michi ''' from PyQt4.QtCore import pyqtSignal, QPoint, Qt from PyQt4.QtGui import QPen, QBrush, QFont from ems.qt4.location.maps.geomapobject import GeoMapObject from ems.qt4.location.geoboundingbox import GeoBoundingBox from ems.qt4.location.geocoordinate import GeoCoordinate clas...
mtils/ems
ems/qt4/location/maps/geomaptextobject.py
Python
mit
9,041
############################### # This file is part of PyLaDa. # # Copyright (C) 2013 National Renewable Energy Lab # # PyLaDa is a high throughput computational platform for Physics. It aims to make it easier to submit # large numbers of jobs on supercomputers. It provides a python interface to physical input, suc...
pylada/pylada-light
config/dftcrystal.py
Python
gpl-3.0
5,517
# coding=utf-8 import unittest """964. Least Operators to Express Number https://leetcode.com/problems/least-operators-to-express-number/description/ Given a single positive integer `x`, we will write an expression of the form `x (op1) x (op2) x (op3) x ...` where each operator `op1`, `op2`, etc. is either addition, ...
openqt/algorithms
leetcode/python/lc964-least-operators-to-express-number.py
Python
gpl-3.0
2,006
#Pyjsdl - Python-to-JavaScript Multimedia Framework #Copyright (c) 2013 James Garnon # #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 right...
jggatc/pyjsdl
pyjsdl/__init__.py
Python
mit
3,564
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2022-01-17 23:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('usermodel', '0008_auto_20180612_1220'), ...
perrys/WSRC
modules/wsrc/site/migrations/0001_initial.py
Python
gpl-2.0
10,265
# coding: utf-8 """ Salt Edge Account Information API API Reference for services # noqa: E501 OpenAPI spec version: 5.0.0 Contact: support@saltedge.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_cl...
ltowarek/budget-supervisor
third_party/saltedge/test/test_income_report_streams_regular.py
Python
mit
1,008
""" Name (and location if needed) of the FFMPEG binary. It will be "ffmpeg" on linux, certainly "ffmpeg.exe" on windows, else any path. If not provided (None), the system will look for the right version automatically each time you launch moviepy. If you run this script file it will check that the path to the ffmpeg bin...
ShaguptaS/moviepy
moviepy/conf.py
Python
mit
1,305
# 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 req...
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/openstack/common/fixture/lockutils.py
Python
gpl-2.0
1,887
#!/usr/bin/python # (c) 2018, NetApp, Inc # 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 = {'metadata_version': '1.1', 'status': ['preview'], ...
thaim/ansible
lib/ansible/modules/storage/netapp/netapp_e_iscsi_target.py
Python
mit
10,686
# Copyright 2014 Mirantis, 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 ...
andrei4ka/fuel-web-redhat
fuelclient/fuelclient/cli/actions/task.py
Python
apache-2.0
2,676
""" WSGI config for aloeveraofforever project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPL...
arbin/aloeveraofforever
aloeveraofforever/aloeveraofforever/wsgi.py
Python
mit
1,582
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-18 13:46 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
MaximilianKindshofer/webeats
webeats/meals/migrations/0001_initial.py
Python
gpl-3.0
2,069
""" invoke_tools.vcs.git_scm """ from git import Repo import os class Git: """ Git """ def __init__(self): """ """ self.repo = Repo(search_parent_directories=True) pass def get_branch(self): """ :return: """ if self.repo.head.is_det...
VJftw/invoke-tools
invoke_tools/vcs/git_scm.py
Python
mit
2,279
from django.db import models from django.conf import settings from identity.models import Organization, Nexus import urllib2 import json class OrganizationAgora(models.Model): organization = models.ForeignKey(Organization) url = models.URLField() class AVLink(models.Model): agora = models.ForeignKey(Organ...
joanma100/mieli
agora/models.py
Python
agpl-3.0
2,553
import requests from orionsdk import SwisClient def main(): npm_server = 'localhost' username = 'admin' password = '' swis = SwisClient(npm_server, username, password) print("Custom Property Update Test:") results = swis.query( "SELECT Uri FROM Orion.Nodes WHERE NodeID=@id", i...
solarwinds/orionsdk-python
samples/custom_property_update.py
Python
apache-2.0
594
from conans import ConanFile, CMake class AversivePlusPlusModuleConan(ConanFile): name = "hal-stm32cubef4" version = "0.1" exports = "*" settings = "os", "compiler", "build_type", "arch", "target" requires = "hal/0.1@AversivePlusPlus/dev", "stm32cube-hal-stm32f4xx/0.1@AversivePlusPlus/dev", "toolc...
AversivePlusPlus/AversivePlusPlus
modules/hal/hal-stm32cubef4/conanfile.py
Python
bsd-3-clause
961
# coding=utf-8 # Source: https://github.com/kivy/kivy/wiki/Editable-ComboBox from kivy.uix.floatlayout import FloatLayout from kivy.uix.dropdown import DropDown from kivy.uix.textinput import TextInput from kivy.properties import ListProperty from kivy.lang import Builder Builder.load_string(''' #:import Button kivy.u...
boisei0/traject-reisinfo
combobox.py
Python
gpl-2.0
1,425
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import logging import time from threading import Thread from flask_cors import CORS, cross_origin from pogom import config from pogom.app import Pogom from pogom.utils import get_args, insert_mock_data, load_credentials from pogom.search import search_lo...
marauder37/PokemonGo-Map
runserver.py
Python
agpl-3.0
2,391
#! /usr/bin/env python # Magic from future for pprint compatibility from __future__ import print_function from selenium import webdriver from selenium.webdriver.support.ui import Select url="http://117.211.91.61/web/Default.aspx" semester="VIII" subjects={} score={} browser=webdriver.Firefox() branch='cs' batch='1...
kshitij8/nitjsr_result
result_scrape.py
Python
mit
2,383
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # 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 appli...
halexan/Headquarters
src/headquarters/packet/slow.py
Python
mit
26,925
import os; link = "http://media.blizzard.com/heroes/images/battlegrounds/maps/haunted-mines-v2/underground/6/" column = 0; rc_column = 0; while (rc_column == 0): row = 0; rc_column = os.system('wget ' + link + str(column) + '/' + str(row) + '.jpg -O ' + str(1000 + column) + '-' + str(1000 + row) + '.jpg') rc_row =...
karellodewijk/wottactics
extra/download_hots_map/haunted-mines-underground/download_hots_map.py
Python
mit
1,381
import unicodecsv as csv def read_csv(filename): rows = [] with open(filename, 'r') as f: for row in csv.reader(f, encoding='utf-8'): rows.append(row) return rows
ybbaigo/deeptext
deeptext/utils/csv.py
Python
bsd-3-clause
197
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import wagtail.wagtailsearch.index def set_page_path_collation(apps, schema_editor): """ Treebeard's path comparison logic can fail on certain locales such as sk_SK, whic...
hamsterbacke23/wagtail
wagtail/wagtailcore/migrations/0001_initial.py
Python
bsd-3-clause
7,535
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os import shutil import subprocess """Copy Special exercise """ ...
plumps/google-python-exercises
copyspecial/copyspecial.py
Python
apache-2.0
1,208
{ 'repo_type' : 'git', 'url' : 'https://git.videolan.org/git/ffmpeg/nv-codec-headers.git', 'needs_configure' : False, 'build_options' : 'PREFIX={target_prefix}', 'install_options' : 'PREFIX={target_prefix}', '_info' : { 'version' : None, 'fancy_name' : 'nVidia (headers)' }, }
DeadSix27/python_cross_compile_script
packages/dependencies/nv-codec-headers.py
Python
mpl-2.0
282
""" byceps.services.shop.order.dbmodels.sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from typing import Optional from .....database import db, generate_uuid from .....util.instances import ReprBuilder from...
homeworkprod/byceps
byceps/services/shop/order/dbmodels/number_sequence.py
Python
bsd-3-clause
1,322
# Flexlay - A Generic 2D Game Editor # Copyright (C) 2014 Ingo Ruhnke <grumbel@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 # (at your option)...
SuperTux/flexlay
flexlay/gui/__init__.py
Python
gpl-3.0
2,268
#!/usr/bin/python from photon_tools.timetag_types import * from photon_tools.filter_photons import filter_by_spans import numpy as np strobe = np.empty(1e2, dtype=strobe_event_dtype) strobe['t'] = np.arange(0,600,6) strobe['chs'] = strobe['t'] delta_a = np.empty(15, dtype=delta_event_dtype) delta_a['start_t'] = 10*n...
goldner-lab/photon-tools
tests/test_filter_photons.py
Python
gpl-3.0
701
# ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Gene...
getting-things-gnome/gtg
GTG/gtk/editor/editor.py
Python
gpl-3.0
34,561
from django.contrib import admin from reversion.admin import VersionAdmin from .models import * class SiteProfileAdmin(VersionAdmin, admin.ModelAdmin): pass class TestResultSetAdmin(VersionAdmin, admin.ModelAdmin): pass admin.site.register(SiteProfile, SiteProfileAdmin) admin.site.register(TestResultSet...
ninapavlich/scout-and-rove
scoutandrove/apps/sr/admin.py
Python
mit
341
import sys from PySide.QtCore import * from PySide.QtGui import * # Setup Basic Dialog window for user class QDialog_youtube(QDialog): def __init__(self, parent=None): super(QDialog_youtube, self).__init__(parent) self.setupUI() def convertYoutubeLink(self): youtubeURL = self.in_you...
Hartman-/Basket
basket/wordpress/youtube_generator.py
Python
bsd-3-clause
2,657
"""test module importing itself""" # pylint: disable=no-absolute-import,using-constant-test from __future__ import print_function from . import func_w0406 __revision__ = 0 if __revision__: print(func_w0406)
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/test/input/func_w0406.py
Python
apache-2.0
214
# Copyright 2012-2013 Jose Blanca, Peio Ziarsolo, # COMAV-Univ. Politecnica Valencia # This file is part of seq_crumbs. # seq_crumbs 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 # Li...
JoseBlanca/seq_crumbs
crumbs/utils/optional_modules.py
Python
gpl-3.0
4,117
""" DIRAC.TransformationSystem.Client package """ from __future__ import absolute_import from __future__ import division from __future__ import print_function
yujikato/DIRAC
src/DIRAC/TransformationSystem/Client/__init__.py
Python
gpl-3.0
159
#!/usr/bin/env python # -*- coding: utf-8 -*- """ The same STA/LTA as used in Flexwin. :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2014 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) """ from __future__ import (absolute_import, division, print_fun...
KNMI/VERCE
verce-hpc-pe/src/pyflex/stalta.py
Python
mit
1,846
#!/usr/bin/env python """ Seaborn is a Python library supported by Stanford University that enables you to create beautiful, presentation-ready data visualizations. While Seaborn uses Matplotlib under the hood to represent, manipulate, and customize plots, it exposes a high-level API that abstracts away a lot of the in...
tleonhardt/CodingPlayground
dataquest/DataVisualiation/seaborn_viz.py
Python
mit
2,301
import sys import os import commands import nipype.pipeline.engine as pe import nipype.algorithms.rapidart as ra import nipype.interfaces.fsl as fsl import nipype.interfaces.io as nio import nipype.interfaces.utility as util from utils import * from CPAC.vmhc import * from nipype.interfaces.afni import preprocess from ...
sgiavasis/C-PAC
CPAC/vmhc/vmhc.py
Python
bsd-3-clause
22,733
""" This script is an example of how to use the saturation block. |br| In this example 1 random multitone signal is generated. The signal contains 3 random tones, the highest possible frequency in the signal is 10 kHz. |br| After the signal generation, the signal is pushed through a saturation block, which limits the...
JacekPierzchlewski/RxCS
examples/acquisitions/saturation_ex2.py
Python
bsd-2-clause
3,763
# python imports import os # rasmus imports from rasmus import util from rasmus import treelib # compbio imports from . import fasta def muscle(seqs, verbose = True, removetmp = True, options = ""): if len(seqs) < 2: return seqs # make input file for muscle infilename = util.tempfile(".", "mu...
wutron/compbio
compbio/muscle.py
Python
mit
3,359
# -*- coding: utf-8 -*- import json import time import pycurl from pyload.core.network.http.exceptions import BadHeader from ..base.multi_account import MultiAccount def args(**kwargs): return kwargs class RealdebridCom(MultiAccount): __name__ = "RealdebridCom" __type__ = "account" __version__ = "...
vuolter/pyload
src/pyload/plugins/accounts/RealdebridCom.py
Python
agpl-3.0
3,902
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # TWX documentation build configuration file, created by # sphinx-quickstart on Sat Jun 27 15:07:02 2015. # # 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 # autoge...
datamachine/twx
docs/conf.py
Python
mit
10,106
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AccessAttempt(models.Model): """ Access Attempt log """ user_agent = models.CharField( max_length=255, ) ip_address = models.Ge...
kencochrane/django-defender
defender/models.py
Python
apache-2.0
1,116
from django.template import RequestContext from django.core.mail import EmailMultiAlternatives from django.shortcuts import render_to_response, get_object_or_404 from forms import GuestForm, RegistrationForm from models import Event, Guest, Registration from django.utils import timezone from django.template.loader impo...
Teknologforeningen/tf_arsfest
tf_arsfest/views.py
Python
mit
4,025
""" ************************************************************************************ Class : DateUtil Role : Utilities to convert Dates Date : 25/11/2016 ************************************************************************************ """ import string import datetime def formatDate(dateStr): """ Check and...
Thierry46/CalcAl
util/DateUtil.py
Python
gpl-3.0
1,334
# Copyright 2015 # # 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 writi...
gandelman-a/neutron-lbaas
neutron_lbaas/db/migration/alembic_migrations/versions/4b6d8d5310b8_add_index_tenant_id.py
Python
apache-2.0
1,168
''' The sp.pmt() function is used to answer the following question: What is the monthly cash flow to pay off a mortgage of $250,000 over 30 years with an annual percentage rate (APR) of 4.5 percent, compounded monthly? ''' import scipy as sp ''' 贷款:200'000.00 年利率:5% 还款周期:月 贷款年限:3年 每月还款:5'994.18 ''' payment2 = sp.pmt(...
UpSea/midProjects
BasicOperations/10_SciPy/03_SciPy_pmt.py
Python
mit
419
__version__ = '0.0.6.dev0' __url__ = 'https://github.com/halkeye/flask_atlassian_connect' __author__ = 'Gavin Mogan' __email__ = 'opensource@gavinmogan.com' __all__ = ['AtlassianConnect', 'AtlassianConnectClient'] from .base import AtlassianConnect # NOQA: E402, F401, C0413 from .client import AtlassianConnectC...
halkeye/flask_atlassian_connect
flask_atlassian_connect/__init__.py
Python
apache-2.0
354
import numpy as np from pics import PrintBinayImage import random from utils import PrintMatrix def NeuralMap(neurons: np.ndarray, n: int, m:int): """Print out neural activity""" L = neurons.reshape(n,m) PrintBinayImage(L) def learn_pattern(pat: np.ndarray, n: int ,m: int, connections) -> np.ndarray: ...
janiskuehn/component-based-recognition
basicHopfield/neural.py
Python
gpl-3.0
1,394
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
OpenCode/stock-logistics-workflow
stock_picking_package_preparation/__openerp__.py
Python
agpl-3.0
1,406
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/aio/operations/_agent_pools_operations.py
Python
mit
24,011
class Solution(object): # array # time: O(m * n) m, n -- size of the matrix # space: O(m * n) def longestLine(self, M): """ :type M: List[List[int]] :rtype: int """ ans = 0 if not M or not M[0]: return ans m, n = len(M), len(M[0]) ...
YiqunPeng/Leetcode-pyq
solutions/562LongestLineOfConsecutiveOneInMatrix.py
Python
gpl-3.0
1,067
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
foursquare/commons-old
src/python/twitter/pants/targets/python_tests.py
Python
apache-2.0
1,972
# This file is part of authapi. # Copyright (C) 2014-2020 Agora Voting SL <contact@nvotes.com> # authapi 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. # authapi is...
agoravoting/authapi
authapi/api/migrations/0026_use_core_jsonfield.py
Python
agpl-3.0
1,159
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-05-04 22:40 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('content', '0008_auto_20180429_1709'), ('content', '0009_auto_20180410_1139'), ] op...
DXCanas/kolibri
kolibri/core/content/migrations/0010_merge_20180504_1540.py
Python
mit
339
"""Common operations on Posix pathnames. Instead of importing this module directly, import os and refer to this module as os.path. The "os.path" name is an alias for this module on Posix systems; on other systems (e.g. Mac, Windows), os.path provides the same operations in a manner specific to that platform, and is a...
HiSPARC/station-software
user/python/Lib/posixpath.py
Python
gpl-3.0
13,935
''' Copyright (C) 2005-17 www.interpss.org 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...
interpss/DeepMachineLearning
ipss.dml/py/c_graph/single_net_random/predict_voltage_random.py
Python
apache-2.0
3,225