repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
hpcugent/easybuild-framework
easybuild/framework/easyconfig/constants.py
1
2040
# # Copyright 2013-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (FW...
gpl-2.0
-5,156,022,926,621,411,000
37.490566
107
0.730392
false
id0tfqh/statistic
check-ip.py
1
1236
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re pattern = r'^[0-9.]+$' try: addr = raw_input('input ip address: \n') if re.match(pattern, addr): pass else: print('A incorrect address') addr = '192.168.1.1' except ValueError: print "A incorrect address" command = 'ipset -L | grep ' comman...
gpl-3.0
-7,377,820,511,277,487,000
31.526316
74
0.682039
false
TylerTemp/tomorrow
lib/hdlr/tomorrow/blog/edit.py
1
2586
import tornado.web import logging import json try: from urllib.parse import unquote from urllib.parse import quote except ImportError: from urllib import unquote from urllib import quote from .base import BaseHandler from ..base import EnsureUser from lib.db.tomorrow import Article, User class EditHa...
gpl-3.0
-6,393,562,031,929,236,000
29.069767
74
0.588554
false
istellartech/OpenGoddard
examples/11_Polar_TSTO_Taiki.py
1
19117
# -*- coding: utf-8 -*- # Copyright 2017 Interstellar Technologies Inc. All Rights Reserved. from __future__ import print_function import numpy as np from scipy import interpolate import matplotlib.pyplot as plt from OpenGoddard.optimize import Problem, Guess, Condition, Dynamics class Rocket: # Atmosphere Param...
mit
2,229,820,025,872,743,400
37.104208
228
0.603114
false
algorithmic-music-exploration/amen
amen/timing.py
1
3596
#!/usr/bin/env python '''Timing interface''' from bisect import bisect_left, bisect_right import numpy as np import pandas as pd import librosa class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, au...
bsd-2-clause
8,363,270,816,140,576,000
29.735043
88
0.55812
false
Jumpscale/jumpscale6_core
lib/JumpScale/baselib/remote/fabric/FabricTool.py
1
1222
from JumpScale import j j.system.platform.ubuntu.check() import fabric import fabric.api # from fabric.api import run as frun # from fabric.api import execute as fexecute # from fabric.api import env as fenv # from fabric.api import open_shell as fopen_shell # from fabric.api import path as fpath # from fabric.api i...
bsd-2-clause
7,891,684,852,131,338,000
25.565217
103
0.638298
false
andnovar/networkx
networkx/algorithms/shortest_paths/tests/test_generic.py
1
7273
from __future__ import division from nose.tools import assert_almost_equal from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_true from nose.tools import assert_raises from nose.tools import ok_ from nose.tools import raises import networkx as nx def validate_grid_...
bsd-3-clause
-7,788,339,697,315,782,000
37.893048
89
0.595903
false
ronkitay/Rons-Tutorials
Python/APIs/tor_json_processing.py
1
3684
#!/usr/bin/python # -*- coding: utf-8 -*- """ Python considers any map or collection as JSON elements. 'Serializing/DeSerializing' them is VERY easy Read: - json.load(data_file) --> Loads an object from a File - json.loads(json_as_string) --> Loads an object from a string representing a JSON object Write: - json.d...
mit
8,985,401,378,486,224,000
28.238095
102
0.615635
false
finalion/WordQuery
src/prepare.py
1
4014
#-*- coding:utf-8 -*- # # Copyright © 2016–2017 Liang Feng <finalion@gmail.com> # # Support: Report an issue at https://github.com/finalion/WordQuery/issues # # 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...
gpl-3.0
1,858,871,427,544,899,800
31.609756
100
0.680379
false
dalgibbard/fishfeedtime
fishfeedtime.py
1
4825
#!/usr/bin/python # # Fishfeedtime powers down Powerheads/Filters/Pumps of your choice (which are connected to 433.92MHz power socket controllers) # for a set duration. # ## GPIO Pin Definitions # Pin with button circuit GPIO Pullup BUTTON = 25 # LED Pin if present... LED = True LEDPIN = 11 # Pin connect to 434MHz tra...
bsd-3-clause
-5,868,628,276,199,227,000
27.892216
126
0.61057
false
skyostil/albumart
lib/albumart/yahoo/search/webservices.py
1
48639
"""Yahoo Search Web Services This module implements a set of classes and functions to work with the Yahoo Search Web Services. All results from these services are properly formatted XML, and this package facilitates for proper parsing of these result sets. Some of the features include: * Extendandable API, with r...
gpl-2.0
-7,296,064,143,722,061,000
35.598194
89
0.58745
false
8l/beri
cheritest/trunk/tests/mem/test_ll_unalign.py
2
2396
#- # Copyright (c) 2011 Robert N. M. Watson # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # License...
apache-2.0
4,248,174,595,657,697,300
37.645161
104
0.705342
false
rjschwei/azure-sdk-for-python
azure-mgmt-redis/setup.py
1
2428
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
mit
-4,773,402,602,854,851,000
31.373333
92
0.575783
false
ravenac95/virtstrap
virtstrap-core/tests/test_hooks.py
1
1073
""" Test Plugins ------------ """ from nose.tools import raises from virtstrap.hooks import Hook, create def test_initialize_Hook(): hook = Hook() @raises(NotImplementedError) def test_run_hook(): hook = Hook() options = None hook.run('fake_event', options) def test_fake_hook(): class FakeHook(H...
mit
2,578,011,350,143,873,000
22.844444
70
0.59739
false
pyqt/maya2012-qt4
PyQt4/uic/Compiler/qobjectcreator.py
1
5626
############################################################################# ## ## Copyright (C) 2011 Riverbank Computing Limited. ## Copyright (C) 2006 Thorsten Marek. ## All right reserved. ## ## This file is part of PyQt. ## ## You may use this file under the terms of the GPL v2 or the revised BSD ## license as fol...
gpl-3.0
-7,984,635,184,039,644,000
32.488095
103
0.612336
false
openhealthcare/gloss
sites/uch/mock_api.py
1
4898
import random from gloss import models from gloss.translators.hl7 import coded_values from datetime import datetime, date, timedelta from gloss.external_api import save_message first_names = [ "Jane", "James", "Chandeep", "Samantha", "Oliver", "Charlie", "Sophie", "Emily", "Lily", "Olivia", "Amelia", "Isabell...
gpl-3.0
955,071,997,367,505,700
26.829545
83
0.627195
false
jtoppins/beaker
IntegrationTests/src/bkr/inttest/client/test_workflow.py
1
4319
# 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. import unittest2 as unittest import re from bkr.client import BeakerWo...
gpl-2.0
-6,848,947,080,913,979,000
45.44086
111
0.561473
false
adamnew123456/myweb
myweb/backend/db.py
1
8614
""" An interface on top of a database, which stores articles along with associated metadata. """ from collections import namedtuple import os import os.path import sqlite3 import sys import zlib import myweb.backend.query as query import myweb.backend.utils as utils # The connected database - there's meant to be onl...
bsd-2-clause
-7,318,419,859,649,137,000
34.44856
87
0.643023
false
alogg/dolfin
demo/undocumented/bcs/python/demo_bcs.py
1
1676
"""This demo illustrates how to set boundary conditions for meshes that include boundary indicators. The mesh used in this demo was generated with VMTK (http://www.vmtk.org/).""" # Copyright (C) 2008-2012 Anders Logg # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # ...
gpl-3.0
8,899,261,710,372,261,000
26.933333
77
0.71778
false
yunify/qingcloud-cli
qingcloud/cli/iaas_client/actions/eip/allocate_eips.py
1
3185
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
apache-2.0
-5,052,867,756,647,274,000
43.236111
101
0.569545
false
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/tools/Editra/src/syntax/_actionscript.py
1
3261
############################################################################### # Name: actionscript.py # # Purpose: Define ActionScript syntax for highlighting and other features # # Author: Cody Precord <cprecord@editra.org> ...
mit
-7,326,205,709,849,318,000
35.918605
85
0.467035
false
mhlechner/psi4
psi4/driver/inputparser.py
1
30572
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
gpl-2.0
7,811,537,964,894,177,000
36.419829
138
0.580204
false
Kijewski/ctypesgen_to_pxd
convert_libc.py
1
3013
#!/usr/bin/env python3 from os import open, O_RDWR, makedirs, devnull from os.path import abspath, exists, isfile, isdir, dirname from subprocess import check_call, check_output, STDOUT from re import compile as compile_re, M from sys import argv, stderr # Standard headers as of POSIX.1-2008 (Base Specifications, Is...
apache-2.0
6,184,763,107,851,232,000
18.43871
75
0.546963
false
CalthorpeAnalytics/urbanfootprint
footprint/main/publishing/user_initialization.py
1
5524
# UrbanFootprint v1.5 # Copyright (C) 2017 Calthorpe Analytics # # This file is part of UrbanFootprint version 1.5 # # UrbanFootprint is distributed under the terms of the GNU General # Public License version 3, as published by the Free Software Foundation. This # code is distributed WITHOUT ANY WARRANTY, without impl...
gpl-3.0
6,012,251,428,999,490,000
39.321168
149
0.705467
false
zulumarketing/html2pdf
xhtml2pdf/w3c/cssDOMElementInterface.py
1
4314
#!/usr/bin/env python ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##~ Copyright (C) 2002-2004 TechGame Networks, LLC. ##~ ##~ This library is free software; you can redistribute it and/or ##~ modify it under the terms of the BSD style License as found in the ##~ LICENSE file included with this distribution....
apache-2.0
-8,676,311,311,175,980,000
28.547945
97
0.529671
false
RandallDW/Aruba_plugin
plugins/org.python.pydev/pysrc/_pydevd_bundle/pydevd_utils.py
1
7871
from __future__ import nested_scopes import traceback import os try: from urllib import quote except: from urllib.parse import quote # @UnresolvedImport import inspect from _pydevd_bundle.pydevd_constants import IS_PY3K import sys from _pydev_bundle import pydev_log def save_main_module(file, module_name): ...
epl-1.0
-8,926,122,198,916,266,000
32.21097
104
0.582899
false
pbjr23/django-projects
mysite/settings.py
1
1989
""" Django settings for mysite 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...
gpl-2.0
2,987,500,169,355,664,000
23.256098
71
0.724987
false
kevin1024/vcrpy
vcr/stubs/httpx_stubs.py
1
5330
import functools import logging from unittest.mock import patch, MagicMock import httpx from vcr.request import Request as VcrRequest from vcr.errors import CannotOverwriteExistingCassetteException _logger = logging.getLogger(__name__) def _transform_headers(httpx_reponse): """ Some headers can appear mult...
mit
-8,018,359,077,275,233,000
32.522013
101
0.684053
false
radicalbit/ambari
ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/YARN/package/scripts/params.py
1
6959
""" 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 use this ...
apache-2.0
-8,420,565,907,828,314,000
46.340136
130
0.753988
false
sboosali/commands-frontends-dragon13
NatLink/SampleMacros/natspeak_sample6.py
1
1733
# # Python Macro Language for Dragon NaturallySpeaking # (c) Copyright 1999 by Joel Gould # Portions (c) Copyright 1999 by Dragon Systems, Inc. # # This sample macro file was created for my talk to the Boston Voice Users # group on November 9, 1999. It is explained in my PowerPoint slides. # # natspeak_sample6.py ...
mit
613,530,174,290,772,600
31.092593
76
0.690133
false
wiki2014/Learning-Summary
alps/build/tools/releasetools/test_rangelib.py
1
5541
# # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
gpl-3.0
-5,130,773,463,447,550,000
39.445255
79
0.632377
false
softelnet/sponge
sponge-remote-api-integration-tests/examples/remote-api-server/remote_api_security.py
1
1483
""" Sponge Knowledge Base Remote API security """ from org.openksavi.sponge.remoteapi.server.security import User # Simple access configuration: role -> knowledge base names regexps. ROLES_TO_KB = { "admin":[".*"], "guest":["example"], "anonymous":["example"]} # Simple access configuration: role -> event names regexp...
apache-2.0
108,816,748,060,182,190
46.83871
184
0.76062
false
tgetzoya/project-euler-python
problems/pe11.py
1
4396
# In the 20×20 grid below, four numbers along a diagonal line have been marked in red. # # 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 # 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 # 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 # 52 70 95 23 04 60 11 42 69 24 68 56 01 32 5...
bsd-2-clause
-8,575,176,105,820,560,000
50.658824
135
0.506946
false
maxandersen/jenkins-job-builder
jenkins_jobs/modules/publishers.py
1
186200
# Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright 2012 Varnish Software AS # Copyright 2013-2014 Antoine "hashar" Musso # Copyright 2013-2014 Wikimedia Foundation Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licen...
apache-2.0
8,813,775,262,747,440,000
41.883464
79
0.611719
false
skyostil/tracy
src/generator/Cheetah/Utils/Misc.py
1
2886
#!/usr/bin/env python # $Id: Misc.py,v 1.1 2006-09-06 09:50:10 skyostil Exp $ """Miscellaneous functions/objects used by Cheetah but also useful standalone. Meta-Data ================================================================================ Author: Mike Orr <iron@mso.oz.net> License: This software is rel...
mit
4,007,942,018,161,766,000
33.195122
80
0.597367
false
noironetworks/group-based-policy
gbpservice/contrib/tests/unit/nfp/configurator/agents/test_generic_config.py
1
12961
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-6,022,767,831,321,831,000
34.316076
79
0.602345
false
Quihico/repository.spartacus
temp/script.module.python.koding.aio/lib/koding/web.py
1
12658
# -*- coding: utf-8 -*- # script.module.python.koding.aio # Python Koding AIO (c) by whufclee (info@totalrevolution.tv) # Python Koding AIO is licensed under a # Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. # You should have received a copy of the license along with this # work...
gpl-2.0
7,584,954,019,673,659,000
40.917219
604
0.643467
false
ricco386/broadcaster
RPi.Relay/setup.py
1
1416
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # This software is licensed as described in the README.rst and LICENSE # files, which you should have received as part of this distribution. import setuptools # noinspection PyPep8Naming from raspi_mc import __version__ as VERSION DEPS = ['RPi.Sensor>=0.5.2'] CLASSIFIERS =...
bsd-3-clause
-6,201,251,968,933,849,000
29.782609
70
0.669492
false
dgvncsz0f/pingpong
tests/transport/test_system.py
1
2079
# -*- coding: utf-8 -*- # Copyright (c) 2011, Diego Souza # 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...
gpl-3.0
5,828,075,713,744,260,000
44.195652
81
0.746994
false
matthagy/physmath
physmath/test.py
1
1856
from reload import fixup fixup(0) from physmath.units import parse_unit as pu from physmath.physnum import parse_physical_number as ppn from physmath.convert import convert, convert_factor from physmath.annotator import annotator from physmath import layout import browsemath.client reload(browsemath.client) from bro...
apache-2.0
1,956,657,980,108,120,800
24.424658
76
0.641703
false
chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/views.py
1
1334
from datetime import datetime from django.conf import settings from django.db.models import Case, IntegerField, Q, Value, When from django.shortcuts import get_object_or_404, render from django.views.generic import ListView, TemplateView from .models import DataQuality class LeagueTable(ListView): model = DataQua...
bsd-3-clause
-8,691,390,755,958,600,000
29.318182
78
0.625187
false
NicoVarg99/daf-recipes
ckan/ckan/ckanext-dcatapit/ckanext/dcatapit/dcat/profiles.py
1
31302
import ast import logging import datetime from pylons import config from rdflib.namespace import Namespace, RDF, SKOS from rdflib import URIRef, BNode, Literal import ckan.logic as logic from ckanext.dcat.profiles import RDFProfile, DCAT, LOCN, VCARD, DCT, FOAF, ADMS from ckanext.dcat.utils import catalog_uri, dat...
gpl-3.0
9,136,739,147,792,279,000
38.225564
139
0.566449
false
slaveofcode/rajaongkir
rajaongkir/api.py
1
6138
from __future__ import unicode_literals import requests import json from json.encoder import JSONEncoder JNE = 'jne' POS = 'pos' TIKI = 'tiki' ALL_COURIER = 'all' class ApiRequest(object): """Basic Api request with using requests library """ json_encoder_class = JSONEncoder def __init__(self, endpo...
mit
-6,702,348,984,780,667,000
25.921053
107
0.567937
false
Julius2342/pyvlx
test/frame_set_node_name_req_test.py
1
1465
"""Unit tests for FrameSetNodeNameRequest.""" import unittest from pyvlx.api.frame_creation import frame_from_raw from pyvlx.api.frames import FrameSetNodeNameRequest class TestFrameSetNodeNameRequest(unittest.TestCase): """Test class FrameSetNodeNameRequest.""" # pylint: disable=too-many-public-methods,inv...
lgpl-3.0
-4,525,066,278,725,775,000
37.552632
77
0.674403
false
chr15m/PodSixNet
examples/LagTimeServer.py
1
1743
from __future__ import print_function from time import sleep, localtime from weakref import WeakKeyDictionary from time import time import sys from PodSixNet.Server import Server from PodSixNet.Channel import Channel class LagTimeChannel(Channel): """ This is the server representation of a single connected c...
lgpl-3.0
-1,066,932,997,699,319,200
27.112903
107
0.558233
false
superwebium/pybbb
checksumUrl.py
1
1052
#creer l'url avec son checksum import hashlib def checksumUrl(queryString,action,secret): #1. Create the entire query string for your API call without the checksum parameter "name=Test+Meeting&meetingID=abc123&attendeePW=111222&moderatorPW=333444" #2. Prepend the call name to your string "createname=Test+Meeting&me...
mit
-2,831,333,343,508,274,000
64.75
202
0.813688
false
bchappet/dnfpy
src/dnfpyUtils/stats/clusterMap.py
1
7473
from dnfpy.core.map2D import Map2D import numpy as np from sklearn.cluster import DBSCAN import scipy.spatial.distance as dist from dnfpyUtils.stats.statistic import Statistic class ClusterMap(Statistic): """ Params: "continuity" : float if different of 0.0, we assume that the cluster are continuous ...
gpl-2.0
7,517,553,050,231,811,000
39.177419
115
0.57313
false
wayward710/django-oidc-provider
oidc_provider/models.py
1
2568
import json from django.db import models from django.utils import timezone from django.conf import settings class Client(models.Model): RESPONSE_TYPE_CHOICES = [ ('code', 'code (Authorization Code Flow)'), ('id_token', 'id_token (Implicit Flow)'), ('id_token token', 'id_token token (Impl...
mit
-1,568,644,394,554,472,200
26.612903
84
0.616433
false
gurneyalex/odoo
addons/hr_holidays/models/mail_channel.py
7
1538
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class Channel(models.Model): _inherit = 'mail.channel' def partner_info(self, all_partners, direct_partners): partner_infos = super(Channel, self).partner_info(all_...
agpl-3.0
8,126,574,079,275,542,000
55.962963
131
0.570221
false
kordless/zoto-server
aztk/plugins/Paypal.py
1
7615
""" plugins/Paypal.py Author: Trey Stout Date Added: Mon Jul 24 15:29:48 CDT 2006 New interface to the same old shit... """ ## STD LIBS from md5 import md5 from datetime import date, datetime from xml.dom import minidom from pprint import pprint, pformat from math import floor import time ## OUR LIBS from AZTKAPI i...
bsd-3-clause
2,491,178,433,134,927,400
34.584112
143
0.695338
false
emory-libraries/readux
readux/books/tests/views.py
1
42006
from datetime import datetime, timedelta from django.contrib.auth import get_user_model from django.core.paginator import Paginator from django.core.urlresolvers import reverse from django.http import HttpResponse from django.template.defaultfilters import filesizeformat from django.test import TestCase import json fro...
apache-2.0
-1,093,845,412,036,145,700
46.952055
358
0.63529
false
shw700/latrace-plus
frontend/la2html.py
1
15468
#!/usr/bin/python import sys import re color_map = [ "silver", "aquamarine", "tan", "skyblue", "plum", "yellowgreen", "moccasin" ] def get_color_level(n): return color_map[n % len(color_map)] def enstyle_parameters(s): result = "" if s == "" or s == "void": return "<b>void</b>" nexti = s.find("=") while...
gpl-3.0
7,565,566,668,682,800,000
34.315068
314
0.612749
false
michellab/SireUnitTests
unittests/SireIO/test_amberterms.py
1
5571
from Sire.IO import * from Sire.MM import * from Sire.Mol import * from Sire.CAS import * from Sire.Maths import * from nose.tools import assert_almost_equal rangen = RanGenerator() mol = MoleculeParser.read("../io/ose.top","../io/ose.crd") \ [MolWithResID(ResName("OSE"))].molecule() def _assert_expressions...
gpl-3.0
-5,070,307,527,353,900,000
34.484076
93
0.581763
false
pahaz/fabtools
fabtools/openvz/operations.py
1
3962
""" OpenVZ containers ================= """ from __future__ import with_statement from fabric.api import * def create(ctid, ostemplate=None, config=None, private=None, root=None, ipadd=None, hostname=None, **kwargs): """ Create an OpenVZ container. """ return _vzctl('create', ctid, ostempl...
bsd-2-clause
-4,828,890,494,168,943,000
23.45679
87
0.594649
false
thanatos/lets-encrypt-preview
letsencrypt-nginx/setup.py
1
2062
import sys from setuptools import setup from setuptools import find_packages version = '0.5.0.dev0' # Please update tox.ini when modifying dependency version requirements install_requires = [ 'acme=={0}'.format(version), 'letsencrypt=={0}'.format(version), 'PyOpenSSL', 'pyparsing>=1.5.5', # Python3...
apache-2.0
2,273,293,315,519,230,000
28.884058
78
0.625121
false
orwa1902/code-exemples
TicTacToe.py
1
4091
board = [] for i in range(3): board.append(["*"] * 3) #a function that creats the board def print_board(board): for row in board: print (" ".join(row)) print("Let\'s play Tic Tac Toe! the rules are simple. you, the players, is given two choices: the row and column of your symbol. note that the numbers are between 0...
apache-2.0
-7,065,360,161,552,512,000
30.713178
199
0.58152
false
matthiasplappert/pibot
src/robot/base.py
1
4268
import logging import select import Pyro4 import Pyro4.core import Pyro4.naming import Pyro4.socketutil class Robot(object): def __init__(self): self._sensors = [] self._actuators = [] self.n_steps = 0 @property def actuators(self): return self._actuators @actuators....
mit
-7,062,326,412,749,371,000
29.056338
99
0.594424
false
bashu/django-easy-seo
seo/south_migrations/0004_auto__del_url__del_unique_url_url_site.py
1
2904
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'Url', fields ['url', 'site'] db.delete_unique('seo_url', ['url', 'site_id']...
gpl-3.0
-8,277,121,684,023,901,000
49.964912
161
0.546488
false
UltrosBot/Ultros-examples
example_clj/plugins/example_clj/__init__.py
1
1893
""" This is an example plugin to give you an idea of how to use Clojure in your plugins, should you wish to. We don't really expect anyone to use this, but we've included it to show that it's actually possible. If you like Lisps, take a look at Clojure and also ClojurePy, which is what we're using here. """ __author_...
artistic-2.0
8,622,630,480,154,848,000
29.532258
77
0.641838
false
spmjc/plugin.video.freplay
resources/lib/channels/tf12.py
1
4906
#-*- coding: utf-8 -*- from resources.lib import utils import base64 import hashlib import json import urllib import urllib2 import urlparse from resources.lib import globalvar title=['TF1','NT1','HD1','TMC','XTRA'] img=['tf1','nt1','hd1','tmc','xtra'] readyForUse=True #urlCatalog='http://api.mytf1.tf1....
gpl-2.0
-7,290,840,593,552,326,000
38.248
138
0.649613
false
jobbrIO/docs
conf.py
1
10123
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Jobbr documentation build configuration file, created by # sphinx-quickstart on Fri Nov 4 19:20:28 2016. # # 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 # auto...
mit
341,553,964,225,169,100
27.668555
80
0.688933
false
sambev/ircbot
scrapers/cafescraper.py
1
1407
def scrapeCafe(): """ Scrape the EastBay Cafe's site for the current lunch menu """ from bs4 import BeautifulSoup import requests # Get the page contents and make a soup object from it page = requests.get('http://www.eastbaycafe.com/menu.php') the_html = BeautifulSoup(page.text) mapping = { 'Steam \'n T...
mit
-7,617,186,305,014,569,000
28.333333
109
0.574271
false
mendersoftware/integration
testutils/api/proto_shell.py
1
2637
# Copyright 2021 Northern.tech AS # # 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 ag...
apache-2.0
-2,031,462,545,458,636,000
31.158537
90
0.617368
false
WoLpH/EventGhost
plugins/Streamzap/__init__.py
1
6300
# -*- coding: utf-8 -*- # # This file is a plugin for EventGhost. # Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 v...
gpl-2.0
6,701,844,419,906,486,000
25.804255
78
0.59184
false
joedborg/fusilier
fusilier/settings.py
1
3090
""" Django settings for fusilier project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import o...
agpl-3.0
1,931,001,291,523,696,600
24.121951
91
0.682201
false
MaxTyutyunnikov/lino
obsolete/src/lino/apps/pinboard/quotes.py
1
4769
## Copyright 2003-2006 Luc Saffre ## This file is part of the Lino project. ## Lino 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...
gpl-3.0
3,548,653,768,347,829,000
28.80625
70
0.658419
false
donyfeng/httpac
httpac.py
1
4588
#!/usr/bin/env python import urllib.request import urllib.parse import http.cookiejar import re import time import json caller_url = "http://caller.ap01.aws.af.cm" tieba_url = "http://tieba.baidu.com" token_url = "https://passport.baidu.com/v2/api/?getapi&tpl=mn&apiver=v3&tt=1385610373352&class=login&loginty...
gpl-2.0
6,571,578,771,101,169,000
29
150
0.53204
false
rogerthat-platform/gae-plugin-framework
src/framework/server/framework/bizz/session.py
1
2118
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
apache-2.0
-4,808,146,808,591,208,000
30.61194
74
0.674221
false
ColumbiaCMB/kid_readout
kid_readout/equipment/agilent_33220.py
1
2243
""" Agilent 33220A Function generator """ import socket import time class FunctionGenerator(object): def __init__(self,addr=('192.168.1.135', 5025)): self.addr = addr def set_load_ohms(self,ohms): self.send("OUTPUT:LOAD %d" % ohms) def set_dc_voltage(self,volts): s...
bsd-2-clause
84,217,115,527,791,150
31.042857
113
0.557735
false
ikvk/imap_tools
tests/messages_data/rfc2822/example06.py
1
1239
import datetime DATA = dict( subject='Re: Saying Hello', from_='mary@example.net', to=('jdoe@machine.example',), cc=(), bcc=(), reply_to=('smith@home.example',), date=datetime.datetime(1997, 11, 21, 10, 1, 10, tzinfo=datetime.timezone(datetime.timedelta(-1, 64800))), date_str='Fri, ...
apache-2.0
-7,564,419,591,360,146,000
58.047619
389
0.616626
false
unnikrishnankgs/va
annotator/models.py
1
2852
from django.db import models from django.contrib.staticfiles import finders class Video(models.Model): annotation = models.TextField(blank=True, help_text="A JSON blob containing all user annotation sent from client.") source = models.CharField(max_length=1048, blank=True, help_text=("Name of v...
bsd-2-clause
-1,258,414,000,665,692,400
46.533333
254
0.646213
false
editxt/editxt
editxt/platform/__init__.py
1
1745
# -*- coding: utf-8 -*- # EditXT # Copyright 2007-2013 Daniel Miller <millerdev@gmail.com> # # This file is part of EditXT, a programmer's text editor for Mac OS X, # which can be found at http://editxt.org/. # # EditXT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
gpl-3.0
-8,238,820,184,732,468,000
29.614035
75
0.632665
false
cpn18/track-chart
gps-pi/combolog4_fft.py
1
4482
#!/usr/bin/python import gps import math import datetime import threading #import the adxl345 module import adxl345 import time import greatcircle import numpy as np import scipy.fftpack lock = threading.Lock() gpstime = "" def gps_logger(): global inSync,gpstime logging = False # feet threshold = 25 # L...
gpl-3.0
6,752,739,938,205,765,000
22.465969
156
0.504909
false
jayantk/pnp
experiments/dipart/scripts/visualize/generate_heatmap.py
1
1411
#!/usr/bin/python # Generate heatmap of points import numpy as np import seaborn as sns sns.set() import matplotlib.pyplot as plt from heatmap_data import * # image_name= # im = plt.imread(image_name); # implot = plt.imshow(im); # Load the example flights dataset and conver to long-form # flights_long = sns.load_da...
apache-2.0
4,418,347,765,884,188,000
22.915254
117
0.634302
false
untitaker/vdirsyncer
docs/conf.py
1
2718
# -*- coding: utf-8 -*- import datetime import os import setuptools_scm extensions = ['sphinx.ext.autodoc'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'vdirsyncer' copyright = (u'2014-{}, Markus Unterwaditzer & contributors' .format(datetime.date.today().st...
mit
-4,870,969,946,447,225,000
28.225806
79
0.59713
false
mjwestcott/projecteuler
python/problem68.py
1
2098
""" problem68.py https://projecteuler.net/problem=68 What is the maximum 16-digit string for a 'magic' 5-gon ring? """ from itertools import chain flatten = chain.from_iterable def five_gon_rings(n): """Return list of solutions to the 'magic' 5-gon ring problem, each line summing to n. The empty list will b...
mit
-8,939,477,965,107,197,000
40.137255
79
0.551954
false
ioannistsanaktsidis/inspire-next
inspire/modules/workflows/tasks/matching.py
1
7191
# -*- coding: utf-8 -*- # ## This file is part of INSPIRE. ## Copyright (C) 2014 CERN. ## ## INSPIRE 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) an...
gpl-2.0
800,043,034,938,041,700
34.776119
81
0.623279
false
mupi/tecsaladeaula
timtec/settings_local_testec.py
1
3024
# -*- coding: utf-8 -*- # configurations for the production server # https://docs.djangoproject.com/en/dev/ref/settings/ DEBUG = False TEMPLATE_DEBUG = DEBUG TIMTEC_THEME = 'tecsaladeaula' SITE_HOME = '/' SITE_DOMAIN = 'teste.tecsaladeaula.com.br' SITE_URL = 'https://teste.tecsaladeaula.com.br' ALLOWED_HOSTS = [ ...
agpl-3.0
-4,544,238,629,032,004,600
27.261682
98
0.595238
false
Tomcuzz/OctaHomeAutomation
OctaHomeSettings/views.py
1
14790
from django.conf import settings import json from OctaHomeCore.baseviews import * from OctaHomeCore.models import * from OctaHomeCore.OctaFiles.menus.base import * from OctaHomeCore.weathermodels import * from OctaHomeCore.helpers import * from OctaHomeCore.authmodels import * from OctaHomeAppInterface.models import *...
mit
-2,805,894,448,979,393,500
39.299728
175
0.680325
false
c-base/libavg
src/test/PythonTest.py
1
8073
# -*- coding: utf-8 -*- # libavg - Media Playback Engine. # Copyright (C) 2003-2014 Ulrich von Zadow # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, o...
lgpl-2.1
-7,251,548,124,392,817,000
33.353191
90
0.589124
false
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/ec.py
1
10656
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography import utils from cryptography.exceptions import ( ...
mit
4,637,279,592,631,494,000
32.828571
79
0.615709
false
Belval/pdf2image
pdf2image/parsers.py
1
1820
""" pdf2image custom buffer parsers """ from io import BytesIO from PIL import Image def parse_buffer_to_ppm(data): """Parse PPM file bytes to Pillow Image""" images = [] index = 0 while index < len(data): code, size, rgb = tuple(data[index : index + 40].split(b"\n")[0:3]) siz...
mit
-5,405,256,562,195,068,000
23.931507
88
0.550549
false
erdc/proteus
proteus/tests/cylinder2D/ibm_method/cylinder_so.py
1
3701
from __future__ import absolute_import import proteus.default_so from importlib import reload reload(proteus.default_so) from proteus.default_so import * try: from . import cylinder except: import cylinder reload(cylinder) from proteus.SplitOperator import Sequential_FixedStep_Simple, defaultSystem if cylinde...
mit
5,619,028,336,860,877,000
34.932039
109
0.623885
false
Edgar-Bruno/Estudos_iniciais_Python
GTK/sudoku/OrdenadasVerificar.py
1
1348
#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Verificação de repetição no eixo das abscissas indexMatriz = 46 # Index da matriz passado no click i = indexMatriz dicOrdenadas = {} # Key é o index da listaMatriz, value é o existe ou não listaMatriz = [6, 2, 4, 1, 5, 9, 7, 6, 8, 9, 7, 8, 2, 6, 3, 1, 9,...
gpl-3.0
-7,201,601,456,120,977,000
18.735294
84
0.545116
false
abarnert/pyinterval
test/__init__.py
1
2481
# Copyright (c) 2008, Stefano Taschini <taschini@ieee.org> # All rights reserved. # See LICENSE for details. class app(object): def __init__(self, doctests = None, docfiles = None): self.doctests = doctests or [] self.docfiles = docfiles or [] def _import(self, name): m = __import__(n...
bsd-3-clause
6,660,165,790,644,861,000
34.956522
131
0.54736
false
miyucy/oppia
extensions/objects/models/objects.py
1
13859
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-7,645,703,186,979,859,000
26.227898
79
0.553503
false
sarielsaz/sarielsaz
test/functional/test_framework/test_framework.py
1
20268
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Sarielsaz Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" from collections import deque from enum import Enum import logging im...
mit
-1,083,212,665,010,364,000
41.049793
310
0.600849
false
vntarasov/openpilot
selfdrive/crash.py
1
2009
"""Install exception handler for process crash.""" import os import sys import threading import capnp from selfdrive.version import version, dirty from selfdrive.swaglog import cloudlog from common.hardware import PC if os.getenv("NOLOG") or os.getenv("NOCRASH") or PC: def capture_exception(*args, **kwargs): pa...
mit
-4,263,265,187,109,849,000
27.295775
118
0.67546
false
gurneyalex/odoo
addons/website_slides/tests/test_security.py
7
12127
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_slides.tests import common from odoo.exceptions import AccessError, UserError from odoo.tests import tagged from odoo.tests.common import users from odoo.tools import mute_logger @tagged('secur...
agpl-3.0
-2,554,847,660,156,569,000
45.28626
152
0.63371
false
jeonghoonkang/BerePi
apps/logger/berepi_logger.py
1
1372
# -*- coding: utf-8 -*- # author : http://github.com/jeonghoonkang import logging #import logging.config from logging.handlers import RotatingFileHandler #logging.config.fileConfig('logging.conf') LOG_FILENAME = "/home/pi/devel/BerePi/logs/berelogger.log" logger = logging.getLogger('BereLogger') logger.setLevel(logg...
bsd-2-clause
-6,053,963,852,080,583,000
25.901961
122
0.690962
false
fluxer/spm
nuitka/nuitka/codegen/IdCodes.py
1
1739
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
gpl-2.0
5,721,993,039,687,379,000
33.78
78
0.646348
false
mrmarkhurlburt/django_media_library
catalog/views.py
1
4650
from django.shortcuts import render # Create your views here. from .models import Book, Author, BookInstance, Genre, Language def index(request): """ View function for home page of site. """ # Generate counts of some of the main objects num_books=Book.objects.all().count() num_instances=BookI...
cc0-1.0
2,464,272,805,686,653,400
34.496183
145
0.704301
false
berguner/svmap
assemble.py
1
6568
import sys import shutil import subprocess import argparse import os import commands from multiprocessing import Pool parser = argparse.ArgumentParser(description='Assemble reads extracted from each region') parser.add_argument('--bed', help='.bed file of SV regions', type=str) parser.add_argument('--dipspades', help=...
gpl-3.0
-4,185,502,430,161,534,000
54.669492
148
0.559227
false
marrow/WebCore
example/annotation.py
1
2204
# encoding: utf-8 """Python 3 function annotation and AnnotationExtension example.""" from json import dumps class Root: def __init__(self, context): self._ctx = context def tmpl(self) -> 'mako:./template.html': return dict() def mul(self, a: int = None, b: int = None) -> 'json': """Multiply two values...
mit
5,416,544,557,947,799,000
30.485714
109
0.712795
false
leighpauls/k2cro4
native_client_sdk/src/build_tools/sdk_tools/sdk_update_main.py
2
11039
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # CMD code copied from git_cl.py in depot_tools. import config import cStringIO import download import json import logging import ...
bsd-3-clause
-2,176,716,282,897,276,200
28.126649
80
0.660024
false
kblomqvist/yasha
yasha/cli.py
1
9767
""" The MIT License (MIT) Copyright (c) 2015-2021 Kim Blomqvist 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, ...
mit
-5,155,256,428,255,109,000
37.604743
232
0.66008
false
compmetagen/micca
micca/tp/muscle.py
1
1664
## Copyright 2016 Davide Albanese <davide.albanese@gmail.com> ## Copyright 2016 Fondazione Edmund Mach (FEM) ## This file is part of micca. ## ## micca 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 ...
gpl-3.0
-4,189,151,909,305,110,500
31.627451
78
0.670072
false
triskadecaepyon/pyworkout-toolkit
pyworkout/parsers/tcxtools.py
1
4560
""" Tools to process TCX files, specifically for parsing and converting to other formats. """ import numpy as np import pandas as pd from lxml import objectify import dateutil.parser import logging TPXNS = "{http://www.garmin.com/xmlschemas/ActivityExtension/v2}TPX" LXNS = "{http://www.garmin.com/xmlschemas/ActivityE...
bsd-3-clause
-4,978,831,119,489,418,000
32.284672
89
0.505263
false
Grk0/python-libconf
setup.py
1
1185
from setuptools import setup setup( name='libconf', version='2.0.1', description="A pure-Python libconfig reader/writer with permissive license", long_description=open('README.rst').read(), author="Christian Aichinger", author_email="Greek0@gmx.net", url='https://github.com/Grk0/python-libc...
mit
-7,864,377,935,274,342,000
38.5
80
0.620253
false
LumaPictures/rez
src/rez/utils/sourcecode.py
1
11788
from rez.utils.formatting import indent from rez.utils.data_utils import cached_property from rez.utils.logging_ import print_debug from inspect import getsourcelines from textwrap import dedent from glob import glob import traceback import os.path import imp def early(): """Used by functions in package.py to har...
lgpl-3.0
-7,031,366,739,847,356,000
30.102902
83
0.580336
false