code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst...
zalew/fabric-pgbackup
setup.py
Python
mit
1,243
import requests import json import sqlite3 import time #searching the api key of velib key_file = open('jcdecaux.key','r') api_key = key_file.readline().rstrip('\n') key_file.close() startime = time.time() url = 'https://api.jcdecaux.com/vls/v1/stations?contract=Paris&apiKey=' + api_key response = requests.get(url...
Gokender/velib
dataParsing.py
Python
mit
1,135
import os import posixpath import re import sys from pathlib import Path from typing import TYPE_CHECKING from typing import Dict from typing import List from typing import Tuple from typing import Union from urllib.parse import unquote from urllib.parse import urlsplit from urllib.request import url2pathname if TYP...
python-poetry/poetry-core
src/poetry/core/packages/utils/utils.py
Python
mit
10,888
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def subtreeWithAllDeepest(self, root: TreeNode) -> TreeNode: def dfs(root): if root is None: return N...
jiadaizhao/LeetCode
0801-0900/0865-Smallest Subtree with all the Deepest Nodes/0865-Smallest Subtree with all the Deepest Nodes.py
Python
mit
610
__author__ = 'mandeepak' import csv import json csvfilename = 'output.csv' jsonfilename = csvfilename.split('.')[0] + '.json' csvfile = open(csvfilename, 'r') jsonfile = open(jsonfilename, 'w') data={} with jsonfile as outfile,csvfile as inputfile: for line in inputfile: stream=line.split() data.set...
should-i-go/should-i-go
support_files/csvtojson.py
Python
mit
422
# /usr/bin/env python ''' Written by Kong Xiaolu and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md ''' import os import numpy as np import torch import CBIG_pMFM_basic_functions as fc def CBIG_mfm_test_desikan_main(gpu_index=0): ''' This function is to implement the test...
ThomasYeoLab/CBIG
stable_projects/fMRI_dynamics/Kong2021_pMFM/part2_pMFM_control_analysis/Primary_gradients/scripts/CBIG_pMFM_step33_test_GradPC2Grad.py
Python
mit
4,115
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder Builder.load_string(''' <FxDialog@Popup> id: popup title: 'Fiat Currency' size_hint: 0.8, 0.8 pos_hint: {'top':0.9} BoxLayout: orientation: 'vertical' B...
protonn/Electrum-Cash
gui/kivy/uix/dialogs/fx_dialog.py
Python
mit
3,539
### Thanks to Mark Frömberg for the idea :) # line intersection method # http://math.stackexchange.com/questions/27388/intersection-of-2-lines-in-2d-via-general-form-linear-equations def getIntersection((x0, y0), (x1, y1), (x2, y2), (x3, y3)): a = y0 - y1 b = x1 - x0 c = (y1 - y0) * x0 - (x1 - x0) * y0 ...
asaumierdemers/cabRoboFontScripts
Glyph/unRoundingUFO.py
Python
mit
1,439
from json import loads, dumps class ObjectType(object): """ Class defining a pluggable type. """ TYPE = '__type__' name = None cls = None @classmethod def encode(cls, value): """ Convert value to dictionary. """ return { 'value': value, } ...
snogaraleal/adjax
adjax/serializer.py
Python
mit
2,855
''' Linear Regression by SVD on TensorFlow Author: Rowel Atienza Project: https://github.com/roatienza/Deep-Learning-Experiments ''' # On command line: python3 linear_inv.py # Prerequisite: tensorflow 1.0 (see tensorflow.org) # : matplotlib (http://matplotlib.org/) from __future__ import print_function im...
roatienza/Deep-Learning-Experiments
versions/old/Experiments/Tensorflow/Regression/linear_inv.py
Python
mit
2,610
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2014, Hartmut Goebel <h.goebel@goebel-consult.de> """ Test cases for L{backends.ampache_storage} """ from lxml import etree from twisted.trial import unittest from coherence.backends import ampache...
unintended/Cohen
tests/backends/test_ampache_storage.py
Python
mit
4,553
# find_leds.py Find LEDs # 2014-10-30 # The purpose of this script is to find the # coordinates of Light Emitting Diodes in # camera frame # Currently it only looks for green and stores # an intermediate and an altered picture back # to the current working directory, to show # things are working # Import necessar...
cschulee/ee542-code
find_leds.py
Python
mit
2,091
print([n for n in range(0,101) if n%2 == 1 and n%3 == 2 and n%4 == 3 and n%5 == 4 and n%6 == 5 ]) print([n for n in range(100,300) if n%2 == 1 and n%3 == 2 and n%4 == 3 and n%5 == 4 and n%6 == 5 and n%7 == 1])
TGITS/programming-workouts
python/misc/math_problem.py
Python
mit
214
class _Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(_Singleton, cls).__call__( *args, **kwargs) return cls._instances[cls] class Singleton(_Singleton('SingletonMeta', (object,), {})):...
ssut/PushBank
pushbank/_singleton.py
Python
mit
330
import datetime from django.db import models from django.utils import timezone # Create your models here. class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __unicode__(self): return self.question_text def was_published_recentl...
DjangoQuilla/pollstutorial
polls/models.py
Python
mit
767
# -*- coding:utf-8 -*- # # Author : TangHanYi # E-mail : thydeyx@163.com # Create Date : 2016-11-23 04:33:03 PM # Last modified : 2016-11-23 04:59:02 PM # File Name : Queue_Reconstruction_by_Height.py # Desc : """ #we have list of persons represented as [height, key] as input #First fill th...
thydeyx/LeetCode-Python
Queue_Reconstruction_by_Height.py
Python
mit
1,637
from django.db import models # Create your models here. from utils_plus.abstracts import CheckDeletableModelMixin from utils_plus.choices import ChoicesEnum from utils_plus.models import QueryManager from utils_plus.fields import ChoicesEnumField class Title(ChoicesEnum): mr = 'Mr.' ms = 'Ms.' mrs = 'Mrs...
jnoortheen/django-utils-plus
tests/test_app/models.py
Python
mit
1,082
import urllib.request as ul from bs4 import BeautifulSoup as bs from time import sleep import pdfkit import os.path from datetime import datetime url = None def converter(url,direc=None): path = r'./wkhtmltopdf.exe' if not direc: direc = "./Website2Pdf" else: direc = direc + "/Website2Pdf" ...
Vinay26k/python
SourceForge/Website_to_pdf/Website2PdfCore.py
Python
mit
643
import os from django.conf.urls import url, include urlpatterns = [ url(r'^misc/', include('misc.urls')), url(r'^qualification/', include('qualification.urls')), ] if os.environ.get('DJANGO_SETTINGS_MODULE') == 'etrack.settings.dev': import debug_toolbar urlpatterns += [ url(r'^__debug__/', i...
jmoreman/eTrack
etrack/urls.py
Python
mit
355
import sublime, sublime_plugin import os class print_file(sublime_plugin.TextCommand): def run(self, edit): os.system('cat -n "%s" > tmp.print; lpr tmp.print' % self.view.file_name()) self.view.show_popup("JIZZ!!")
NCTU-PCCA/NCTU_Yggdrasill
codebook/ToBeClassify/print_file.py
Python
mit
221
from rest_framework.routers import DefaultRouter, Route class SingletonRouter(DefaultRouter): """ Use this router instead of the DRF DefaultRouter if you have only one resource accessible from an endpoint. This gives you the following urls: * prefix/ GET: returns 404 or the object ...
ministryofjustice/cla_backend
cla_backend/apps/core/routers.py
Python
mit
1,336
# -*- coding: utf-8 -*- __author__ = 'xyh' #... from head import * from models import Student_user from student_forms import StudentInfoForm LEN_OF_STUDENT_ID = 10 LEN_OF_FACULTY_ID = 6 LEN_OF_ADMIN_ID = 3 #Note: has not finished @csrf_exempt @login_required def changeStudentInfo(request): if request.method == ...
yuanpengX/SE-NE
djcode/IMS/change_student_personal_info.py
Python
mit
3,064
import argparse import codecs import sys from .auth import parse_authentication from .confluence_api import create_confluence_api from .confluence import ConfluencePageManager from .constants import DEFAULT_CONFLUENCE_API_VERSION def main(): parser = argparse.ArgumentParser(description='Dumps Confluence page in ...
dopuskh3/confluence-publisher
conf_publisher/page_dumper.py
Python
mit
1,397
""" Created on 9/2/2015 @author: victor """ import numpy import math import prody try: from pyproct.data.handler.sourceGenerator import SourceGenerator from pyproct.data.handler.protein.proteinEnsembleDataLoader import ProteinEnsembleDataLoader except: print "[WARNING] pyProCT was not found. Some function...
victor-gil-sepulveda/PhD-ANMPythonHelpers
anmichelpers/tools/tools.py
Python
mit
3,490
""" This module is designed for parsing dimensions in text form and turning them into sizes in printer's points (i.e. 72 per inch). """ import re __all__ = ['DimensionError', 'parse_dimension', 'parse_dimensions'] class DimensionError(Exception): pass def parse_dimension(text): """ Parses the given text into...
idmillington/layout
layout/datatypes/parse_dimensions.py
Python
mit
3,882
""" https://codility.com/programmers/task/brackets/ """ from collections import deque def solution(S): q = deque() for char in S: if char in ')]}': if q and are_mirrors(char, q[-1]): q.pop() else: return 0 else: q.append(ch...
py-in-the-sky/challenges
codility/brackets.py
Python
mit
531
""" Django settings for simcon project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
djorda9/Simulated-Conversations
vagrant/simcon/settings.py
Python
mit
4,696
import discord import os.path import json from discord.ext import commands class Character(): def __init__(self, bot): self.bot = bot @commands.command(pass_context = True) async def char (self, ctx): """Character Creation. Asks for all information then builds Json file.""" ...
padilin/Discord-RPG-Bot
character.py
Python
mit
2,055
import random N = 600851475143 def gcd(a, b): while b > 0: a, b = b, a % b return a def factorize(N): " N の素因数分解を求める (Pollard's rho algorithm) " factors = [] while N >= 2: d = 1 while d == 1: x = random.randint(1, N) y = random.randint(1, N) ...
ys-nuem/project-euler
003/003.py
Python
mit
603
import pdb from scan_lexer import * from global_env import * from sys import exit macros = {} scope = [] def evaluate(exp, envs = [global_env]): #Use the global scope list global scope # Is exp an atom? if atom(exp): if type(exp) == Symbol: return lookup(exp, envs)...
Krish95/tango
evaluator.py
Python
mit
3,730
"""Add high comp officer fields to published_award_financial_assistance table Revision ID: ad3dd1c0cf20 Revises: 5f29b283f23e Create Date: 2019-05-23 08:31:35.225654 """ # revision identifiers, used by Alembic. revision = 'ad3dd1c0cf20' down_revision = '5f29b283f23e' branch_labels = None depends_on = None from alem...
fedspendingtransparency/data-act-broker-backend
dataactcore/migrations/versions/ad3dd1c0cf20_add_high_comp_officer_fields_to_.py
Python
cc0-1.0
2,902
""" Since this is basically firmware, it should be able to handle a lot of hard coding. Some of the elements, especially the events to add, will be difficult to allow the user to send. 1. ??? 2. List of message objects 3. Pop random element off list of message objects 4. When list reaches X entries, start the ???...
Kiganshee/Flip-Sign
FlipDotSign.py
Python
cc0-1.0
9,790
#!/usr/bin/env python from __future__ import print_function import sys import binascii import argparse import re # raw_input doesn't exist in Python 3 try: raw_input except NameError: raw_input = input PROMPT_TEXT = "I agree to be careful" WARNING_TEXT = """ USE THIS SOFTWARE AT YOUR OWN DISCRETION. THIS...
Matoking/NVIDIA-vBIOS-VFIO-Patcher
nvidia_vbios_vfio_patcher.py
Python
cc0-1.0
6,176
"""ExpInt.py Definition of the namedtuple that identifies a set of interaction files from which to derive data """ from __future__ import division from __future__ import unicode_literals from collections import namedtuple # noinspection PyClassHasNoInit class ExpInt(namedtuple('ExpInt', ['e', 'hw', 'base', 'rp'])): ...
dilynfullerton/tr-A_dependence_plots
src/deprecated/int/ExpInt.py
Python
cc0-1.0
719
#-*- coding: utf-8 -*- ''' Created on 16 déc. 2013 @author: yoann Moreau All controls operations : return true if control ok ''' import os import errno from datetime import date,datetime,timedelta import ogr,osr import re import gdal import osr import numpy as np import numpy.ma as ma import subprocess import shutil...
yoannMoreau/Evapo_EraInterim
python/utils.py
Python
cc0-1.0
20,707
from django.contrib.auth.models import User from actstream import registry from dnstorm.app import models DNSTORM_VERSION = '0.01' DNSTORM_URL = 'http://vmassuchetto.github.io/dnstorm' registry.register(User) registry.register(models.Problem) registry.register(models.Criteria) registry.register(models.Idea) registry....
vmassuchetto/dnstorm
dnstorm/app/__init__.py
Python
gpl-2.0
383
# coding: utf-8 from django.test import TestCase from django.contrib.auth.models import User, Permission from django.utils import timezone from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from utils.tests.common_test_case import CommonTestCase, with_login_user from discussion....
giliam/sharbrary
discussion/tests.py
Python
gpl-2.0
7,655
#!/usr/bin/env python3 from socket import * import _thread import sys def enviardatos(sock): data = input() enviar = data.encode() sock.sendto(enviar,('localhost',23456)) if data == "bye": print("Closing Client\n") sock.close() return 0 _thread.start_new_thread(recibird...
CarlosCebrian/RedesII_Ejercicios
Practica2_RedesII/chatudp.py
Python
gpl-2.0
1,117
#!/usr/bin/python import pandas as pd import numpy as np import time, datetime # script to load data as raw csv, and add columns to data frame infilename = "Homebrewing_titles_1214239837_1424289414.csv" columns = ['row_id', 'post_id', 'score', 'time','title'] # row is an integer # post_id is a alphanumeric integer. ...
ajfranke/subscrape
processtitles.py
Python
gpl-2.0
1,317
# -*- coding: utf-8 -*- # emma # # Copyright (C) 2006 Florian Schmidt (flo@fastflo.de) # 2014 Nickolay Karnaukhov (mr.electronick@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 F...
fastflo/emma
emmalib/__init__.py
Python
gpl-2.0
2,772
# -*- coding: utf-8 -*- # $Id$ # # Copyright (c) 2007 Otto-von-Guericke-Universität Magdeburg # # This file is part of ECReviewBox. from StringIO import StringIO from Products.Archetypes.Extensions.utils import installTypes, install_subskin from Products.Archetypes.public import listTypes from Products.CMFCore.utils...
collective/ECReviewBox
Extensions/Install.py
Python
gpl-2.0
2,470
""" Plugin for URLResolver Copyright (C) 2020 gujal This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is di...
dknlght/dkodi
src/script.module.urlresolver/lib/urlresolver/plugins/vk.py
Python
gpl-2.0
2,793
import socket import sys import random import hashlib from thread import * path="graphs/" def openMatrix(file): global path with open(path + file,"r") as mat: data=mat.read() dimension=1 for c in data: if c=='\n': break dimension=dimension+1 dimension=dimension/2 m=[[0 for x in range(dimension)]...
hahahzm/sub_iso
prover.py
Python
gpl-2.0
4,112
from matplotlib import rcParams, rc from spuriousRadioProbRangeP1 import probsOfGRP from util import mpfit from util.fitFunctions import gaussian import matplotlib.pyplot as plt import numpy as np import matplotlib import scipy.stats import tables import scipy.special def fitGauss(xdata,ydata,yerr,flatLine=False): ...
bmazin/ARCONS-pipeline
examples/Pal2012-crab/enhancementPhaseP1.py
Python
gpl-2.0
21,133
# -*- coding: utf-8 -*- # from django.dispatch import receiver from django.db.models.signals import m2m_changed from django_auth_ldap.backend import populate_user from django.conf import settings from django_cas_ng.signals import cas_user_authenticated from jms_oidc_rp.signals import openid_create_or_update_user fro...
zsjohny/jumpserver
apps/users/signals_handler.py
Python
gpl-2.0
2,429
#!/usr/bin/env python import time import os from plugins import * import CustomHandlers # Light switch #try: # CapSwitch.CapSwitch(SerialEnumeration.find("capbutton1")) #except: # pass try: # Telephony services rotdial = RotaryDial.RotaryDial(SerialEnumeration.find("rotarydial")) # Handle telephon...
moosd/HomeAutomation
main.py
Python
gpl-2.0
1,574
# -*- coding: utf-8 -*- # $Id: webservergluebase.py $ """ Test Manager Core - Web Server Abstraction Base Class. """ __copyright__ = \ """ Copyright (C) 2012-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you...
miguelinux/vbox
src/VBox/ValidationKit/testmanager/core/webservergluebase.py
Python
gpl-2.0
20,134
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @Daddy_Blamo wrote this file. As long as you retain this notice you # can do whatever you want wi...
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_placenta/en_placenta-1.7.8/to_be_fixed/needsfixing/vumoo.py
Python
gpl-2.0
7,170
#!/usr/bin/env python3.5 # -*- coding: utf-8 -*- # Author: ChenLiang # 线程池 """ """ import queue import threading import time class ThreadPool: def __init__(self, maxsize=5): self.maxsize = maxsize self._q = queue.Queue(maxsize) for i in range(maxsize): self._q.put(threading...
smartczm/python-learn
Old-day01-10/s13-day11/线程/线程池.py
Python
gpl-2.0
823
# -*- coding: utf-8 -*- # Description: Squid Model # Author: Subha # Maintainer: Dilawar Singh <dilawars@ncbs.res.in> # Created: Mon Jul 9 18:23:55 2012 (+0530) # Version: # Last-Updated: Wednesday 12 September 2018 04:23:52 PM IST # PyQt5 version import sys import os from collections import defaultdict impo...
BhallaLab/moose-examples
squid/squid_demo.py
Python
gpl-2.0
43,246
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: Administrator # # Created: 06/09/2013 # Copyright: (c) Administrator 2013 # Licence: <your licence> #-----------------------------------------------------------------------------...
MutsuGhost1/StudyGroupPython
hw1/look_folder_yield_2.py
Python
gpl-2.0
1,995
""" ManyMan - A Many-core Visualization and Management System Copyright (C) 2012 University of Amsterdam - Computer Systems Architecture Jimi van der Woning and Roy Bakker 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 t...
FlorisTurkenburg/ManyMan
SCC_backend/server.py
Python
gpl-2.0
14,884
# tools/pywine -O tests/test_backend.py import unittest import sys, os sys.path.insert(0, 'build\\wubi\\lib') from wubi.backends.win32 import backend from version import application_name, version, revision from wubi import application import mock from wubi.backends.win32 import registry class BackendTests(unittest.Tes...
linuxmint/mint4win
tests/test_backend.py
Python
gpl-2.0
3,126
import tempfile import pytest from os import path as os_path from wait_for import wait_for from cfme.base.ui import navigate_to from cfme.utils import version, os from cfme.utils.appliance import ApplianceException from cfme.utils.blockers import BZ from cfme.utils.conf import cfme_data, credentials from cfme.utils.l...
mfalesni/cfme_tests
cfme/tests/test_db_migrate.py
Python
gpl-2.0
8,770
#!/usr/bin/env python3 import argparse import glob import os import struct import sys def clamp_to_min_max(value, min, max): if value > max: value = max elif value < min: value = min return value def clamp_to_u8(value): return clamp_to_min_max(value, 0, 255) def parse_args(): pars...
z3ntu/razer-drivers
scripts/razer_mouse/driver/set_mouse_dpi.py
Python
gpl-2.0
1,921
# # BitBake Toaster Implementation # # Copyright (C) 2015 Intel Corporation # # SPDX-License-Identifier: GPL-2.0-only # from toastergui.widgets import ToasterTable from orm.models import Recipe, ProjectLayer, Layer_Version, Machine, Project from orm.models import CustomImageRecipe, Package, Target, Build, LogMe...
schleichdi2/OPENNFR-6.3-CORE
bitbake/lib/toaster/toastergui/tables.py
Python
gpl-2.0
63,230
#!/usr/bin/python # vim: set expandtab tabstop=4 shiftwidth=4: # -*- coding: utf-8 -*- # gen_cacert <http://rhizomatik.net/> # Python functions for generate a X509 CA certificate # # Copyright (C) 2010 duy at rhizomatik dot net # # This program is free software; you can redistribute it and/or modify # it under the te...
duy/python-foafcert
foafcert/gen_cacert.py
Python
gpl-2.0
4,578
import os import boto import time import hashlib import logging import mimetypes from django.conf import settings from optparse import make_option from multiprocessing.pool import ThreadPool from django.core.urlresolvers import get_callable from django.core.management.base import BaseCommand, CommandError logger = logg...
SCPR/accountability-tracker
bakery/management/commands/publish.py
Python
gpl-2.0
10,130
#coding: gbk have = open('C:\\Users\\suchao\\Desktop\\xq.txt').readlines() domains = open('C:\\Users\\suchao\\Desktop\\domain.txt').readlines() result = open('C:\\Users\\suchao\\Desktop\\result.txt','w') domainDic = {} for domain in domains: d,name = domain.split('\t') domainDic[d] = name[:-1] dic = {...
hfutsuchao/Python2.6
批量替换/replace.py
Python
gpl-2.0
471
from __future__ import unicode_literals from django.utils.encoding import python_2_unicode_compatible from django.contrib.auth.models import User from django.db import models @python_2_unicode_compatible class MarketUser(models.Model): user = models.OneToOneField(User, primary_key=...
iAddz/allianceauth
services/modules/market/models.py
Python
gpl-2.0
664
from nesoni import io, bio, grace, config, sam, span_index, annotation, working_directory import os, sys, collections, random def subsample(n, p): #Note that this is rather inefficient result = 0 for i in xrange(n): if random.random() <= p: result += 1 return result def add_lists...
Victorian-Bioinformatics-Consortium/nesoni
nesoni/samcount.py
Python
gpl-2.0
46,723
#!/usr/bin/env python # ====================================================================== # Copyright (C) 2007-2014 Giampaolo Rodola' <g.rodola@gmail.com> # # All Rights Reserved # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and assoc...
satyamz/Tests
pyftpdlib/log.py
Python
gpl-2.0
6,094
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Extractors for https://kohlchan.net/""" from .common import Extractor, Message from .. import text import ...
mikf/gallery-dl
gallery_dl/extractor/kohlchan.py
Python
gpl-2.0
2,737
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2014 Francisco José Rodríguez Bogado, # # <pacoqueen@users.sourceforge.net> # # ...
pacoqueen/ginn
ginn/formularios/logviewer.py
Python
gpl-2.0
17,683
#!/usr/bin/python # Copyright 2003-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function __author__ = "Thomas de Grenier de Latour (tgl), " + \ "modular re-write by: Brian Dolbec (dol-sen)" __email__ = "degrenier@easyconnect.fr, " + \ "bri...
djanderson/equery
pym/gentoolkit/eclean/cli.py
Python
gpl-2.0
18,211
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.7 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path imp...
satoken/centroid-rna-package
python/CentroidFold.py
Python
gpl-2.0
5,989
from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener import sqlite3 as sql3 import time import json import time from datetime import datetime import os #import sys #consumer key, consumer secret, access token, access secret. ckey= 'TWITTER_CKEY' in os.environ csecret= '...
ssmdevelopers/jklhoods
streamtweet.py
Python
gpl-2.0
1,889
# -*- coding: utf-8 -*- """ SALTS XBMC Addon Copyright (C) 2014 tknorris 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) a...
repotvsupertuga/tvsupertuga.repository
script.vodextende/scrapers/ninemovies_proxy.py
Python
gpl-2.0
5,303
# # Copyright (C) 2009-2016 Nexedi SA # # 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 distributed...
vpelletier/neoppod
neo/tests/zodb/testRecovery.py
Python
gpl-2.0
1,770
# # Copyright (C) 2021 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 distributed in the hope that it will be...
M4rtinK/anaconda
tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_image_installation.py
Python
gpl-2.0
4,138
# -*- coding: utf-8 -*- from enigma import * from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.MenuList import MenuList from Components.GUIComponent import GUIComponent from Components.HTMLComponent import HTMLComponent from Tools.Directories import fileExists, SCOPE_SKIN_IMAG...
popazerty/enigma2
lib/python/Plugins/Extensions/LDteam/ExtraActionBox.py
Python
gpl-2.0
1,524
#!/usr/bin/env python import sys import re from feed_maker_util import IO def main(): link = "" title = "" resultList = [] urlPrefix = "http://music.naver.com" for line in IO.read_stdin_as_line_list(): m = re.search(r'<a href="(?P<url>/todayMusic/index\.nhn[^\"]+)"[^>]*>(?P<title>.+...
terzeron/FeedMakerApplications
naver/_todaymusic/capture_item_link_title.py
Python
gpl-2.0
685
from PacketFilterBase import * class FollowTeleportsFilter(PacketFilterBase): def __newSim(self, packet, info_key, ip_key, port_key): decodedData = packet.getDecodedData() circuit_info = decodedData[info_key] sim_ip = circuit_info[ip_key] ...
MarioVilas/secondlife-experiments
SimProxy/udpfilter/FollowTeleports.py
Python
gpl-2.0
1,706
import os from time import sleep import sys def get_single_test_avg_results(filename): # For each file srv_msgs=0 w_sentMsgs = 0 w_invokedWrites = 0 w_completedWrites = 0 r_sentMsgs = 0 r_invokedReads = 0 r_completedReads = 0 r_slowReads = 0 r_fastReads = 0 r_avgtime = 0 r_avgCommtime = 0 r_avgComptime...
nicolaoun/NS3-AM-Proto-Simulation
collect_data_v2_mwmr.py
Python
gpl-2.0
19,411
VERSION = 1 NAME = _("Winged Feet") DESCRIPTION = _("Increases the movement rate of a unit.") ABILITY_TYPE = ACTION COST = 10 TARGET_TYPE = FRIENDLY RANGE = Diamond(0, 5, 16) AOE = Single() EFFECTS = [Status(Status.PLUS_MOVE, power=1.0, hit=0.5, duration=5)]
jemofthewest/GalaxyMage
data/core/abilities/wingedfeet.py
Python
gpl-2.0
268
from django.conf.urls.defaults import * #from pinax.apps.account import urls from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from wangji.sharesite.models import Onesite info_dict = { 'queryset': Onesite.objects.all(), } url...
weaponsjtu/neteye
urls.py
Python
gpl-2.0
1,514
# # Copyright (c) 2010, 2016, 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...
mysql/mysql-utilities
mysql-test/suite/replication/t/export_rpl_errors.py
Python
gpl-2.0
7,565
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "routes.test_settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
fmartingr/django-routes
manage.py
Python
gpl-2.0
254
# coding:utf-8 import posi_predict import degree_predict import salary_predict import size_predict import codecs file_out = codecs.open('result.csv', 'w', 'utf-8') def get_result(): print '将进行职位预测,需要1小时以上,请耐心等待' posi_result = posi_predict.train() print '职位预测结束\n将进行degree预测:' degree_result = degree_pr...
yinzhao0312/Position-predict
yin/predict_model/get_result.py
Python
gpl-2.0
1,049
#!/usr/bin/python # -*- coding: utf-8 -*- #Copyright (C) Fiz Vazquez vud1@sindominio.net # Modified by dgranda #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...
viiru-/pytrainer
pytrainer/gui/windowmain.py
Python
gpl-2.0
103,483
from pywink.devices.base import WinkDevice class WinkRobot(WinkDevice): """ Represents a Wink robot. """ def __init__(self, device_state_as_json, api_interface): super(WinkRobot, self).__init__(device_state_as_json, api_interface) self._available = True self._capability = "fir...
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/pywink/devices/robot.py
Python
gpl-2.0
782
#!/usr/bin/python # coding=utf-8 ''' @authors: David,Erwan, Theo version Python 2.7 and 3.4 This prog permits configure Precidot and Novar according to 2 input files. first one is created from eagle by a module "testeur_UM.pnp" and contains components and pins x & y coordonates second one is not yet defin...
theouf/CMStools
CMS_Conf.py
Python
gpl-2.0
6,570
# encoding: utf-8 from yast import import_module import_module('UI') from yast import * class Frame1Client: def main(self): UI.OpenDialog( VBox( Frame("Hey! I&mportant!", Label("Hello, World!")), PushButton("&OK") ) ) UI.UserInput() UI.CloseDialog() Fra...
yast/yast-python-bindings
examples/Frame1.py
Python
gpl-2.0
340
#!/usr/bin/env python """ Written by Brett Dunscomb This is the game client for the game manhunt The object of the game is to move into the space occupied by the other player """ import socket import select import sys import os import time data = 'hello' move = 'up' host = 'localhost' port = 50000 size = 1024 #game ...
Brett-D/cs494program
echoclient.py
Python
gpl-2.0
3,368
from setuptools import setup from ngmaster import __version__ def readme(): with open('README.md', encoding='utf-8') as f: return f.read() setup(name='ngmaster', version=__version__, description='In silico multi-antigen sequence typing for Neisseria gonorrhoeae (NG-MAST)', long_descri...
MDU-PHL/ngmaster
setup.py
Python
gpl-2.0
1,595
"""Test pylint.extension.typing - consider-using-alias 'py-version' needs to be set to '3.7' or '3.8' and 'runtime-typing=no'. """ # pylint: disable=missing-docstring,invalid-name,unused-argument,line-too-long,unsubscriptable-object import collections import collections.abc import typing from collections.abc import Aw...
PyCQA/pylint
tests/functional/ext/typing/typing_consider_using_alias_without_future.py
Python
gpl-2.0
2,165
#!/usr/bin/env python3 import socket HOST = '127.0.0.1' # The server's hostname or IP address PORT = 65432 # The port used by the server with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((HOST, PORT)) s.sendall(b'Hello, world') data = s.recv(1024) print('Received', repr(data...
RobMackie/robiverse
python/echo_client/echo_client.py
Python
gpl-2.0
323
import binascii data = ''' D9 51 44 5C 65 D5 3D 7D C8 67 BC 68 C8 68 6F 3F C8 64 3F 30 48 41 72 3F 75 C8 67 F4 68 48 B9 6E 7C C8 7F 3C 74 5C 74 3C 74 3C 5C 3C 74 3C 5C 77 48 FE E8 67 C8 49 48 48 48 48 48 48 48 48 48 48 71 43 00 00 00 00 00 00 ''' data = data.replace(' ', '') data = data.replace('\n', '') data = l...
Qwaz/solved-hacking-problem
sciencewar/2018/ezbt/solver.py
Python
gpl-2.0
990
from amitools.vamos.astructs import LibraryStruct from amitools.vamos.atypes import Library, NodeType from amitools.fd import read_lib_fd, generate_fd from .vlib import VLib from .stub import LibStubGen from .patch import LibPatcherMultiTrap from .impl import LibImplScanner class LibCreator(object): """create a vam...
FrodeSolheim/fs-uae-launcher
amitools/vamos/libcore/create.py
Python
gpl-2.0
3,188
# Time-stamp: <02/02/04 22:11:36 smulloni> ######################################################################## # Copyright (C) 2002 Jocob Smullyan <smulloni@smullyan.org> # # You may distribute under the terms of either the GNU General # Public License or the SkunkWeb License, as specified in the # ...
drewcsillag/skunkweb
test/vfs_testsuite.py
Python
gpl-2.0
2,337
#!/usr/bin/python # -*- coding: utf-8 -*- # -------------------------------------------------------------------------- # File Name: try.py # Author: Zhao Yanbai # Wed Dec 28 21:41:17 2011 # Description: none # -------------------------------------------------------------------------- try: s = input("Enter an i...
acevest/acecode
learn/python/try.py
Python
gpl-2.0
456
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import unittest from unittest.mock import patch, call import logging.config from pathlib import Path from typing import List, Tuple from feed_maker_util import Config from new_list_collector import NewListCollector logging.config.fileConfig(os.enviro...
terzeron/FeedMaker
bin/test_new_list_collector.py
Python
gpl-2.0
4,610
"""PyDbLite.py adapted for MySQL backend Differences with PyDbLite: - pass the connection to the MySQL db as argument to Base() - in create(), field definitions must specify a type - no index - the Base() instance has a cursor attribute, so that SQL requests can be executed : db.cursor.execute(an_sql_req...
leleobhz/scripts
python/chat_back_machine/engine/PyDbLite/MySQL.py
Python
gpl-2.0
11,904
# -*- coding: utf-8 -*- """Model unit tests.""" import datetime as dt import pytest from blogaggregator.user.models import User, Role from .factories import UserFactory @pytest.mark.usefixtures('db') class TestUser: def test_get_by_id(self): user = User('foo', 'foo@bar.com') user.save() ...
andre-geldenhuis/bloggregator
blogaggregator/tests/test_models.py
Python
gpl-2.0
1,687
#hw 1/ task8/ Sergei Shybkoi t = (1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 'a', 'b', 'c') print "Set:",t print "Each third element:" print t[2::3] print t[-1*len(t)+2:-1:3]
pybursa/homeworks
s_shybkoy/hw1/hw1_task8_ShybkoiSergei.py
Python
gpl-2.0
162
""" Module for building and working with Poses. """ import thread, random, re, pprint, sets import pickle import maya.cmds as mc import pymel.core as pm from pymel.core import mel, Path from pymel.core.uitypes import OptionMenu #from pymelX import register_runtime from impress import register from config import RUN...
kinetifex/maya-kinetifex
scripts/kinetifex/poses.py
Python
gpl-2.0
28,451
from django.http import HttpResponse from django.http import Http404 from django.shortcuts import render_to_response from fotis.albums.models import Album def index(request): year_list = Album.objects.all().order_by('-year') return render_to_response('albums/index.html', {'year_list': year_list}) def year(req...
jamuelle/fotis
albums/views.py
Python
gpl-2.0
591
##Edge bundling=group ##input_layer=vector ##cluster_field=field input_layer ##weight_field=field input_layer ##use_weight_field=boolean true ##max_distance=number 0.008 ##collapsed_lines=output vector from qgis.core import * from qgis.gui import * import qgis.utils from PyQt4.QtCore import * import processing from pr...
dts-ait/qgis-edge-bundling
summarize.py
Python
gpl-2.0
4,463
#!/usr/bin/env python ## guppy.py - Main program ## Copyright (C) 2005 Tony Tsui <tsui.tony@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 2 of the License, or ...
ttsui/guppy
src/guppy.py
Python
gpl-2.0
21,484
''' This script is run as root by the osmc update module. ''' import apt import socket import sys from datetime import datetime import json import os import time import subprocess import traceback from CompLogger import comprehensive_logger as clog t = datetime class Logger(object): def __init__(self, filename="Def...
indie1982/osmc-fixes
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/apt_cache_action.py
Python
gpl-2.0
11,354