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
YeoLab/gscripts
tests/test_sailfish_index.py
1
1318
__author__ = 'olga' import unittest from gscripts.rnaseq.sailfish_index import SailfishIndex import tests import os import shutil import sys class Test(unittest.TestCase): out_dir = 'test_output' def setUp(self): os.mkdir(self.out_dir) def tearDown(self): shutil.rmtree(self.out_dir) ...
mit
2,624,321,952,649,796,600
25.918367
111
0.628225
false
kronicz/ecommerce-2
bin/player.py
1
2211
#!/Users/michelkrohn-dale/Desktop/ecommerce-2/bin/python # # The Python Imaging Library # $Id$ # from __future__ import print_function try: from tkinter import * except ImportError: from Tkinter import * from PIL import Image, ImageTk import sys # -----------------------------------------------------------...
mit
-4,403,060,269,132,047,400
20.676471
72
0.475351
false
yaukwankiu/armor
dataStreamTools/cwbFileNames.py
1
2022
""" to fix the file names for the data from cwb 201403111800f006_M15.txt -> WRF15.20140312.0000.txt """ #from armor import pattern #import shutil import os import datetime, time from armor import defaultParameters as dp root = dp.defaultRootFolder obsFolder = root + "data/march2014/QPESUMS/" wrfsFolder1 = ...
cc0-1.0
550,889,382,923,040,960
33.271186
104
0.577151
false
eSmelser/SnookR
SnookR/api/views.py
1
3749
import hashlib from rest_framework.generics import ListCreateAPIView, UpdateAPIView, ListAPIView, RetrieveAPIView, CreateAPIView from django.core.cache import caches from rest_framework.response import Response from substitutes.models import Session, SessionEvent, Sub from accounts.models import CustomUser from teams....
mit
78,620,710,748,288,240
30.504202
113
0.746599
false
alvare/python-funcional
parser-monad.py
1
1535
import sys from pymonad.Reader import curry from Parser import * def item(): return Parser(lambda cs: [] if cs == "" else [(cs[0], cs[1:])]) def sat(cond): return item() >> (lambda c: unit(Parser, c) if cond(c) else mzero(Parser)) def char(c): return sat(lambda x: c == x) def space(): return char(' ...
mit
4,481,513,220,722,752,500
21.573529
83
0.522476
false
Commonists/bingo
bingo/card_maker.py
1
1930
# -*- coding: utf-8 -*- import os from string import Template, ascii_uppercase import itertools class CardMaker(object): def __init__(self, size): self.size = size self.elements = [] def make_card(self): raise NotImplemented() class MarkdownCardMaker(CardMaker): def make_card...
mit
8,819,562,063,728,641,000
27.80597
80
0.592746
false
mtivadar/qiew
TextDecorators.py
1
13791
from PyQt5 import QtGui, QtCore, QtWidgets import re import string from time import time import sys import TextSelection class CTextDecorator(object): redPen = QtGui.QPen(QtGui.QColor(255, 0, 0)) greenPen = QtGui.QPen(QtGui.QColor(255, 255, 0)) whitePen = QtGui.QPen(QtGui.QColor(255, 255, 255)) norm...
gpl-2.0
-3,535,276,325,798,863,400
31.992823
171
0.516279
false
google/makani
avionics/firmware/network/generate_net_send.py
1
4158
#!/usr/bin/python # Copyright 2020 Makani Technologies LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
apache-2.0
-7,501,108,895,089,029,000
30.984615
77
0.672198
false
thecotne/smart_less_build
executer.py
1
10324
import sublime, sublime_plugin import os, sys import threading import subprocess import functools import time class ProcessListener(object): def on_data(self, proc, data): pass def on_finished(self, proc): pass # Encapsulates subprocess.Popen, forwarding stdout to a supplied # ProcessListener...
gpl-3.0
-967,074,813,617,226,400
38.106061
118
0.565866
false
google/dnae
lib/utils/utils.py
1
6860
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
8,431,717,631,091,964,000
26.886179
79
0.61035
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/sphinx/builders/applehelp.py
1
1258
""" sphinx.builders.applehelp ~~~~~~~~~~~~~~~~~~~~~~~~~ Build Apple help books. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import warnings from sphinxcontrib.applehelp import ( AppleHelpCodeSigningFailed, AppleHelpIndexerF...
mit
-7,510,677,014,965,285,000
26.347826
89
0.638315
false
ikreymer/pywb-ia
tools/iaitemhandler.py
1
3821
from pywb.webapp.handlers import WBHandler from pywb.cdx.zipnum import ZipNumCluster from pywb.cdx.cdxserver import CDXServer import os import requests import shutil #============================================================================= class ItemHandler(WBHandler): def __init__(self, query_handler, confi...
mit
1,659,556,733,371,929,600
33.423423
78
0.516619
false
wegamekinglc/alpha-mind
alphamind/tests/portfolio/test_evolver.py
1
1141
# -*- coding: utf-8 -*- """ Created on 2017-11-23 @author: cheng.li """ import unittest import numpy as np from alphamind.portfolio.evolver import evolve_positions class TestEvolver(unittest.TestCase): def test_evolve_positions_with_all_positive_position(self): positions = np.array([0.2, 0.2, 0.8]) ...
mit
1,129,303,972,060,844,300
28.25641
82
0.648554
false
antivanov/chief-lunch-officer
find_cafe.py
1
8229
# Automatically fetches menus for today, grades predefined cafes and based on # additional information (weather, cafe of choice yesterday) gives recommendations # where to go for lunch. # If there are problems with encoding set Python encoding correctly by executing: # set PYTHONIOENCODING=utf-8 from chief_lunch_offic...
apache-2.0
6,199,370,958,018,314,000
41.205128
222
0.697898
false
unicefuganda/edtrac
edtrac_project/rapidsms_xforms_src/pavement.py
1
2360
# -*- Import: -*- from paver.easy import * from paver.setuputils import setup from setuptools import find_packages try: # Optional tasks, only needed for development # -*- Optional import: -*- from github.tools.task import * import paver.doctools import paver.virtual import paver.misctasks ...
bsd-3-clause
-8,912,364,466,401,702,000
24.934066
93
0.607203
false
RedhawkSDR/rtl-demo-app
server/rtl_app/__init__.py
1
1030
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK server. # # REDHAWK server 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 F...
lgpl-3.0
-6,564,324,000,110,991,000
45.818182
88
0.78835
false
brendangregg/bcc
examples/networking/http_filter/http-parse-complete.py
1
11542
#!/usr/bin/python # # Bertrone Matteo - Polytechnic of Turin # November 2015 # # eBPF application that parses HTTP packets # and extracts (and prints on screen) the URL # contained in the GET/POST request. # # eBPF program http_filter is used as SOCKET_FILTER attached to eth0 interface. # Only packets of type ip and tc...
apache-2.0
4,341,704,507,636,344,300
36.718954
100
0.574164
false
maximencia/python_traning
fixture/application.py
1
1783
# -*- coding: utf-8 -*- __author__ = 'Maxim.Rumyantsev' #from selenium.webdriver.firefox.webdriver import WebDriver from selenium import webdriver from fixture.session_f import SessionHelper from fixture.group_f import GroupHelper from fixture.contact_f import ContactHelper class Application: # проверка в...
apache-2.0
7,473,063,612,288,819,000
27.052632
89
0.605072
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/location_group_radius_units.py
1
1225
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
5,528,833,102,422,046,000
28.878049
74
0.685714
false
ArcherSys/ArcherSys
Lib/test/test_dis.py
1
124487
<<<<<<< HEAD <<<<<<< HEAD # Minimal tests for dis module from test.support import run_unittest, captured_stdout from test.bytecode_helper import BytecodeTestCase import difflib import unittest import sys import dis import io import re import types import contextlib def get_tb(): def _error(): try: ...
mit
9,050,017,357,533,923,000
48.695409
205
0.633255
false
lsst-ts/ts_wep
tests/bsc/test_nbrStar.py
1
2710
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
gpl-3.0
5,397,523,749,416,159,000
28.139785
80
0.628782
false
naggie/dsblog
dsblog/environment.py
1
1659
import yaml from os import makedirs from os.path import join,dirname,realpath,isdir script_dir = dirname(realpath(__file__)) default_yml_filepath = join(script_dir,'defaults.yml') defaults = { "output_dir": 'output', "header_img_dir": 'imgs/headers/', "scaled_img_dir": 'imgs/scaled/', "original_img_d...
mit
978,721,617,976,014,700
24.136364
86
0.634117
false
praekelt/vumi-go
go/apps/jsbox/metrics.py
1
3058
# -*- test-case-name: go.apps.jsbox.tests.test_metrics -*- # -*- coding: utf-8 -*- """Metrics for JS Box sandboxes""" import re from vxsandbox import SandboxResource from vumi.blinkenlights.metrics import SUM, AVG, MIN, MAX, LAST class MetricEventError(Exception): """Raised when a command cannot be converted ...
bsd-3-clause
1,665,057,652,388,163,000
31.88172
77
0.577502
false
calexil/FightstickDisplay
pyglet/image/buffer.py
1
9407
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2021 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
gpl-3.0
933,900,144,839,290,800
37.395918
114
0.635059
false
njncalub/animakyoukai-san
animakyoukaisan/urls.py
1
1035
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.http import HttpResponseRedirect admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^accoun...
gpl-2.0
-5,553,957,187,897,016,000
42.125
92
0.6657
false
glogiotatidis/mopidy
mopidy/backend.py
1
12306
from __future__ import absolute_import, unicode_literals from mopidy import listener, models class Backend(object): """Backend API If the backend has problems during initialization it should raise :exc:`mopidy.exceptions.BackendError` with a descriptive error message. This will make Mopidy print th...
apache-2.0
-5,506,081,038,595,665,000
27.887324
79
0.622461
false
CMPUT410W15/cmput410-project
socialdistribution/urls.py
1
1265
from django.conf.urls import patterns, include, url from django.contrib import admin from login.views import * from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from django.conf.urls.static import static from posts.views import * from images.views import * urlpatter...
apache-2.0
8,455,670,157,464,625,000
36.205882
119
0.670356
false
hb9kns/PyBitmessage
src/bitmessageqt/dialogs.py
1
2513
from PyQt4 import QtGui from tr import _translate from retranslateui import RetranslateMixin import widgets from newchandialog import NewChanDialog from address_dialogs import ( AddAddressDialog, NewAddressDialog, NewSubscriptionDialog, RegenerateAddressesDialog, SpecialAddressBehaviorDialog, EmailGatewayDialo...
mit
1,662,048,093,800,792,800
32.065789
79
0.652209
false
desihub/desisim
py/desisim/test/test_templates.py
1
13874
from __future__ import division import os import unittest import numpy as np from astropy.table import Table, Column from desisim.templates import ELG, LRG, QSO, BGS, STAR, STD, MWS_STAR, WD, SIMQSO from desisim import lya_mock_p1d as lyamock desimodel_data_available = 'DESIMODEL' in os.environ desi_templates_availab...
bsd-3-clause
-7,112,978,407,730,016,000
54.2749
126
0.60235
false
phiros/nepi
src/nepi/resources/ns3/classes/single_model_spectrum_channel.py
1
3165
# # NEPI, a framework to manage network experiments # Copyright (C) 2014 INRIA # # 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 ...
gpl-3.0
3,667,919,845,605,207,000
47.692308
577
0.706793
false
fishroot/nemoa
nemoa/file/nplot.py
1
16627
# -*- coding: utf-8 -*- """Common function for creating plots with matplotlib.""" __author__ = 'Patrick Michl' __email__ = 'frootlab@gmail.com' __license__ = 'GPLv3' __docformat__ = 'google' import numpy as np from nemoa.types import OptDict class Plot: """Base class for matplotlib plots. Export classes lik...
gpl-3.0
-1,912,380,908,918,862,800
30.913628
77
0.527696
false
brake/python-utl
utl/hex.py
1
2924
#!/usr/bin/env python # -*- coding: UTF-8 -*- # ------------------------------------------------------------------------------ # Name: hex.py # Package: utl # Project: utl # # Created: 10.10.13 11:43 # Copyright 2013-2016 © Constantin Roganov # License: The MIT License # -----------------------------------...
mit
9,198,827,906,294,220,000
31.597701
102
0.624701
false
rndusr/stig
stig/commands/cli/misc.py
1
1667
# 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 distributed in the hope that it will be useful # but...
gpl-3.0
2,688,278,037,507,489,000
31.057692
78
0.644271
false
route-nazionale/event_manager
ragazzi/views.py
1
1103
from django.shortcuts import render from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from base.views_support import HttpJSONResponse from base.models import Rove...
agpl-3.0
2,945,973,249,241,085,400
28.026316
69
0.752493
false
watchdogpolska/watchdog-kj-kultura
watchdog_kj_kultura/organizations_requests/tests/test_forms.py
1
3033
from django.core import mail from django.test import RequestFactory, TestCase from ...organizations.factories import OrganizationFactory from ..factories import TemplateFactory from ..forms import RequestForm class RequestFormTestCase(TestCase): def setUp(self): self.organization = OrganizationFactory()...
mit
387,663,058,317,457,540
42.328571
71
0.554566
false
e-koch/VLA_Lband
14B-088/HI/imaging/sd_regridding/sd_comparison.py
1
3520
''' Compare the regridded versions of the SD datasets. ''' from spectral_cube import SpectralCube import matplotlib.pyplot as plt import os from corner import hist2d from radio_beam import Beam import astropy.units as u import numpy as np from paths import fourteenB_HI_data_path, data_path from galaxy_params import ...
mit
-5,906,216,601,364,028,000
31.009091
87
0.704545
false
Kovak/KivyNBT
flat_kivy/uix/behaviors.py
1
19077
from weakref import ref from kivy.app import App from kivy.clock import Clock from kivy.properties import (ObjectProperty, OptionProperty, NumericProperty, ListProperty, StringProperty) from kivy.metrics import sp from kivy.animation import Animation from kivy.graphics import Color, Ellip...
mit
4,843,255,177,433,859,000
36.187135
88
0.548514
false
groupe-conseil-nutshimit-nippour/django-geoprisma
geoprisma/acl/models.py
1
1433
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import User, Group from geoprisma.models import Resource, Session #Dummy decorator if schema is not supported def schematize(original_class): return original_class #Import model that support PGSQL schema if dif...
bsd-3-clause
-81,777,879,238,157,520
27.854167
80
0.593859
false
product-definition-center/pdc-client
pdc_client/plugins/image.py
1
4868
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from __future__ import print_function import sys from datetime import datetime from pdc_client.plugin_helpers import PDCClientPlugin, add_parser_arguments, extract_arguments info_des...
mit
1,686,656,099,837,159,700
37.03125
104
0.513558
false
OAGr/exercism
python/twelve-days/twelve_days.py
1
1335
#1 hour 15 minutes with minor distractions def sing(): return verses(1,12) def verse(i): lines = [] lines.append("On the %s day of Christmas my true love gave to me" % days[i]) lines += chorus(i) lines.append(ending(i)) lines = ', '.join(lines) return lines + "\n" def verses(start,stop): ...
mit
8,918,104,149,386,228,000
20.532258
80
0.494382
false
transientlunatic/minke
minke/mdctools.py
1
34706
""" 88b d88 88 88 888b d888 "" 88 88`8b d8'88 88 88 `8b d8' 88 88 8b,dPPYba, 88 ,d8 ,adPPYba, 88 `8b d8' 88 88 88P' `"8a 88 ,a8" a8P_____88 88 `8b d8' 88 88...
isc
-1,914,375,457,587,391,000
35.687104
291
0.54953
false
niutool/niuforum
forum/utils.py
1
3033
import re from PIL import Image, ImageOps from io import BytesIO from django.contrib.auth.models import User from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import HttpResponseForbidden from django.shortcuts import get_object_or_404 from django.core.files.uploadedfile import Si...
mit
2,211,155,211,056,811,500
32.7
94
0.667326
false
rodrigorm/golimar
plugin/python/golimar/ui/vimui.py
1
8614
#!/usr/bin/env python # # vimui.py # # User Interface for Vim import functools import vim class Ui: def __init__(self, skype): self.skype = skype self.is_open = False self.tabnr = None def open(self): if self.is_open: return # try: self.messages =...
gpl-2.0
-7,399,287,538,600,110,000
25.262195
84
0.565823
false
DmitriySalnikov/godot
modules/mono/build_scripts/godot_net_sdk_build.py
11
1755
# Build Godot.NET.Sdk solution import os from SCons.Script import Dir def build_godot_net_sdk(source, target, env): # source and target elements are of type SCons.Node.FS.File, hence why we convert them to str module_dir = env["module_dir"] solution_path = os.path.join(module_dir, "editor/Godot.NET.Sd...
mit
5,912,477,984,069,791,000
30.909091
114
0.688889
false
Kloudless/kloudless-python
kloudless/http.py
1
4038
from .util import logger from . import config from . import exceptions import functools import json import time import six from abc import ABCMeta, abstractproperty from requests.structures import CaseInsensitiveDict class BaseAuth: __metaclass__ = ABCMeta scheme = abstractproperty() def __init__(self...
mit
-1,713,365,648,381,834,800
33.810345
85
0.631748
false
epam/DLab
infrastructure-provisioning/src/general/scripts/aws/edge_start.py
1
3048
#!/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
-5,064,682,080,044,262,000
39.64
110
0.580052
false
njwilson23/rasterio
rasterio/tool.py
1
5429
""" Implementations of various common operations, like `show()` for displaying an array or with matplotlib, and `stats()` for computing min/max/avg. Most can handle a numpy array or `rasterio.Band()`. Primarily supports `$ rio insp`. """ from __future__ import absolute_import import code import collections import ...
bsd-3-clause
3,904,077,660,816,779,300
30.201149
78
0.63695
false
MixedEmotions/27_emotion_video_dcu
emotionService/emotionService.py
1
5891
# coding: utf-8 # In[ ]: from __future__ import division import logging import os import xml.etree.ElementTree as ET from senpy.plugins import EmotionPlugin, SenpyPlugin from senpy.models import Results, EmotionSet, Entry, Emotion, Error logger = logging.getLogger(__name__) import numpy as np import math, itertoo...
apache-2.0
-8,383,515,891,701,562,000
32.282486
137
0.55101
false
muccc/luftschleuse2
software/lockd/announce.py
1
1588
# This file is part of lockd, the daemon of the luftschleuse2 project. # # See https://github.com/muccc/luftschleuse2 for more information. # # Copyright (C) 2013 Tobias Schneider <schneider@muc.ccc.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
gpl-3.0
6,334,732,133,319,795,000
35.930233
74
0.65869
false
balloob/home-assistant
setup.py
1
2249
#!/usr/bin/env python3 """Home Assistant setup script.""" from datetime import datetime as dt from setuptools import find_packages, setup import homeassistant.const as hass_const PROJECT_NAME = "Home Assistant" PROJECT_PACKAGE_NAME = "homeassistant" PROJECT_LICENSE = "Apache License 2.0" PROJECT_AUTHOR = "The Home A...
apache-2.0
612,110,318,167,927,600
28.592105
77
0.655402
false
Harhoy/transport
transport.py
1
9259
from __future__ import division import numpy as np import math as m from easygui import multenterbox import pandas as pd import matplotlib.pyplot as plt import math as m def import_xl(file_path): df = pd.read_excel(file_path,header = None) df = df.values return df def export_xl(file_path,sheets): writ...
mit
-5,535,627,304,960,529,000
26.804805
97
0.550491
false
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/cert_schema/model.py
1
12691
""" class ProofType(Enum): merkle_proof_2017 = 0 class SignatureType(Enum): signed_content = 0, signed_transaction = 1 Signature --------- | |-- EmbeddedSignature: signs "contents" directly | |-- TransactionSignature: "contents" are embedded in transaction. Merkle proof for multiple """ import...
gpl-3.0
154,558,770,172,818,700
33.961433
116
0.60405
false
smurfix/HomEvenT
modules/path.py
1
1945
# -*- coding: utf-8 -*- ## ## Copyright © 2007, Matthias Urlichs <matthias@urlichs.de> ## ## 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...
gpl-3.0
-2,167,329,687,825,755,100
28.454545
72
0.738169
false
erzel/vitess
test/base_sharding.py
1
16103
#!/usr/bin/env python # # Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """This module contains a base class and utility functions for sharding tests. """ import struct import logging from vtdb import keyrange_c...
bsd-3-clause
6,068,879,863,299,270,000
41.827128
80
0.611501
false
mohd-akram/item.tf
tf2api.py
1
15632
"""This module is based on the Steam WebAPI and can be used to get information about items in TF2. Using this module, you can obtain the item schema, store prices, bundles, item sets and attributes for TF2. You can also obtain market prices from backpack.tf and trade.tf. There are also functions for parsing the inform...
mit
3,765,730,247,329,332,700
32.18896
80
0.5625
false
seblin/launchit
launchit/settings.py
1
3719
""" Configuration stuff. """ # Stdlib import os # 3rd party from xdg.BaseDirectory import xdg_config_home # Launchit package from . import logger # Default configuration config = { 'encoding': 'utf-8', 'icon-theme': 'hicolor', 'menu-dir': '/etc/xdg/menus', 'starter' : 'xdg-open', } CONFIG_FILENAME = '...
mit
119,058,826,191,110,880
37.340206
80
0.674106
false
WDavidX/pipy
v3dht22.py
1
20163
#!/usr/bin/env python # 2014-07-11 DHT22.py import time import atexit import pigpio import smbus import subprocess import os import signal import RPi.GPIO as GPIO import psutil import json import socket import math import datetime import urllib2 class i2c_device: def __init__(self, addr, port=1): self.a...
mit
-1,763,873,955,601,170,400
30.802839
118
0.560581
false
VanceKingSaxbeA/MarketsEngine
src/googlequotemachine.py
1
3986
/*Owner & Copyrights: Vance King Saxbe. A.*/""" Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxb...
mit
-2,020,211,338,537,667,600
38.87
530
0.466633
false
garbear/EventGhost
plugins/Barco/__init__.py
1
19632
from __future__ import with_statement import eg eg.RegisterPlugin( name = "Barco CRT Projector", description = "Controls Barco CRT projectors via RS232.", kind = "external", author = "Bitmonster", version = "1.0.0", canMultiLoad = True, createMacrosOnAdd = True, icon = ( ...
gpl-2.0
-198,317,870,930,125,540
35.537285
96
0.532141
false
w4nderlust/lingua-politicae
scraping/scrape_facebook.py
1
1718
import os import facebook import json import requests # get temporary access token here: https://developers.facebook.com/tools/explorer/ from globals import POLITICIANS_INFO_FILE_PATH, FACEBOOK_POSTS_DIRECTORY access_token = 'EAACEdEose0cBAAKiNQ3ZB3kpnGu7GqkWq4mUHQBb4BuKmae6FHH3jSTIqZBeuqU7hhVv3WiAdxWMLbwx1h9ptmzRWM...
apache-2.0
-5,462,487,004,753,837,000
29.678571
213
0.672293
false
tulip-control/tulip-control
contrib/fmu/robotfmu.py
1
3360
#!/usr/bin/env python """Demonstration of FMU export from a controller synthesized using TuLiP This is a modified copy from the TuLiP sources of examples/robot_planning/continuous.py that exports an FMU. The key changes are * caching of the abstraction and controller in AbstractPwa.p and FSM.p, and * calling exportF...
bsd-3-clause
7,800,883,244,847,692,000
29
76
0.622917
false
akx/shoop
shoop_tests/core/test_product_packages.py
1
2238
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import pytest import six from django.test import RequestFactory from shoop....
agpl-3.0
2,530,028,607,514,225,000
36.3
107
0.725648
false
google-research/kubric
kubric/__init__.py
1
3004
# Copyright 2021 The Kubric Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
4,263,002,817,207,333,000
34.761905
74
0.828229
false
pyfa-org/Pyfa
service/port/eft.py
1
34060
# ============================================================================= # Copyright (C) 2014 Ryan Holmes # # This file is part of pyfa. # # pyfa 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-3.0
3,213,832,208,081,448,000
34.113402
154
0.555255
false
jfmorcillo/mss
mss/agent/managers/module.py
1
25781
# -*- coding: UTF-8 -*- # # (c) 2010 Mandriva, http://www.mandriva.com/ # # This file is part of Mandriva Server Setup # # MSS 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, o...
gpl-3.0
-4,889,416,704,443,938,000
34.028533
105
0.541135
false
lexxito/monitoring
ceilometer/tests/api/v2/test_app.py
1
10718
# -*- encoding: utf-8 -*- # # Copyright 2013 IBM Corp. # Copyright © 2013 Julien Danjou # # Author: Julien Danjou <julien@danjou.info> # # 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
-7,755,225,670,747,542,000
46.211454
78
0.547355
false
danforthcenter/plantcv
plantcv/plantcv/visualize/obj_size_ecdf.py
1
1554
# Plot Empirical Cumulative Distribution Function for Object Size import os import cv2 import pandas as pd from plantcv.plantcv import params from plantcv.plantcv._debug import _debug from statsmodels.distributions.empirical_distribution import ECDF from plotnine import ggplot, aes, geom_point, labels, scale_x_log10 ...
mit
-1,732,821,960,471,904,500
33.533333
94
0.677606
false
shoopio/shoop
shuup_tests/browser/admin/test_picotable.py
2
6430
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import os import time import pytest from django.core.urlresolvers...
agpl-3.0
-8,168,418,631,158,132,000
33.756757
118
0.655832
false
blab/nextstrain-augur
tests/python2/test_fitness_model.py
1
10095
""" Tests for the `fitness_model` module. """ import Bio.Align.AlignInfo import Bio.Phylo import Bio.SeqIO import datetime import numpy as np import pytest import sys import os # we assume (and assert) that this script is running from the tests/ directory sys.path.append(os.path.join(os.path.dirname(__file__), '..', '...
agpl-3.0
-5,951,141,255,891,297,000
35.709091
106
0.665478
false
lalitkumarj/NEXT-psych
next/apps/TupleBanditsPureExploration/Dashboard.py
1
3313
""" TupleBanditsPureExplorationDashboard author: Nick Glattard, n.glattard@gmail.com last updated: 4/24/2015 ###################################### TupleBanditsPureExplorationDashboard """ import json import numpy import numpy.random import matplotlib.pyplot as plt from datetime import datetime from datetime impor...
apache-2.0
-895,578,038,832,103,800
37.976471
278
0.635376
false
clubcapra/Ibex
src/capra_ui/GpsPointManager/controllers/DialogAddPoint.py
1
1045
__author__ = 'jstcyr' from PyQt4 import QtGui, QtCore from ..views import DialogAddPointUi from ..models.Coordinates import Coordinates from ..utilities import CoordinatesUtils class DialogAddPoint(QtGui.QDialog, DialogAddPointUi.Ui_Dialog_add_point): def __init__(self, parent=None): super(DialogAddPoint...
gpl-3.0
5,127,037,757,480,092,000
39.230769
96
0.686124
false
genialis/resolwe
resolwe/flow/migrations/0023_process_entity_2.py
1
1150
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-01 03:15 from __future__ import unicode_literals from django.db import migrations def migrate_flow_collection(apps, schema_editor): """Migrate 'flow_collection' field to 'entity_type'.""" Process = apps.get_model("flow", "Process") Descript...
apache-2.0
5,028,491,642,079,892,000
30.081081
86
0.633913
false
pitunti/alfaPitunti
plugin.video.alfa/channels/peliculashindu.py
1
5105
# -*- coding: utf-8 -*- import re import urlparse from core import httptools from core import scrapertools from core import servertools from core.item import Item from platformcode import config, logger host = "http://www.peliculashindu.com/" def mainlist(item): logger.info() itemlist = list() iteml...
gpl-3.0
7,154,396,034,331,516,000
39.704
128
0.630896
false
NCI-GDC/gdcdatamodel
docs/bin/schemata_to_graphviz.py
1
1305
import os from gdcdatamodel import models as m from graphviz import Digraph def build_visualization(): print('Building schema documentation...') # Load directory tree info bin_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = os.path.join(os.path.abspath( os.path.join(bin_dir, os.p...
apache-2.0
-1,928,741,707,726,198,000
29.348837
82
0.613027
false
Diacamma2/asso
diacamma/member/migrations/0002_change_activity.py
1
1810
# -*- coding: utf-8 -*- ''' Initial django functions @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License ...
gpl-3.0
-43,555,210,291,383,250
29.677966
112
0.695028
false
bintoro/schematics
schematics/types/base.py
1
27989
import uuid import re import datetime import decimal import itertools import functools import random import string import six from six import iteritems from ..exceptions import ( StopValidation, ValidationError, ConversionError, MockCreationError ) try: from string import ascii_letters # PY3 except ImportErr...
bsd-3-clause
-4,595,678,198,879,457,300
30.342665
95
0.586016
false
zetaops/ulakbus
selenium_tests/test_admin_donem.py
1
1461
# -*- coding: utf-8 -*- from test_settings import Settings class TestCase(Settings): def test_sidebar(self): # Ayarlari yapiyor. self.do_settings() # Admin'e tikliyor. self.driver.find_element_by_css_selector('li.ng-binding:nth-child(4) > a:nth-child(1)').click() # Donem'e ...
gpl-3.0
-750,470,740,243,175,200
51.178571
111
0.646817
false
tony/pconf
setup.py
1
1673
#!/usr/bin/env python # -*- coding: utf8 -*- """pconf lives at <https://github.com/tony/pconf>. pconf ~~~~~ Python configuration management for humans. """ import os import sys from setuptools import setup, find_packages with open('requirements.pip') as f: install_reqs = [line for line in f.read().split('\n') ...
bsd-3-clause
466,822,481,173,191,000
26.42623
79
0.616856
false
jgowans/correlation_plotter
rfi_looker.py
1
1835
#!/usr/bin/env python import os, time import numpy as np import matplotlib.pyplot as plt import scipy.signal results_directory = os.getenv('HOME') + "/rfi_capture_results/" SAMPLE_FREQUENCY = 3600.0 # MHz and us ADC_SCALE_VALUE = 707.94 # algorithm: # open a .npy file (or do the disk buffer thing) filename = raw_in...
mit
-6,651,409,812,825,622,000
35.7
120
0.72752
false
dblN/misc
utils.py
1
3046
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from keras.layers import Dense from keras.preprocessing.image import apply_transform import matplotlib.pyplot as plt def take_glimpses(image, location, sizes): ...
mit
-7,068,430,309,194,083,000
34.418605
109
0.602101
false
banacer/lab221
building_control/Python/Pubsub.py
1
1316
import pika import logging import sys __mqtt_host = '172.26.50.120' __mqtt_port = 1883 def printit(ch, method, properties, body): """ prints the body message. It's the default callback method :param ch: keep null :param method: keep null :param properties: keep null :param body: the message ...
mit
2,891,826,054,302,727,000
28.931818
85
0.681611
false
JosefAssad/stock-data-cacher
tests.py
1
19610
#!/usr/bin/env python # Copyright 2012 Josef Assad # # This file is part of Stock Data Cacher. # # Stock Data Cacher 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 y...
gpl-3.0
7,874,646,917,034,667,000
47.902743
122
0.594238
false
bokeh/bokeh
tests/unit/bokeh/models/test_ranges.py
1
9638
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
bsd-3-clause
-2,753,696,687,269,874,700
36.069231
117
0.513903
false
BL-Labs/jokedbapp
jokedbapp/tests/test_load_omeka.py
1
1534
import unittest from models import * from utils.handle_transcript import TranscriptionParser, OmekaXML, om from test_data import TRANSCRIPTIONS OMEKA_COLLECTION = "test_omeka_collection.xml" # User, Transcription, Joke, Picture class TestUserClass(unittest.TestCase): def setUp(self): self.TP = Transcription...
mit
3,395,962,392,050,536,000
29.078431
77
0.690352
false
pobear/django-xadmin
xadmin/plugins/actions.py
1
10988
from django import forms from django.core.exceptions import PermissionDenied from django.db import router from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from django.template.response import TemplateResponse # from django.utils.datastructures import SortedDict from collecti...
bsd-3-clause
-8,988,290,766,967,416,000
36.630137
142
0.608664
false
kimus/django-blocks
blocks/migrations/0007_auto__chg_field_pagetranslation_title.py
1
6688
# -*- 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): # Changing field 'PageTranslation.title' db.alter_column(u'blocks_page_translation', 'title', self.gf('djan...
mit
2,696,382,157,176,265,700
70.924731
154
0.54994
false
Ichimonji10/robottelo
tests/foreman/ui/test_discoveryrule.py
1
22334
# -*- encoding: utf-8 -*- """Test class for Foreman Discovery Rules @Requirement: Discoveryrule @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ from fauxfactory import gen_integer, gen_ipaddr, gen_string from nailgun import entiti...
gpl-3.0
5,553,202,389,800,551,000
34.116352
79
0.563849
false
phwallen/smrc
heSensor.py
1
4357
''' Simimple Model Railway Automation Hall-effect Sensor Support Module Author : Peter Wallen Created : 21/1/13 Version 1.0 This code encapulates hardware associated with sensors used to detect the location of trains. The hardware supported comprises of : One or more Microchip MCP2301...
mit
5,683,908,779,810,081,000
32.775194
103
0.684416
false
babelsberg/babelsberg-r
tests/modules/ffi/test_function.py
1
15258
from tests.modules.ffi.base import BaseFFITest from topaz.modules.ffi.type import type_names, aliases from rpython.rlib import clibffi import sys if sys.platform == 'darwin': ext = 'dylib' libm = 'libm.' + ext libc = 'libc.' + ext else: libm = 'libm.so' libc = 'libc.so.6' substitutions = {} code...
bsd-3-clause
-1,216,122,773,162,513,700
42.223796
81
0.54247
false
jcmgray/quijy
quimb/tensor/__init__.py
1
2984
from .tensor_core import ( get_contract_strategy, set_contract_strategy, contract_strategy, get_contract_backend, set_contract_backend, contract_backend, get_tensor_linop_backend, set_tensor_linop_backend, tensor_linop_backend, tensor_contract, tensor_split, tensor_direct...
mit
4,681,047,906,577,972,000
18.251613
35
0.594839
false
hazelnusse/pydy
examples/pointfootwalker/GarciasPFW_eoms.py
1
2122
# Sun Aug 23 13:12:56 2009 from numpy import sin, cos, tan, vectorize def f(x, t, parameter_list): # Unpacking the parameters Mh, mf, g, L, q3 = parameter_list # Unpacking the states (q's and u's) q1, q2, u1, u2 = x s1 = sin(q1) cos(q3) = cos(q3) c2 = cos(q2) sin(q3) = sin(q3) s2 = ...
bsd-3-clause
-8,282,384,684,407,211,000
54.868421
747
0.49623
false
pikamar/scoop
config/settings/production.py
1
7423
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku - Use sentry for error logging ''' from __future__ import absolute_import, unicode_literals from boto.s3.connection import Ordinar...
bsd-3-clause
-8,161,419,392,009,591,000
34.014151
117
0.605011
false
jtpereyda/boofuzz
boofuzz/primitives/byte.py
1
1725
import struct import six from .bit_field import BitField class Byte(BitField): """The byte sized bit field primitive. :type name: str, optional :param name: Name, for referencing later. Names should always be provided, but if not, a default name will be given, defaults to None :type defau...
gpl-2.0
-9,200,485,191,700,654,000
43.230769
120
0.688116
false
Smart-Torvy/torvy-home-assistant
tests/components/test_http.py
1
7912
"""The tests for the Home Assistant HTTP component.""" # pylint: disable=protected-access,too-many-public-methods import logging import time from ipaddress import ip_network from unittest.mock import patch import requests from homeassistant import bootstrap, const import homeassistant.components.http as http from te...
mit
472,902,248,127,394,500
35.127854
79
0.592391
false
pyxll/pyxll-examples
matplotlib/interactiveplot.py
1
3441
""" Example code showing how to draw an interactive matplotlib figure in Excel. While the figure is displayed Excel is still useable in the background and the chart may be updated with new data by calling the same function again. """ from pyxll import xl_func from pandas.stats.moments import ewma # matplotlib imports...
unlicense
-8,776,649,208,221,896,000
30.281818
92
0.657076
false
ColumbiaCMB/kid_readout
apps/data_taking_scripts/2017-05-jpl-lf-n1-optical/single-horn/sweep_and_stream_bb_4.py
1
3439
from kid_readout.interactive import * from kid_readout.equipment import hardware from kid_readout.measurement import acquire from kid_readout.roach import analog from kid_readout.equipment import agilent_33220 import time fg = agilent_33220.FunctionGenerator(addr=('192.168.1.135', 5025)) fg.set_load_ohms(1000) fg.set...
bsd-2-clause
2,862,236,436,444,174,300
39.458824
124
0.624891
false
RyanYoung25/tensorflow
tensorflow/python/kernel_tests/init_ops_test.py
1
11495
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-5,162,727,929,526,822,000
37.189369
80
0.654806
false
jerpat/csmake
csmake-providers/CsmakeModules/HttpStopService.py
1
2642
# <copyright> # (c) Copyright 2017 Hewlett Packard Enterprise Development LP # # 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 ve...
gpl-3.0
5,305,169,420,175,332,000
38.432836
77
0.691522
false
el33th4x0r/crosstex
crosstex/cmd.py
1
12121
import argparse import importlib import logging import os import os.path import sys import crosstex import crosstex.style logger = logging.getLogger('crosstex') parser = argparse.ArgumentParser(prog='crosstex', description='A modern, object-oriented bibliographic tool.') #parser.add_...
gpl-2.0
-3,937,128,750,447,653,000
51.021459
102
0.557875
false
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/modules/rna_info.py
1
22978
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
-7,275,365,268,557,199,000
31.002786
179
0.556402
false