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
martijnvermaat/rpclib
examples/multiple_protocols/protocol.py
1
4933
# encoding: utf8 # # Copyright © Burak Arslan <burak at arskom dot com dot tr>, # Arskom Ltd. http://www.arskom.com.tr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistr...
lgpl-2.1
-12,388,837,928,334,454
38.142857
81
0.644972
false
rbarrois/xelpaste
libpaste/forms.py
1
6310
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django import forms from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from .conf import settings from .models import Snippet from .highlight import LEXER_LIST, LEXER_DEFAULT, LEXER_KEYS cl...
mit
-4,652,377,994,480,685,000
31.694301
116
0.599208
false
CINPLA/expipe-dev
expipe-plugin-cinpla/utils/batch-analysis.py
1
2291
import subprocess import expipe import os import os.path as op import sys import logging sys.path.append(expipe.config.config_dir) if not op.exists(op.join(expipe.config.config_dir, 'expipe_params.py')): print('No config params file found, use "expipe' + 'copy-to-config expipe_params.py"') else: from ...
gpl-3.0
-3,879,119,396,292,974,600
31.267606
86
0.662156
false
NMGRL/pychron
pychron/dvc/meta_object.py
1
8555
# =============================================================================== # Copyright 2018 ross # # 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
-8,466,811,119,454,810,000
26.508039
107
0.497604
false
Xion/callee
docs/conf.py
1
12588
# -*- coding: utf-8 -*- # # callee documentation build configuration file, created by # sphinx-quickstart on Wed Oct 14 11:24:04 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
bsd-3-clause
2,139,527,253,336,142,000
31.866841
79
0.690022
false
freevo/freevo2
src/core/plugin.py
1
6511
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # plugin.py - Plugin interface # ----------------------------------------------------------------------------- # $Id$ # # This file defines some special plugins known to Freevo. # # -----------------------------...
gpl-2.0
5,919,889,569,692,873,000
33.089005
90
0.492551
false
kbrose/article-tagging
lib/tagnews/utils/load_data.py
1
18109
import pandas as pd import numpy as np import re import json import os import warnings import shutil from pathlib import Path import codecs """ Helper functions to load the article data. The main method to use is load_data(). """ # Caution! Modifying this in code will have no effect since the # default arguments are ...
mit
-2,647,651,664,021,491,700
35.145709
79
0.576178
false
makinux/PyCsmap
CSMapMake.py
1
2664
# -*- coding: utf-8 -* from PIL import Image import os import argparse import requests import math from CSMap import CSMap parser = argparse.ArgumentParser(description='MyScript') parser.add_argument('images_x_start', type=int) parser.add_argument('images_x_end', type=int) parser.add_argument('images_y_...
mit
-6,314,688,419,536,940,000
32.153846
138
0.569069
false
helpmoeny/pythoncode
Python_labs/lab10/warmup.py
1
1907
################################################################################ ## Demonstration program for class Date ################################################################################ import date print("[Testing Area-__init__]") J = date.Date( brake, me, 2013 )#testin two arguments to function that...
unlicense
8,212,722,584,520,924,000
18.864583
93
0.577347
false
CSD-Public/stonix
src/MacBuild/proto/lib/manage_user/macos_user.py
1
31321
""" Cross platform user creation and management Created for testing cross user testing for the ramdisk project, specifically unionfs functionality. @author: Roy Nielsen """ import re import os import pty import sys import shutil from subprocess import Popen ########## # local app libraries from lib.manage_user.pa...
gpl-2.0
-8,467,802,380,262,595,000
30.960204
113
0.4769
false
keras-team/keras-io
examples/nlp/text_classification_from_scratch.py
1
8972
""" Title: Text classification from scratch Authors: Mark Omernick, Francois Chollet Date created: 2019/11/06 Last modified: 2020/05/17 Description: Text sentiment classification starting from raw text files. """ """ ## Introduction This example shows how to do text classification starting from raw text (as a set of t...
apache-2.0
6,434,025,411,105,237,000
28.513158
97
0.731052
false
marcok/odoo_modules
hr_employee_time_clock/models/hr_contract.py
1
8125
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2016 - now Bytebrand Outsourcing AG (<http://www.bytebrand.net>). # # This program is free software: you can redistribute it and/or modify # it...
agpl-3.0
6,116,065,699,745,750,000
41.317708
84
0.494769
false
splunk/splunk-webframework
server/splunkdj/management/commands/wsgiserver/mediahandler.py
1
3038
#!/usr/bin/env python # -*- coding: utf-8 -*- # fix these up import os, stat, mimetypes import django from django.utils.http import http_date from django.conf import settings from django.contrib.staticfiles import finders import logging logger = logging.getLogger('splunk') class BlockIterator(object): # Vlada Mac...
apache-2.0
2,097,185,919,337,839,600
31.297872
76
0.565547
false
DoubleCiti/daimaduan.com
daimaduan/migrations/20160318173601.py
1
1459
# coding: utf-8 import hashlib import time from mongodb_migrations.base import BaseMigration class Migration(BaseMigration): def upgrade(self): """ Add default bookmark to every user :return: """ user_ids = [str(i['user']) for i in self.db.bookmark.find()] users =...
bsd-3-clause
-5,481,385,107,902,638,000
36.205128
96
0.458994
false
fgclaramonte/Odoo-addons
pos_order_categories/__openerp__.py
1
1761
# -*- encoding: utf-8 -*- ############################################################################## # pos_order_categories # Copyright (c) 2017 Francisco Manuel García Claramonte <francisco@garciac.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
gpl-3.0
-6,679,769,431,541,364,000
34.734694
81
0.607082
false
anaran/olympia
apps/amo/helpers.py
1
20802
import collections import json as jsonlib import os import random import re from operator import attrgetter from urlparse import urljoin from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.forms import CheckboxInput from django.utils import translation from django.utils.e...
bsd-3-clause
4,492,389,124,689,926,000
28.548295
79
0.637727
false
Alex-Chizhov/python_training
home_work_4_fixture/test_add_group_and_contact.py
1
1218
# -*- coding: utf-8 -*- from group import Group from info_contact import Infos from application import Application import pytest @pytest.fixture def app(request): fixture = Application() request.addfinalizer(fixture.destroy) return fixture def test_add_group(app): app.login( username="admin", passw...
apache-2.0
-3,554,137,020,219,568,600
17.179104
172
0.66092
false
zacharyvoase/django-postgres
tests/test_project/viewtest/tests.py
1
1775
from contextlib import closing from django.contrib import auth from django.core.management import call_command from django.db import connection from django.test import TestCase import models class ViewTestCase(TestCase): def setUp(self): call_command('sync_pgviews', *[], **{}) def test_views_have_...
unlicense
-4,855,519,043,533,569,000
33.803922
85
0.658592
false
baidu/Paddle
python/paddle/fluid/transpiler/distribute_transpiler.py
1
90029
# Copyright (c) 2018 PaddlePaddle 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 required by app...
apache-2.0
-3,133,544,841,182,929,400
41.466509
130
0.534617
false
wdxtub/Patriots
static/code/sentiment_lstm.py
1
10671
# -*- coding: utf-8 -*- from __future__ import absolute_import #导入3.x的特征函数 from __future__ import print_function import yaml import sys reload(sys) sys.setdefaultencoding('utf8') import pandas as pd #导入Pandas import numpy as np #导入Numpy import jieba #导入结巴分词 import h5py, pickle, os, datetime from keras.models import m...
gpl-3.0
-7,875,329,815,553,282,000
28.21365
128
0.602641
false
keon/algorithms
algorithms/arrays/merge_intervals.py
1
2055
""" In mathematics, a (real) interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set. """ class Interval: """ A set of real numbers with methods to determine if other numbers are included in the set. Includes related m...
mit
8,231,583,978,743,226,000
25.688312
63
0.543066
false
charleslaw/pyfft
fft.py
1
6159
# -*- coding: utf-8 -*- """ Created on Sun Aug 29 00:09:26 2010 @author: Charles Law """ import math def fft(fin, inverse): nfft = len(fin) twiddles, factors = fft_alloc(nfft, inverse) fout = [] for i in xrange(nfft): fout.append((0, 0)) fout_ind_start = 0 ...
bsd-3-clause
-4,358,925,286,503,255,000
23.036585
77
0.458841
false
raybrshen/pattern_recognition
noise_detection/tools/filter_noise.py
1
3213
__author__ = 'ray' import os from subprocess import Popen,PIPE import wave import numpy as np def run_comm(comm): process = Popen(comm, stdout=PIPE) (std_out,std_err) = process.communicate() exit_code = process.wait() if std_out: print std_out if std_err!=None: print std_err def run_comm_save_out...
apache-2.0
-174,848,481,864,122,460
32.821053
124
0.68503
false
stephane-martin/salt-debian-packaging
salt-2016.3.2/salt/states/apache_module.py
1
3640
# -*- coding: utf-8 -*- ''' Manage Apache Modules .. versionadded:: 2014.7.0 Enable and disable apache modules. .. code-block:: yaml Enable cgi module: apache_module.enabled: - name: cgi Disable cgi module: apache_module.disabled: - name: cgi ''' from __future__ import absolute_...
apache-2.0
2,404,470,140,685,547,500
25.376812
79
0.549176
false
imprazaguy/bluetool
test/ts/TP_CON_MAS_BV-37-C.py
1
3830
# TP/CON/MAS/BV-37-C [Master Data Length Update - minimum Receive Data Channel # PDU length and time] # # Verify that the IUT as Master correctly handles reception of an LL_LENGTH_REQ # PDU import bluetool from bluetool.core import HCIDataTransCoordinator, HCIDataTransWorker, LEHelper import bluetool.bluez as bluez im...
mit
-6,715,319,736,514,728,000
29.887097
79
0.641514
false
jbradberry/django-turn-generation
sample_project/sample_app/plugins.py
1
1455
from django.contrib.contenttypes.models import ContentType from . import models class TurnGeneration(object): realm_types = { 'testrealm': 'sample_app.testrealm', } agent_types = { 'testagent': 'sample_app.testagent', } permissions = { 'turngeneration.add_generator': '_i...
mit
8,028,781,954,254,338,000
29.3125
64
0.612371
false
liddiard/skry
attachments/migrations/0001_initial.py
1
3621
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('authors', '0001_initial'), ] operations = [...
mit
-2,658,551,179,478,902,000
42.626506
143
0.540182
false
lsaffre/lino_book
lino_book/projects/team/settings/fixtures/demo.py
1
14548
# -*- coding: UTF-8 -*- # Copyright 2015-2020 Rumma & Ko Ltd # License: BSD (see file COPYING for details) import datetime from lino.api import rt, dd, _ from lino.utils import Cycler, i2d from lino.core.roles import SiteAdmin from lino_xl.lib.cal.choicelists import DurationUnits from lino_xl.lib.working.roles impo...
agpl-3.0
-5,977,341,165,044,321,000
33.532067
100
0.60022
false
wikimedia/analytics-aggregator
aggregator/projectcounts.py
1
34906
# -*- coding: utf-8 -*- # 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 #...
apache-2.0
3,475,592,987,253,228,000
40.505351
80
0.575288
false
raubana/NeverEndingDungeon
libs/TileSystem.py
1
19615
# ====== IMPORTS ====== # --- Pygame --- import pygame # --- Custom Modules --- from common import copy_color, lerp_colors # --- Misc. --- import random, math # ====== CONSTANTS ====== TILE_SIZE = 48 # The 2D size of a side of a single tile in pixels. TILE_FLOOR_COLOR = (96,96,96) TILE_GRASSTILE_COLOR = (100,165,7...
gpl-3.0
-4,026,060,207,007,091,700
34.53442
144
0.67637
false
ztultrebor/BARKEVIOUS
BARKEVIOUS.py
1
1924
# coding: utf-8 #read in libraries import cPickle as pickle from webcrawler import coredump from dataloader import get_trawled_data, introduce_weighting from ratings import PowerRater from history import historical, model_the_model from predict import predict from oddsmaker import read_odds from betting import wager ...
mit
5,116,046,065,970,311,000
34.62963
93
0.751559
false
cernanalysispreservation/cap-client
cap_client/cli/metadata_cli.py
1
2900
# -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2020 CERN. # # CERN Analysis Preservation Framework 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...
gpl-2.0
711,444,110,853,838,100
25.605505
78
0.68069
false
pratapvardhan/pandas
pandas/core/tools/numeric.py
1
6034
import numpy as np import pandas as pd from pandas.core.dtypes.common import ( is_scalar, is_numeric_dtype, is_decimal, is_datetime_or_timedelta_dtype, is_number, _ensure_object) from pandas.core.dtypes.generic import ABCSeries, ABCIndexClass from pandas.core.dtypes.cast import maybe_downcast_to...
bsd-3-clause
3,448,711,943,204,059,000
32.522222
77
0.595956
false
CitoEngine/cito_engine
app/cito_engine/views/teams.py
1
2915
"""Copyright 2014 Cyrus Dasadia 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 distr...
apache-2.0
339,665,741,333,778,900
35.4375
87
0.649743
false
tylercal/dragonfly
dragonfly/engines/backend_natlink/__init__.py
1
2141
# # This file is part of Dragonfly. # (c) Copyright 2007, 2008 by Christo Butcher # Licensed under the LGPL. # # Dragonfly is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the...
lgpl-3.0
2,523,695,225,473,114,600
29.15493
81
0.611397
false
villaverde/iredadmin
tools/ira_tool_lib.py
1
1823
"""Library used by other scripts under tools/ directory.""" # Author: Zhang Huangbin <zhb@iredmail.org> import os import sys import logging import web debug = False # Set True to print SQL queries. web.config.debug = debug os.environ['LC_ALL'] = 'C' rootdir = os.path.abspath(os.path.dirname(__file__)) + '/../' sy...
gpl-2.0
-8,572,292,621,515,470,000
23.972603
73
0.537575
false
ddurieux/alignak
alignak/objects/escalation.py
1
11934
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 S...
agpl-3.0
3,850,765,669,917,690,000
41.617857
98
0.607643
false
black-perl/ptop
ptop/core/plugin.py
1
1653
''' ptop.core.plugin This module define the BaseClass for plugin. It defines the basic rules that are to be followed by a new plugin. ''' class Plugin(object): ''' Base Plugin class ''' def __init__(self,name,sensorType,interval): '''creates an instance of the class I...
mit
5,349,374,689,661,157,000
25.238095
116
0.589837
false
solomonvimal/pyras
pyras/controllers/hecras/hecrascontroller/ras41.py
1
49672
""" """ import os import os.path as osp class Controller(object): """HECRAS Controller vesrsion RAS41""" # %% Compute def Compute_Cancel(self): """ """ rc = self._rc rc.Compute_Cancel() def Compute_CurrentPlan(self): """ Computes the current plan. ...
mit
65,427,403,340,449,160
26.905618
79
0.544794
false
stu314159/pyNFC
pyNFC_Util.py
1
2945
# pyNFC_Util.py """ definition module for some pyNFC utility classes """ import numpy as np class NFC_Halo_Data_Organizer(object): """ collect and organize how halo data will be organized prior to communication """ def __init__(self,ngb_rank): """ constructor """ s...
mit
-2,612,081,654,532,963,000
27.592233
96
0.550424
false
aljohnso/Market_Dreams
Stock Class.py
1
1179
class Stock: def __init__(self, Company_name): """ the constructor for the TextModel class all dictionaries are started at empty the name is just for our own purposes, to keep things organized """ self.Company_name = Company_name ...
mit
1,794,398,396,096,586,200
18.684211
84
0.492791
false
xialin/cs4221
hello/views.py
1
6857
from django.shortcuts import render, redirect from django.conf import settings import textwrap from converter import convert_xml_to_json from converter import update_primary_key_in_xml, merge_relationship_in_xml, validate_xml import lxml.etree as etree from django.http import HttpResponse from django.views.generic.ba...
mit
349,054,863,970,484,300
31.966346
92
0.596033
false
mtils/ems
ems/qt4/gui/itemdelegate/multiroledelegate.py
1
1523
from PyQt4.QtCore import QRect, Qt, QLine from PyQt4.QtGui import QStyledItemDelegate, QStyleOptionViewItemV4 from PyQt4.QtGui import qApp, QStyle, QPen, QColor class MultiRoleDelegate(QStyledItemDelegate): def __init__(self, *args, **kwargs): super(MultiRoleDelegate, self).__init__(*args, **kwargs) ...
mit
9,120,466,596,143,563,000
34.418605
92
0.630335
false
sgnn7/sgfc
io_dev/sgfc_io/devices/pic18f45k50/hk_usb_io.py
1
8392
#!/usr/bin/python import sys import time import usb.core import usb.util from array import array # Markham Thomas 2015 # This version is under heavy development # You can add your test code to the bottom # below the === end of module statement, or # externally call the module # # ---- This version adds a python cla...
lgpl-2.1
-5,762,390,856,084,882,000
29.405797
72
0.561725
false
convexopt/gpkit
gpkit/tests/t_examples.py
1
6270
"""Unit testing of tests in docs/source/examples""" import unittest import os import numpy as np from gpkit import settings from gpkit.tests.helpers import generate_example_tests from gpkit.small_scripts import mag from gpkit.small_classes import Quantity def assert_logtol(first, second, logtol=1e-6): "Asserts t...
mit
-6,738,244,762,504,449,000
31.827225
79
0.56571
false
hforge/Localizer
zgettext.py
1
8628
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (C) 2001 Andrés Marzal Varo # Copyright (C) 2001-2002 J. David Ibáñez <jdavid@itaapy.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 Foundati...
gpl-3.0
855,364,505,234,791,200
32.045977
94
0.582377
false
shivamMg/toy-task
toytask/toytask/views.py
1
3161
import json import os import random import cv2 from django.shortcuts import render, HttpResponseRedirect from django.core.urlresolvers import reverse from django.views.decorators.csrf import csrf_exempt from toytask.settings import MEDIA_ROOT from . import modules from .forms import UploadImageForm def imagepath(im...
mit
-4,341,640,527,606,923,000
29.68932
77
0.548877
false
liffiton/ATLeS
src/analysis/plot.py
1
11295
import math import re import matplotlib import matplotlib.pyplot as plt from matplotlib import collections, lines, patches from analysis import heatmaps import config # Source: https://gist.github.com/jasonmc/1160951 def _set_foregroundcolor(ax, color): '''For the specified axes, sets the color of the frame, m...
mit
3,365,155,033,270,954,500
33.96904
124
0.569633
false
afrendeiro/pipelines
lib/fix_bedfile_genome_boundaries.py
1
1086
#!/usr/bin/env python import csv import sys def getChrSizes(chrmFile): """ Reads tab-delimiter file with two rows describing the chromossomes and its lengths. Returns dictionary of chr:sizes. """ with open(chrmFile, 'r') as f: chrmSizes = {} for line in enumerate(f): ro...
gpl-2.0
7,434,051,444,998,922,000
29.166667
87
0.632597
false
tsai1993/aisixiang
01.download_1.py
1
2415
#!/usr/bin/python3 import os from urllib.request import urlopen from bs4 import BeautifulSoup import pandas import time # 读取 00.get_metadata.R 获取的相关目录信息 D0 = pandas.read_csv("all_aisixiang_2017-05-24.csv") # 意外中断时,可以修改 j 的值 j = 0 D = D0[j:] for i in D['ID']: Url = "http://www.aisixiang.com/data/" + str(i) + ".h...
mpl-2.0
2,543,399,884,251,609,000
28.6125
77
0.433938
false
rvalyi/l10n-brazil
l10n_br_account_service/models/res_company.py
1
2477
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api from openerp.addons.l10n_br_account.models.l10n_br_account import ( L10nBrTaxDefinition ) class ResComp...
agpl-3.0
2,993,863,139,731,171,000
42.263158
79
0.599757
false
jasonflorack/OS-tweets
app/UserInterface.py
1
13307
import os import webbrowser import json from app.ListenerInterface import ListenerInterface from app.SearcherInterface import SearcherInterface class UserInterface: def __init__(self): super(UserInterface, self).__init__() self._auth = None self._search_terms = '' self._num_tweets ...
mit
3,604,229,500,218,865,000
46.525
119
0.574435
false
OpenMined/PySyft
packages/grid/apps/domain/src/main/core/model_centric/tasks/cycle.py
1
1084
# stdlib import logging import traceback # grid relative from ....utils.executor import executor def run_task_once(name, func, *args): future = executor.futures._futures.get(name) logging.info("future: %s" % str(future)) logging.info("futures count: %d" % len(executor.futures._futures)) # prevent run...
apache-2.0
-6,640,543,777,322,043,000
29.111111
86
0.613469
false
guorendong/iridium-browser-ubuntu
third_party/chromite/lib/graphite_lib/statsd_mock_unittest.py
2
1605
# Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittest for statsd mock.""" from __future__ import print_function import unittest from chromite.lib.graphite_lib import statsd_mock as statsd clas...
bsd-3-clause
1,459,786,621,160,206,300
24.887097
72
0.656075
false
duyet-website/api.duyet.net
api/clean_datetime.py
1
1037
# Clean import datetime as dt import time import datetime from utils import * def is_present(date_text): return date_text.upper() == 'NOW' def get_current(): return dt.datetime.now().date() def clean_datetime(date_text): if not isinstance(date_text, basestring): return None # Parse from text date...
mit
9,082,041,020,757,264,000
26.315789
125
0.612343
false
BT-ojossen/l10n-switzerland
l10n_ch_account_statement_base_import/parsers/postfinance_file_parser.py
1
12859
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi, David Wulliamoz # 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 ...
agpl-3.0
2,705,433,604,774,319,000
38.324159
78
0.547632
false
jashandeep-sohi/python-blowfish
blowfish.py
1
49719
# vim: filetype=python3 tabstop=2 expandtab fileencoding=utf-8 # blowfish # Copyright (C) 2015 Jashandeep Sohi <jashandeep.s.sohi@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, ei...
gpl-3.0
2,806,202,192,635,136,500
36.923722
80
0.653043
false
ahkscript/sjBot
commands/##monsterhunter/help.py
1
1542
#!/usr/bin/env python3 import inspect owner = False aliases = ['helpmeplz'] def help(con, sjBot, commands, trigger, host, channel, command=None): """Shows information about commands.""" if command is None: output = [] output.append('Here is a list of commands: {}.'.format(', '.join( ...
gpl-3.0
-6,210,531,313,193,145,000
32.543478
73
0.500649
false
petrvanblokland/Xierpa3
xierpa3/components/logo.py
1
3750
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
mit
-2,568,391,173,460,124,000
44.180723
109
0.6088
false
adrn/TwoFace
twoface/data.py
1
1645
# Third-party import astropy.units as u from astropy.time import Time import numpy as np from thejoker.data import RVData def star_to_apogeervdata(star, clean=False): """Return a `twoface.data.APOGEERVData` instance for this star. Parameters ---------- """ jd = [] rv = [] rv_rand_err = [...
mit
-3,166,085,702,231,851,500
25.111111
77
0.54772
false
PhloxAR/PhloxAR-dc1394
dc1394/frame.py
1
6790
# ----------------------------------------------------------------------------- # # -*- coding: utf-8 -*- # # phlox-libdc1394/phloxar-dc1394/frame.py # # Copyright (C) 2016, by Matthias Yang Chen <matthias_cy@outlook.com> # All rights reserved. # # phlox-libdc1394 is free software: you can redistribute it and/or modify...
gpl-3.0
-5,535,564,742,537,007,000
37.361582
85
0.584831
false
lhotchkiss/mousetrap
src/mousetrap/ocvfw/_ocv.py
1
16960
# # Copyright 2009 Flavio Percoco Premoli # # This file is part of Ocvfw. # # Ocvfw is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the Free Software Foundation. # # Ocvfw is distributed in the hope that it will be useful, # but WITHOUT...
gpl-2.0
6,197,836,876,637,046,000
31.243346
109
0.531132
false
lakewik/storj-gui-client
UI/__init__.py
1
2608
# -*- coding: utf-8 -*- from __future__ import absolute_import import sys import os import click import logging import logging.config as config from logging import handlers APP_NAME = 'storj-gui' """(str): the application name.""" def setup_logging(): """Reads the Storj GUI logging configuration from logg...
mit
-7,573,279,076,914,696,000
27.659341
105
0.673313
false
junzis/py-adsb-decoder
setup.py
1
4319
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject Steps for deploying a new verison: 1. Increase the version number 2. remove the old deployment under [dist] folder 3. run: python setup.py sdist run: python setup.py bdist_wheel -...
mit
9,150,657,280,470,961,000
34.113821
94
0.65918
false
frejanordsiek/hdf5storage
tests/test_dict_like_storage_methods.py
1
7762
# Copyright (c) 2013-2021, Freja Nordsiek # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions ...
bsd-2-clause
-1,991,158,301,032,182,500
32.895197
72
0.636047
false
greenify/zodiacy
bin/import_to_sql.py
1
1369
#!/usr/bin/env python3 # encoding: utf-8 import argparse import os import sqlite3 import json """import_to_sql.py: Imports the Horoscope database into a SQLite""" __author__ = "Project Zodiacy" __copyright__ = "Copyright 2015, Project Zodiacy" parser = argparse.ArgumentParser(description="Awesome SQLite importer")...
mit
-3,553,664,374,160,074,000
34.102564
117
0.61943
false
lovedaybrooke/gender-decoder
db_repository/versions/005_migration.py
1
1581
from sqlalchemy import * from migrate import * import datetime from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() job_ad = Table('job_ad', pre_meta, Column('hash', VARCHAR, primary_key=True, nullable=False), Column('date', TIMESTAMP), Column('jobAdText', TEXT), Column('m...
mit
-7,568,859,038,292,744,000
33.369565
78
0.689437
false
henriquegemignani/randovania
randovania/game_connection/connection_base.py
1
1872
from enum import Enum from typing import Optional, Callable, Awaitable, List, NamedTuple, Dict, Tuple from randovania.game_description.resources.item_resource_info import ItemResourceInfo from randovania.game_description.resources.pickup_entry import PickupEntry class GameConnectionStatus(Enum): Disconnected = "...
gpl-3.0
-7,045,308,066,942,127,000
32.428571
100
0.730235
false
Cinntax/home-assistant
homeassistant/components/geniushub/sensor.py
1
3755
"""Support for Genius Hub sensor devices.""" from datetime import timedelta from typing import Any, Awaitable, Dict from homeassistant.const import DEVICE_CLASS_BATTERY from homeassistant.util.dt import utc_from_timestamp, utcnow from . import DOMAIN, GeniusEntity GH_HAS_BATTERY = ["Room Thermostat", "Genius Valve",...
apache-2.0
157,621,510,489,957,730
30.033058
88
0.604527
false
thorgate/django-esteid
esteid/authentication/views.py
1
3854
import logging from typing import Type, TYPE_CHECKING from django.http import HttpRequest, JsonResponse from esteid.exceptions import ActionInProgress from esteid.mixins import DjangoRestCompatibilityMixin, SessionViewMixin from .authenticator import Authenticator from .types import AuthenticationResult try: f...
bsd-3-clause
-1,586,896,137,301,164,500
31.661017
116
0.677737
false
cpennington/edx-platform
openedx/core/djangoapps/user_authn/views/tests/test_reset_password.py
1
23912
""" Test the various password reset flows """ import json import re import unicodedata import unittest import ddt from django.conf import settings from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX, make_password from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tokens...
agpl-3.0
-3,053,625,084,020,662,300
41.17284
117
0.640432
false
mozilla/firefox-flicks
vendor-local/lib/python/billiard/forking.py
1
20104
# # Module for starting a process object using os.fork() or CreateProcess() # # multiprocessing/forking.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import import os import sys import signal import warnings from ._ext import Connection, ...
bsd-3-clause
-3,203,743,688,771,891,000
29.231579
79
0.557998
false
sergmelikyan/murano
murano/utils.py
1
2779
# Copyright (c) 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-8,519,043,706,058,087,000
36.053333
78
0.631522
false
pyprism/Diary
hiren/settings.py
1
4794
""" Django settings for hiren project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os impo...
mit
2,283,533,890,099,398,700
25.633333
71
0.638089
false
parinporecha/backend_gtgonline
GTG/gtk/__init__.py
1
1400
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2012 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
gpl-3.0
-6,198,741,599,627,684,000
45.666667
79
0.654286
false
beni55/djangolint
project/lint/views.py
2
2264
from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.utils import simplejson as json from django.views.decorators.http import require_POST from .forms import ReportForm from .models import Report, STAGES from .tasks import process_report def index(request): repo...
isc
-2,993,274,295,728,508,400
33.30303
75
0.631625
false
bgaultier/laboitepro
laboite/apps/weather/migrations/0001_initial.py
1
1855
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-21 20:41 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('boites', '__first__'), ] operati...
agpl-3.0
6,369,800,420,185,776,000
50.527778
191
0.616173
false
lebrice/SimpleParsing
test/test_decoding.py
1
3455
import json import logging import textwrap from collections import OrderedDict from dataclasses import dataclass, fields from pathlib import Path from test.conftest import silent from test.testutils import * from typing import Any, Dict, List, Mapping, Optional, Set, Tuple, Type, Union import pytest import yaml from ...
mit
-1,691,354,428,396,457,700
28.784483
94
0.61534
false
andykimpe/chromium-test-npapi
base/android/jni_generator/jni_generator.py
1
53217
#!/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."""...
bsd-3-clause
3,317,135,672,563,785,000
36.214685
80
0.613281
false
vovanec/supervisor_checks
supervisor_checks/bin/xmlrpc_check.py
1
3794
#! /usr/bin/env python3 """Example configuration: [eventlistener:example_check] command=/usr/local/bin/supervisor_xmlrpc_check -g example_service -n example_check -u /ping -r 3 -p 8080 events=TICK_60 """ import argparse import sys from supervisor_checks import check_runner from supervisor_checks.check_modules impor...
mit
-8,783,079,380,630,934,000
41.155556
104
0.524512
false
sportorg/pysport
sportorg/modules/live/live.py
1
1390
from functools import partial from threading import Thread import requests from sportorg.models.memory import race from sportorg.modules.live import orgeo class LiveClient: @staticmethod def is_enabled(): obj = race() live_enabled = obj.get_setting('live_enabled', False) urls = obj.g...
gpl-3.0
-7,688,169,801,107,381,000
25.226415
73
0.576978
false
jomyhuang/sdwle
SDWLE/ui/game_console.py
1
9331
from SDWLE.constants import CHARACTER_CLASS card_abbreviations = { 'Mark of the Wild': 'Mrk Wild', 'Power of the Wild': 'Pow Wild', 'Wild Growth': 'Wld Grth', 'Healing Touch': 'Hlng Tch', 'Mark of Nature': 'Mrk Ntr', 'Savage Roar': 'Svg Roar', 'Soul of the Forest': 'Sol Frst', 'Force of...
mit
-7,777,511,036,395,406,000
39.04721
129
0.506698
false
blissland/devflixx
lib/subliminal/subliminal/providers/opensubtitles.py
1
8161
# -*- coding: utf-8 -*- from __future__ import unicode_literals import base64 import logging import os import re import zlib import babelfish import guessit from . import Provider from .. import __version__ from ..compat import ServerProxy, TimeoutTransport from ..exceptions import ProviderError, AuthenticationError, D...
gpl-2.0
-4,338,821,856,794,192,400
38.425121
139
0.63154
false
MarineLasbleis/GrowYourIC
notebooks/Yoshida.py
1
4212
# -*- coding: UTF-8 -*- import numpy as np import matplotlib.pyplot as plt #for figures #from mpl_toolkits.basemap import Basemap #to render maps import math from GrowYourIC import tracers, positions, geodyn, geodyn_trg, geodyn_static, plot_data, data, geodyn_analytical_flows #plt.rcParams['figure.figsize'] = (8.0,...
mit
8,356,120,609,574,831,000
37.3
118
0.69943
false
UCRoboticsLab/BaxterTictactoe
src/baxter_tictactoe/scripts/camera_gui.py
1
15093
#!/usr/bin/env python """ A GUI to help user take snapshot with hand camera """ import rospy import struct import Tkinter as tk import tkFileDialog, tkMessageBox import tkSimpleDialog from baxter_interface.camera import CameraController from PIL import Image from PIL import ImageTk, ImageDraw import numpy as np f...
apache-2.0
-7,776,810,201,796,508,000
33.9375
124
0.579673
false
iniqua/plecost
plecost_lib/libs/plugins_utils.py
1
9305
#!/usr/bin/python # -*- coding: utf-8 -*- # # Plecost: Wordpress vulnerabilities finder # # @url: http://iniqua.com/labs/ # @url: https://github.com/iniqua/plecost # # @author:Francisco J. Gomez aka ffranz (http://iniqua.com/) # @author:Daniel Garcia aka cr0hn (http://www.cr0hn.com/me/) # # Copyright (c) 2015, Iniqua T...
bsd-3-clause
827,604,493,306,041,200
33.209559
117
0.552714
false
djaodjin/drop
src/dlogwatch.py
1
6707
#!/usr/bin/env python # # Copyright (c) 2020, DjaoDjin inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this ...
bsd-2-clause
8,943,113,638,740,521,000
34.675532
168
0.590279
false
andreMonkey/camera_processing
filming_test.py
1
1179
#!/usr/bin/python from __future__ import absolute_import, division, print_function, unicode_literals import picamera import time import pi3d W, H = 800, 600 with picamera.PiCamera() as camera: camera.resolution = (W, H) camera.framerate = 24 camera.start_preview() #NB layer argument below, fps as sl...
bsd-2-clause
-3,019,243,204,453,303,000
33.676471
84
0.626802
false
mythmon/airmozilla
airmozilla/manage/tests/views/test_tags.py
1
3865
import json from nose.tools import eq_, ok_ from funfactory.urlresolvers import reverse from airmozilla.main.models import Tag, Event from .base import ManageTestCase class TestTags(ManageTestCase): def test_tags(self): """Tag management pages return successfully.""" response = self.client.get(...
bsd-3-clause
-6,290,076,975,803,354,000
33.81982
71
0.580336
false
slackhq/python-slackclient
integration_tests/samples/basic_usage/views_2.py
1
3819
import json import logging logging.basicConfig(level=logging.DEBUG) # --------------------- # Slack WebClient # --------------------- import os from slack_sdk.web import WebClient from slack_sdk.errors import SlackApiError from slack_sdk.signature import SignatureVerifier from slack_sdk.models.blocks import InputBl...
mit
-1,292,510,414,588,983,000
34.361111
88
0.488086
false
WalrusCow/euler
Solutions/problem61.py
1
2077
from collections import defaultdict def triangle(n): return int((n * (n + 1)) / 2) def square(n): return n * n def pentagon(n): return int((n * (3 * n - 1)) / 2) def hexagon(n): return n * (2 * n - 1) def heptagon(n): return int((n * (5 * n - 3)) / 2) def octagon(n): return n * (3 * ...
mit
-5,259,867,364,386,793,000
27.067568
75
0.539239
false
Vilsepi/infinimonkey
backend/ratings-api.py
1
1556
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import json import boto3 table = boto3.resource("dynamodb").Table(os.environ.get("RAMBLINGS_TABLE_NAME")) # def update_item_rating(vote): # table.update_item( # Key={ # 'username': 'janedoe', # 'last_name': 'Doe' # }, # UpdateE...
mit
-1,414,629,655,844,149,200
24.096774
80
0.558483
false
gfvandehei/roomlight-6
light_GUI.py
1
3827
import pyaudio import numpy as np import threading import serial from tkinter import * import serial class GUI(Frame): def audio_thread(self): ''' This function is in charge of collecting data from microphone and changing it into usable data. Is meant to be ran as a thread so it do...
mit
183,737,504,966,901,380
31.440678
93
0.585837
false
lahwaacz/qutebrowser
qutebrowser/browser/webkit/webkittab.py
1
27974
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
-3,768,238,808,339,824,000
34.864103
79
0.608279
false
lsiemens/lsiemens.github.io
theory/fractional_calculus/code/old/FCC2.py
1
1663
""" Ideas about fractional calculus defined on C^2 J^b f(x, a) = f(x, a + b) """ import numpy from matplotlib import pyplot from scipy import special def monomial(x, a, x_0, a_0): return (x - x_0)**(a - a_0)/special.gamma(a - a_0 + 1) def exp(x, a, b): return b**(-a)*numpy.exp(b*x) def projx(f, x, a): n...
mit
-7,503,364,648,748,710,000
24.19697
82
0.5911
false
fajoy/nova
nova/tests/api/openstack/compute/contrib/test_hosts.py
1
14601
# Copyright (c) 2011 OpenStack, LLC. # 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
6,406,965,252,625,038,000
38.040107
78
0.609616
false
MISP/misp-modules
misp_modules/modules/import_mod/csvimport.py
1
15484
# -*- coding: utf-8 -*- from pymisp import MISPEvent, MISPObject from pymisp import __path__ as pymisp_path import csv import io import json import os import base64 misperrors = {'error': 'Error'} moduleinfo = {'version': '0.2', 'author': 'Christian Studer', 'description': 'Import Attributes from a csv f...
agpl-3.0
3,844,226,165,855,668,700
48
304
0.557091
false
pmeier82/BOTMpy
botmpy/test/test_nodes_artifacts.py
1
3553
# -*- coding: utf-8 -*- #_____________________________________________________________________________ # # Copyright (c) 2012 Berlin Institute of Technology # All rights reserved. # # Developed by: Neural Information Processing Group (NI) # School for Electrical Engineering and Computer Science # ...
mit
7,607,404,055,623,223,000
37.204301
78
0.640585
false
release-monitoring/anitya
anitya/lib/backends/cpan.py
1
3710
# -*- coding: utf-8 -*- """ (c) 2014-2016 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> Ralph Bean <rbean@redhat.com> """ import logging from defusedxml import ElementTree as ET from anitya.lib.backends import BaseBackend, get_versions_by_regex, REGEX from anitya.lib.exceptions...
gpl-2.0
-7,440,166,123,449,222,000
31.54386
86
0.628302
false
sztosz/neonet
CommercialReturns/views.py
1
4999
#!/usr/bin/python # -*- coding: utf-8 -*- # # Created on 2013-10-11 # # @author: Bartosz Nowak sztosz@gmail.com # # This file is licensed GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 from __future__ import unicode_literals import unicodecsv from django.contrib.auth import logout from django.shortcuts import red...
gpl-3.0
-2,720,274,015,115,004,400
37.674419
116
0.693125
false