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
chrischoy/3D-R2N2
lib/blender_renderer.py
1
10773
#!/usr/bin/env python3 import _init_paths import time import os import contextlib from math import radians import numpy as np from PIL import Image from tempfile import TemporaryFile from lib.utils import stdout_redirected from lib.config import cfg import bpy def voxel2mesh(voxels): cube_verts = [[0, 0, 0], ...
mit
1,062,251,790,059,312,600
32.77116
101
0.560475
false
spantaleev/sijax-python
sijax/core.py
1
16018
# -*- coding: utf-8 -* from __future__ import (absolute_import, unicode_literals) """ sijax.core ~~~~~~~~~~ Implements the main Sijax class, an instance of which is used to register callbacks, invoke callbacks, setup events handlers, etc. :copyright: (c) 2011 by Slavi Pantaleev. :license: BS...
bsd-3-clause
8,143,440,697,030,521,000
38.163814
84
0.629667
false
epam/DLab
infrastructure-provisioning/src/general/scripts/azure/edge_configure.py
1
20304
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 # #...
apache-2.0
-8,906,384,043,524,874,000
65.789474
131
0.578063
false
markwal/Cura
plugins/CuraEngineBackend/CuraEngineBackend.py
1
10593
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from UM.Backend.Backend import Backend from UM.Application import Application from UM.Scene.SceneNode import SceneNode from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Preferences import Preferenc...
agpl-3.0
-7,926,261,142,368,935,000
37.380435
180
0.652412
false
adamsumm/CausalMario
HiddenCauses/irm/Mario/parse.py
1
2165
import sys import re import random vevent = re.compile("V\s+([\-\d\w]+)\s+(\w+)") sevent = re.compile("S\s+([\-\d\w]+)\s+([\-\d\w]+)") aevent = re.compile("A\s+([\-\d\w]+)") devent = re.compile("D\s+([\-\d\w]{2,})") cevent = re.compile("C\s+([\-\d\w]+)\s+[\-\d]*\s*([\-\d\w]+)\s+([\-\d\w]+)") animate = ["Goomba","Mario"...
mit
7,378,686,023,350,711,000
28.256757
76
0.579677
false
mazvv/travelcrm
travelcrm/lib/qb/services.py
1
1097
# -*coding: utf-8-*- from collections import Iterable from . import ResourcesQueryBuilder from ...models.resource_type import ResourceType from ...models.resource import Resource from ...models.service import Service class ServicesQueryBuilder(ResourcesQueryBuilder): def __init__(self, context): super(S...
gpl-3.0
-5,362,266,019,576,411,000
28.648649
67
0.601641
false
arenaoftitans/arena-of-titans-api
aot/game/cards/deck.py
1
4174
################################################################################ # Copyright (C) 2015-2020 by Last Run Contributors. # # This file is part of Arena of Titans. # # Arena of Titans is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publ...
agpl-3.0
-7,988,025,100,036,046,000
28.814286
94
0.594873
false
petebachant/CFT-vectors
cft_vectors.py
1
18584
#!/usr/bin/env python """ This script generates a force and velocity vector diagram for a cross-flow turbine. """ from __future__ import division, print_function import numpy as np import matplotlib import matplotlib.pyplot as plt import pandas as pd from scipy.interpolate import interp1d import seaborn as sns from px...
mit
-164,932,162,652,562,180
35.296875
79
0.562096
false
bluecube/codecad
codecad/rendering/svg.py
1
1105
from . import polygon2d def render_svg(obj, filename): polygons = polygon2d.polygon(obj) with open(filename, "w") as fp: box = obj.bounding_box() box_size = box.size() fp.write('<svg xmlns="http://www.w3.org/2000/svg" ') fp.write('width="{}mm" height="{}mm" '.format(box_size....
gpl-3.0
-1,875,038,684,060,846,800
30.571429
86
0.483258
false
jmwenda/hypermap
hypermap/aggregator/tasks.py
1
5215
from __future__ import absolute_import from django.conf import settings from celery import shared_task @shared_task(bind=True) def check_all_services(self): from aggregator.models import Service service_to_processes = Service.objects.filter(active=True) total = service_to_processes.count() count = 0...
mit
2,542,782,802,133,991,400
27.812155
76
0.60767
false
habnabit/pip
pip/exceptions.py
1
1260
"""Exceptions used throughout package""" from __future__ import absolute_import class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class ...
mit
-3,849,063,694,971,408,400
23.230769
77
0.743651
false
georgyberdyshev/ascend
pygtk/selftest.py
1
7384
# Sort of an experiment in thread programming. This script locates all # ASCEND files in the ASCENDLIBRARY path, then for any that contain 'self_test' # methods, it loads them and solves them and runs the self test. It's not # very good at checking the results just yet: probably there needs to be a # 'TestReporter' hoo...
gpl-2.0
8,621,907,191,316,145,000
28.291498
88
0.659399
false
yosukesuzuki/deep-link-app
project/api/tests/__init__.py
1
4097
# -*- coding: utf-8 -*- from kay.ext.testutils.gae_test_base import GAETestBase from api.shorturls import URLShorten from core.models import ShortURL, ShortURLUser class URLShortenTest(GAETestBase): CLEANUP_USED_KIND = True USE_PRODUCTION_STUBS = True def test_get(self): user = ShortURLUser(key_...
mit
-2,044,805,659,408,637,400
48.963415
120
0.580425
false
MasterFacilityList/mfl_api
common/tests/test_tasks.py
1
1419
from mock import patch from requests.exceptions import ConnectionError from django.test import TestCase from django.test.utils import override_settings from ..tasks import backup_db, refresh_material_views class S3BucketMock(object): pass class S3Mock(object): def __init__(self, *args, **kwargs): s...
mit
1,987,873,591,940,204,800
30.533333
65
0.642706
false
slzatz/esp8266
iot_generic.py
1
2478
''' The basic setup here is to have an Adafruit Feather HUZZAH ESP8266 plus a Featherwing OLED SSD1306 This is a non-specific script that writes the MQTT message to the OLED display. The MQTT broker is running on an EC2 instance. The esp8266+OLED that subscribes to the topic can be used to turn on and off a Data Logg...
mit
7,950,682,271,571,295,000
24.546392
111
0.657385
false
suraj-deshmukh/myCodes
crout.py
1
1270
#!/usr/bin/python2.7 import numpy as num import sys import csv def crout(A): n = A.shape if(n[0]!=n[1]): print("Give matrix is not square matrix. Code Terminated") sys.exit() n=n[0] A = num.mat(A,dtype=float) U = num.matrix(A*0) L = num.matrix(U) for i in range(0,n): L[i,0] = A[i,0] U[i,i] = 1 ...
mit
1,452,418,819,009,944,600
29.97561
103
0.60315
false
mrclro/kbxrec
project/people/migrations/0001_initial.py
1
4164
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-22 19:46 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('events', '0...
mit
2,426,154,979,955,103,000
46.318182
168
0.555716
false
classicsxdx/puzzlecoin
contrib/bitrpc/bitrpc.py
1
7844
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:11814") else: access = Se...
mit
3,194,827,894,278,671,400
23.209877
79
0.662035
false
midnightradio/gerrit
tools/pack_war.py
1
1943
#!/usr/bin/python # Copyright (C) 2013 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 ap...
apache-2.0
-142,233,088,232,519,580
33.087719
79
0.685538
false
dabrahams/zeroinstall
zeroinstall/injector/trust.py
1
8662
""" Records who we trust to sign feeds. Trust is divided up into domains, so that it is possible to trust a key in some cases and not others. @var trust_db: Singleton trust database instance. """ # Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. from zeroinstall i...
lgpl-2.1
-5,275,137,996,461,932,000
32.187739
113
0.699607
false
jpurma/Kataja
plugins/TreesAreMemory/TreesAreMemoryParser.py
1
9791
from itertools import chain try: # When this is imported in Kataja context from plugins.TreesAreMemory.Constituent import Constituent from plugins.TreesAreMemory.Feature import Feature from kataja.syntax.SyntaxState import SyntaxState from plugins.TreesAreMemory.utils import simple_bracket_tree_...
gpl-3.0
-4,325,917,991,685,196,300
39.659574
114
0.575077
false
agoravoting/agora-tools
import_election_csv.py
1
18454
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of agora-tools. # Copyright (C) 2014-2016 Agora Voting SL <agora@agoravoting.com> # agora-tools 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...
agpl-3.0
-4,769,490,560,645,930,000
38.492505
146
0.51895
false
hxxft/lynx-native
Core/build/jni_generator.py
1
52358
#!/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. """Extracts native methods from a Java file and generates the JNI bindings. If you change this, please run and update the tests."""...
mit
1,661,477,151,239,666,400
34.739249
103
0.6196
false
gnumdk/eolie
eolie/art.py
1
6729
# Copyright (c) 2017 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
-2,079,920,480,432,212,500
33.331633
76
0.49413
false
djs55/planex
planex/debiancontrol.py
1
3069
""" Utility functions for generating Debian control files from RPM spec files. """ from planex.tree import Tree from planex import mappkgname import textwrap STANDARDS_VERSION = "3.9.3" def control_from_spec(spec): """ Create the contents of the debian/control file from spec. """ res = Tree() s...
lgpl-2.1
-5,583,763,980,021,387,000
30
79
0.576735
false
uvemas/ViTables
vitables/csv/export_csv.py
1
11064
# Copyright (C) 2008-2019 Vicent Mas. 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, either version 3 of the License, or # (at your option) a...
gpl-3.0
3,280,593,357,724,348,400
36.505085
81
0.574657
false
flockchat/pyflock
flockos/models/image.py
1
1421
# coding: utf-8 from pprint import pformat from ..utils import to_dict class Image(object): def __init__(self, src=None, width=None, height=None): self._src = src self._width = width self._height = height @property def src(self): return self._src @src.setter ...
apache-2.0
-9,079,618,273,298,583,000
18.202703
75
0.525686
false
Denon/syncPlaylist
WYtoQQ.py
1
5106
import urlparse import re from time import sleep from base import BaseSpider from settings import * from urllib2 import quote from api.wy import get_playlist_detail from utils import _print, retry, RetryException class WYtoQQ(BaseSpider): @retry(retry_times=3, notice_message="login failed and retry") def pre...
mit
7,395,140,910,663,368,000
43.017241
164
0.591069
false
tanium/pytan
EXAMPLES/PYTAN_API/invalid_export_basetype_csv_bad_sort_type.py
1
3820
#!/usr/bin/env python """ Export a BaseType from getting objects using a bad header_sort """ # import the basic python packages we need import os import sys import tempfile import pprint import traceback # disable python from generating a .pyc file sys.dont_write_bytecode = True # change me to the path of pytan if th...
mit
-7,229,140,398,507,273,000
35.730769
198
0.712565
false
indautgrp/frappe
frappe/api.py
1
4534
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import json import frappe import frappe.handler import frappe.client from frappe.utils.response import build_response from frappe import _ from urlparse import urlparse from urlli...
mit
2,075,036,741,239,225,300
29.02649
133
0.679091
false
sgmap/openfisca-france
openfisca_france/model/prestations/minima_sociaux/aefa.py
1
2983
# -*- coding: utf-8 -*- from openfisca_france.model.base import * from openfisca_france.model.prestations.prestations_familiales.base_ressource import nb_enf class aefa(Variable): ''' Aide exceptionelle de fin d'année (prime de Noël) Instituée en 1998 Apparaît sous le nom de complément de rmi dans le...
agpl-3.0
-1,951,170,180,763,779,300
47.583333
120
0.672384
false
olyhaa/OlyEats
olyeats/recipe/forms.py
1
3642
from django.forms import ModelForm from django.template.loader import render_to_string from models import Recipe import django.forms as forms from django.forms.models import BaseInlineFormSet from django.conf import settings from django.contrib.sites.models import Site from django.template import loader, RequestContext...
gpl-2.0
7,721,903,612,825,831,000
35.42
129
0.731192
false
leonardoarroyo/django-react-cms
react_cms/widgets.py
1
1852
import json from django.forms.widgets import Widget from django.conf import settings from django.utils.safestring import mark_safe from django.template.loader import render_to_string from collections import OrderedDict from react_cms.finders import ComponentFinder class ResourceEditorWidget(Widget): template_name ...
mit
8,283,340,780,235,129,000
36.04
121
0.689525
false
autogestion/sh_ctracker
ctracker/sql.py
1
7452
from django.db import connection claim_to_polygon_join = """ LEFT OUTER JOIN ctracker_polygon_organizations ON (houses.polygon_id = ctracker_polygon_organizations.polygon_id) LEFT OUTER JOIN ctracker_organization ON (ctracker_polygon_organizations.organization_id = ctracker_organization.id) LEFT OU...
bsd-3-clause
-1,031,291,130,743,859,500
50.4
151
0.543076
false
zynga/jasy
jasy/core/Config.py
1
10980
# # Jasy - Web Tooling Framework # Copyright 2010-2012 Zynga Inc. # import sys, os, yaml, json import jasy.core.Console as Console import jasy.core.File as File from jasy import UserError from jasy.core.Util import getKey __all__ = [ "Config", "findConfig", "loadConfig", "writeConfig" ] def findConfig(fileName):...
mit
6,042,181,563,522,621,000
27.59375
116
0.563661
false
ceph/autotest
scheduler/monitor_db_functional_test.py
1
42015
#!/usr/bin/python import logging, os, unittest import common from autotest_lib.client.common_lib import enum, global_config, host_protections from autotest_lib.database import database_connection from autotest_lib.frontend import setup_django_environment from autotest_lib.frontend.afe import frontend_test_utils, model...
gpl-2.0
-8,264,390,622,760,610,000
38.011142
80
0.629632
false
password123456/lotto
get_random_generate_number_sendmessage.py
1
5900
#!/usr/local/bin/python2.7 # -*- coding: utf-8 -*- __author__ = 'https://github.com/password123456/' import random import numpy as np import sys reload(sys) sys.setdefaultencoding('utf-8') import requests import urllib import urllib2 import json import datetime import time import dateutil.relativedelta as REL class b...
apache-2.0
-2,032,991,578,046,145,300
25.928571
86
0.512505
false
selvasingh/azure-sdk-for-java
eng/pipelines/scripts/generate_overview_from_readme.py
1
3812
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # Use case: Given a README.md file, generate a readme_overview.html file and place it next # to the README.md. This will allow the javadocs jar step to append the contents of the # readme onto the landing page. # # This scrip...
mit
3,548,446,964,432,801,300
49.157895
164
0.695435
false
crustymonkey/pylibgal3
libg3/Errors.py
1
1431
# # Author: Jay Deiman # Email: admin@splitstreams.com # # This file is part of pylibgal3. # # pylibgal3 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 # ...
gpl-3.0
4,734,498,918,985,512,000
27.058824
73
0.671558
false
mwilliamson/toodlepip
toodlepip/build.py
1
3620
from . import config, files from .consoles import Console, Command from .platforms import builders from .temp import create_temp_dir def create_builder(shell, stdout): return Builder(builders, Console(shell, stdout)) class Builder(object): def __init__(self, builders, console): self._console = conso...
bsd-2-clause
-7,364,044,656,382,404,000
32.831776
96
0.572652
false
opensvn/python
pygame/bpwpapcode/Chapter06/joystickdemo.py
1
3510
import pygame from pygame.locals import * from sys import exit pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) # Get a list of joystick objects joysticks = [] for joystick_no in xrange(pygame.joystick.get_count()): stick = pygame.joystick.Joystick(joystick_no) stick.init() jo...
gpl-2.0
2,817,038,411,529,330,000
29.909091
78
0.533903
false
cgwalters/imagefactory
imagefactory_plugins/OVA/OVA.py
1
3390
# encoding: utf-8 # Copyright 2013 Red Hat, 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 applica...
apache-2.0
5,084,509,486,704,579,000
37.965517
113
0.666372
false
philgyford/django-ditto
setup.py
1
4093
import codecs import os import re import sys from setuptools import setup with open(os.path.join(os.path.dirname(__file__), "README.rst")) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) def read(filepath):...
mit
-8,697,545,742,880,782,000
30.484615
133
0.596384
false
armanpazouki/chrono
src/demos/python/demo_crank_plot.py
1
5655
#------------------------------------------------------------------------------ # Name: pychrono example # Purpose: # # Author: Alessandro Tasora # # Created: 1/01/2019 # Copyright: (c) ProjectChrono 2019 #------------------------------------------------------------------------------ import pychrono...
bsd-3-clause
-6,782,592,407,969,920,000
31.125
99
0.649098
false
iakinsey/moneybot
moneybot/commands/fedspeak.py
1
1981
from moneybot.command import Command from moneybot.exc import InvalidCommand from moneybot.ledger import transfer_balance from random import choice class FedSpeak(Command): prefix = "fedspeak" description = "Speak like the federal reserve!" options = [ "The members of the Board of Governors and t...
mit
1,819,040,583,107,992,300
89.045455
476
0.775871
false
Amber819/chatbot_AM
data_utils.py
1
9930
from __future__ import absolute_import import os import re import numpy as np import tensorflow as tf from six.moves import range, reduce stop_words=set(["a","an","the"]) def load_candidates(data_dir, task_id): assert task_id > 0 and task_id < 7 candidates=[] candidates_f=None candid_dic={} if t...
mit
-5,978,191,130,541,190,000
33.010274
115
0.582779
false
vitek/wwwatch
wwwatch/storage.py
1
3245
import socket import json from collections import defaultdict import redis class BasicStorage(object): def __init__(self): self.counters = {} def register_counter(self, name=''): if name not in self.counters: self.counters[name] = defaultdict(int) return self.counters[nam...
mit
-7,546,837,987,552,991,000
31.45
79
0.561479
false
ysrc/xunfeng
vulscan/kunpeng.py
1
4090
# coding:utf-8 from ctypes import * import _ctypes import json import platform import os import urllib2 import sys from urllib import urlretrieve import zipfile class kunpeng: def __init__(self): self.kunpeng = None self.system = platform.system().lower() self.pwd = os.path.split(os.path....
gpl-3.0
-7,708,567,594,290,426,000
29.059259
106
0.55101
false
widowild/messcripts
exercice/python3/chap13/base_exercice_13_23.py
1
1776
# -*- coding:Utf8 -*- # Examen de programmation Python - 6TSIb - Juin 2004 from tkinter import * class FaceDom(object): def __init__(self, can, val, pos, taille =70): self.can =can # *** x, y, c = pos[0], pos[1], taille/2 can.create_rectangle(x -c, y-c, x+c, y+c, fill ='ivory', wi...
gpl-3.0
-3,131,348,597,347,846,000
27.645161
78
0.469032
false
ingadhoc/demo
demo_simple/__manifest__.py
1
3001
############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
-4,743,295,325,270,112,000
29.313131
78
0.528491
false
kellyschrock/ardupilot
Tools/autotest/apmrover2.py
1
80558
#!/usr/bin/env python # Drive APMrover2 in SITL from __future__ import print_function import os import pexpect import time from common import AutoTest from common import AutoTestTimeoutException from common import MsgRcvTimeoutException from common import NotAchievedException from common import PreconditionFailedEx...
gpl-3.0
2,298,468,115,287,737,000
41.176963
165
0.522592
false
praekelt/molo.polls
molo/polls/admin_views.py
1
1756
import csv from collections import OrderedDict from django.http.response import HttpResponse from django.shortcuts import get_object_or_404, render from django.views.generic.edit import FormView from molo.polls.models import Question class QuestionResultsAdminView(FormView): def get(self, request, *args, **kwarg...
bsd-2-clause
-880,368,398,644,271,100
31.518519
74
0.610478
false
liboyin/algo-prac
arrays/weighted_schedule.py
1
2080
from lib import bin_search_right, snd def search(arr): """ Given a list of tasks, represented as tuple of starting time, finishing time, and profit (non-negative). Returns the maximum profit achievable by choosing non-conflicting tasks. Solution is binary search on tasks sorted by finishing time. ...
gpl-3.0
-3,536,597,105,274,693,000
45.222222
116
0.574519
false
purpleidea/gedit-plugins
plugins/commander/commander/commands/method.py
1
3558
# -*- coding: utf-8 -*- # # method.py - commander # # Copyright (C) 2010 - Jesse van den Kieboom # # 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...
gpl-2.0
-6,270,523,070,650,933,000
27.015748
149
0.577853
false
sirio81/vmcli
libguest.py
1
3653
from libvmcli import * class Guest: def __init__(self, all_opt, global_cluster_options, cluster_options): self.global_cluster_options = global_cluster_options self.cluster_options = cluster_options self.all_opt = all_opt self.opt = self.parse_opt(all_opt) self.host_name = No...
lgpl-2.1
-349,600,212,241,541,060
39.142857
146
0.545305
false
umago/kabukiman
kabukiman/module.py
1
1400
#!/usr/bin/python # coding: utf-8 # Copyright (C) 2010 Lucas Alvares Gomes <lucasagomes@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 # (at you...
gpl-2.0
-1,178,434,302,922,153,500
33.146341
72
0.661429
false
ArcherSys/ArcherSys
Lib/sre_compile.py
1
19904
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import _sre import sre_parse from sre_constants import *...
mit
-6,332,745,429,824,574,000
32.50253
109
0.4963
false
vipul-tm/DAG
dags-ttpl/createPreviousState.py
1
14429
from airflow import DAG from airflow.operators import PythonOperator from airflow.hooks import RedisHook from datetime import datetime, timedelta from airflow.models import Variable from airflow.hooks import RedisHook from shutil import copyfile import logging import traceback from airflow.hooks import MemcacheHook d...
bsd-3-clause
4,937,185,614,881,251,000
37.787634
153
0.563934
false
andrewyoung1991/supriya
supriya/tools/requesttools/NodeFreeRequest.py
1
1577
# -*- encoding: utf-8 -*- import collections from supriya.tools import osctools from supriya.tools.requesttools.Request import Request class NodeFreeRequest(Request): r'''A /n_free request. :: >>> from supriya.tools import requesttools >>> request = requesttools.NodeFreeRequest( ... ...
mit
6,297,036,571,516,061,000
20.324324
63
0.551046
false
maxisi/gwsumm
gwsumm/channels.py
1
6672
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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) ...
gpl-3.0
-6,511,334,062,866,690,000
32.86802
79
0.542866
false
goneri/dci-control-server
sample/tox-agent.py
1
2235
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, 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 req...
apache-2.0
2,374,281,384,220,255,000
26.9375
75
0.636689
false
sevenian3/ChromaStarPy
LevelPopsGasServer.py
1
55996
# -*- coding: utf-8 -*- """ Created on Mon Apr 24 14:13:47 2017 @author: ishort """ import math import Useful import ToolBox #import numpy #JB# #from matplotlib.pyplot import plot, title, show, scatter #storage for fits (not all may be used) uw = [] uwa = [] uwb = [] uwStage = [] uwbStage = [] uwu ...
mit
3,178,557,225,868,192,000
39.977511
287
0.575238
false
mhvk/baseband
docs/conf.py
1
7827
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # 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 file. # # All configurati...
gpl-3.0
674,455,686,497,305,500
36.629808
89
0.693625
false
codelieche/codelieche.com
apps/article/views/pages/article.py
1
11474
# -*- coding:utf-8 -*- import json from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect, Http404, JsonResponse from django.shortcuts import render, get_object_or_404, redirect from django.views.generic...
mit
-1,462,004,923,378,391,000
32.350482
101
0.54811
false
DirectXMan12/nova-hacking
nova/tests/virt/hyperv/test_hypervapi.py
1
51735
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cloudbase Solutions Srl # # 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/LICE...
apache-2.0
-5,168,143,782,321,951,000
39.768322
79
0.562984
false
updownlife/multipleK
dependencies/biopython-1.65/Tests/test_SearchIO_hmmer3_tab.py
1
20424
# Copyright 2012 by Wibowo Arindrarto. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Tests for SearchIO HmmerIO hmmer3-tab parser.""" import os import unittest from Bio ...
gpl-2.0
-5,258,293,306,572,943,000
39.766467
117
0.632393
false
lehmannro/pootle
setup.py
1
11428
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of Pootle. # # 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 t...
gpl-2.0
-1,998,137,997,287,100,200
41.483271
122
0.588467
false
SathyaBhat/spotify-dl
spotify_dl/youtube.py
1
3746
import urllib.request from os import path import mutagen import youtube_dl from mutagen.easyid3 import EasyID3 from mutagen.id3 import APIC, ID3 from mutagen.mp3 import MP3 from spotify_dl.scaffold import log from spotify_dl.utils import sanitize def default_filename(song): return sanitize(f"{song.get('artist')...
mit
-4,171,133,412,178,890,000
40.622222
120
0.571543
false
1200wd/1200wd_addons
account_bank_match/__openerp__.py
1
2272
# -*- coding: utf-8 -*- ############################################################################## # # Account Bank Match # Copyright (C) 2016 May # 1200 Web Development # http://1200wd.com/ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...
agpl-3.0
-5,681,885,919,968,691,000
38.172414
171
0.617958
false
Debian/dput-ng
dput/uploaders/sftp.py
1
10474
# -*- coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # Copyright (c) 2012 dput authors # # 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...
gpl-2.0
-8,902,492,800,630,426,000
34.0301
80
0.555184
false
artkolev/QuizBot
src/bot.py
1
16410
#!/usr/bin/env python # -*- coding: utf-8 -*- import Skype4Py import datetime import time import random import logging import sqlite3 from hashlib import sha1 from collections import deque FORMAT=u'%(name)s %(thread)d %(levelname)s: %(message)s' logging.basicConfig(format=FORMAT, level=logging.INFO) logging.getLogg...
gpl-2.0
7,940,548,997,084,515,000
44.736842
99
0.461194
false
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/netappfiles/tests/latest/test_account_backup_commands.py
1
7184
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
8,064,734,338,689,275,000
53.424242
120
0.596882
false
salceson/PJN
lab8/main.py
1
6484
# coding: utf-8 import pickle import sys from heapq import nlargest, nsmallest from operator import itemgetter from pprint import pprint from gensim import corpora, models from utils import calculate_lda, calculate_lsi, cosine_metric, preprocess_data, create_tfidf __author__ = "Michał Ciołczyk" _DATA_FILE = 'data/pa...
mit
-4,748,124,683,531,162,000
38.284848
109
0.51265
false
waliens/sldc
sldc/merger.py
1
10691
# -*- coding: utf-8 -*- import numpy as np from shapely.geometry import JOIN_STYLE, Polygon from shapely.ops import cascaded_union __author__ = "Begon Jean-Michel <jm.begon@gmail.com>" __contributor__ = ["Romain Mormont <romainmormont@hotmail.com>"] __version = "0.1" class Graph(object): """A class for represent...
mit
-6,005,729,276,697,479,000
40.277992
132
0.609391
false
almann/ion-python
tests/test_core_multimap.py
1
1665
from amazon.ion.core import Multimap, record import six from tests import parametrize class _P(record('pairs', 'expected_all_values', 'expected_single_value', 'expected_total_len')): def __str__(self): return '{name}'.format(name=self.pairs) ALL_DATA = _P( pairs=[('a', 1), ('a', 2), ('a', 3), ('a',...
apache-2.0
-5,591,384,137,282,426,000
25.428571
98
0.533333
false
TobiasLundby/UAST
Module1/exercise41/utm.py
1
7035
#!/usr/bin/env python #***************************************************************************** # Universal Transverse Mercator (UTM) conversion # Copyright (c) 2013-2015, Kjeld Jensen <kjeld@frobomind.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification...
bsd-3-clause
4,569,679,686,985,486,000
39.431034
130
0.632694
false
harrysocool/ear_recognition
ear_recognition/generate_files.py
1
6623
import csv import os import random import numpy as np import pandas as pd import matlab_wrapper from lib.utils.timer import Timer from tools.ear_recog import get_gt, ROI_boxes import scipy.io as sio def listdir_no_hidden(path): list1 = [] for f in sorted(os.listdir(path)): if not f.startswith('.'): ...
mit
-4,927,959,362,908,432,000
39.390244
145
0.587649
false
mosra/m.css
plugins/m/test/test_alias.py
1
1775
# # This file is part of m.css. # # Copyright © 2017, 2018, 2019, 2020 Vladimír Vondruš <mosra@centrum.cz> # # 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, inc...
mit
4,064,174,233,653,767,000
44.435897
87
0.705982
false
yaoshanliang/markdown-preview.vim
pythonx/markdown_preview.py
1
3976
#!/usr/bin/env python # encoding: utf-8 import socket import vim import markdown_parser import webbrowser import os, platform import commands import markdown_server import markdown_lib def markdownPreviewWithDefaultCodeStyle(): cssName = vim.eval("a:args1") currentpath = commands.getstatusoutput("pwd")[1] ...
mit
6,209,467,138,368,643,000
32.411765
104
0.589537
false
eduardosan/window-manager
gwmanager/utils.py
1
1379
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from glob import glob from subprocess import check_output, CalledProcessError def get_usb_devices(): """ Lista dispositivos USB conectados :return: """ sdb_devices = map(os.path.realpath, glob('/sys/block/sd*')) usb_devices = (dev for de...
gpl-3.0
-8,723,302,183,774,859,000
28.978261
81
0.57723
false
kevinpt/symbolator
nucanvas/color/sinebow.py
1
1400
# -*- coding: utf-8 -*- # Copyright © 2017 Kevin Thibedeau # Distributed under the terms of the MIT license import math from math import sin, pi import colorsys def sinebow(hue): '''Adapted from http://basecase.org/env/on-rainbows''' hue = -(hue + 0.5) # Start at red rotating clockwise rgb = sin(pi * hue), sin(p...
mit
-8,503,877,829,647,342,000
21.934426
75
0.580415
false
robbiev/pytelemeter
pytelemeter/config.py
1
3703
""" pytelemeter config file handler """ import os import sys import ConfigParser from parser import Account # exceptions class ConfigError(Exception): pass class MissingConfigFile(ConfigError): pass class MalformedConfigFile(ConfigError): pass class StockCredentials(ConfigError): pass class NoSuchAccount(ConfigEr...
gpl-2.0
-8,811,499,867,530,199,000
32.972477
72
0.562247
false
SAVeselovskiy/KFU_Visual_Tracking
Tracking/detection.py
1
10566
__author__ = 'IVMIT KFU: Gataullin Ravil & Veselovkiy Sergei' from copy import copy import numpy as np from sklearn.ensemble import RandomForestClassifier from time import time import warnings warnings.filterwarnings("ignore") from sklearn.cross_validation import train_test_split from structure import Position class...
mit
402,492,065,248,297,800
47.031818
178
0.638463
false
sathnaga/virt-test
virttest/virt_vm.py
1
42907
import logging, time, glob, os, re from autotest.client.shared import error import utils_misc, utils_net, remote class VMError(Exception): pass class VMCreateError(VMError): def __init__(self, cmd, status, output): VMError.__init__(self, cmd, status, output) self.cmd = cmd self.statu...
gpl-2.0
1,149,361,905,148,768,600
32.972288
86
0.573007
false
manahl/arctic
tests/integration/store/test_pickle_store.py
1
4373
from datetime import datetime as dt, timedelta import bson import numpy as np from mock import patch from arctic._util import mongo_count from arctic.arctic import Arctic def test_save_read_bson(library): blob = {'foo': dt(2015, 1, 1), 'bar': ['a', 'b', ['x', 'y', 'z']]} library.write('BLOB', blob) save...
lgpl-2.1
3,256,457,355,782,051,300
34.266129
77
0.658815
false
SINGROUP/pycp2k
pycp2k/classes/_each134.py
1
1114
from pycp2k.inputsection import InputSection class _each134(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Meta...
lgpl-3.0
-8,482,029,577,158,587,000
41.846154
447
0.576302
false
Tomographer/tomographer
test/pytest_t_mhrwtasks.py
1
6356
#!/usr/bin/env python from __future__ import print_function import re import numpy as np import numpy.testing as npt import logging logging.basicConfig(level=logging.DEBUG) import unittest # import the module import tomographer.mhrwtasks import tomographer class MHRWTasksStuff(unittest.TestCase): def test_...
mit
-1,653,078,731,656,334,000
38.234568
104
0.614695
false
anchore/anchore
anchore/anchore-modules/gates/11_check_image.py
1
1615
#!/usr/bin/env python import sys import os import json import re import anchore from anchore import anchore_utils gate_name = "IMAGECHECK" triggers = { 'BASEOUTOFDATE': { 'description':'triggers if the image\'s base image has been updated since the image was built/analyzed', 'params':'None' ...
apache-2.0
1,436,451,591,911,512,000
25.47541
206
0.667492
false
bluven/eonboard
eoncloud_web/biz/account/views.py
1
12004
#-*-coding-utf-8-*- from datetime import datetime import logging from rest_framework import generics from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view from django.conf import settings from django.shortcuts import render_to_response from dja...
apache-2.0
4,892,102,443,532,302,000
32.252078
116
0.635955
false
nikobockerman/rsnapshot-backup
rsnapshotbackup/argumentparser.py
1
1573
''' http://stackoverflow.com/a/5943381 ''' import argparse import sys class ArgParser(argparse.ArgumentParser): def __init__(self, *args, **kwargs): """Initialisation method for the parser class""" super(ArgParser, self).__init__(*args, **kwargs) #argparse.ArgumentParser.__init__(self, *...
bsd-2-clause
-1,816,188,652,166,511,000
30.46
77
0.574698
false
surculus12/py-hyphen
hyphen/knuth_liang.py
1
1704
""" Our implementation of knuth-liang """ from string import digits from collections import OrderedDict from .language_patterns import LanguagePatterns class KnuthLiang(object): """ This class implements knuth-liang """ __slots__ = ['language_patterns', 'limit_left', 'limit_right'] def __init__...
mit
6,763,296,129,892,360,000
34.5
84
0.583333
false
pferreir/indico-backup
indico/MaKaC/webinterface/common/contribFilters.py
1
15606
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
gpl-3.0
4,691,919,094,041,345,000
33.68
125
0.578111
false
Lana-B/Pheno4T
madanalysis/install/install_fastjetcontrib.py
1
6885
################################################################################ # # Copyright (C) 2012-2013 Eric Conte, Benjamin Fuks # The MadAnalysis development team, email: <ma5team@iphc.cnrs.fr> # # This file is part of MadAnalysis 5. # Official website: <https://launchpad.net/madanalysis5> # # MadAnal...
gpl-3.0
-3,883,177,532,337,279,500
38.797688
137
0.581699
false
ymca-ireland/hth
app/main.py
1
2477
#!/usr/bin/env kivy import kivy import uuid kivy.require('1.8.0') from kivy.app import App from kivy.properties import NumericProperty, ReferenceListProperty,ObjectProperty, StringProperty from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout from kivy.uix.scre...
bsd-2-clause
7,853,394,444,727,441,000
24.802083
97
0.654017
false
Khan/react-components
make_template.py
1
1966
#!/usr/bin/env python # TODO(colin): fix these lint errors (http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes) # pep8-disable:E128 import os.path import jinja2 from jinja2.ext import Extension class CodeExampleExtension(Extension): """Insert a code example. My plan for the docs is side-by-...
mit
8,428,015,763,604,837,000
33.491228
105
0.632248
false
testalt/electrum-ppc
setup-release.py
1
2894
""" py2app/py2exe build script for Electrum Litecoin Usage (Mac OS X): python setup.py py2app Usage (Windows): python setup.py py2exe """ from setuptools import setup import os import re import shutil import sys from lib.util import print_error from lib.version import ELECTRUM_VERSION as version name = ...
gpl-3.0
-7,215,813,235,646,526,000
30.11828
118
0.599516
false
ddeepak6992/IITM-placement-Spyder
main.py
1
1142
# -*- coding: utf-8 -*- """ Created on Mon Nov 16 00:27:31 2015 @author: deep """ ##################################### USERNAME = '' PASSWORD = '' ##################################### import json from scraper import scraper import os import time def diff(A,B): if len(A.keys()) > len(B.keys()): A...
gpl-2.0
2,431,725,302,540,940,300
25.55814
73
0.478984
false
dracos/QGIS
python/plugins/processing/algs/translations.py
1
53414
# -*- coding: utf-8 -*- """ Don't edit this file manually. Update it from QGIS console: from processing.tools.translation import updateTranslations updateTranslations() """ from PyQt4.QtCore import QCoreApplication def translationShadow(): """QGISAlgorithmProvider""" QCoreApplication.translate("SumLines", ...
gpl-2.0
1,586,493,956,906,256,000
85.993485
286
0.779927
false
IE-NITK/NITK-Student-Council-Website
src/smriti/views.py
1
8079
from django.shortcuts import render, get_object_or_404, redirect from django.views import generic from django.contrib import auth, messages from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from...
mit
8,959,160,691,661,415,000
44.644068
138
0.630276
false
hcarvalhoalves/hy
hy/importer.py
1
6134
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org> # # 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, modif...
mit
3,325,653,699,906,485,000
29.216749
76
0.61477
false