repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
toomanycats/IndeedScraper | test.py | 1 | 1136 | from flask import Flask, render_template
from bokeh.charts import Bar
from bokeh.embed import components
from bokeh.util.string import encode_utf8
from bokeh.plotting import figure
import pandas as pd
app = Flask(__name__)
@app.route('/')
def test():
kws = ["one", "two", "cat", "dog"]
count = [23, 45, 11, 87]... | mit | -600,367,166,198,424,400 | 22.666667 | 70 | 0.514085 | false | 3.55 | false | false | false |
stpeter/memberbot | sleekxmpp/plugins/xep_0009.py | 1 | 7589 | """
XEP-0009 XMPP Remote Procedure Calls
"""
from __future__ import with_statement
import base
import logging
from xml.etree import cElementTree as ET
import copy
import time
import base64
def py2xml(*args):
params = ET.Element("params")
for x in args:
param = ET.Element("param")
param.append(_py2... | gpl-2.0 | 3,609,349,652,676,770,300 | 25.798535 | 99 | 0.652919 | false | 2.988972 | false | false | false |
pearu/f2py | extgen/scalar_rules.py | 1 | 17398 | """
TODO: npy_void
"""
from __future__ import absolute_import
import numpy
from .capi import sctypebits
c_char = dict(\
ctype = 'signed char',
init = ' = 0',
argument_format = 'b',
return_format = 'b',
argument_title = 'a python integer (converting to C signed char)',
return_title = 'a python ... | bsd-3-clause | 2,982,873,471,366,255,000 | 26.659777 | 118 | 0.575583 | false | 3.410704 | false | false | false |
iamRusty/RustyPE | 18/try.py | 1 | 1347 | """
===============================================================
Trial Program for PE 18
Goal: Find the greatest path-sum.
https://projecteuler.net/problem=18
Note: The program uses FILE IO
===============================================================
"""
_FILE_NAME = "data.pe"
def extract(... | mit | -6,180,291,786,295,823,000 | 26.659574 | 75 | 0.472903 | false | 3.826705 | false | false | false |
frutik/formunculous | formunculous/models.py | 1 | 18803 | # This file is part of formunculous.
#
# formunculous 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.
#
# formu... | gpl-3.0 | -5,708,087,654,961,886,000 | 32.516934 | 81 | 0.586236 | false | 4.614233 | false | false | false |
f0rki/cb-multios | original-challenges/CGC_File_System/support/genpolls.py | 1 | 4100 | import struct
import time
import sys
import random
import string
def randString( z ):
s = ''
for i in range(z):
s += random.choice( string.lowercase + string.uppercase + string.digits)
return s
def delfile( dirs ):
### randomly select a directory then pull the file to remove
fl = ''
cnt = 0
while fl == ''... | mit | 6,480,812,888,750,274,000 | 19.707071 | 127 | 0.565366 | false | 2.484848 | false | false | false |
alwayssayyes/incrediblesy | app/views.py | 1 | 9016 | from flask import render_template, Flask, request, redirect, url_for, current_app
from app import app
from urllib2 import urlopen
from bs4 import BeautifulSoup
from flaskext import wtf
from flaskext.wtf import Form, TextField, TextAreaField, SubmitField, validators, ValidationError
from google.appengine.ext import db
... | apache-2.0 | 86,643,763,824,553,280 | 28.371336 | 130 | 0.581522 | false | 3.269036 | false | false | false |
auduny/home-assistant | tests/components/google_assistant/test_trait.py | 1 | 41902 | """Tests for the Google Assistant traits."""
from unittest.mock import patch, Mock
import pytest
from homeassistant.components import (
binary_sensor,
camera,
cover,
fan,
input_boolean,
light,
lock,
media_player,
scene,
script,
switch,
vacuum,
group,
)
from homeassi... | apache-2.0 | 8,503,505,274,772,646,000 | 31.787167 | 79 | 0.580306 | false | 3.681103 | true | false | false |
uchchwhash/fortran-linter | linter/tokens.py | 1 | 3201 | """
Some lowest-level parsers, that is, tokenizers.
"""
import re
from .parsers import parser, join
from .parsers import Success, Failure
def exact(string, ignore_case=False):
""" Only matches the exact `string`. """
if ignore_case:
string = string.lower()
@parser(repr(string))
def inner(tex... | mit | -5,792,294,949,699,803,000 | 25.89916 | 74 | 0.621368 | false | 3.770318 | false | false | false |
Cadasta/cadasta-platform | cadasta/search/tests/test_parser.py | 1 | 12984 | import pytest
from django.test import TestCase
from .. import parser
class ParserTest(TestCase):
def test_parse_string(self):
p = parser.query.parseString
# Simple cases
assert p('a').asList() == ['a']
assert p('a ').asList() == ['a']
assert p(' a ').asList... | agpl-3.0 | 4,627,493,749,427,611,000 | 34.768595 | 79 | 0.275878 | false | 4.076609 | true | false | false |
braindevices/nanoVanalystLib | nanoVanalystLib/nanoVanalystLib/imgFileUtils.py | 1 | 1373 | # -*- coding: UTF-8 -*-
'''
Created on Mar 12, 2015-1:16:18 PM
@author: Ling Wang<LingWangNeuralEng@gmail.com>
'''
import cv2, os
from Constants_and_Parameters import *
def loadAsGray(imgFile, cropY=[0,880]):
img = cv2.imread(imgFile)
img = img[cropY[0]:cropY[1],:,:]
gray = cv2.cvtColor(img, cv2.COLOR_... | gpl-2.0 | 3,744,444,933,070,862,000 | 28.869565 | 109 | 0.646031 | false | 2.984783 | false | false | false |
alexvh/pydflatex | pydflatex/processor.py | 1 | 1137 | #!/usr/bin/env python
# coding: UTF-8
from __future__ import division
import latex_logger
class LaTeXError(Exception):
"""
LaTeX Error
"""
class Processor(object):
"""
Models an object with a logger and some options.
General options:
- colour
- debug
"""
def __init__(self, logger=None, options=None):
... | bsd-3-clause | 5,279,224,763,711,696,000 | 20.055556 | 73 | 0.689534 | false | 3.175978 | false | false | false |
unistra/django-rest-framework-fine-permissions | rest_framework_fine_permissions/permissions.py | 1 | 2283 | # -*- coding: utf-8 -*-
""" Provides new permission policies for django-rest-framework
"""
from rest_framework.permissions import DjangoModelPermissions, BasePermission
from django.contrib.contenttypes.models import ContentType
from rest_framework_fine_permissions.models import FilterPermissionModel
from django.core.... | gpl-2.0 | -2,426,721,725,778,089,000 | 33.575758 | 87 | 0.594654 | false | 4.363289 | false | false | false |
dparks1134/GenomeTreeTk | genometreetk/markers/lgt_test.py | 1 | 10697 | ###############################################################################
# #
# 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 ... | gpl-3.0 | -828,814,402,445,759,400 | 47.294931 | 158 | 0.581284 | false | 4.131711 | false | false | false |
gabrielelanaro/pyquante | PyQuante/MINDO3.py | 1 | 28237 | """\
MINDO3.py: Dewar's MINDO/3 Semiempirical Method
This program is part of the PyQuante quantum chemistry program suite.
Copyright (c) 2004, Richard P. Muller. All Rights Reserved.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE that is part of this
distrib... | bsd-3-clause | 7,576,133,613,060,574,000 | 33.351582 | 79 | 0.515458 | false | 2.914336 | false | false | false |
hoh/Billabong | billabong/storage/__init__.py | 1 | 1393 | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom 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 Foundation, either version 3 of the
# License, or (at your o... | agpl-3.0 | -8,488,347,488,452,236,000 | 30.659091 | 74 | 0.723618 | false | 4.049419 | false | false | false |
dariocorral/panoanda | panoanda/candles.py | 1 | 3916 | """
Created on Sun Sep 17 09:27:31 2017
@author: dariocorral
"""
import pandas as pd
from datetime import timedelta
from tickers import Tickers
from hourOffset import Hour
class Candles(object):
"""
OANDA Historical Rates ready to use with Pandas
"""
def __init__(self):
self.__... | mit | 5,409,763,454,632,025,000 | 32.008621 | 81 | 0.439394 | false | 4.535545 | false | false | false |
JioCloud/cinder | cinder/volume/drivers/drbdmanagedrv.py | 1 | 19926 | # Copyright (c) 2014 LINBIT HA Solutions GmbH
# 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
#
# Unl... | apache-2.0 | -4,814,244,151,652,230,000 | 36.596226 | 79 | 0.543812 | false | 4.053295 | true | false | false |
lylejohnson/FXPy | src/controls.py | 1 | 313359 | # This file was created automatically by SWIG.
import controlsc
from misc import *
from windows import *
from containers import *
import fox
class FX_LabelPtr(FX_FramePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def onPaint(self, *_args, **_kwargs):
val = apply(con... | lgpl-2.1 | 2,367,650,108,529,640,000 | 43.259746 | 91 | 0.615725 | false | 3.429599 | false | false | false |
veusz/veusz | veusz/plugins/votable.py | 1 | 3549 | # Copyright (C) 2012 Science and Technology Facilities Council.
#
# 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 ... | gpl-2.0 | -2,412,068,919,430,953,500 | 34.49 | 78 | 0.560158 | false | 4.738318 | false | false | false |
plaufer/wikiwsd | wsd/build/articleinserter.py | 1 | 1279 | import Queue
import threading
MAX_WAIT_QUEUE_TIMEOUT = 2
class ArticleInserter(threading.Thread):
'''Thread which inserts articles into the database
'''
def __init__(self, queue, build_view):
threading.Thread.__init__(self)
'''constructor
@param queue the queue to which the ar... | mit | 5,740,311,425,071,852,000 | 29.47619 | 86 | 0.542611 | false | 4.650909 | false | false | false |
Unknowncmbk/Two-Shot | backend/participant_stat.py | 1 | 2762 | #!/usr/bin/python
# local imports
import credentials
# python modules
import MySQLdb
import urllib
import json
class ParticipantStat(object):
def __init__(self, match_id, participant_id):
self.match_id = match_id
self.participant_id = participant_id
self.kills = 0
s... | mit | -8,455,300,076,131,699,000 | 29.033708 | 206 | 0.581101 | false | 3.405672 | false | false | false |
storborg/pyweaving | pyweaving/generators/tartan.py | 1 | 3330 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import re
from .. import Draft
color_map = {
'A': (92, 140, 168), # azure / light blue
'G': (0, 104, 24), # green
'B': (44, 44, 128), # blue
'K': (0, 0, 0), # black
'W': (224, 224, 22... | mit | -5,582,420,518,683,146,000 | 31.647059 | 79 | 0.494595 | false | 2.318942 | false | false | false |
timj/scons | src/engine/SCons/Tool/docbook/__init__.py | 1 | 29293 |
"""SCons.Tool.docbook
Tool-specific initialization for Docbook.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# ... | mit | 2,695,215,425,218,211,300 | 32.747696 | 130 | 0.595637 | false | 3.621785 | false | false | false |
smjhnits/Praktikum_TU_D_16-17 | Anfängerpraktikum/Protokolle/V355_Gekoppelte_Schwingungen/LaTex-Dateien/Messungc_Plot1.py | 1 | 2021 | import numpy as np
from scipy.stats import sem
from uncertainties import ufloat
import uncertainties.unumpy as unp
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
L = 32.51 * 10 ** (-3)
C = 0.801 * 10 ** (-9)
Csp = 0.037 * 10 ** (-9)
R = 48
Start = np.array([30.85, 30.84, 30.83, 30.82, 30.81,... | mit | -687,076,574,687,488,800 | 44.636364 | 114 | 0.616036 | false | 2.012024 | false | false | false |
Southpaw-TACTIC/Team | src/python/Lib/site-packages/pythonwin/pywin/framework/editor/editor.py | 1 | 16036 | #####################################################################
#
# editor.py
#
# A general purpose text editor, built on top of the win32ui edit
# type, which is built on an MFC CEditView
#
#
# We now support reloading of externally modified documented
# (eg, presumably by some other process, such as so... | epl-1.0 | 6,208,114,795,459,562,000 | 32.486022 | 133 | 0.695373 | false | 3.128365 | false | false | false |
ganeti/ganeti | lib/config/__init__.py | 1 | 111167 | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google 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 ... | bsd-2-clause | -9,024,758,844,000,849,000 | 31.696176 | 80 | 0.659278 | false | 3.931358 | true | false | false |
javiercantero/streamlink | src/streamlink/plugins/viasat.py | 1 | 4387 | import re
from streamlink import NoStreamsError
from streamlink.exceptions import PluginError
from streamlink.plugin import Plugin
from streamlink.plugin.api import StreamMapper, http, validate
from streamlink.stream import HDSStream, HLSStream, RTMPStream
from streamlink.utils import rtmpparse
STREAM_API_URL = "http... | bsd-2-clause | 6,951,403,913,173,260,000 | 28.641892 | 110 | 0.531115 | false | 3.634631 | false | false | false |
AnthonyDiGirolamo/heliopause | sector.py | 1 | 9915 | import libtcodpy as libtcod
import math
from random import randrange
import time
import pprint
pp = pprint.PrettyPrinter(indent=4, width=200).pprint
from planet import Planet
from asteroid import Asteroid
class Sector:
def __init__(self, screen_width, screen_height, buffer, background=libtcod.Color(0,0,0)):
... | mit | -1,482,294,771,838,708,700 | 39.635246 | 198 | 0.611195 | false | 3.698247 | false | false | false |
openqt/algorithms | leetcode/python/lc080-remove-duplicates-from-sorted-array-ii.py | 1 | 2142 | # coding=utf-8
import unittest
"""80. Remove Duplicates from Sorted Array II
https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/description/
Given a sorted array _nums_ , remove the duplicates [**in-
place**](https://en.wikipedia.org/wiki/In-place_algorithm) such that
duplicates appeared at most _t... | gpl-3.0 | 1,719,257,980,137,989,000 | 27.226667 | 180 | 0.630719 | false | 3.624365 | false | false | false |
diogocs1/simuladormips | lib/simulador.py | 1 | 3312 | # -*- encoding: UTF-8 -*-
from controle import UC
from lib.memoria import Mem_instrucoes, Mem_dados
from lib.registradores import Banco
from lib.operacoes import ULA
from lib.instrucoes import Instrucao_R_I
class Sistema (object):
def __init__(self):
self.__PC = 0
self.__UC = UC()
self.__U... | gpl-2.0 | 6,597,753,176,257,532,000 | 35.351648 | 95 | 0.588449 | false | 3.238981 | false | false | false |
dmkelly/Django-Location-Form-Field | fields.py | 1 | 4316 | from django import forms
class LocationWidget(forms.widgets.Widget):
"""Forms widget to represent a location.
Uses Google Maps API to represent a location on a map with a marker.
"""
def __init__(self, *args, **kwargs):
super(LocationWidget, self).__init__(*args, **kwargs)
def ren... | epl-1.0 | 6,844,412,214,279,928,000 | 39.716981 | 103 | 0.522938 | false | 4.342052 | false | false | false |
ahlusar1989/flowzillow | flowzillow/client.py | 1 | 9263 | from urlparse import urljoin
import requests
from flowzillow import constants
from flowzillow.exceptions import ZillowError
def _trim_none_values(dict_):
new_dict = dict(dict_)
del_keys = []
for k, v in new_dict.iteritems():
if not v:
del_keys.append(k)
for key in del_keys:
... | gpl-2.0 | -5,074,563,894,233,085,000 | 37.435685 | 108 | 0.555975 | false | 3.753241 | false | false | false |
Alexander-Minyushkin/aistreamer | worker/app.py | 1 | 1520 | import os
from flask import Flask, render_template, request
import luigi
from luigi.contrib.gcs import GCSTarget, GCSClient
import subprocess
from merge_video import MergeVideoAndAudio
app = Flask(__name__)
@app.route('/')
def hello_world():
target = os.environ.get('TARGET', 'World')
return 'Hello {}!\n'.fo... | apache-2.0 | -997,589,223,079,689,300 | 35.214286 | 139 | 0.653289 | false | 3.12115 | false | false | false |
capitalone/cloud-custodian | tests/test_webhook.py | 1 | 9095 | # Copyright 2019 Microsoft Corporation
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
import datetime
import json
import mock
from c7n.actions.webhook import Webhook
from c7n.exceptions import PolicyValidationError
from .common import BaseTest
import os
class WebhookTest(BaseTest):
... | apache-2.0 | 4,588,318,786,688,363,500 | 28.433657 | 82 | 0.464651 | false | 4.080305 | true | false | false |
dude56987/YoutubeTV | resources/lib/tables.py | 1 | 8449 | #########################################################################
# Generic database libary using pickle to store values in files.
# Copyright (C) 2016 Carl J Smith
#
# 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
# ... | gpl-3.0 | -4,693,631,649,817,199,000 | 34.953191 | 81 | 0.644928 | false | 3.961088 | false | false | false |
CubicERP/odoo | addons/sale/sale.py | 1 | 70307 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 5,077,323,756,699,645,000 | 52.384207 | 318 | 0.579615 | false | 3.812951 | false | false | false |
Vutshi/qutip | qutip/examples/ex_52.py | 1 | 2978 | #
# Landau-Zener-Stuckelberg interferometry: steady state of repeated
# Landau-Zener like avoided-level crossing, as a function of driving amplitude
# and bias.
#
# Note: In order to get this example to work properly in the demos window,
# we have had to pass many more variables to parfor than is typically
# necessary.... | gpl-3.0 | -7,503,352,612,644,134,000 | 34.035294 | 78 | 0.595366 | false | 2.801505 | false | false | false |
listyque/TACTIC-Handler | thlib/side/console/ui/output_window.py | 1 | 2451 | from thlib.side.Qt import QtWidgets as QtGui
from thlib.side.Qt import QtGui as Qt4Gui
class OutputWindow(QtGui.QPlainTextEdit):
def __init__(self, parent=None):
"""
Initialize default settings.
"""
QtGui.QPlainTextEdit.__init__(self, parent)
self.setTabStopWidth(4 * se... | epl-1.0 | -5,648,691,627,177,380,000 | 28.178571 | 93 | 0.555692 | false | 3.753446 | false | false | false |
Sterncat/opticspy | opticspy/lens/aberration.py | 1 | 2204 | import numpy as __np__
import matplotlib.pyplot as __plt__
def third(s1,s2,s3,s4,s5):
"""
Third order aberrations:
Ray aberrations
Field curve
Distortion
input: third order aberration coefficient
sigma 1~5
output: third order aberration graph
"""
print("third order aberration")
py = __np__.linspace(-... | mit | -6,850,834,233,485,839,000 | 27.636364 | 96 | 0.585299 | false | 2.298227 | false | false | false |
xraywu/wegene-python-sdk | wegene/Controllers/Psychology.py | 1 | 2949 | # -*- coding: utf-8 -*-
"""
wegene.Controllers.PsychologyController
This file was automatically generated by APIMATIC BETA v2.0 on 02/22/2016
"""
import requests
from wegene.APIHelper import APIHelper
from wegene.Configuration import Configuration
from wegene.APIException import APIException
from wegene.Models... | mit | -6,103,705,326,501,828,000 | 32.134831 | 86 | 0.602238 | false | 4.802932 | false | false | false |
wphicks/Writing3D | pyw3d/blender_actions/visibility.py | 1 | 3616 | # Copyright (C) 2016 William Hicks
#
# This file is part of Writing3D.
#
# Writing3D 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 | 4,423,988,806,805,680,000 | 37.468085 | 79 | 0.568584 | false | 4.040223 | false | false | false |
igrlas/CentralHub | CHPackage/src/centralhub/helpers/data_operations.py | 1 | 1674 |
def element_dict_to_tuple(my_dict):
"""Of type Element"""
if 'hid' not in my_dict:
my_dict['hid'] = None
if 'name' not in my_dict:
my_dict['name'] = None
if 'type' not in my_dict:
my_dict['type'] = None
if 'state' not in my_dict:
my_dict['state'] = None
if 'over... | gpl-2.0 | 4,153,254,492,931,863,600 | 37.045455 | 160 | 0.630824 | false | 3.72 | false | false | false |
Jbkwok/is210_lesson_02 | identity.py | 1 | 1489 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Provides the is_empty() method."""
def get_member_count(my_sequence):
"""Returns the number of members of a list object.
Args:
my_sequence (sequence): The sequence object being measured.
Returns:
mixed: If the object can be measured it ret... | mpl-2.0 | 3,495,747,279,157,622,000 | 19.971831 | 77 | 0.556749 | false | 4.11326 | false | false | false |
bschug/poe-loot-gen | uniques.py | 1 | 2853 | import requests
from collections import defaultdict
import sys
FATED_UNIQUES = {
'Amplification Rod',
'Cragfall',
'Death\'s Opus',
'Deidbellow',
'Doomfletch\'s Prism',
'Ezomyte Hold',
'Hrimburn',
'Hrimnor\'s Dirge',
'Kaltensoul',
'Kaom\'s Way',
'Karui Charge',
'Martyr\'... | mit | -7,418,833,182,215,221,000 | 24.702703 | 122 | 0.625657 | false | 3.128289 | false | false | false |
gblanchard4/viamics | framework/modules/blast.py | 1 | 6151 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2010 - 2011, University of New Orleans
#
# 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 o... | gpl-2.0 | 185,121,696,036,604,600 | 42.624113 | 122 | 0.63323 | false | 3.631051 | false | false | false |
colonelqubit/libreconverter | libreconverter.py | 1 | 6539 | #!/usr/bin/python3
#
# Requires Python3
# *Please* make sure to use the version of Python included with
# your copy of LibreOffice.
#
# Convert spreadsheet to CSV file.
#
# Based on:
# PyODConverter (Python OpenDocument Converter) v1.0.0 - 2008-05-05
# Copyright (C) 2008 Mirko Nasato <mirko@artofsolving.com>
# Li... | lgpl-2.1 | 6,492,071,722,650,483,000 | 37.017442 | 114 | 0.577764 | false | 4.21599 | false | false | false |
wait4pumpkin/tmall | solution/analysis/single_repeat.py | 1 | 5277 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import random
import glob
import os
import sys
import time
import math
import numpy
import pylab
from collections import Counter
from svmutil import *
N_MONTH = 4
N_DAY_PER_MONTH = 31
BASE_MONTH = 4
TYPE_LENGTH = 4
class User(object):
def __init__(sel... | mit | -2,505,034,783,997,640,000 | 29.686047 | 111 | 0.465795 | false | 3.761226 | false | false | false |
listyque/TACTIC-Handler | thlib/tactic_server.py | 1 | 2467 | # tactic_api_client.py
# Start here to run client for tactic api
import sys
import datetime
from thlib.side.Qt import QtWidgets as QtGui
from thlib.side.Qt import QtCore as QtCore
from thlib.side.Qt import QtNetwork as QtNetwork
import main_standalone
import thlib.global_functions as gf
from thlib.environment import ... | epl-1.0 | 4,327,361,219,604,347,400 | 29.45679 | 102 | 0.691528 | false | 3.509246 | false | false | false |
srio/shadow3-scripts | HIGHLIGHTS/occupation.py | 1 | 3634 | from orangecontrib.comsyl.util.CompactAFReader import CompactAFReader
# from CompactAFReader import CompactAFReader
import numpy
from srxraylib.plot.gol import plot_image, plot
# from plot_color import plot_with_transparency_one
import pylab as plt
from matplotlib.colors import Normalize, ListedColormap
import ma... | mit | 2,380,184,108,273,730,000 | 34.281553 | 128 | 0.682168 | false | 2.691852 | false | false | false |
erilyth/PyGame-Learning-Environment | ple/games/flappybird/__init__.py | 1 | 13533 | import os
import sys
import numpy as np
import pygame
from pygame.constants import K_w
from .. import base
class BirdPlayer(pygame.sprite.Sprite):
def __init__(self,
SCREEN_WIDTH, SCREEN_HEIGHT, init_pos,
image_assets, rng, color="red", scale=1.0):
self.SCREEN_WIDTH = SCREEN_WI... | mit | -4,636,007,687,599,830,000 | 30.767606 | 144 | 0.522205 | false | 3.699563 | false | false | false |
12425/pac-maker | pac-maker.py | 1 | 5031 | #!/usr/bin/env python3
# vim: fileencoding=utf-8
import os
import re
from base64 import standard_b64decode as b64decode
from os.path import dirname, isfile, expanduser
from configparser import ConfigParser
from urllib.request import urlopen
HOST_PAT = re.compile(r'^[\w-]+(\.[\w-]+)+$')
PORT_PAT = re.compile(r':\d+$')... | bsd-3-clause | -103,067,667,032,438,510 | 24.538071 | 73 | 0.595309 | false | 3.111317 | false | false | false |
mjs/juju | acceptancetests/update_lxc_cache.py | 1 | 7813 | #!/usr/bin/python
"""Update the lxc 'download' template cache for hosts on closed networks."""
from __future__ import print_function
from argparse import ArgumentParser
from collections import namedtuple
import errno
import os
import sys
import traceback
import shutil
import subprocess
import urllib2
SITE = 'https:... | agpl-3.0 | -5,232,036,418,743,799,000 | 34.83945 | 79 | 0.588634 | false | 3.758057 | false | false | false |
fjacob21/MAX | service/src/features/tv/eg_tv_feature.py | 1 | 1266 | from eg_networksender import Send
class eg_tv_feature(object):
def __init__(self, device):
self._device = device
@property
def name(self):
return 'tv'
@property
def version(self):
return 1
@property
def description(self):
return "Control TV using evenghos... | mit | 1,546,015,063,897,016,300 | 29.142857 | 109 | 0.587678 | false | 3.801802 | false | false | false |
TheAlgorithms/Python | graphs/minimum_spanning_tree_kruskal.py | 1 | 1393 | from typing import List, Tuple
def kruskal(num_nodes: int, num_edges: int, edges: List[Tuple[int, int, int]]) -> int:
"""
>>> kruskal(4, 3, [(0, 1, 3), (1, 2, 5), (2, 3, 1)])
[(2, 3, 1), (0, 1, 3), (1, 2, 5)]
>>> kruskal(4, 5, [(0, 1, 3), (1, 2, 5), (2, 3, 1), (0, 2, 1), (0, 3, 2)])
[(2, 3, 1), (... | mit | 2,064,725,714,210,795,800 | 28.638298 | 86 | 0.498923 | false | 2.7154 | false | false | false |
andela-ooshodi/django-bucketlist-application | djangobucketlist/djangobucketlist/settings/base.py | 1 | 4073 | """
Django settings for djangobucketlist project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Bui... | gpl-2.0 | -2,429,033,043,398,538,000 | 24.45625 | 81 | 0.69752 | false | 3.544822 | false | false | false |
spktklr/kansalaisrajoite | python/vote.py | 1 | 1105 | # coding=utf-8
from bottle import Bottle, HTTPError
from sqlalchemy.orm.exc import NoResultFound
from sqlalchemy.orm import joinedload
import model
from utils import jsonplugin
import auth
app = Bottle()
app.install(model.plugin)
app.install(jsonplugin)
@app.get('/<id:int>')
@auth.require_login
def read_one(db, us... | agpl-3.0 | -5,562,420,966,119,401,000 | 23.021739 | 65 | 0.657919 | false | 3.269231 | false | false | false |
michaelneuder/image_quality_analysis | bin/nets/old/pixel_diff_conv_net_double_feed.py | 1 | 6455 | #!/usr/bin/env python3
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import numpy as np
np.set_printoptions(threshold=np.nan)
import tensorflow as tf
import time
def convolve_inner_layers(x, W, b):
y = tf.nn.conv2d(x, W, strides = [1,1,1,1], padding='SAME')
y = tf.nn.bias_add(y, b)
return tf.nn.tanh(y)
... | mit | 1,550,266,799,215,808,500 | 41.748344 | 198 | 0.623857 | false | 3.139591 | true | false | false |
gimli-org/gimli | doc/tutorials/dev/plot_XX_mod_fv_laplace-2d.py | 1 | 2873 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
import pygimli as pg
import pygimli.solver as solver
from pygimli.viewer import showMesh
from pygimli.viewer.mpl import drawMesh, drawStreams
from pygimli.meshtools import createMesh
import matplotlib.pyplot as plt
import numpy as np
from solverFVM import solveF... | apache-2.0 | -7,926,348,419,567,565,000 | 28.030303 | 118 | 0.604595 | false | 2.873 | false | false | false |
open-mmlab/mmdetection | mmdet/models/dense_heads/corner_head.py | 1 | 46890 | from logging import warning
from math import ceil, log
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule, bias_init_with_prob
from mmcv.ops import CornerPool, batched_nms
from mmcv.runner import BaseModule
from mmdet.core import multi_apply
from ..builder import HEADS, build_loss
from ..utils import ... | apache-2.0 | -2,730,451,611,199,976,400 | 43.572243 | 79 | 0.536362 | false | 3.827755 | true | false | false |
kg-bot/SupyBot | plugins/Linux/__init__.py | 1 | 2354 | ###
# Copyright (c) 2005, Jeremiah Fincher
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditi... | gpl-3.0 | -8,622,309,444,501,066,000 | 38.233333 | 79 | 0.763806 | false | 4.233813 | false | false | false |
nkmk/python-snippets | notebook/pandas_set_index.py | 1 | 3936 | import pandas as pd
df = pd.read_csv('data/src/sample_pandas_normal.csv')
print(df)
# name age state point
# 0 Alice 24 NY 64
# 1 Bob 42 CA 92
# 2 Charlie 18 CA 70
# 3 Dave 68 TX 70
# 4 Ellen 24 CA 88
# 5 Frank 30 NY 57
df_i = df.set_ind... | mit | 7,370,681,852,639,031,000 | 23.754717 | 66 | 0.424035 | false | 2.825556 | false | true | false |
AlgorithmLover/OJCodes | qlcoder/data_mining/topic_model/reference/refered_code.py | 1 | 3286 | #!/usr/bin/python
# -*- coding:utf8 -*-
import time
import jieba.analyse
def post_cut(url):
fr = open(url + "/post_data.txt")
fo = open(url + "/post_key.txt", "a+")
for line in fr.readlines():
term = line.strip().split("\t")
if len(term) == 3 and term[2] != "":
key_list = jieb... | mit | 6,242,895,625,385,736,000 | 26.512605 | 115 | 0.550397 | false | 3.014733 | false | false | false |
RedHatInsights/insights-core | insights/parsers/parted.py | 1 | 8405 | """
PartedL - command ``parted -l``
===============================
This module provides processing for the ``parted`` command. The output is parsed
by the ``PartedL`` class. Attributes are provided for each field for the disk,
and a list of ``Partition`` class objects, one for each partition in the output.
Typical... | apache-2.0 | -4,088,203,973,475,428,400 | 35.385281 | 535 | 0.569423 | false | 3.820455 | false | false | false |
kfoss/neon | neon/models/rnn.py | 1 | 21431 | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana 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
#
# http://www.apache.o... | apache-2.0 | 9,129,896,781,727,219,000 | 43.741127 | 79 | 0.575101 | false | 3.84965 | false | false | false |
LamaHamadeh/Microsoft-DAT210x | Module 5/assignment4.py | 1 | 10263 | '''
author Lama Hamadeh
'''
import numpy as np
import pandas as pd
from sklearn import preprocessing
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
import matplotlib
#
# TODO: Parameters to play around with
PLOT_TYPE_TEXT = False # If you'd like to see indices
PLOT_VECTORS = True # If yo... | mit | -4,313,806,507,492,444,000 | 40.216867 | 122 | 0.714508 | false | 3.503926 | false | false | false |
hardc0d3/sppy | sppy_test/open_env_get_db_cursor_ctl_close.py | 1 | 1038 | from sppy.spapi_cffi import SophiaApi
from sppy.spapi_cffi_cdef import sophia_api_cdefs
from sppy.spapi_cffi_codecs import *
sp = SophiaApi( '../../sophia/sophia1.2.2/libsophia.so.1.2.2',sophia_api_cdefs['1.2.2'] )
codec_u32 = U32(sp.ffi)
dbname = 'test'
env = sp.env()
print "get env object",env.cd
typ = sp.type(en... | bsd-2-clause | -2,561,781,173,405,216,300 | 18.222222 | 89 | 0.631021 | false | 2.237069 | false | false | false |
wdmchaft/taskcoach | taskcoachlib/mailer/outlook.py | 1 | 2591 | '''
Task Coach - Your friendly task manager
Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org>
Task Coach 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 | -6,198,454,282,548,796,000 | 34.986111 | 92 | 0.542648 | false | 4.413969 | false | false | false |
daq-tools/kotori | test/test_vendor_hiveeyes.py | 1 | 2713 | # -*- coding: utf-8 -*-
# (c) 2020-2021 Andreas Motl <andreas@getkotori.org>
import logging
import pytest
import pytest_twisted
from bunch import Bunch
from test.conftest import create_machinery
from test.settings.mqttkit import PROCESS_DELAY_MQTT
from test.util import mqtt_json_sensor, sleep, InfluxWrapper, GrafanaW... | agpl-3.0 | 8,705,837,564,512,757,000 | 33.782051 | 120 | 0.709915 | false | 3.429836 | true | false | false |
SRabbelier/Melange | thirdparty/google_appengine/google/appengine/dist/py_zipimport.py | 1 | 9300 | #!/usr/bin/env python
#
# Copyright 2007 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 o... | apache-2.0 | 6,846,432,237,036,810,000 | 30.958763 | 79 | 0.653548 | false | 3.881469 | false | false | false |
jseabold/statsmodels | statsmodels/sandbox/stats/contrast_tools.py | 5 | 28790 | '''functions to work with contrasts for multiple tests
contrast matrices for comparing all pairs, all levels to reference level, ...
extension to 2-way groups in progress
TwoWay: class for bringing two-way analysis together and try out
various helper functions
Idea for second part
- get all transformation matrices ... | bsd-3-clause | -6,191,862,223,996,965,000 | 29.020855 | 121 | 0.501841 | false | 2.838411 | true | false | false |
chrislit/abydos | tests/distance/test_distance_goodman_kruskal_lambda.py | 1 | 4737 | # Copyright 2019-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | gpl-3.0 | -650,457,956,675,182,000 | 42.063636 | 73 | 0.628668 | false | 3.12467 | true | false | false |
jbzdak/data-base-checker | grading/tests/test_models.py | 1 | 7167 | # coding=utf-8
from django.contrib.auth.models import User, Group
from django.test.testcases import TestCase
from grading.models import *
from grading.autograding import get_autograders
class StudentTest(TestCase):
def test_user_creation_creates_student(self):
u = User.objects.create(username = "test1", ... | gpl-3.0 | 8,593,671,345,695,744,000 | 32.180556 | 104 | 0.637784 | false | 3.534024 | true | false | false |
mschmittfull/nbodykit | nbodykit/core/source/Grid.py | 1 | 3878 | from nbodykit.core import Source
from nbodykit.core.source import Painter
from bigfile import BigFileMPI
from pmesh.pm import RealField, ComplexField, ParticleMesh
import numpy
from pmesh import window
class GridSource(Source):
plugin_name = "Source.Grid"
def __init__(self, path, dataset, attrs={}, painter=P... | gpl-3.0 | -1,629,912,195,537,198,300 | 34.907407 | 199 | 0.610366 | false | 3.757752 | false | false | false |
penny4860/SVHN-deep-digit-detector | digit_detector/extractor.py | 1 | 3315 | #-*- coding: utf-8 -*-
import cv2
import numpy as np
import progressbar
import digit_detector.region_proposal as rp
class Extractor:
def __init__(self, region_proposer, annotator, overlap_calculator):
"""
overlap_calculator : OverlapCalculator
instance of OverlapCalculator class
... | mit | -4,793,058,175,960,898,000 | 40.962025 | 164 | 0.626546 | false | 4.032847 | false | false | false |
akrherz/iem | scripts/climodat/qc_last_used_ob.py | 1 | 2574 | """Report any climodat sites without recent observations."""
# stdlib
import datetime
# Third Party
from pandas.io.sql import read_sql
from pyiem.util import get_dbconn, logger
LOG = logger()
FLOOR = datetime.date.today() - datetime.timedelta(days=365)
def remove_track(iemid):
"""Cull the defunct tracks."""
... | mit | -500,835,713,754,578,200 | 26.978261 | 78 | 0.560606 | false | 3.342857 | false | false | false |
mskarbek/pysx | pysx.py | 1 | 1558 | #!/usr/bin/env python
import base64
import hashlib
from datetime import datetime
import hmac
import binascii
import sys
import json
import requests
import pytz
def hextobyte(hex_str):
bytes = []
hex_str = ''.join( hex_str.split(' ') )
for i in range(0, len(hex_str), 2):
bytes.append( chr( int (hex... | apache-2.0 | 244,371,133,018,332,960 | 25.40678 | 111 | 0.59371 | false | 2.78712 | false | false | false |
WemGL/alchemist | alchemist/javaparser.py | 1 | 4703 | from alchemist import Parser
import re
class JavaParser(Parser):
def __init__(self, kwargs):
self._file_extension = "Java"
self._current_match = None
self._fields = []
self._classname = ""
Parser.__init__(self, kwargs)
def parse(self):
fh = open(self.file)
... | gpl-3.0 | -5,193,369,130,521,656,000 | 36.927419 | 139 | 0.586647 | false | 3.711918 | false | false | false |
vstconsulting/polemarch | polemarch/main/migrations/0004_auto_20170710_0857.py | 1 | 9227 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-09 22:57
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
dependencies... | agpl-3.0 | -7,657,088,549,418,526,000 | 42.319249 | 183 | 0.563889 | false | 4.481302 | false | false | false |
av8ramit/tensorflow | tensorflow/contrib/py2tf/converters/side_effect_guards.py | 1 | 6838 | # Copyright 2016 The TensorFlow 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 applica... | apache-2.0 | 6,557,334,343,230,137,000 | 35.179894 | 80 | 0.652676 | false | 3.75508 | false | false | false |
wathen/PhD | MHD/FEniCS/MHD/Stabilised/SaddlePointForm/Test/SplitMatrix/ParamTests/MHDfluid.py | 1 | 13757 | #!/usr/bin/python
# interpolate scalar gradient onto nedelec space
import petsc4py
import sys
petsc4py.init(sys.argv)
from petsc4py import PETSc
from dolfin import *
Print = PETSc.Sys.Print
# from MatrixOperations import *
import numpy as np
#import matplotlib.pylab as plt
import PETScIO as IO
import common
import ... | mit | -2,145,468,271,991,474,000 | 36.080863 | 248 | 0.582758 | false | 2.689015 | false | false | false |
makerdao/maker.py | pymaker/vault.py | 1 | 2652 | # This file is part of Maker Keeper Framework.
#
# Copyright (C) 2017-2018 reverendus
#
# This program 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 Foundation, either version 3 of the License, or
# (at your opti... | agpl-3.0 | 8,156,267,412,930,917,000 | 33 | 115 | 0.654223 | false | 3.82684 | false | false | false |
redeyser/IceCash2 | clientEgais.py | 1 | 39275 | #!/usr/bin/python
# -*- coding: utf-8
import httplib, urllib,time
import requests
import xml.etree.ElementTree as etree
import re
from icelog import *
from my import curdate2my
from datetime import datetime
import dbIceCash as db
ns={\
"c":"http://fsrar.ru/WEGAIS/Common",\
"wbr":"http://fsrar.ru/WEGAIS/TTNInformF2Reg"... | gpl-3.0 | -6,480,574,202,339,699,000 | 32.91342 | 141 | 0.52724 | false | 3.126097 | false | false | false |
MichSchli/Mindblocks | model/module/module_repository.py | 1 | 4319 | import json
import os
from model.component.component_specification import ComponentSpecification
from model.component.subgraph_component import SubgraphComponentModel
from model.module.graph_prototype.graph_prototype_specifications import GraphPrototypeSpecifications
from model.module.module_model import ModuleModel
f... | gpl-3.0 | -4,040,655,532,269,729,000 | 36.241379 | 100 | 0.683492 | false | 4.371457 | false | false | false |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_pathlib.py | 1 | 97139 | import collections.abc
import io
import os
import sys
import errno
import pathlib
import pickle
import socket
import stat
import tempfile
import unittest
from unittest import mock
from test import support
from test.support import TESTFN, FakePath
try:
import grp, pwd
except ImportError:
grp = pwd = None
cla... | apache-2.0 | 4,477,674,600,441,387,500 | 39.507506 | 96 | 0.527636 | false | 3.333116 | true | false | false |
cloudfoundry/php-buildpack | tests/test_newrelic.py | 1 | 12713 | import os
import os.path
import tempfile
import shutil
import json
from nose.tools import eq_
from nose.tools import with_setup
from build_pack_utils import utils
from common.integration import ErrorHelper
from common.components import BuildPackAssertHelper
from common.components import HttpdAssertHelper
from common.co... | apache-2.0 | 1,364,594,228,700,609,300 | 36.391176 | 101 | 0.602454 | false | 3.261416 | true | false | false |
mcaleavya/bcc | examples/tracing/stack_buildid_example.py | 1 | 3105 | #!/usr/bin/python
#
# An example usage of stack_build_id
# Most of the code here is borrowed from tools/profile.py
#
# Steps for using this code
# 1) Start ping program in one terminal eg invocation: ping google.com -i0.001
# 2) Change the path of libc specified in b.add_module() below
# 3) Invoke the script as 'python... | apache-2.0 | 8,691,926,209,330,545,000 | 28.571429 | 81 | 0.681804 | false | 2.991329 | false | false | false |
maschwanden/boxsimu | boxsimu/visualize.py | 1 | 24184 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 13 15:57:03 2017
@author: Mathias Aschwanden (mathias.aschwanden@gmail.com)
"""
import os
import re
import copy
import importlib
import svgwrite
from svgwrite import cm, mm
import numpy as np
from . import utils as bs_utils
class BoxModelSystemSvgHelper:
"""Helpe... | mit | -172,437,947,065,888,160 | 35.476621 | 80 | 0.571204 | false | 3.6849 | false | false | false |
OCM-Lab-PUC/switch-chile | python_utility_scripts/existing_projects_plant_grouping.py | 1 | 5767 | # -*- coding: utf-8 -*-
# Copyright 2016 The Switch-Chile Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
# Operations, Control and Markets laboratory at Pontificia Universidad
# Católica de Chile.
"""
Groups generation units by plant to reduce number of varia... | apache-2.0 | -6,822,856,848,889,920,000 | 31.761364 | 414 | 0.624176 | false | 3.241147 | false | false | false |
marinho/PyNFe | pynfe/processamento/serializacao.py | 1 | 17276 | # -*- coding: utf-8 -*-
try:
set
except:
from sets import Set as set
from pynfe.entidades import Emitente, Cliente, Produto, Transportadora, NotaFiscal
from pynfe.excecoes import NenhumObjetoEncontrado, MuitosObjetosEncontrados
from pynfe.utils import etree, so_numeros, obter_municipio_por_codigo, obter_pais_p... | lgpl-3.0 | -4,061,621,420,979,028,000 | 48.895954 | 116 | 0.663925 | false | 2.904441 | false | false | false |
t3dev/odoo | addons/website/controllers/backend.py | 5 | 2937 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http
from odoo.http import request
from odoo.tools.translate import _
class WebsiteBackend(http.Controller):
@http.route('/website/fetch_dashboard_data', type="json", auth='user')
def fetch_da... | gpl-3.0 | -7,889,350,832,139,283,000 | 43.5 | 130 | 0.582567 | false | 4.107692 | false | false | false |
ctools/ctools | modules/comscripts/comlixfit.py | 1 | 10461 | #! /usr/bin/env python
# ==========================================================================
# Perform SRCLIX model fitting of COMPTEL observations
#
# Copyright (C) 2021 Juergen Knoedlseder
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Li... | gpl-3.0 | 556,582,991,032,804,600 | 30.414414 | 86 | 0.531402 | false | 4.395378 | false | false | false |
yudingding6197/fin_script | static_present.py | 1 | 5506 | #!/usr/bin/env python
# -*- coding:gbk -*-
import sys
import re
import os
import time
import string
import datetime
import tushare as ts
from internal.ts_common import *
from decimal import Decimal
today = datetime.date.today()
#˵Ã÷show_flag
#0£º²»»ñµÃÿһֻµÄÁ÷ͨÅÌ£¬²»»á¼ÆËã»»ÊÖÂÊ
#1£º»ñµÃÿһֻµÄÁ÷ͨÅÌ£¬²¢ÇÒ¼ÆËã»»... | gpl-2.0 | 7,300,797,230,191,250,000 | 22.732759 | 141 | 0.622594 | false | 1.907831 | false | false | false |
IfengAutomation/uitester | uitester/test_manager/rpc_server.py | 1 | 6380 | from socketserver import ThreadingTCPServer, StreamRequestHandler
import json
from threading import Thread
import logging
import queue
import traceback
logger = logging.getLogger('Tester')
Timeout = 120
Port = 11800
class RPCServer(ThreadingTCPServer):
def __init__(self, server_address, RequestHandlerClass, b... | apache-2.0 | 5,114,537,863,154,361,000 | 28.133028 | 111 | 0.574331 | false | 3.8184 | false | false | false |
MasterScrat/PostMonitor | monitor.py | 1 | 3168 | #!/usr/bin/python
import sys
import json
import urllib
import urllib2
import time
import logging
from tinydb import TinyDB, where
from apscheduler.schedulers.blocking import BlockingScheduler
# Multiple Projects, each with multiple Events (release, blog post...), each with multiple Links (Reddit, HN, FB, Twitter...)... | mit | -8,944,656,295,161,008,000 | 22.649254 | 125 | 0.665088 | false | 2.966292 | false | false | false |
all-of-us/raw-data-repository | rdr_service/genomic/genomic_job_components.py | 1 | 134110 | """
Component Classes for Genomic Jobs
Components are assembled by the JobController for a particular Genomic Job
"""
import csv
import logging
import re
import pytz
from collections import deque, namedtuple
from copy import deepcopy
from dateutil.parser import parse
import sqlalchemy
from rdr_service import clock
fr... | bsd-3-clause | 7,104,423,912,018,031,000 | 39.924626 | 119 | 0.555604 | false | 4.065294 | false | false | false |
cherrypy/magicbus | magicbus/plugins/servers.py | 1 | 15085 | """
Multiple servers/ports
======================
If you need to start more than one HTTP server (to serve on multiple ports, or
protocols, etc.), you can manually register each one and then start them all
with bus.transition("RUN")::
s1 = ServerPlugin(bus, MyWSGIServer(host='0.0.0.0', port=80))
s2 = ServerPl... | bsd-3-clause | 5,599,271,003,952,700,000 | 33.838337 | 79 | 0.6 | false | 3.910057 | false | false | false |
rjw57/foldbeam | foldbeam/rendering/renderer/tile_fetcher.py | 1 | 8728 | import math
import logging
import StringIO
import sys
import cairo
import numpy as np
from osgeo.osr import SpatialReference
from PIL import Image
import httplib2
from foldbeam.rendering.renderer.base import RendererBase, set_geo_transform
from foldbeam.rendering.renderer.decorator import reproject_from_native_spatia... | apache-2.0 | -7,803,865,678,951,885,000 | 42.64 | 120 | 0.626604 | false | 3.636667 | false | false | false |
davy39/eric | Helpviewer/HelpBrowserWV.py | 1 | 92524 | # -*- coding: utf-8 -*-
# Copyright (c) 2008 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing the helpbrowser using QWebView.
"""
from __future__ import unicode_literals
try:
str = unicode
except NameError:
pass
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QObject, QT_TRANSLAT... | gpl-3.0 | -5,708,538,440,104,066,000 | 35.92099 | 79 | 0.535364 | false | 4.741902 | false | false | false |
souravbadami/oppia | core/domain/event_services.py | 1 | 10774 | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 | -1,731,946,290,718,996,500 | 34.675497 | 80 | 0.679785 | false | 4.131135 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.