content
stringlengths
7
928k
avg_line_length
float64
3.5
33.8k
max_line_length
int64
6
139k
alphanum_fraction
float64
0.08
0.96
licenses
list
repository_name
stringlengths
7
104
path
stringlengths
4
230
size
int64
7
928k
lang
stringclasses
1 value
from setuptools import setup, find_packages setup( name = "pierre", version = "1.0.0", py_modules = ["pierre"], install_requires = [ "Click", "mistune", ], package_dir = {"": "pierre"}, entry_points = { "console_scripts": [ "pierre = pierre:main" ...
18.210526
43
0.482659
[ "Unlicense" ]
CoryMcCartan/pierre
setup.py
346
Python
# Copyright (c) 2019 Bernd Wiesner. bernduwiesner@yahoo.co.uk # All rights reseArgumentS_Resultsed # """ Display the command line options in a window """ from argparse import Namespace from typing import Tuple, Union import PySimpleGUI as sg import constants as C from gui_utility import popup_window ArgumentsR...
38.068182
85
0.468507
[ "MIT" ]
bernduwiesner/GenLottery
gui_arguments.py
6,700
Python
import sys, java, unittest import xpath from xml.dom import minidom as dom from geoscript import geom, proj, feature try: import json except ImportError: import simplejson as json class Feature_Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.xpathctx = xpath.XPathContext() cls.xpath...
33.259259
289
0.58686
[ "MIT" ]
geoscript/geoscript-py
tests/test_feature.py
7,184
Python
import itertools as it import re import string import warnings from xml.dom import minidom from manimlib.constants import * from manimlib.mobject.geometry import Circle from manimlib.mobject.geometry import Rectangle from manimlib.mobject.geometry import RoundedRectangle from manimlib.mobject.types.vectorized_mobject...
37.949519
79
0.559574
[ "MIT" ]
Tarang74/manim
manimlib/mobject/svg/svg_mobject.py
15,787
Python
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2019 Zimeng Qiu <zimengq@andrew.cmu.edu> """ F19 11-411/611 NLP Assignment 3 Task 1 N-gram Language Model Implementation Script Zimeng Qiu Sep 2019 This is a simple implementation of N-gram language model Write your own implementation in this file! """ ...
40.117647
154
0.623851
[ "MIT" ]
alvisdeng/NLP-Language-Model
lm.py
10,230
Python
""" --- title: Compressive Transformer Experiment summary: This experiment trains a compressive transformer model on tiny Shakespeare dataset. --- # Compressive Transformer Experiment This is an annotated PyTorch experiment to train a compressive transformer model. """ from typing import List, Tuple, NamedTuple impo...
36.883853
120
0.606836
[ "MIT" ]
Aarsh2001/annotated_deep_learning_paper_implementations
labml_nn/transformers/compressive/experiment.py
13,020
Python
# coding:utf8 from flask import request routes = dict() class ApiServiceBase(type): def __new__(cls, name, base, attrs): # super(type, obj) require isinstance(obj, type) return super(ApiServiceBase, cls).__new__(cls, name, base, attrs) def __init__(self, name, base, attrs): if name == 'ApiService': pas...
19.117647
67
0.666154
[ "BSD-3-Clause" ]
qzlzwhx/flask
flask/api_service.py
650
Python
""" # EXCEL SHEET COLUMN TITLE Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB ... Example 1: Input: 1 Output: "A" Example 2: Input: 28 Output: "AB" Example 3: Input: 70...
15
92
0.434043
[ "MIT" ]
das-jishu/data-structures-basics-leetcode
Leetcode/easy/excel-sheet-column-title.py
705
Python
from .dbnet import DBNet from .drrg import DRRG from .fcenet import FCENet from .ocr_mask_rcnn import OCRMaskRCNN from .panet import PANet from .psenet import PSENet from .single_stage_text_detector import SingleStageTextDetector from .text_detector_mixin import TextDetectorMixin from .textsnake import TextSnake __all...
30.533333
75
0.790393
[ "Apache-2.0" ]
A465539338/mmocr
mmocr/models/textdet/detectors/__init__.py
458
Python
from __future__ import print_function import random import struct import sys import time import os import zmq from msgpack import ExtType, packb, unpackb class AlignClient(object): # A synchronous Python2 alignment client REQ_PREFIX = struct.Struct('=HH') REQ_SUFFIX = struct.Struct('=Ld') RESP = st...
30.085714
113
0.583096
[ "MPL-2.0" ]
SamStudio8/pomoxis
pomoxis/align/py2client.py
2,106
Python
########################################################################## # # Copyright (c) 2017, John Haddon. 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 so...
39.109091
77
0.69642
[ "BSD-3-Clause" ]
ACFX/gaffer
python/GafferDelightUITest/DocumentationTest.py
2,151
Python
from .config import Config from .tools import Tools
13.25
26
0.792453
[ "MIT" ]
prise6/smart-iss-posts
iss/tools/__init__.py
53
Python
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
39.957447
78
0.582801
[ "BSD-3-Clause" ]
JWDebelius/scikit-bio
skbio/stats/ordination/_correspondence_analysis.py
7,512
Python
""" Projection class for the Sunyaev-Zeldovich effect. Requires SZpack (version 1.1.1), which is included in SZpack.v1.1.1 and will be automatically installed. Website for the SZpack library: http://www.chluba.de/SZpack/ For details on the computations involved please refer to the following references: Chluba, Nagai, ...
46.893617
101
0.520995
[ "MIT" ]
weiguangcui/pymsz
pymsz/SZpack_models.py
24,244
Python
""" Example file on how to display a networkx graph on a browser """ import json import networkx as nx from networkx.readwrite import json_graph import http_server import random # https://www.alanzucconi.com/2015/11/03/recreational-maths-python/ # Converts a number in the list of its digits def int_to_list(n): #...
27.186047
75
0.673225
[ "MIT" ]
dborbor/InteractiveGraph
program.py
1,169
Python
# TODO: not very happy with this state of affairs of having unencrypted passwords (use keyring ?) ALYX_PWD = 'alyxpassword' HTTP_DATA_SERVER_PWD = 'httpserverpass' # password for flat iron server for IBLail
52
97
0.788462
[ "MIT" ]
GaelleChapuis/ibllib
python/oneibl/params_secret.py
208
Python
from typing import Optional, List from pydantic import BaseModel class LogSetting(BaseModel): LOG_LEVEL: Optional[str] = 'DEBUG' LOG_PATH: str class ServiceSetting(BaseModel): # openapi swagger INCLUDE_IN_SCHEMA: Optional[bool] = True # socket.io on SOCKET_IO_ON: Optional[bool] = False c...
20.363636
53
0.712054
[ "MIT" ]
panla/fastapi_sockets
conf/settings.py
448
Python
# -------------- # Importing header files import numpy as np # print(path) # Path of the file has been stored in variable called 'path' #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #Code starts here census = np.array([]) data=np.genfromtxt(path, delimiter=",", skip_header=1) census = np.conc...
26.319149
110
0.605497
[ "MIT" ]
amitgupta98/ga-learner-dsmp-repo
Make-Sense-of-census/code.py
2,474
Python
""" Generate and operate on geometric elements and meshes. """ from __future__ import absolute_import from .geometry import Polygon, Square, Prism, Tesseroid, Sphere from .geometry import PolygonalPrism from .mesh import SquareMesh, PointGrid, PrismRelief, PrismMesh, TesseroidMesh
31.444444
78
0.812721
[ "BSD-3-Clause" ]
Claudiadtx/Pelotas
fatiando/mesher/__init__.py
283
Python
import subprocess import gdspy import shutil from utils import * from codegen.caravel_codegen import generate_openlane_files from urllib.parse import urlparse import os, json REQUIRED_KEYS_SINGLE = ["project", "caravel_test", "module_test", "wrapper_proof", "openlane", "gds"] class Project(object): def __init__...
39.708333
173
0.600333
[ "Apache-2.0" ]
mattvenn/multi_project_tools
project.py
16,201
Python
""" MX Platform API The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. # noqa: E501 The version of the OpenAPI document: 0.1.0 ...
25.972222
242
0.717647
[ "MIT" ]
mxenabled/mx-platform-python
test/test_statement_response.py
935
Python
"""Criteria for parametric methods. .. topic:: This module provides criteria to automatically select order in parametric PSD estimate or pseudo spectrum estimates (e.g, music). Some criteria such as the AIC criterion helps to chose the order of PSD models such as the ARMA model. Nevertheless, it is diffic...
29.138643
94
0.591921
[ "BSD-3-Clause" ]
butala/spectrum
src/spectrum/criteria.py
9,878
Python
from tkinter import * class MainFrame(Frame): def __init__(self, parent): super().__init__() self['bd'] = 1 self['relief'] = SOLID self['padx'] = 5 self['pady'] = 5 self.label_text1 = StringVar() self.label_text1.set('Digite seu nome') self.text_text...
28.857143
79
0.612871
[ "MIT" ]
JonasJF360/Curso_Tkinter
Aulas/app001/ex18-praticando_frame.py
1,013
Python
__author__ = "Laurence Elliott - 16600748" import os, math import numpy as np # sampleLens = [] # count = 0 # for file in os.listdir("corpus"): # sample = np.load("corpus/" + file) # zeroArr = [0] # try: # zerosInSample = np.isin(sample, zeroArr) # zerosIndexes = np.where(zerosInSample) # ...
29.190476
69
0.607667
[ "MIT" ]
laurencejbelliott/Ensemble_DL_Ransomware_Detector
bin-utf8-vec/truncateCorpus.py
1,226
Python
# This file is part of the MapProxy project. # Copyright (C) 2010, 2011 Omniscale <http://omniscale.de> # # 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/L...
37.135593
100
0.611491
[ "ECL-2.0", "Apache-2.0" ]
GeoplexGIS/mapproxy
mapproxy/seed/seeder.py
19,719
Python
import minimalmodbus import serial.tools.list_ports import argparse import time #Creates a new instance of a minimal modbus connection #Change portname to whatever you're using (/dev/USB0, COM4, etc) #Or just change it when you create the new serial object #247 is the default address for Renogy devices class RenogySma...
32.063694
114
0.635081
[ "MIT" ]
epfenninger/HA-Renogy
Renogy.py
5,034
Python
import math import os from pathlib import Path from typing import Iterable, Union import mmcv import torch from pytorch3d.structures.meshes import Meshes from tqdm import trange import mmhuman3d from mmhuman3d.core.cameras import compute_orbit_cameras from mmhuman3d.core.conventions.cameras import convert_cameras fro...
28.54902
74
0.590316
[ "Apache-2.0" ]
mingyuan-zhang/mmhuman3d
mmhuman3d/core/visualization/renderer/torch3d_renderer/render_runner.py
2,912
Python
import pygame import random import helpers from ItemManager import ItemManager import scorer class BlockManager: def __init__(self,main): self.main = main self.blockSize = 75 self.gridWidth = 12 self.gridHeight = 12 self.grid = [] for x in range(0,self.gridWidth): newColumn = [] ...
30.045198
141
0.632193
[ "Unlicense" ]
andy-hanson/monis
src/BlockManager.py
5,318
Python
# coding: utf-8 """ Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen...
51.763158
1,052
0.785968
[ "Apache-2.0" ]
CiscoUcs/intersight-python
test/test_vnic_eth_adapter_policy_list.py
1,967
Python
import logging from pyrogram.errors import InputUserDeactivated, UserNotParticipant, FloodWait, UserIsBlocked, PeerIdInvalid from info import AUTH_CHANNEL, LONG_IMDB_DESCRIPTION, MAX_LIST_ELM from imdb import IMDb import asyncio from pyrogram.types import Message from typing import Union import re import os from dateti...
32.124661
135
0.56985
[ "Apache-2.0" ]
godismyloard/Alan-Walker
untils.py
11,861
Python
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
31.416327
118
0.692737
[ "MIT" ]
boringlee24/keras_old
examples/pwr_run/checkpointing/timed/max_par/job2.py
7,697
Python
# vmimages.py - azurerm functions for Microsoft.Compute RP publishers and images from .restfns import do_get from .settings import azure_rm_endpoint, COMP_API # list_offers(access_token, subscription_id, location, publisher) # list available VM image offers from a publisher def list_offers(access_token, subscription...
46
86
0.609881
[ "MIT" ]
pjshi23/mcazurerm
mcazurerm/vmimages.py
2,530
Python
# GUI Application automation and testing library # Copyright (C) 2006-2018 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or without # ...
32.780435
94
0.619007
[ "MIT" ]
snakyhuman/auto-tests
auto1/venv/Lib/site-packages/pywinauto/timings.py
15,079
Python
from corvus.structures import Handler, Exchange, Loop, Update import corvutils.pyparsing as pp import os, sys, subprocess, shutil #, resource import re from scipy.interpolate import CubicSpline from scipy.integrate import quad from scipy.signal import convolve import numpy as np # Debug: FDV import pprint pp_debug = p...
38.429487
134
0.604003
[ "BSD-3-Clause" ]
times-software/Corvus
corvus/mbconv.py
5,995
Python
# https://adventofcode.com/2020/day/14 import itertools import re SAMPLE_PATH = "../../input/2020-14-sample.txt" INPUT_PATH = "../../input/2020-14-input.txt" def get_data(filename): with open(filename) as file: data = file.read().split("\n\n") data = [block.splitlines() for block in data] if l...
29.453125
77
0.564987
[ "MIT" ]
BastiHz/Advent_of_Code
python/2020/day14.py
1,885
Python
import copy from unittest import mock import matplotlib import pytest from matplotlib import pyplot as plt from matplotlib._pylab_helpers import Gcf @pytest.fixture(autouse=True) def mpl_test_settings(qt_module, mpl_test_settings): """ Ensure qt_module fixture is *first* fixture. We override the `mpl_te...
31.069307
79
0.641066
[ "MIT" ]
qiujiangkun/mplopengl
tests/test_backend_qt.py
9,414
Python
import os from indexing.pathanalyzer import PathAnalyzer from indexing.pathanalyzerstore import PathAnalyzerStore class Indexer: """ Traverses the given directory using the DFS algorithm. Allows registering different rules for handling different file types and calls the associated PathAnalyzers and Collec...
32.496774
120
0.534247
[ "MIT" ]
pgecsenyi/piepy
src/indexing/indexer.py
5,037
Python
from win32com.propsys import propsys, pscon print("propsys was imported (sorry - that is the extent of the tests,") print("but see the shell folder_view demo, which uses this module)") # that's all folks!
51.75
72
0.753623
[ "Apache-2.0" ]
Matchoc/python_env
python35/Lib/site-packages/win32comext/propsys/test/testpropsys.py
207
Python
from __future__ import annotations import logging import os import time from functools import partial from typing import Callable, Optional, Sequence, Union import torch from hivemind.averaging.control import AveragingStage, StepControl from hivemind.compression import CompressionBase, NoCompression from hivemind.dh...
57.198718
123
0.701984
[ "MIT" ]
MeshchaninovViacheslav/hivemind
hivemind/optim/optimizer.py
44,615
Python
'''A temporarily outdated visualization module.''' import graphviz as gv from .model import Model def visualize(model: Model, structural_part=True, measurement_part=False, view=True, filename=None, title=''): """Visualization of SEM model via graphviz library. Keyword arguments: model ...
38.566667
75
0.623163
[ "MIT" ]
YoungjuneKwon/forked-semopy
semopy/visualization.py
1,157
Python
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.637681
82
0.641142
[ "MIT" ]
OlhaTkachenko/azure-sdk-for-python
sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py
2,873
Python
import torch.nn as nn class AwAWrapper(nn.Module): def __init__(self, embeddingnet): super(AwAWrapper, self).__init__() self.embeddingnet = embeddingnet
16.181818
42
0.685393
[ "MIT" ]
VisionLearningGroup/SANE
lib/nets/awa_net_wrapper.py
178
Python
from setuptools import find_packages, setup setup( # Application info name="pytorch_common", version="1.5.3", author="Mihir Rana", author_email="ranamihir@gmail.com", description="Repo for common PyTorch code", long_description=open("README.md", "r", encoding="utf-8").read(), long_descr...
31.03125
81
0.623364
[ "MIT" ]
ranamihir/pytorch_common
setup.py
993
Python
from torch import nn import torch.nn.functional as F from torch import distributions as pyd class TanhTransform(pyd.transforms.Transform): domain = pyd.constraints.real codomain = pyd.constraints.interval(-1.0, 1.0) bijective = True sign = +1 def __init__(self, cache_size=1): super().__in...
30.27451
137
0.657383
[ "MIT" ]
willwhitney/sac_dists
distributions/squashed_normal.py
1,544
Python
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
38.788544
88
0.620012
[ "Apache-2.0" ]
AI-App/Polyaxon
src/tests/test_tracking/test_run_tracking.py
63,652
Python
# Copyright 2014 Joe Cora. # Revisions copyright 2017 Peter Cock. # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Objects to represent NEXUS standard data type matrix coding....
33.728814
97
0.532161
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
EnjoyLifeFund/macHighSierra-py36-pkgs
Bio/Nexus/StandardData.py
3,980
Python
""" Words analyses by Amardjia Amine. Free software utility which allows you to find the most frequent phrases and frequencies of words. French and English language texts are supported. It also counts number of words, characters, the lexical density, sentences...etc. https://github.com/Layto888/Words-Analysis...
32.338346
85
0.601953
[ "MIT" ]
Layto888/Words-Analysis
words.py
8,602
Python
import logging as log import time from . import gitlab from .approvals import Approvals GET, POST, PUT, DELETE = gitlab.GET, gitlab.POST, gitlab.PUT, gitlab.DELETE class MergeRequest(gitlab.Resource): @classmethod def create(cls, api, project_id, params): merge_request_info = api.call(POST( ...
31.187192
106
0.626125
[ "BSD-3-Clause" ]
chmielowiec/marge-bot
marge/merge_request.py
6,331
Python
import json import logging import socket from roombapy.roomba_info import RoombaInfo class RoombaDiscovery: udp_bind_address = "" udp_address = "<broadcast>" udp_port = 5678 roomba_message = "irobotmcs" amount_of_broadcasted_messages = 5 server_socket = None log = None def __init__(s...
28.972477
79
0.594997
[ "MIT" ]
Erelen-Laiquendi/roombapy
roombapy/discovery.py
3,158
Python
import gdax import os import json API_KEY = os.environ['GDAX_API_KEY'] API_SECRET = os.environ['GDAX_API_SECRET'] API_PASS = os.environ['GDAX_API_PASS'] def main(): ''' Cancels all bitcoin orders. ''' client = gdax.AuthenticatedClient(API_KEY, API_SECRET, API_PASS) r = client.cancel_all(product='...
18.809524
68
0.686076
[ "MIT" ]
griswaldbrooks/gdax-tools
cancel.py
395
Python
import pyupbit import time from datetime import datetime # 초기화 준비 def init_prepairing(investable_coins_map, all_market_codes, all_market_names, order_money): # 이전 투자 시 코인 별 전날 대비 상승률 prev_coins_map = pyupbit.get_prev_dict(investable_coins_map, all_market_codes, all_market_names) # 투자할 만한 코인 목록 가져오기 in...
38.770492
170
0.644228
[ "BSD-2-Clause" ]
snj830526/py_autoinvestment
pyupbit/strategy.py
14,197
Python
import itertools import multiprocessing as mp import os import pickle import random import string import tempfile from concurrent.futures import ProcessPoolExecutor from copy import copy from functools import partial from unittest import mock import numpy as np import pandas as pd import pytest import dask import das...
32.982156
109
0.624355
[ "BSD-3-Clause" ]
alikefia/dask
dask/dataframe/tests/test_shuffle.py
44,361
Python
from ecsclient.common.other import user_info user_info = user_info
17
44
0.838235
[ "Apache-2.0" ]
bcgov/nr-dell-objectstore_admin
ecsclient/v2/other/__init__.py
68
Python
from storage_bucket.bucket import get_bucket from storage_bucket.client import get_client from storage_bucket.create import create_bucket from storage_bucket.delete import delete_bucket from storage_bucket.delete_file import delete_file from storage_bucket.download_file import download_file from storage_bucket.list imp...
29.869565
63
0.79476
[ "MIT" ]
thomasborgen/storage-bucket
storage_bucket/__init__.py
687
Python
import os from dataclasses import dataclass from tequila import TequilaException, BitString, TequilaWarning from tequila.hamiltonian import QubitHamiltonian from tequila.wavefunction import QubitWaveFunction from tequila.hamiltonian.paulis import Sp, Sm, Qp, Qm from tequila.circuit import QCircuit, gates, _gates_impl ...
41.208475
255
0.553811
[ "MIT" ]
CopperHu/tequila
src/tequila/quantumchemistry/qc_base.py
84,601
Python
#!/usr/bin/env python # # svnadmin_tests.py: testing the 'svnadmin' tool. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one #...
39.335353
118
0.561419
[ "Apache-2.0" ]
auycro/subversion
subversion/tests/cmdline/svnadmin_tests.py
162,337
Python
# -*- coding: utf-8 -*- import os import sys sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extens...
33.621118
324
0.689082
[ "MIT" ]
FoamyGuy/Adafruit_CircuitPython_MPU6050
docs/conf.py
5,413
Python
#!/usr/bin/env python3 def selection_sort(lst): length = len(lst) for i in range(length - 1): least = i for k in range(i + 1, length): if lst[k] < lst[least]: least = k lst[least], lst[i] = (lst[i], lst[least]) return lst print(selection_sort([5, 2, 4, ...
23.571429
49
0.512121
[ "MIT" ]
udohsolomon/LearnAlgorithms
sort/selection_sort.py
330
Python
from setuptools import setup, find_packages setup( name='spot', version='0.1', packages=find_packages(), include_package_data=True, author="Steven Feltner", author_email="steven.feltner@spot.io", license="MIT", install_requires=[ "Click", "spotinst-sdk2", "reques...
21.65
43
0.6097
[ "Apache-2.0" ]
stevenfeltner/terraform-spotinst-data-get-accountid
scripts/setup.py
433
Python
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.732558
88
0.714673
[ "Apache-2.0" ]
AlexanderSaydakov/impala
tests/custom_cluster/test_web_pages.py
7,006
Python
import torch import torch.nn as nn import torch.nn.functional as F class MLP(nn.Module): def __init__(self, dims, multiplxer=4): super(MLP, self).__init__() hidden = int(dims * multiplxer) self.out = nn.Sequential( nn.Linear(dims, hidden), nn.GELU(), nn...
28.698565
94
0.589196
[ "MIT" ]
leaderj1001/Bag-of-MLP
model.py
5,998
Python
import time from datetime import datetime, timedelta from urllib.parse import urljoin import requests from bs4 import BeautifulSoup from flask.views import MethodView from config.setting import BOT_TOKEN from models import User hitcon_zeroday_base_url = "https://zeroday.hitcon.org" hitcon_zeroday_all_url = "https://...
34.880435
144
0.642879
[ "MIT" ]
zondaTW/gcp-tg-bot
apps/hitcon_zeroday.py
3,221
Python
"""Module containing methods that allow to identify task goals.""" # Copyright (c) 2022, ABB # 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 t...
34.329787
96
0.721103
[ "BSD-3-Clause" ]
matiov/disambiguate-BT-execution
bt_learning/bt_learning/learning_from_demo/goal_identification.py
3,227
Python
#!/usr/bin/env python import sys from loginas import __version__ assert sys.version >= "3.4", "Requires Python v3.4 or above." try: from setuptools import setup except ImportError: from distutils.core import setup setup( name="django-loginas", version=__version__, author="Stochastic Technologie...
26.633333
93
0.707134
[ "BSD-3-Clause" ]
pacahon/django-loginas
setup.py
799
Python
import json import crawlKoreaData_All as crawl1 import crawlKoreaData_Gyeonggi as crawl2 import crawlKoreaData_Seoul as crawl3 import LED_Display as LMD import threading from datetime import date, timedelta import datetime from matrix import * today = date.today() oneday = datetime.timedelta(days=1) yester...
36.497817
119
0.47978
[ "Apache-2.0" ]
ekqls3301/osscap2020
crawling_update(LED)/main_s.py
17,292
Python
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Xinlei Chen # -------------------------------------------------------- """Compute minibatch blobs for training a Fast R-CNN ne...
35.23622
128
0.654972
[ "MIT" ]
wennieWN/endernewton_tf-faster-rcnn
lib/roi_data_layer/minibatch.py
4,553
Python
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from drive_ros_msgs/mav_cc16_IMU.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geometry_msgs.msg import std_msgs.msg class mav_cc16_IMU(genpy.Message): _md5sum...
36.377119
165
0.646942
[ "MIT" ]
jessecha/OPCAS
Catkin_PKG_Car/devel/lib/python2.7/dist-packages/drive_ros_msgs/msg/_mav_cc16_IMU.py
8,585
Python
# Copyright 2018-2019 The glTF-Blender-IO authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
43.466292
131
0.769937
[ "Apache-2.0" ]
VitusW42/glTF-Blender-IO
addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_pbr_metallic_roughness.py
7,737
Python
"""A setuptools based setup module. See: https://packaging.python.org/guides/distributing-packages-using-setuptools/ https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages, Extension from os import path # io.open is needed for projects that suppo...
42.616438
98
0.68531
[ "MIT" ]
michalsta/mocos_helper
setup.py
9,336
Python
import os import pdb import sys import tempfile sys.path.append("/opt/tosca") from translator.toscalib.tosca_template import ToscaTemplate from core.models import Instance,User,Network,NetworkTemplate,Port from xosresource import XOSResource class XOSPort(XOSResource): provides = ["tosca.nodes.network.Port"] ...
30.66129
127
0.662809
[ "Apache-2.0" ]
xmaruto/mcord
xos/tosca/resources/port.py
1,901
Python
"""User defaults Revision ID: 30b25dd39af0 Revises: 46b85e11f48f Create Date: 2015-02-12 15:34:59.515740 """ # revision identifiers, used by Alembic. revision = '30b25dd39af0' down_revision = '46b85e11f48f' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ##...
23.272727
63
0.657552
[ "Apache-2.0" ]
Lunga001/pmg-cms-2
migrations/versions/30b25dd39af0_user_defaults.py
768
Python
numbers = input().split(', ') numbers_list = list(map(int, numbers)) even_list = [] for i in range (len(numbers_list)): if numbers_list[i] % 2 == 0: even_list.append(i) print(even_list) # found_indices = map(lambda x: x if numbers_list[x] % 2 == 0 else 'no', range(len(numbers_list))) # even_indices = list...
29.769231
98
0.664083
[ "MIT" ]
GYosifov88/Python-Fundamentals
even_numbers_list_advanced.py
387
Python
import os from django.conf import settings DOCUMENT_SIGNATURE_DETACHED_ACTION_CLASS_PATH = 'mayan.apps.document_signatures.workflow_actions.DocumentSignatureDetachedAction' DOCUMENT_SIGNATURE_EMBEDDED_ACTION_CLASS_PATH = 'mayan.apps.document_signatures.workflow_actions.DocumentSignatureEmbeddedAction' TEST_SIGNED_DOC...
42.5
129
0.816176
[ "Apache-2.0" ]
DRCIT/Mayan-EDMS
mayan/apps/document_signatures/tests/literals.py
680
Python
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.KbdishMaterialInfo import KbdishMaterialInfo class KoubeiCateringDishMaterialDeleteResponse(AlipayResponse): def __init__(self): super(KoubeiCateringDish...
35.633333
113
0.755847
[ "Apache-2.0" ]
Anning01/alipay-sdk-python-all
alipay/aop/api/response/KoubeiCateringDishMaterialDeleteResponse.py
1,069
Python
import unittest def suite(): return unittest.TestLoader().discover("garbageday.tests", pattern="*.py")
17.666667
74
0.735849
[ "MIT" ]
josylad/RoomScout
garbageday/tests/__init__.py
106
Python
from __future__ import print_function import sys import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import os import time # Options for mode 'lower_level' MODE = 'S-4mu_WigD' label_size = 28 #################################################################################################...
53.980583
816
0.495594
[ "MIT" ]
weissercn/learningml
learningml/GoF/analysis/S-4mu/plot_S-4mu_updated10_alphaSvalue_analysis.py
11,120
Python
try: from os import system from os.path import isdir,isfile from time import sleep from npc import NPC from tutorial import text import pack import sys from requests import get if not isfile('./config'): open('config','w').write('firmware: https://raw.githubusercontent.com/miko1112/comp9/main/fir...
32.24
118
0.602269
[ "MIT" ]
miko1112/comp9
core.py
5,642
Python
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init from torchvision import models import numpy as np device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') def weights_init_normal(m): classname = m.__class__.__name__ if classname.find('Conv') != -1: ...
42.122642
118
0.608585
[ "MIT" ]
bhavyashahh/SieveNet
gmm.py
13,395
Python
from django.shortcuts import render from django.urls import reverse_lazy from django.views import generic from django.contrib.auth.forms import UserCreationForm from .models import Hall def home(request): return render(request, 'halls/home.html') class SignUp(generic.CreateView): form_class = UserCr...
29.7
55
0.737374
[ "MIT" ]
MsNahid/Youtube-Hall
halls/views.py
594
Python
''' Created on Sep 3, 2012 @author: Daniel J. Rivers ''' from DataAccess.TableData import TableData from DataAccess.TableHandler import TableHandler class EpisodeHandler( TableHandler ): pass class Episode( TableData ): def __init__( self ): self.columnNames = [ ( "SEASON_ID", "INTEGE...
25.388889
127
0.619256
[ "MIT" ]
ErebusMaligan/python
FileInventory/DataAccess/Tables/EpisodeHandler.py
457
Python
import mmdet2trt.ops.util_ops as mm2trt_util import torch from mmdet2trt.models.builder import register_wraper from mmdet2trt.models.dense_heads.anchor_free_head import AnchorFreeHeadWraper @register_wraper('mmdet.models.FoveaHead') class FoveaHeadWraper(AnchorFreeHeadWraper): def __init__(self, module): ...
44.05
79
0.574915
[ "Apache-2.0" ]
daavoo/mmdetection-to-tensorrt
mmdet2trt/models/dense_heads/fovea_head.py
3,524
Python
from ._version import version_info, __version__
47
47
0.87234
[ "Apache-2.0" ]
IKNL/VANTAGE6
vantage6/cli/__init__.py
47
Python
from django.conf.urls import url from django.conf.urls import patterns from events import views urlpatterns = patterns('', # Events url(r'^microcosms/(?P<microcosm_id>\d+)/create/event/$', views.create, name='create-event'), url(r'^events/(?P<event_id>\d+)/$', views.single, name='single-event'), url(r...
43.736842
96
0.645006
[ "MIT" ]
microcosm-cc/microweb
events/urls.py
831
Python
# py-motmetrics - Metrics for multiple object tracker (MOT) benchmarking. # https://github.com/cheind/py-motmetrics/ # # MIT License # Copyright (c) 2017-2020 Christoph Heindl, Jack Valmadre and others. # See LICENSE file for terms. """Tests behavior of MOTAccumulator.""" from __future__ import absolute_import from _...
47.284946
109
0.532234
[ "MIT" ]
Borda/py-motmetrics
motmetrics/tests/test_mot.py
8,795
Python
from django.db import models from django.utils import timezone from django.db.models import Sum #from cycle_2018.models import ScheduleA import datetime class BaseModel(models.Model): active = models.BooleanField(default=True) created = models.DateTimeField(default=timezone.now) updated = models.DateTimeF...
38.675676
148
0.739343
[ "Apache-2.0" ]
capitolmuckrakr/cnn-fec
donor/models.py
1,431
Python
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
95.138889
798
0.804136
[ "MIT" ]
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
flux_combined_high_binding/model_792.py
20,550
Python
from project.customer import Customer from project.equipment import Equipment from project.exercise_plan import ExercisePlan from project.subscription import Subscription from project.trainer import Trainer class Gym: def __init__(self): self.customers = [] self.trainers = [] self.equipmen...
31.78125
59
0.590462
[ "MIT" ]
bvoytash/Software-University
Python OOP/Class and Static Methods/Gym/gym.py
2,034
Python
import os import sys DIET_IN=""" option display_precision 0; model diet.mod; param dname symbolic := "amplxl"; param fname symbolic := "#1#"; table Amounts IN (dname) (fname): [NUTR,FOOD], amt; table Foods IN (dname) (fname): FOOD <- [FOOD], cost, f_min, f_max; table Nutrients IN (dname) (fname): NUTR <-...
22.358779
91
0.643906
[ "BSD-3-Clause" ]
Seanpm2001-AMPL-lang/plugins
src/amplxl/tests/generate.py
5,858
Python
import json import re import logging as log from .helpers import path_leaf regexes = { "bp_processed": "Total basepairs processed:\s*([\d,]+) bp", "bp_written": "Total written \(filtered\):\s*([\d,]+) bp", "quality_trimmed": "Quality-trimmed:\s*([\d,]+) bp", "r_processed": "Total reads processed:\s*([\...
35.904255
88
0.502815
[ "BSD-3-Clause" ]
saketkc/riboraptor
riboraptor/cutadapt_to_json.py
3,375
Python
""" The ``mlflow.keras`` module provides an API for logging and loading Keras models. This module exports Keras models with the following flavors: Keras (native) format This is the main flavor that can be loaded back into Keras. :py:mod:`mlflow.pyfunc` Produced for use by generic pyfunc-based deployment tools ...
47.465331
100
0.636845
[ "Apache-2.0" ]
AnesBenmerzoug/mlflow
mlflow/keras.py
30,805
Python
from django import forms from django.forms import ModelForm from .models import FoodHomePageModel,FullMenuPageModel class FoodHomeForm(forms.ModelForm): class Meta: model = FoodHomePageModel exclude = ("company",'status',) class FoodMenuForm(forms.ModelForm): class ...
23.470588
55
0.66416
[ "MIT" ]
CPU-sangoma/PlentyPot
FoodStore/forms.py
399
Python
import cv2 import numpy as np from sklearn.cluster import DBSCAN as skDBSCAN def DBSCAN(src, eps, min_samples): arr = cv2.cvtColor(src, cv2.COLOR_BGR2LAB).reshape(-1, src.shape[2]) clustering = skDBSCAN(eps=eps, min_samples=min_samples).fit(arr) labels = clustering.labels_ + 1 maps = labels.reshape(sr...
31.291667
72
0.653795
[ "Apache-2.0" ]
076923/cv2-utils
cv2u/core/cluster.py
751
Python
from setuptools import setup, find_packages setup( name='src', version='0.0.1', packages=find_packages(), )
17.142857
43
0.675
[ "Apache-2.0" ]
YohannaWANG/CS5242_Project
src/setup.py
120
Python
class MolecularDescriptorsEnum: HEAVY_ATOM_COUNT = "heavy_atom_count" MOLECULAR_WEIGHT = "molecular_weight" CLOGP = "clogp" HYDROGEN_BOND_DONORS = "hydrogen_bond_donors" HYDROGEN_BOND_ACCEPTORS = "hydrogen_bond_acceptors" ROTATABLE_BONDS = "rotatable_bonds" RING_COUNT = "ring_count"
26.25
55
0.75873
[ "MIT" ]
MolecularAI/reinvent-chemistry
reinvent_chemistry/library_design/enums/molecular_descriptors_enum.py
315
Python
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class Armadillo(CMakePackage): """Armadillo is a high quality linear algebra library (ma...
36.698413
79
0.637976
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
PDoakORNL/spack
var/spack/repos/tutorial/packages/armadillo/package.py
2,312
Python
import base64 def display_skills(skills): result = [] for skill in skills: base = f'''<img width ='22px' align='left' src ='{'https://raw.githubusercontent.com/rahulbanerjee26/githubAboutMeGenerator/main/icons/'+skill+'.svg'}'>''' result.append(base) return '\n'.join(result) def display_so...
43.12
235
0.678108
[ "MIT" ]
saminul/githubProfileReadmeGenerator
helpers.py
4,335
Python
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class UpdateLoadBalancerResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map...
27.632353
81
0.581692
[ "Apache-2.0" ]
JeffreyDin/huaweicloud-sdk-python-v3
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/update_load_balancer_response.py
3,798
Python
#!/usr/bin/env python3 # # Extract a CSV of findings for a particular bucket # import boto3 from botocore.exceptions import ClientError import json import os import time import csv from time import sleep from datetime import datetime import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logging....
41.446009
192
0.57295
[ "Apache-2.0" ]
jchrisfarris/aws-macie-automations
scripts/extract_findings_to_csv.py
8,828
Python
import pytest from uyaml import Yaml from report.workflow.settings import ( ConfluenceSettings, Settings, _Credentials, _Page, _UnifiedSettings, ) from tests.fake import SECTION @pytest.fixture() def credentials() -> _Credentials: return _Credentials('foo', 'bar') @pytest.fixture() def page(...
23.947368
78
0.727473
[ "MIT" ]
vyahello/pytest-confluence-report
tests/test_settings.py
2,275
Python
def sub1(a,b): c = a-b return c def divide1(a,b): c = a/b return c
11.142857
18
0.525641
[ "MIT" ]
JaysreeBora/Learn-Python-in-7-Days
Chapter08/module2.py
78
Python