hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ca948f0797bf188859bbfb89b609d47d2e225d34 | 1,883 | py | Python | cgi-bin/remove.py | sam-glendenning/dynafed-oidc-plugin | d22c274e80eb717edff3c8ea849f632432d3c31b | [
"Apache-2.0"
] | null | null | null | cgi-bin/remove.py | sam-glendenning/dynafed-oidc-plugin | d22c274e80eb717edff3c8ea849f632432d3c31b | [
"Apache-2.0"
] | 2 | 2020-01-27T16:30:44.000Z | 2021-02-23T13:48:24.000Z | cgi-bin/remove.py | sam-glendenning/dynafed-oidc-plugin | d22c274e80eb717edff3c8ea849f632432d3c31b | [
"Apache-2.0"
] | 1 | 2020-11-26T17:28:12.000Z | 2020-11-26T17:28:12.000Z | #!/usr/bin/python3.6
"""
Receives information via POST from IRIS DynaFed web UI for removing a bucket
Sends it off to manage_config.py
"""
# Import modules for CGI handling
import cgi
import argparse
import sys
CONFIG_PATH = "/etc/ugr/conf.d/"
sys.path.append(CONFIG_PATH)
from manage_config import remove_bucket
... | 34.87037 | 209 | 0.710568 |
ca968827ae8ca82e5994b430fbeebecd32c70e99 | 1,027 | py | Python | setup.py | schyczewski/electrum-sum-server | 3e78c225290e8b21dc59e14aac5df7c6d99e0d8c | [
"MIT"
] | null | null | null | setup.py | schyczewski/electrum-sum-server | 3e78c225290e8b21dc59e14aac5df7c6d99e0d8c | [
"MIT"
] | null | null | null | setup.py | schyczewski/electrum-sum-server | 3e78c225290e8b21dc59e14aac5df7c6d99e0d8c | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="electrum-sum-server",
version="1.0",
scripts=['run_electrum_sum_server.py','electrum-sum-server'],
install_requires=['plyvel','jsonrpclib', 'irc >= 11, <=14.0'],
package_dir={
'electrumsumserver':'src'
},
py_modules=[
'electrumsu... | 33.129032 | 77 | 0.668939 |
ca972713883880d5f8b26f6f6ca4dd9d3f968ecd | 33,588 | py | Python | hyperion/torch/narchs/resnet.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | 14 | 2021-12-19T04:24:15.000Z | 2022-03-18T03:24:04.000Z | hyperion/torch/narchs/resnet.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | null | null | null | hyperion/torch/narchs/resnet.py | hyperion-ml/hyperion | c4c9eee0acab1ba572843373245da12d00dfffaa | [
"Apache-2.0"
] | 5 | 2021-12-14T20:41:27.000Z | 2022-02-24T14:18:11.000Z | """
Copyright 2019 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
import logging
import numpy as np
import torch
import torch.nn as nn
from torch.nn import Conv1d, Linear, BatchNorm1d
from ..layers import ActivationFactory as AF
from ..layers import ... | 32.452174 | 110 | 0.589556 |
ca99e20a87727779716fbe845133ce076ca3fec6 | 997 | py | Python | dimsim/tests/test_dimsim.py | NTHU-NLPLAB/DimSim | c851d76c228088ee84064c5bda2ca3ef9feb34dd | [
"Apache-2.0"
] | null | null | null | dimsim/tests/test_dimsim.py | NTHU-NLPLAB/DimSim | c851d76c228088ee84064c5bda2ca3ef9feb34dd | [
"Apache-2.0"
] | null | null | null | dimsim/tests/test_dimsim.py | NTHU-NLPLAB/DimSim | c851d76c228088ee84064c5bda2ca3ef9feb34dd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Dependencies
import pytest
# The module to test
from dimsim.core.model import get_distance, get_candidates
if __name__ == '__main__':
pytest.main([__file__])
| 23.186047 | 70 | 0.673019 |
ca9a9ba93dc9a5c27b4f0145431adeb22018682c | 3,293 | py | Python | patient/image_block.py | 11pawan11/ehealth | 4385881e43b441937a9b6f90d7d00122ae568c35 | [
"MIT"
] | null | null | null | patient/image_block.py | 11pawan11/ehealth | 4385881e43b441937a9b6f90d7d00122ae568c35 | [
"MIT"
] | 1 | 2021-03-08T09:13:02.000Z | 2021-03-08T09:13:02.000Z | patient/image_block.py | 11pawan11/ehealth | 4385881e43b441937a9b6f90d7d00122ae568c35 | [
"MIT"
] | null | null | null | import tensorflow as tf
from keras.preprocessing.image import ImageDataGenerator
import numpy as np
from keras.preprocessing import image
import zipfile
import os
import pickle
from keras.models import model_from_json
from django.conf import settings
from django.conf import settings
if __name__=="__main__":
... | 31.361905 | 139 | 0.681142 |
ca9b15154d8f779deebc6e36a5aa1ed54ce979af | 317 | py | Python | src/hamcrest/library/number/__init__.py | rbalint/PyHamcrest | 713aa08e313dba997fd8e4b7e0d3d599a72bdd72 | [
"BSD-3-Clause"
] | 6 | 2020-08-04T13:12:42.000Z | 2020-08-16T13:26:19.000Z | src/hamcrest/library/number/__init__.py | rbalint/PyHamcrest | 713aa08e313dba997fd8e4b7e0d3d599a72bdd72 | [
"BSD-3-Clause"
] | 16 | 2020-06-06T01:28:35.000Z | 2022-03-12T00:16:58.000Z | src/hamcrest/library/number/__init__.py | rbalint/PyHamcrest | 713aa08e313dba997fd8e4b7e0d3d599a72bdd72 | [
"BSD-3-Clause"
] | 5 | 2020-05-12T11:04:44.000Z | 2020-05-31T14:08:00.000Z | """Matchers that perform numeric comparisons."""
from .iscloseto import close_to
from .ordering_comparison import (
greater_than,
greater_than_or_equal_to,
less_than,
less_than_or_equal_to,
)
__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
| 22.642857 | 48 | 0.757098 |
ca9c42a3546a2a31de0428c29562026775458eb1 | 3,812 | py | Python | run_measure_seeing.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | 1 | 2021-06-06T15:26:36.000Z | 2021-06-06T15:26:36.000Z | run_measure_seeing.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | null | null | null | run_measure_seeing.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | 3 | 2015-07-29T15:16:35.000Z | 2017-12-01T13:02:36.000Z | #!/usr/bin/env python
import os, shutil
import datetime
import ox_wagon
import pick_star
from find_boxes import find_boxes
from guide_gto900 import guide_gto900
from pygto900 import GTO900, status
from spiral_search_gto900 import spiralsearch
import time
import sys
old_star = None
repeat = 1
niter = 15
spiral_log ... | 30.99187 | 106 | 0.612802 |
ca9d0a4554a8094c94f6acae008131b3adb7af66 | 25,841 | py | Python | plugins/levelops-gcloud.py | levelops-tools-admin/levelops-plugins | 35fc10c23b1953d0c442a6a9a03b2ccb58604733 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | plugins/levelops-gcloud.py | levelops-tools-admin/levelops-plugins | 35fc10c23b1953d0c442a6a9a03b2ccb58604733 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | plugins/levelops-gcloud.py | levelops-tools-admin/levelops-plugins | 35fc10c23b1953d0c442a6a9a03b2ccb58604733 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | #!/usr/bin/env python
##################################################################
# Copyright (C) 2019-2020 LevelOps Inc <support@levelops.io>
#
# This file is part of the LevelOps Inc Tools.
#
# This tool is licensed under Apache License, Version 2.0
#####################################################... | 40.18818 | 245 | 0.601757 |
045f052d4285b8cf208a346e26cbfa9caa9cb8c2 | 6,807 | py | Python | pyHalo/Rendering/two_halo.py | DarthLazar/pyHalo | aac61ed4dd6bb9df1f8295760c6ec5f6099f8983 | [
"MIT"
] | 7 | 2020-12-09T23:58:34.000Z | 2022-03-13T12:18:32.000Z | pyHalo/Rendering/two_halo.py | DarthLazar/pyHalo | aac61ed4dd6bb9df1f8295760c6ec5f6099f8983 | [
"MIT"
] | 8 | 2020-10-12T21:30:22.000Z | 2022-01-25T16:04:54.000Z | pyHalo/Rendering/two_halo.py | DarthLazar/pyHalo | aac61ed4dd6bb9df1f8295760c6ec5f6099f8983 | [
"MIT"
] | 6 | 2021-06-07T16:30:41.000Z | 2022-01-12T16:58:04.000Z | from pyHalo.Rendering.SpatialDistributions.uniform import LensConeUniform
import numpy as np
from copy import deepcopy
from pyHalo.Rendering.MassFunctions.power_law import GeneralPowerLaw
from pyHalo.Rendering.rendering_class_base import RenderingClassBase
| 45.993243 | 121 | 0.667695 |
0460206d62dac32523f0b642f0c3d4603a343ecd | 1,391 | py | Python | utils.py | konichar/footprint-api | 22afc44993a1c473f34de10bf12e8c916a573c56 | [
"MIT"
] | 1 | 2021-07-31T05:22:13.000Z | 2021-07-31T05:22:13.000Z | utils.py | konichar/footprint-api | 22afc44993a1c473f34de10bf12e8c916a573c56 | [
"MIT"
] | null | null | null | utils.py | konichar/footprint-api | 22afc44993a1c473f34de10bf12e8c916a573c56 | [
"MIT"
] | 1 | 2021-07-31T03:52:20.000Z | 2021-07-31T03:52:20.000Z | from decouple import config
import heroku3
import uuid
HEROKU_API_KEY = config("HEROKU_API_KEY")
heroku_conn = heroku3.from_key(HEROKU_API_KEY)
# app.delete()
# config = app.config()
# onfig['New_var'] = 'new_val'
# newconfig = config.update({u'TEST1': u'A1', u'TEST2': u'A2', u'TEST3': u'A3'})
# proclist = app.proc... | 32.348837 | 83 | 0.643422 |
046058a96701e019af377663b6bbf0d5f9acfc02 | 168 | py | Python | app/views/index.py | Depado/LostInNetworkWeb | d3963819aa6f770d56836de6ef82f469cfebe900 | [
"MIT"
] | 1 | 2015-11-08T10:13:19.000Z | 2015-11-08T10:13:19.000Z | app/views/index.py | Depado/LostInNetworkWeb | d3963819aa6f770d56836de6ef82f469cfebe900 | [
"MIT"
] | null | null | null | app/views/index.py | Depado/LostInNetworkWeb | d3963819aa6f770d56836de6ef82f469cfebe900 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import render_template
from app import app
| 16.8 | 40 | 0.666667 |
0461bb76c195fe88f22a199e28fe83fe4fbd0827 | 2,084 | py | Python | src/eduid_userdb/tests/test_profile.py | SUNET/eduid-userdb | 5970880caf0b0e2bdee6c23869ef287acc87af2a | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/eduid_userdb/tests/test_profile.py | SUNET/eduid-userdb | 5970880caf0b0e2bdee6c23869ef287acc87af2a | [
"BSD-2-Clause-FreeBSD"
] | 12 | 2015-08-28T12:05:32.000Z | 2020-06-23T13:31:29.000Z | src/eduid_userdb/tests/test_profile.py | SUNET/eduid-userdb | 5970880caf0b0e2bdee6c23869ef287acc87af2a | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-10-24T06:37:33.000Z | 2016-11-21T11:39:39.000Z | # -*- coding: utf-8 -*-
from unittest import TestCase
from eduid_userdb.element import DuplicateElementViolation
from eduid_userdb.profile import Profile, ProfileList
__author__ = 'lundberg'
OPAQUE_DATA = {'a_string': 'I am a string', 'an_int': 3, 'a_list': ['eins', 2, 'drei'], 'a_map': {'some': 'data'}}
| 37.890909 | 114 | 0.673225 |
04625083332958f71028761e817830740d7d5a10 | 1,764 | py | Python | responsibleai/tests/databalanceanalysis/test_distribution_balance_measures.py | imatiach-msft/responsible-ai-toolbox | aa62536afa295c1883c7d4b016ba00ab93f33e63 | [
"MIT"
] | null | null | null | responsibleai/tests/databalanceanalysis/test_distribution_balance_measures.py | imatiach-msft/responsible-ai-toolbox | aa62536afa295c1883c7d4b016ba00ab93f33e63 | [
"MIT"
] | null | null | null | responsibleai/tests/databalanceanalysis/test_distribution_balance_measures.py | imatiach-msft/responsible-ai-toolbox | aa62536afa295c1883c7d4b016ba00ab93f33e63 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation
# Licensed under the MIT License.
import pandas as pd
from responsibleai.databalanceanalysis import DistributionBalanceMeasures
from ..common_utils import assert_series_and_dict_equal
| 30.413793 | 76 | 0.660998 |
04649b8dea147441c36a2539f92aeead65d9654b | 645 | py | Python | examples/example3.py | axju/socialpy | c304d8f7c619d17f7f6f819ce6e8c2aa794646a0 | [
"MIT"
] | 1 | 2018-09-11T21:42:50.000Z | 2018-09-11T21:42:50.000Z | examples/example3.py | axju/socialpy | c304d8f7c619d17f7f6f819ce6e8c2aa794646a0 | [
"MIT"
] | null | null | null | examples/example3.py | axju/socialpy | c304d8f7c619d17f7f6f819ce6e8c2aa794646a0 | [
"MIT"
] | null | null | null | from socialpy import Gateway
import json
gateway = Gateway()
#gateway.load_from_file('.env')
gateway['instagram'].setup(user='...', pw='...')
id = gateway['instagram'].api.username_id
print(id)
print(gateway['instagram'].api.getUserFeed(id))
plot(gateway['instagram'].api.LastJson)
print(gateway['instagram'].api.ge... | 24.807692 | 78 | 0.72093 |
0464b5bf3f4e05c2d5fbe30bf159470aecfd92d8 | 6,046 | py | Python | src/vivarium/interface/cli.py | ihmeuw/vivarium | 77393d2e84ff2351c926f65b33272b7225cf9628 | [
"BSD-3-Clause"
] | 41 | 2017-07-14T03:39:06.000Z | 2022-03-20T05:36:33.000Z | src/vivarium/interface/cli.py | ihmeuw/vivarium | 77393d2e84ff2351c926f65b33272b7225cf9628 | [
"BSD-3-Clause"
] | 26 | 2017-08-08T22:13:44.000Z | 2021-08-18T00:14:54.000Z | src/vivarium/interface/cli.py | ihmeuw/vivarium | 77393d2e84ff2351c926f65b33272b7225cf9628 | [
"BSD-3-Clause"
] | 8 | 2017-08-03T17:15:39.000Z | 2021-09-30T21:57:50.000Z | """
===========================
Vivarium Command Line Tools
===========================
``vivarium`` provides the tool :command:`simulate` for running simulations
from the command line. It provides three subcommands:
.. list-table:: ``simulate`` sub-commands
:header-rows: 1
:widths: 30, 40
* - Name
... | 40.577181 | 118 | 0.70526 |
0465a13b1dbd15462725dc4ec15c4ffc06b85c63 | 1,281 | py | Python | univt-fonts/convert_univt.py | AOSC-Dev/scriptlets | 944dc346382c146256ca99de0a2e740fffb3320a | [
"MIT"
] | 5 | 2017-08-04T15:44:45.000Z | 2020-09-27T09:02:15.000Z | univt-fonts/convert_univt.py | AOSC-Dev/scriptlets | 944dc346382c146256ca99de0a2e740fffb3320a | [
"MIT"
] | 4 | 2020-10-05T03:20:06.000Z | 2021-08-31T23:09:13.000Z | univt-fonts/convert_univt.py | AOSC-Dev/scriptlets | 944dc346382c146256ca99de0a2e740fffb3320a | [
"MIT"
] | 2 | 2020-03-08T06:55:18.000Z | 2020-09-27T09:02:20.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import warnings
import bdflib
if __name__ == '__main__':
# python3 convert_univt.py unifont-*.bdf fonts_utf8.h
bdffont = bdflib.read_bdf(open(sys.argv[1]))
with open(sys.argv[2], 'w') as f:
for line in format_header(convert_bdf(bdffont)):
... | 32.025 | 85 | 0.540984 |
0465d285875f7341d40eda1201940586861d778c | 3,325 | py | Python | checker.py | nautilusPrime/howdy_checker | e2dfc2962a54d93d62d1f7dcc1b4690bd1760c95 | [
"Unlicense"
] | null | null | null | checker.py | nautilusPrime/howdy_checker | e2dfc2962a54d93d62d1f7dcc1b4690bd1760c95 | [
"Unlicense"
] | null | null | null | checker.py | nautilusPrime/howdy_checker | e2dfc2962a54d93d62d1f7dcc1b4690bd1760c95 | [
"Unlicense"
] | null | null | null |
# coding: utf-8
# author: Ankur Roy Chowdhury
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver... | 31.971154 | 108 | 0.668571 |
0468f997470dd119cac6c8338ed802fc3992bd6a | 1,590 | py | Python | seat_reservation/bus_seats.py | wrightdj99/wrightdj99.github.io | aa0bda1e8d4c5cc1a33dfba56ef3dad10b4e1293 | [
"CC-BY-3.0"
] | null | null | null | seat_reservation/bus_seats.py | wrightdj99/wrightdj99.github.io | aa0bda1e8d4c5cc1a33dfba56ef3dad10b4e1293 | [
"CC-BY-3.0"
] | null | null | null | seat_reservation/bus_seats.py | wrightdj99/wrightdj99.github.io | aa0bda1e8d4c5cc1a33dfba56ef3dad10b4e1293 | [
"CC-BY-3.0"
] | null | null | null | #This application is supposed to mimics
#a seat reservation system for a bus company
#or railroad like Amtrak or Greyhound.
num_seats = 5
available_seats = []
for i in range(num_seats):
available_seats.append(Seat())
command = input('Enter command (p/r/q): ')
while command != 'q':
if command == 'p': # Pr... | 23.043478 | 81 | 0.583648 |
046adc53c7fe3e03006b675d1e1ef4fb8a9ffa29 | 924 | py | Python | src/airflow_fs/sensors.py | Sergfalt/airflow-fs | b1e09035242b4feb70faf1626a12d6078d0883c1 | [
"MIT"
] | 16 | 2019-03-14T22:21:36.000Z | 2021-10-05T20:34:13.000Z | src/airflow_fs/sensors.py | Sergfalt/airflow-fs | b1e09035242b4feb70faf1626a12d6078d0883c1 | [
"MIT"
] | 1 | 2019-10-15T19:24:06.000Z | 2020-04-06T12:56:17.000Z | src/airflow_fs/sensors.py | Sergfalt/airflow-fs | b1e09035242b4feb70faf1626a12d6078d0883c1 | [
"MIT"
] | 8 | 2019-03-15T22:11:15.000Z | 2021-07-07T18:45:50.000Z | """Module containing file system sensors."""
from airflow.sensors.base_sensor_operator import BaseSensorOperator
from airflow.utils.decorators import apply_defaults
from airflow_fs.hooks import LocalHook
| 28.875 | 71 | 0.6829 |
046be80319f651476fa1099fd611e380f14e2ece | 412 | py | Python | pkg/tests/test_range.py | arita37/pyvtreat | c32e7ce6db11a2ccdd63e545b25028cbec03a3ff | [
"BSD-3-Clause"
] | 1 | 2020-08-16T12:07:56.000Z | 2020-08-16T12:07:56.000Z | pkg/tests/test_range.py | arita37/pyvtreat | c32e7ce6db11a2ccdd63e545b25028cbec03a3ff | [
"BSD-3-Clause"
] | null | null | null | pkg/tests/test_range.py | arita37/pyvtreat | c32e7ce6db11a2ccdd63e545b25028cbec03a3ff | [
"BSD-3-Clause"
] | null | null | null | import vtreat.util
import pandas
import numpy
| 29.428571 | 86 | 0.740291 |
046cd240efa5eb3c008bf8423b38dbc9f76818a1 | 5,544 | py | Python | src/config.py | robertmetcalf/chia-log | d1160f0fe8920e581a3a0ffd242f70597b5061fd | [
"Apache-2.0"
] | null | null | null | src/config.py | robertmetcalf/chia-log | d1160f0fe8920e581a3a0ffd242f70597b5061fd | [
"Apache-2.0"
] | null | null | null | src/config.py | robertmetcalf/chia-log | d1160f0fe8920e581a3a0ffd242f70597b5061fd | [
"Apache-2.0"
] | null | null | null | # system packages
from pathlib import Path
from typing import Any, Dict, List
#import pprint
# third party packages
import yaml
# local packages
from src.logger import Logger
def _validate_config (self) -> bool:
'''Validate the configuration file'''
cfg:Dict[str, Any] = {}
# read the configuration file
... | 27.72 | 129 | 0.687229 |
046d31d158fc4b7351831f3cd9d74c5e9eb6c08b | 2,592 | py | Python | nipype/interfaces/ants/tests/test_auto_KellyKapowski.py | sebastientourbier/nipype | 99c5904176481520c5bf42a501aae1a12184e672 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/ants/tests/test_auto_KellyKapowski.py | sebastientourbier/nipype | 99c5904176481520c5bf42a501aae1a12184e672 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/ants/tests/test_auto_KellyKapowski.py | sebastientourbier/nipype | 99c5904176481520c5bf42a501aae1a12184e672 | [
"Apache-2.0"
] | null | null | null | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..segmentation import KellyKapowski
| 31.228916 | 114 | 0.68287 |
046e054a3981940509c13877eac1f1f1a24af3c6 | 72,469 | py | Python | lib/two/evalctx.py | erkyrath/tworld | 9f5237771196b03753d027277ffc296e25fd7425 | [
"MIT"
] | 38 | 2015-01-03T16:59:20.000Z | 2021-10-13T09:15:53.000Z | lib/two/evalctx.py | Oreolek/tworld | 9f5237771196b03753d027277ffc296e25fd7425 | [
"MIT"
] | 32 | 2015-01-04T01:59:34.000Z | 2016-05-20T16:29:26.000Z | lib/two/evalctx.py | Oreolek/tworld | 9f5237771196b03753d027277ffc296e25fd7425 | [
"MIT"
] | 7 | 2015-10-08T21:01:20.000Z | 2020-05-21T17:42:54.000Z | """
The context object for evaluating script code. Most of the implementation
of TworldPy lives in the EvalPropContext module.
"""
import re
import random
import ast
import operator
import itertools
import tornado.gen
import bson
from bson.objectid import ObjectId
import motor
import twcommon.misc
from twcommon.exce... | 40.193566 | 220 | 0.561523 |
046e1944cb47f77b2ef3ad60d8607bd0144c1767 | 1,294 | py | Python | setup.py | matwey/django-eremaea2 | 71dd65cf9b53a6b256e8445f8adc7c05b78ebe70 | [
"BSD-2-Clause"
] | null | null | null | setup.py | matwey/django-eremaea2 | 71dd65cf9b53a6b256e8445f8adc7c05b78ebe70 | [
"BSD-2-Clause"
] | 12 | 2016-04-03T14:54:39.000Z | 2021-12-26T12:43:57.000Z | setup.py | matwey/django-eremaea2 | 71dd65cf9b53a6b256e8445f8adc7c05b78ebe70 | [
"BSD-2-Clause"
] | 1 | 2020-07-10T18:20:27.000Z | 2020-07-10T18:20:27.000Z | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-eremaea2',
version='2.0.17',
package... | 29.409091 | 78 | 0.718702 |
046e60d4b0c53f0874165e8270d36b4fb4571a8f | 226 | py | Python | GOP/utility/__init__.py | viebboy/PyGOP | 753f291d18601869f2e91930c7a2cb9a92caf892 | [
"MIT"
] | 17 | 2018-10-03T15:39:16.000Z | 2022-01-16T08:13:34.000Z | GOP/utility/__init__.py | viebboy/PyGOP | 753f291d18601869f2e91930c7a2cb9a92caf892 | [
"MIT"
] | 3 | 2020-10-10T02:53:11.000Z | 2020-12-18T05:33:07.000Z | GOP/utility/__init__.py | viebboy/PyGOP | 753f291d18601869f2e91930c7a2cb9a92caf892 | [
"MIT"
] | 6 | 2019-04-26T15:28:06.000Z | 2021-12-03T17:19:01.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Author: Dat Tran
Email: dat.tranthanh@tut.fi, viebboy@gmail.com
github: https://github.com/viebboy
"""
from . import gop_utils
from . import gop_operators
from . import misc
| 18.833333 | 46 | 0.70354 |
046e66b446fbf1ac3ae733e7523d1431aba5d800 | 1,206 | py | Python | sample_project/users/models.py | CorrDyn/django-bulk-user-upload | caa5e74f295ad5b89056f588b5782fa396e502af | [
"MIT"
] | 1 | 2022-01-27T14:38:37.000Z | 2022-01-27T14:38:37.000Z | sample_project/users/models.py | CorrDyn/django-bulk-user-upload | caa5e74f295ad5b89056f588b5782fa396e502af | [
"MIT"
] | null | null | null | sample_project/users/models.py | CorrDyn/django-bulk-user-upload | caa5e74f295ad5b89056f588b5782fa396e502af | [
"MIT"
] | null | null | null | from django.contrib.auth.base_user import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
# https://wsvincent.com/django-custom-user-model-tutorial/
from django.db import models
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from users.managers import... | 32.594595 | 118 | 0.707297 |
046e66c9e8d08fd755bbba528a47d73a17739ce0 | 9,835 | py | Python | ansys/dpf/core/operators/logic/identical_fc.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 11 | 2021-01-31T15:50:02.000Z | 2021-10-01T23:15:38.000Z | ansys/dpf/core/operators/logic/identical_fc.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 46 | 2021-01-14T05:00:50.000Z | 2021-10-06T18:30:37.000Z | ansys/dpf/core/operators/logic/identical_fc.py | TheGoldfish01/pydpf-core | 75ca8a180454f94cedafbc68c1d6f20dcfc4c795 | [
"MIT"
] | 3 | 2021-06-30T07:18:30.000Z | 2021-09-15T08:43:11.000Z | """
identical_fc
============
"""
from ansys.dpf.core.dpf_operator import Operator
from ansys.dpf.core.inputs import Input, _Inputs
from ansys.dpf.core.outputs import Output, _Outputs, _modify_output_spec_with_one_type
from ansys.dpf.core.operators.specification import PinSpecification, Specification
"""Operators from... | 35.894161 | 327 | 0.624606 |
046f0d1359a28c9061482e63daa2989b97076d60 | 3,424 | py | Python | tests/test_allure_reporter.py | nikitanovosibirsk/vedro-allure-reporter | da6bb3e89a13a1e67324f0e791458c65e162f18c | [
"Apache-2.0"
] | 1 | 2021-08-25T12:24:46.000Z | 2021-08-25T12:24:46.000Z | tests/test_allure_reporter.py | nikitanovosibirsk/vedro-allure-reporter | da6bb3e89a13a1e67324f0e791458c65e162f18c | [
"Apache-2.0"
] | 1 | 2022-03-22T14:16:22.000Z | 2022-03-23T09:05:46.000Z | tests/test_allure_reporter.py | nikitanovosibirsk/vedro-allure-reporter | da6bb3e89a13a1e67324f0e791458c65e162f18c | [
"Apache-2.0"
] | null | null | null | from unittest.mock import Mock, call
import pytest
from baby_steps import given, then, when
from vedro.core import Dispatcher
from vedro.events import (
ArgParsedEvent,
ScenarioFailedEvent,
ScenarioPassedEvent,
ScenarioRunEvent,
ScenarioSkippedEvent,
)
from vedro.plugins.director import Reporter
f... | 27.612903 | 93 | 0.672605 |
046ff1d643ec6be440b6ad4c59c90e01565c9847 | 1,635 | py | Python | tests/test_utils.py | JorgeGarciaIrazabal/cf-scripts | 69f4f0268496281c2b9e2073e13566b985b06677 | [
"MIT"
] | 33 | 2018-02-28T04:05:46.000Z | 2022-01-13T15:34:43.000Z | tests/test_utils.py | JorgeGarciaIrazabal/cf-scripts | 69f4f0268496281c2b9e2073e13566b985b06677 | [
"MIT"
] | 1,371 | 2018-02-25T00:32:37.000Z | 2022-03-29T23:44:42.000Z | tests/test_utils.py | bgruening/cf-scripts | bca57b85be7c9b85a180210f74c90be293519371 | [
"MIT"
] | 62 | 2018-02-25T00:28:48.000Z | 2022-02-22T02:55:28.000Z | import os
import json
import pickle
from conda_forge_tick.utils import LazyJson, dumps
| 31.442308 | 79 | 0.556575 |
0470a0e70e1741cad53c7b14ae633f12cdfbbac9 | 3,556 | py | Python | genomicode/quantnorm.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 9 | 2017-01-13T02:38:41.000Z | 2021-04-08T00:44:39.000Z | genomicode/quantnorm.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | null | null | null | genomicode/quantnorm.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 4 | 2017-01-05T16:25:25.000Z | 2019-12-12T20:07:38.000Z | """
Functions:
normalize
normalize_binreg Requires binreg
"""
import os
| 28.910569 | 75 | 0.620079 |
0471aa4a650f08ab7b5c8c85b7f2d8e99b5c94f4 | 6,081 | py | Python | main.py | Grads2Career-Python/eliaseraphim_password_confirmation | 0f3e3a9b7ad614587f24837d05c88ad3101570a1 | [
"MIT"
] | null | null | null | main.py | Grads2Career-Python/eliaseraphim_password_confirmation | 0f3e3a9b7ad614587f24837d05c88ad3101570a1 | [
"MIT"
] | null | null | null | main.py | Grads2Career-Python/eliaseraphim_password_confirmation | 0f3e3a9b7ad614587f24837d05c88ad3101570a1 | [
"MIT"
] | 1 | 2021-06-14T14:22:19.000Z | 2021-06-14T14:22:19.000Z | # author: elia deppe
# date 6/4/21
#
# simple password confirmation program that confirms a password of size 12 to 48, with at least: one lower-case letter
# one upper-case letter, one number, and one special character.
# constants
MIN_LENGTH, MAX_LENGTH = 8, 48 # min and max length of password
# dictionaries
LO... | 31.837696 | 118 | 0.645617 |
0472642d1bf08ce923878a588a8ef30c233f4fb1 | 381 | py | Python | 1929.py | asa-leholland/puzzle_practice | 026bd5ea0f4812ac7d5056518ca9fdc05ee9dabf | [
"MIT"
] | null | null | null | 1929.py | asa-leholland/puzzle_practice | 026bd5ea0f4812ac7d5056518ca9fdc05ee9dabf | [
"MIT"
] | null | null | null | 1929.py | asa-leholland/puzzle_practice | 026bd5ea0f4812ac7d5056518ca9fdc05ee9dabf | [
"MIT"
] | null | null | null | from timing import timing
if __name__ == '__main__':
print(concat2([1,2,5,2])) | 19.05 | 36 | 0.580052 |
047324face5937f511652ad3aa44ea8940a67ba1 | 3,063 | py | Python | tests/test_timeset.py | GFlorio/pytimeset | 147ca0f074ea9753cb35f05fef8fd80210f82fb5 | [
"MIT"
] | null | null | null | tests/test_timeset.py | GFlorio/pytimeset | 147ca0f074ea9753cb35f05fef8fd80210f82fb5 | [
"MIT"
] | 1 | 2020-03-24T17:28:14.000Z | 2020-03-24T17:28:14.000Z | tests/test_timeset.py | GFlorio/pytimeset | 147ca0f074ea9753cb35f05fef8fd80210f82fb5 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from random import sample, choice, randrange
from unittest import TestCase
import tests.test_timeinterval as ti
from tests.factories import make_sets, make_moments
from timeset import TimeSet
t0 = datetime(2019, 7, 19)
t6 = datetime(2019, 7, 25)
t = make_moments(20, t0, t6)
se... | 34.806818 | 91 | 0.640222 |
04737b29349fe094e4753116c73ba39614a30afc | 477 | py | Python | python/anyascii/_data/_30c.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_30c.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_30c.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | b=' Tan Shuang Zhou Dai Lou Xu Tang Qiu Lun Kui Dui Shi Qi Sha Za Fu Liu She Ke Gong Jian Yong Meng Ung Na Fen Xu Jian Zhong Xiang Fen Fu Lu Lu Bei Ci Zhi Lai Tui Teng Lei Ceoi Wu Zhan Wu Che Q... | 477 | 477 | 0.465409 |
0474b3b615ffa27e5b2d59490038a87b1d507a7f | 2,650 | py | Python | Collections-a-installer/community-general-2.4.0/tests/unit/plugins/become/test_doas.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 22 | 2021-07-16T08:11:22.000Z | 2022-03-31T07:15:34.000Z | Collections-a-installer/community-general-2.4.0/tests/unit/plugins/become/test_doas.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | Collections-a-installer/community-general-2.4.0/tests/unit/plugins/become/test_doas.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 39 | 2021-07-05T02:31:42.000Z | 2022-03-31T02:46:03.000Z | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2020 Ansible Project
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import re
from an... | 31.176471 | 141 | 0.612453 |
0476e92ddb685f3d848b0ff0228d9311265e9dc0 | 109 | py | Python | src/server_CFD/definitions.py | robertpardillo/Funnel | f45e419f55e085bbb95e17c47b4c94a7c625ba9b | [
"MIT"
] | 1 | 2021-05-18T16:10:49.000Z | 2021-05-18T16:10:49.000Z | src/server_CFD/definitions.py | robertpardillo/Funnel | f45e419f55e085bbb95e17c47b4c94a7c625ba9b | [
"MIT"
] | null | null | null | src/server_CFD/definitions.py | robertpardillo/Funnel | f45e419f55e085bbb95e17c47b4c94a7c625ba9b | [
"MIT"
] | null | null | null |
import os
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
SERVER = 'CFD'
IS_MULTITHREADING = 0
| 15.571429 | 54 | 0.706422 |
0477b8704fc254929c1468f8e3c98a6ae150cd99 | 1,040 | py | Python | problems/A/LevelStatistics.py | deveshbajpai19/CodeForces | 707b374f03012ec68054841f791d48b33ae4ef1b | [
"MIT"
] | 55 | 2016-06-19T05:45:15.000Z | 2022-03-31T15:18:53.000Z | problems/A/LevelStatistics.py | farhadcu/CodeForces-2 | 707b374f03012ec68054841f791d48b33ae4ef1b | [
"MIT"
] | null | null | null | problems/A/LevelStatistics.py | farhadcu/CodeForces-2 | 707b374f03012ec68054841f791d48b33ae4ef1b | [
"MIT"
] | 25 | 2016-07-29T13:03:15.000Z | 2021-09-17T01:45:45.000Z | __author__ = 'Devesh Bajpai'
'''
https://codeforces.com/problemset/problem/1334/A
Solution: Its easy to deduce that even for one player, it is impossible to clear more levels than the plays done. This
also is true when multiple players are there. Secondly, the number of plays or levels cleared cannot go done as they ... | 26.666667 | 120 | 0.6375 |
0477dce09b1e1c9c972295a526736ea853619dd3 | 201 | py | Python | src/base.py | mchange/gitlab-migrator | 9ae5779993bb699c050ad6156c1f71f3ae2ddaf9 | [
"MIT"
] | 2 | 2020-02-12T07:49:13.000Z | 2021-03-23T02:58:20.000Z | src/base.py | mchange/gitlab-migrator | 9ae5779993bb699c050ad6156c1f71f3ae2ddaf9 | [
"MIT"
] | null | null | null | src/base.py | mchange/gitlab-migrator | 9ae5779993bb699c050ad6156c1f71f3ae2ddaf9 | [
"MIT"
] | 3 | 2019-11-18T23:49:25.000Z | 2021-03-23T02:58:24.000Z | # -*- coding: utf-8 -*-
import json
| 25.125 | 73 | 0.621891 |
0478b54058cbf70583d9f8984f29751d5b3c1f53 | 1,037 | py | Python | python_start/remove_ad_text.py | ftconan/python3 | eb63ba33960072f792ecce6db809866b38c402f8 | [
"MIT"
] | 1 | 2018-12-19T22:07:56.000Z | 2018-12-19T22:07:56.000Z | python_start/remove_ad_text.py | ftconan/python3 | eb63ba33960072f792ecce6db809866b38c402f8 | [
"MIT"
] | 12 | 2020-03-14T05:32:26.000Z | 2022-03-12T00:08:49.000Z | python_start/remove_ad_text.py | ftconan/python3 | eb63ba33960072f792ecce6db809866b38c402f8 | [
"MIT"
] | 1 | 2018-12-19T22:08:00.000Z | 2018-12-19T22:08:00.000Z | # coding=utf-8
import os
def remove_ad_text(dir2, ad_text):
"""
delete ad text funtion
1. search file and dir, serarch sub_dir, until sub_dir not exist
2. remove ad_text from file
@params: dir2: str dir
ad_text: str content
"""
# dir2 is not dir
if not os.path.isdir(dir2)... | 25.925 | 68 | 0.592093 |
0479290c06cae27f381fab48dfc43d99b4f70b7a | 3,321 | py | Python | modesolverpy/design.py | maederan201/modesolverpy | ebdd70087f8e1c46f36dd7c6ae70ad59d7c38185 | [
"MIT"
] | 48 | 2017-02-20T19:22:08.000Z | 2022-03-27T12:35:08.000Z | modesolverpy/design.py | maederan201/modesolverpy | ebdd70087f8e1c46f36dd7c6ae70ad59d7c38185 | [
"MIT"
] | 6 | 2018-12-10T21:50:51.000Z | 2020-11-04T19:56:19.000Z | modesolverpy/design.py | maederan201/modesolverpy | ebdd70087f8e1c46f36dd7c6ae70ad59d7c38185 | [
"MIT"
] | 23 | 2017-01-04T02:34:47.000Z | 2022-01-26T15:29:27.000Z | import numpy as np
def directional_coupler_lc(wavelength_nm, n_eff_1, n_eff_2):
'''
Calculates the coherence length (100% power transfer) of a
directional coupler.
Args:
wavelength_nm (float): The wavelength in [nm] the
directional coupler should operate at.
n_eff_1 (float... | 27.907563 | 77 | 0.56218 |
0479a79922f195860796d00252e046f9a5fce1d4 | 79,539 | py | Python | PySDDP/newave/script/confhd.py | tscher/PySDDP | ece69b77c951cbb1f046ac184f6fe4fc025ad690 | [
"MIT"
] | 9 | 2021-01-07T13:35:47.000Z | 2022-02-06T14:30:33.000Z | PySDDP/newave/script/confhd.py | AndreMarcato/PySDDP | e6b1e60df6a5598c30552be61b07ed642e46399c | [
"MIT"
] | null | null | null | PySDDP/newave/script/confhd.py | AndreMarcato/PySDDP | e6b1e60df6a5598c30552be61b07ed642e46399c | [
"MIT"
] | 3 | 2021-01-08T11:37:23.000Z | 2021-04-19T15:07:26.000Z | import os
from typing import IO
from PySDDP.newave.script.templates.confhd import ConfhdTemplate
from matplotlib import pyplot as plt
import numpy as np
from random import randint
from mpl_toolkits.mplot3d import Axes3D
| 46.48685 | 156 | 0.517595 |
047d356eac421c64f460f4f1894ac0f1bc1e3d47 | 9,933 | py | Python | RainbowFileReaders/MathHelpers.py | RainbowRedux/RainbowSixFileConverters | 1f755f781ee85af068ba7bcc73d4960998363794 | [
"MIT"
] | 6 | 2020-03-28T14:32:25.000Z | 2022-02-03T00:41:24.000Z | RainbowFileReaders/MathHelpers.py | RainbowRedux/RainbowSixFileConverters | 1f755f781ee85af068ba7bcc73d4960998363794 | [
"MIT"
] | 46 | 2020-03-20T06:27:30.000Z | 2022-03-11T23:36:12.000Z | RainbowFileReaders/MathHelpers.py | RainbowRedux/RainbowSixFileConverters | 1f755f781ee85af068ba7bcc73d4960998363794 | [
"MIT"
] | 4 | 2020-02-09T01:55:44.000Z | 2020-07-22T12:52:43.000Z | """ This module contains a number of useful math related functions that are used throughout this project """
from __future__ import annotations
import math
from typing import List, Union, Tuple
from deprecated import deprecated # type: ignore
AnyNumber = Union[int, float]
FloatIterable = Union[List[float], Tuple[flo... | 34.852632 | 122 | 0.618846 |
047dda6f886d6f540dabf38332a527ce2ae53acf | 8,266 | py | Python | cloudshell/snmp/snmp_parameters.py | QualiSystems/cloudshell-snmp | 9f8c4a927997d69cf85cac2a9bb1c36952d62d99 | [
"Apache-2.0"
] | null | null | null | cloudshell/snmp/snmp_parameters.py | QualiSystems/cloudshell-snmp | 9f8c4a927997d69cf85cac2a9bb1c36952d62d99 | [
"Apache-2.0"
] | 36 | 2016-05-13T08:42:13.000Z | 2021-07-07T13:53:23.000Z | cloudshell/snmp/snmp_parameters.py | QualiSystems/cloudshell-snmp | 9f8c4a927997d69cf85cac2a9bb1c36952d62d99 | [
"Apache-2.0"
] | 5 | 2016-08-05T17:49:21.000Z | 2019-05-28T03:27:22.000Z | import warnings
def get_valid(self):
self.validate()
if self.snmp_private_key_protocol == self.PRIV_NO_PRIV:
self.snmp_private_key = ""
if self.snmp_auth_protocol == self.AUTH_NO_AUTH:
self.snmp_password = ""
return self
class SnmpParametersHelper(objec... | 32.289063 | 119 | 0.612872 |
047ddea5eaf08f1b1d3d02d14ffa8e3bbd12dec7 | 3,543 | py | Python | core/rest/authentication.py | macdaliot/Osmedeus | cd8020416af81a745af7b06c8c5a1c5881911234 | [
"MIT"
] | 1 | 2020-02-20T15:10:07.000Z | 2020-02-20T15:10:07.000Z | core/rest/authentication.py | macdaliot/Osmedeus | cd8020416af81a745af7b06c8c5a1c5881911234 | [
"MIT"
] | null | null | null | core/rest/authentication.py | macdaliot/Osmedeus | cd8020416af81a745af7b06c8c5a1c5881911234 | [
"MIT"
] | null | null | null |
import os
import json
import glob
import datetime
from flask_restful import Api, Resource, reqparse
from flask_jwt_extended import (
JWTManager, jwt_required, create_access_token,
get_jwt_identity
)
from .decorators import local_only
import utils
'''
Check authentication
'''
current_path = os.path.dirname(... | 34.735294 | 137 | 0.593847 |
047e4f48fb6cfecaeedc80f55d630f6e7d7ab8d9 | 1,898 | py | Python | Python2/runEmu.py | johnofleek/OctaveOrp | 2f9eb0dd1b8f2d2e63541496b17f47cf2e2b3e43 | [
"MIT"
] | 1 | 2019-12-20T14:38:57.000Z | 2019-12-20T14:38:57.000Z | Python2/runEmu.py | johnofleek/OctaveOrp | 2f9eb0dd1b8f2d2e63541496b17f47cf2e2b3e43 | [
"MIT"
] | 1 | 2020-03-23T15:16:58.000Z | 2020-03-23T15:16:58.000Z | Python2/runEmu.py | johnofleek/OctaveOrp | 2f9eb0dd1b8f2d2e63541496b17f47cf2e2b3e43 | [
"MIT"
] | null | null | null | import os
from json import dumps
import logging
from platform import platform
from psutil import cpu_percent, virtual_memory
from serial import Serial
from time import sleep
from sb_serial import Sensor, SbSerial
# Change the serial port to suit the machine that this running on
# and the OS
#DEV = os.getenv('DEV', '/... | 26 | 76 | 0.660169 |
047e857f5b6aae8c5a67cbc9e2587c1301cf3673 | 2,800 | py | Python | srxray.py | dfex/srxray | d431e5b58f5eb6a82067027f0aa1810aba2df339 | [
"MIT"
] | null | null | null | srxray.py | dfex/srxray | d431e5b58f5eb6a82067027f0aa1810aba2df339 | [
"MIT"
] | null | null | null | srxray.py | dfex/srxray | d431e5b58f5eb6a82067027f0aa1810aba2df339 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
import argparse
def flattenJunosConfig(JunosConfig):
"""Take a Junos configuration file in bracketed format and flattens it into set format"""
JunosSetConfig=[]
JunosSetLine=['set ']
for line in JunosConfig:
if (line.endswith("{")):
if (line.lstrip().startswith("protec... | 40 | 168 | 0.6975 |
047efb8d4f91b74f19a3af0e601abfa47aafa3ef | 274 | py | Python | tests/conftest.py | mariushelf/sa2django | 936b0a70b0ccc8faf3ca26ff241b0b6dac13f204 | [
"MIT"
] | null | null | null | tests/conftest.py | mariushelf/sa2django | 936b0a70b0ccc8faf3ca26ff241b0b6dac13f204 | [
"MIT"
] | null | null | null | tests/conftest.py | mariushelf/sa2django | 936b0a70b0ccc8faf3ca26ff241b0b6dac13f204 | [
"MIT"
] | null | null | null | import django
import pytest
| 22.833333 | 78 | 0.726277 |
047f8deee5f7a22e959b07e3465a6fa2e08d7775 | 278 | py | Python | client/test.py | Blockchain-Simplified/Blockchain-Simplified | 8770cbf68d1b6ebd85f846b0a88687b041b01ecf | [
"MIT"
] | 9 | 2020-06-27T12:01:24.000Z | 2020-07-01T14:47:50.000Z | client/test.py | Blockchain-Simplified/Blockchain-Simplified | 8770cbf68d1b6ebd85f846b0a88687b041b01ecf | [
"MIT"
] | null | null | null | client/test.py | Blockchain-Simplified/Blockchain-Simplified | 8770cbf68d1b6ebd85f846b0a88687b041b01ecf | [
"MIT"
] | null | null | null | import configFileControl
import uuid
uid = check_and_get_uid()
print(uid) | 19.857143 | 44 | 0.661871 |
047fc0cf6a71b49d6c093c09917af516389bdb89 | 3,862 | py | Python | hanse_ros/xsens_driver/nodes/mtdef.py | iti-luebeck/HANSE2012 | fd2348823a6a51baf87cd493529f085fb22d65a7 | [
"BSD-3-Clause"
] | null | null | null | hanse_ros/xsens_driver/nodes/mtdef.py | iti-luebeck/HANSE2012 | fd2348823a6a51baf87cd493529f085fb22d65a7 | [
"BSD-3-Clause"
] | null | null | null | hanse_ros/xsens_driver/nodes/mtdef.py | iti-luebeck/HANSE2012 | fd2348823a6a51baf87cd493529f085fb22d65a7 | [
"BSD-3-Clause"
] | null | null | null | """Constant and messages definition for MT communication."""
| 24.75641 | 62 | 0.722683 |
0487745f61c3a9a8d9923f5b46f9963da793fbf5 | 2,416 | py | Python | geosquizzy/fsm/selection.py | LowerSilesians/geo-squizzy | 8fff2df9e158c4063ef93d58f60f84e90ad44edd | [
"MIT"
] | 3 | 2016-02-25T07:59:24.000Z | 2016-03-11T12:33:48.000Z | geosquizzy/fsm/selection.py | LowerSilesians/geo-squizzy | 8fff2df9e158c4063ef93d58f60f84e90ad44edd | [
"MIT"
] | 2 | 2016-03-09T12:23:42.000Z | 2016-03-09T21:21:47.000Z | geosquizzy/fsm/selection.py | LowerSilesians/geo-squizzy | 8fff2df9e158c4063ef93d58f60f84e90ad44edd | [
"MIT"
] | null | null | null | # TODO selection percentage pattern works, but run and done methods really slow down
# TODO whole computation when we traverse really big data
# TODO in order to achieve better performance EconomizeFiniteStateMachine class was provided
import math
| 36.059701 | 92 | 0.612997 |
0487933676c70985ff3209d984be6288faf61bfb | 1,641 | py | Python | Machine learning Intermediate/Multiclass classification-75.py | vipmunot/Data-Analysis-using-Python | 34586d8cbbc336508c4a7a68abe14944f1096252 | [
"MIT"
] | null | null | null | Machine learning Intermediate/Multiclass classification-75.py | vipmunot/Data-Analysis-using-Python | 34586d8cbbc336508c4a7a68abe14944f1096252 | [
"MIT"
] | null | null | null | Machine learning Intermediate/Multiclass classification-75.py | vipmunot/Data-Analysis-using-Python | 34586d8cbbc336508c4a7a68abe14944f1096252 | [
"MIT"
] | null | null | null | ## 1. Introduction to the data ##
import pandas as pd
cars = pd.read_csv("auto.csv")
unique_regions = cars['origin'].unique()
print(unique_regions)
## 2. Dummy variables ##
dummy_cylinders = pd.get_dummies(cars["cylinders"], prefix="cyl")
cars = pd.concat([cars, dummy_cylinders], axis=1)
print(cars.head())
dummy_yea... | 28.293103 | 85 | 0.725168 |
0487b20370084158b2727b02d7d10c74a8717694 | 200 | py | Python | fedml-server/executor/conf/__init__.py | MichaelLee-ceo/FedSAUC | 8c00008772213562ff6a07bf9fa92c3831713118 | [
"Apache-2.0"
] | 1 | 2022-03-24T09:14:58.000Z | 2022-03-24T09:14:58.000Z | fedml-server/executor/conf/__init__.py | MichaelLee-ceo/FedSAUC | 8c00008772213562ff6a07bf9fa92c3831713118 | [
"Apache-2.0"
] | null | null | null | fedml-server/executor/conf/__init__.py | MichaelLee-ceo/FedSAUC | 8c00008772213562ff6a07bf9fa92c3831713118 | [
"Apache-2.0"
] | 1 | 2022-03-24T09:15:01.000Z | 2022-03-24T09:15:01.000Z | # -*- coding: utf-8 -*-n
import os
from fedml_mobile.server.executor.conf.env import EnvWrapper
ENV = EnvWrapper(os.path.abspath(os.path.dirname(os.path.dirname(__file__))), True, 'TrainingExecutor')
| 40 | 103 | 0.76 |
048994f00ef5cca104a05540183dcb3e001d3085 | 1,109 | py | Python | fatima/utils/viz.py | AmrMKayid/fatima | 9ee5365889bca8bc05a84eb4130b9357a8177366 | [
"MIT"
] | null | null | null | fatima/utils/viz.py | AmrMKayid/fatima | 9ee5365889bca8bc05a84eb4130b9357a8177366 | [
"MIT"
] | null | null | null | fatima/utils/viz.py | AmrMKayid/fatima | 9ee5365889bca8bc05a84eb4130b9357a8177366 | [
"MIT"
] | null | null | null | import glob
import os
import subprocess
import time
import matplotlib.pyplot as plt
import numpy
import torch
| 24.644444 | 79 | 0.63661 |
048cf0cb812c8d176a678de93a58e527977e8fbf | 364 | py | Python | scripts/cutadapt.py | CollinJ0/NNK | ed2ca89d2fa98e8de818609f2dccd7ee43601329 | [
"MIT"
] | null | null | null | scripts/cutadapt.py | CollinJ0/NNK | ed2ca89d2fa98e8de818609f2dccd7ee43601329 | [
"MIT"
] | null | null | null | scripts/cutadapt.py | CollinJ0/NNK | ed2ca89d2fa98e8de818609f2dccd7ee43601329 | [
"MIT"
] | null | null | null | from Bio import SeqIO
from subprocess import Popen, PIPE
adapters = [str(s.seq) for s in SeqIO.parse(open(snakemake.input[1], 'r'), 'fasta')]
adapters = '-b ' + ' -b '.join(adapters)
cutadapt_cmd = f"cutadapt -o {snakemake.output[0]} {adapters} {snakemake.input[0]}"
p = Popen(cutadapt_cmd, stdout=PIPE, stderr=PIPE, ... | 36.4 | 84 | 0.706044 |
048cf13a20959c26ee66d61ced9969ea71a64c13 | 2,948 | py | Python | packages/SwingSet/misc-tools/mint-gca.py | danwt/agoric-sdk | e0f7ee8884648973c63bbcae587ea36e51f58a64 | [
"Apache-2.0"
] | 4 | 2019-11-02T17:15:28.000Z | 2019-11-02T21:32:18.000Z | packages/SwingSet/misc-tools/mint-gca.py | danwt/agoric-sdk | e0f7ee8884648973c63bbcae587ea36e51f58a64 | [
"Apache-2.0"
] | 1 | 2019-11-03T02:14:09.000Z | 2019-11-04T19:35:40.000Z | packages/SwingSet/misc-tools/mint-gca.py | danwt/agoric-sdk | e0f7ee8884648973c63bbcae587ea36e51f58a64 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys, json, time, hashlib, base64
from collections import defaultdict
# vat-mint (v5) .getCurrentAmount is a really simple method: it looks up a
# Presence in a WeakMap, and returns the value. The only syscall it makes is
# the resolve. There are four timestamps of interest:
# A: delivery ... | 34.682353 | 88 | 0.608887 |
048d5fb7a39c71bf4143cf0fb3bc1bee84101d57 | 4,648 | py | Python | tweetbot-d.py | mc3k/tweetbot | cc9798b8dab5d18f0616171b1af105d3e8a168b3 | [
"MIT"
] | null | null | null | tweetbot-d.py | mc3k/tweetbot | cc9798b8dab5d18f0616171b1af105d3e8a168b3 | [
"MIT"
] | null | null | null | tweetbot-d.py | mc3k/tweetbot | cc9798b8dab5d18f0616171b1af105d3e8a168b3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, os, logging, urllib
import xml.etree.ElementTree
from twython import TwythonStreamer, Twython
from daemon3x import daemon
# Logging
logging.basicConfig(filename='tweetbot.log',
filemode='a',
format='[%(asctime)s] %(message)s',
datefmt='%Y/%m/%... | 34.947368 | 175 | 0.629948 |
048dced6e20cee4469dff32aab16aa9ac5f26c72 | 1,715 | py | Python | inheritance/demo_inheritance.py | Minkov/python-oop-2020-06 | 63b830a42b7abfac5bee576a81ee7626c47a80bc | [
"MIT"
] | 3 | 2020-07-04T11:32:42.000Z | 2020-08-14T08:43:25.000Z | inheritance/demo_inheritance.py | Minkov/python-oop-2020-06 | 63b830a42b7abfac5bee576a81ee7626c47a80bc | [
"MIT"
] | null | null | null | inheritance/demo_inheritance.py | Minkov/python-oop-2020-06 | 63b830a42b7abfac5bee576a81ee7626c47a80bc | [
"MIT"
] | 2 | 2020-07-09T07:17:37.000Z | 2021-02-22T22:55:52.000Z | from mixins.debug_attributes_setter_mixin import DebugAttributesSetterMixin
#
Person('John the Person', 18).eat()
Student('John the Student', 18, 3).eat()
Employee('John the Employee', 18, 'SoftUni', 100000).eat()
# student = Student('Pesho', 8, 2)
# print(student)
# student.get_greeting2()
| 23.175676 | 76 | 0.602915 |
048e21a34122d250073c40e802c888ac73a5c8e4 | 602 | py | Python | src/program/migrations/0079_eventinstance_uuid.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/program/migrations/0079_eventinstance_uuid.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/program/migrations/0079_eventinstance_uuid.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | # Generated by Django 3.0.3 on 2020-02-22 13:59
import uuid
from django.db import migrations, models
| 23.153846 | 104 | 0.55814 |
048ec0bed692ae0c4685a4dd783ffc41b793e182 | 928 | py | Python | scripts/download_sandana_datasets.py | ohsu-comp-bio/cycIF-DB | 57cc27ef09e3cb22d1660a3271ad22994fdf16b9 | [
"MIT"
] | null | null | null | scripts/download_sandana_datasets.py | ohsu-comp-bio/cycIF-DB | 57cc27ef09e3cb22d1660a3271ad22994fdf16b9 | [
"MIT"
] | null | null | null | scripts/download_sandana_datasets.py | ohsu-comp-bio/cycIF-DB | 57cc27ef09e3cb22d1660a3271ad22994fdf16b9 | [
"MIT"
] | null | null | null | """ Download datasets from SANDANA samples from Galaxy server.
python scripts/download_sandana_datasets.py --help
"""
import argparse
import logging
from cycif_db.galaxy_download import download_sandana
parser = argparse.ArgumentParser()
parser.add_argument(
'--server', '-s', type=str, dest='server', required=F... | 29.935484 | 76 | 0.728448 |
048ff5bd2b8df060a13293cecf1d4c55f4c69fee | 18,632 | py | Python | diffxpy/unit_test/test_single.py | SabrinaRichter/diffxpy | 8eff054ca3ce097533134f490aac3580431eee15 | [
"BSD-3-Clause"
] | null | null | null | diffxpy/unit_test/test_single.py | SabrinaRichter/diffxpy | 8eff054ca3ce097533134f490aac3580431eee15 | [
"BSD-3-Clause"
] | null | null | null | diffxpy/unit_test/test_single.py | SabrinaRichter/diffxpy | 8eff054ca3ce097533134f490aac3580431eee15 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import logging
import numpy as np
import pandas as pd
import scipy.stats as stats
from batchglm.api.models.glm_nb import Simulator
import diffxpy.api as de
if __name__ == '__main__':
unittest.main()
| 39.474576 | 108 | 0.63713 |
0491a9bac3f9e8e3712a63584b3e8fad3b4db70a | 988 | py | Python | decode/PNG_CRC32.py | SkyLined/headsup | 8c07c0a4b90c5fad2c208a88bd2b2fc12ecadea4 | [
"Apache-2.0"
] | 1 | 2021-01-30T07:32:28.000Z | 2021-01-30T07:32:28.000Z | decode/PNG_CRC32.py | SkyLined/headsup | 8c07c0a4b90c5fad2c208a88bd2b2fc12ecadea4 | [
"Apache-2.0"
] | null | null | null | decode/PNG_CRC32.py | SkyLined/headsup | 8c07c0a4b90c5fad2c208a88bd2b2fc12ecadea4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 29.939394 | 75 | 0.656883 |
0491c2d77117bdd518d1a98b202acf3807e7a73d | 9,004 | py | Python | buildz/toolchain/gcc.py | patrykbajos/buildz | f3e73bdf2fd254ca2568607994919411e0f6e67c | [
"MIT"
] | null | null | null | buildz/toolchain/gcc.py | patrykbajos/buildz | f3e73bdf2fd254ca2568607994919411e0f6e67c | [
"MIT"
] | null | null | null | buildz/toolchain/gcc.py | patrykbajos/buildz | f3e73bdf2fd254ca2568607994919411e0f6e67c | [
"MIT"
] | null | null | null | import os.path
import re
import platform
import subprocess
from copy import deepcopy
from pathlib import Path
from schema import Optional, Schema, SchemaError, Or
from buildz.toolchain.generic import GenericToolchain
from buildz.utils import find_re_it_in_list, get_cmd_matches, merge, merge_envs, resolve_rel_paths_li... | 32.505415 | 113 | 0.56275 |
04931ff5e6574df3113dcf736a73cbeafd8f9983 | 2,209 | py | Python | app/src/models/calculation.py | beerjoa/flask-restplus-skeleton | efa221a00620746c9b7227d3840b2a43d788db1b | [
"Apache-2.0"
] | 1 | 2021-02-03T03:30:00.000Z | 2021-02-03T03:30:00.000Z | app/src/models/calculation.py | beerjoa/flask-restplus-skeleton | efa221a00620746c9b7227d3840b2a43d788db1b | [
"Apache-2.0"
] | null | null | null | app/src/models/calculation.py | beerjoa/flask-restplus-skeleton | efa221a00620746c9b7227d3840b2a43d788db1b | [
"Apache-2.0"
] | null | null | null | from .. import db
from .base import Base, BaseSchema
from typing import Dict, Union
from datetime import datetime
| 29.453333 | 106 | 0.560887 |
04966909614617bd9595c089c1d8b8ffe8d5c4d4 | 1,440 | py | Python | isic_grabber/src/web_helper.py | stamas02/isic_grabber | 8e5ef1f37dae6f44b71fa8ca630ac8f693430752 | [
"MIT"
] | null | null | null | isic_grabber/src/web_helper.py | stamas02/isic_grabber | 8e5ef1f37dae6f44b71fa8ca630ac8f693430752 | [
"MIT"
] | null | null | null | isic_grabber/src/web_helper.py | stamas02/isic_grabber | 8e5ef1f37dae6f44b71fa8ca630ac8f693430752 | [
"MIT"
] | null | null | null | import requests
import os
from tqdm import tqdm
import sys
def get_json(url):
"""
Gets a json response from the given url.
:param url: URL.
:return: the received Json data.
"""
resp = requests.get(url=url)
return resp.json()
def get_file(url, output_file, show_progress_bar=True):
""... | 28.8 | 83 | 0.622222 |
04997bbebf6e42ca1e1135bb954c7849e8c75cdf | 713 | py | Python | fuyuzi/artword.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | fuyuzi/artword.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | fuyuzi/artword.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | # coding=utf-8
import random
import sys
import pygame
from pygame.color import THECOLORS
pygame.init()
screen = pygame.display.set_mode([640, 480])
screen.fill([255, 255, 255])
for i in range(0, 100):
width = random.randint(0, 250)
height = random.randint(0, 100)
top = random.randint(0, 400)
left =... | 21.606061 | 75 | 0.673212 |
04997ff2d198e72c0cfde245e8c3f1845b810b35 | 1,467 | py | Python | lesson10/qiangshihong/users/forms.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson10/qiangshihong/users/forms.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson10/qiangshihong/users/forms.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# author: qsh
from django import forms
from django.contrib.auth.models import Group, Permission
from .models import UserProfile
import re
#
#
"""
UserProfileFormmodel
username=aaUserProfileForm
""" | 26.672727 | 65 | 0.636673 |
0499956a25f0758cec57f99ade8ce442a3a58b56 | 2,913 | py | Python | lgbm_plugin.py | truelatysh/unsorted_python_staff | a937707f400f0334f1d56b2fbd3f6749cf2ed6e3 | [
"MIT"
] | 1 | 2020-11-20T21:41:03.000Z | 2020-11-20T21:41:03.000Z | lgbm_plugin.py | truelatysh/unsorted_python_staff | a937707f400f0334f1d56b2fbd3f6749cf2ed6e3 | [
"MIT"
] | null | null | null | lgbm_plugin.py | truelatysh/unsorted_python_staff | a937707f400f0334f1d56b2fbd3f6749cf2ed6e3 | [
"MIT"
] | 1 | 2019-06-10T11:31:56.000Z | 2019-06-10T11:31:56.000Z | """
Tool for 'leave-one-out' testing features in dataset.
Adds use_column parameter for lightgbm CLI, which works
like an opposite one to ignore_columns.
Example usage
--------------
>>> python lgbm_tool.py --use_column=column1,column2,column3 \
>>> config=path_to_config data=path_to_data valid=pat... | 26.481818 | 83 | 0.651219 |
049a005b96a52797a15d88dec327f267e14f4272 | 651 | py | Python | kive/portal/apps.py | cfe-lab/Kive | e46b9eb40f085d579c12f47b6b5696d5ee93a9d3 | [
"BSD-3-Clause"
] | 2 | 2016-10-02T18:24:53.000Z | 2019-01-19T09:37:56.000Z | kive/portal/apps.py | dmacmillan/Kive | 76bc8f289f66fb133f78cb6d5689568b7d015915 | [
"BSD-3-Clause"
] | 1,190 | 2015-07-10T22:57:23.000Z | 2022-03-30T05:10:14.000Z | kive/portal/apps.py | dmacmillan/Kive | 76bc8f289f66fb133f78cb6d5689568b7d015915 | [
"BSD-3-Clause"
] | 2 | 2019-07-16T00:25:25.000Z | 2019-11-25T16:32:58.000Z | import logging
import sys
from django.apps import AppConfig
from django.conf import settings
logger = logging.getLogger(__name__)
| 29.590909 | 77 | 0.655914 |
049afbb984009ea06474ce34e8657c76529b4597 | 533 | py | Python | setup.py | getyourguide/image-quality-assessment | 6e61ca2d2627e5c16a648db4097519936d86b604 | [
"Apache-2.0"
] | null | null | null | setup.py | getyourguide/image-quality-assessment | 6e61ca2d2627e5c16a648db4097519936d86b604 | [
"Apache-2.0"
] | null | null | null | setup.py | getyourguide/image-quality-assessment | 6e61ca2d2627e5c16a648db4097519936d86b604 | [
"Apache-2.0"
] | null | null | null | import setuptools
setuptools.setup(
name="image-quality-assessment",
version="0.0.1",
author="gdp",
author_email="engineering.data-products@getyourguide.com",
description="TBD",
long_description_content_type="text/markdown",
url="https://github.com/getyourguide/image-quality-assessment",
... | 29.611111 | 73 | 0.660413 |
049de3c3ae505666b492be50e8f1cba6b6c01fc0 | 2,234 | py | Python | seq2seq-translation/model.py | StanleyLsx/practical-pytorch | ccc9ebad47ca6763c04dbb8574769cfe3f1acdde | [
"MIT"
] | null | null | null | seq2seq-translation/model.py | StanleyLsx/practical-pytorch | ccc9ebad47ca6763c04dbb8574769cfe3f1acdde | [
"MIT"
] | 2 | 2021-06-08T22:12:46.000Z | 2022-01-13T03:11:10.000Z | seq2seq-translation/model.py | StanleyLsx/practical-pytorch | ccc9ebad47ca6763c04dbb8574769cfe3f1acdde | [
"MIT"
] | null | null | null | import torch.nn.functional as F
from torch import nn, zeros, cat, bmm
from data import MAX_LENGTH
| 35.460317 | 87 | 0.660698 |
049e902695b3f12dc0159bb3ea84ccc388a6852b | 4,478 | py | Python | lib/utils/convert.py | lin-zju/descriptor-space | 7b6aaa6ed710d7e3b097b0097c01f4562df75c59 | [
"MIT"
] | null | null | null | lib/utils/convert.py | lin-zju/descriptor-space | 7b6aaa6ed710d7e3b097b0097c01f4562df75c59 | [
"MIT"
] | 5 | 2021-03-19T04:29:29.000Z | 2022-03-12T00:01:54.000Z | lib/utils/convert.py | lin-zju/descriptor-space | 7b6aaa6ed710d7e3b097b0097c01f4562df75c59 | [
"MIT"
] | null | null | null | import torch
import numpy as np
import cv2
def tonumpyimg(img):
"""
Convert a normalized tensor image to unnormalized uint8 numpy image
For single channel image, no unnormalization is done.
:param img: torch, normalized, (3, H, W), (H, W)
:return: numpy: (H, W, 3), (H, W). uint8
"""
... | 23.946524 | 82 | 0.566994 |
049f5f9f41f902d0b150f604248f0afb878c2c27 | 1,490 | py | Python | setup.py | radionets-project/vipy | 792b43b77e56d085c649942180f7b83383cba73d | [
"MIT"
] | null | null | null | setup.py | radionets-project/vipy | 792b43b77e56d085c649942180f7b83383cba73d | [
"MIT"
] | 10 | 2021-02-11T08:41:40.000Z | 2021-12-01T14:59:18.000Z | setup.py | radionets-project/vipy | 792b43b77e56d085c649942180f7b83383cba73d | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="vipy",
version="0.0.3",
description="Simulate radio interferometer observations and visibility generation.",
url="https://github.com/radionets-project/vipy",
author="Kevin Schmidt, Felix Geyer, Stefan Frse",
author_email="kevin3.schmidt@t... | 31.702128 | 88 | 0.587919 |
04a0d2b92a66841497b189be82e766ad06751727 | 9,152 | py | Python | nicos/devices/taco/axis.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-03-26T10:30:45.000Z | 2021-03-26T10:30:45.000Z | nicos/devices/taco/axis.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos/devices/taco/axis.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 3 | 2020-08-04T18:35:05.000Z | 2021-04-16T11:22:08.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 37.052632 | 88 | 0.631556 |
04a0f7c8e73bfcce9651c7db2dfb5842e9c8d12d | 6,921 | py | Python | rings/1round/rings.py | dendaxD/QAOA-MaxCut-amplitudes | 02f070b7113770cfccc28b8870a394c3883c2ad1 | [
"MIT"
] | null | null | null | rings/1round/rings.py | dendaxD/QAOA-MaxCut-amplitudes | 02f070b7113770cfccc28b8870a394c3883c2ad1 | [
"MIT"
] | null | null | null | rings/1round/rings.py | dendaxD/QAOA-MaxCut-amplitudes | 02f070b7113770cfccc28b8870a394c3883c2ad1 | [
"MIT"
] | null | null | null | import subprocess
from os import system, remove, chdir
from tabulate import tabulate
# label is used to unambiguously identify a group
#THE MOST IMPORTANT
start = 3
end = 16
with open('result.txt', 'w') as f:#to delete any content
pass
with open('amplitudes.txt', 'w') as f:#to create the file
pass... | 28.599174 | 298 | 0.592978 |
04a2b7c40d808c8f08236d901bdbc56a016a0488 | 3,162 | py | Python | SNMP/pycopia/SNMP/Stripcharts.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 89 | 2015-03-26T11:25:20.000Z | 2022-01-12T06:25:14.000Z | SNMP/pycopia/SNMP/Stripcharts.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 1 | 2015-07-05T03:27:43.000Z | 2015-07-11T06:21:20.000Z | SNMP/pycopia/SNMP/Stripcharts.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 30 | 2015-04-30T01:35:54.000Z | 2022-01-12T06:19:49.000Z | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... | 28.232143 | 92 | 0.631879 |
04a2d378269cca4d4cf2daaa834242bda91b7548 | 227 | py | Python | src/views/constants_view.py | philherrmann/httpchallenge | 83134e2ac36d2016199dca2e74e79a98e532141d | [
"Unlicense"
] | null | null | null | src/views/constants_view.py | philherrmann/httpchallenge | 83134e2ac36d2016199dca2e74e79a98e532141d | [
"Unlicense"
] | null | null | null | src/views/constants_view.py | philherrmann/httpchallenge | 83134e2ac36d2016199dca2e74e79a98e532141d | [
"Unlicense"
] | null | null | null | FORMAT_MSG_HIGH_ALERT = "High traffic generated an alert - hits = %s, triggered at %s"
FORMAT_MSG_RECOVERED_ALERT = "Traffic recovered - hits = %s, triggered at %s"
HIGHEST_HITS_HEADER = "Highest hits"
ALERTS_HEADER = "Alerts"
| 45.4 | 86 | 0.762115 |
04a3f4f95a94a851179c212da4772f3975af4698 | 1,625 | py | Python | base_model.py | pomonam/Self-Tuning-Networks | 3fa949bb1da5beb2b4e7f1d07a26b819b42ad7f3 | [
"MIT"
] | 44 | 2020-10-27T03:00:38.000Z | 2022-02-24T10:47:15.000Z | base_model.py | pomonam/Self-Tuning-Networks | 3fa949bb1da5beb2b4e7f1d07a26b819b42ad7f3 | [
"MIT"
] | 2 | 2021-01-22T11:17:45.000Z | 2021-03-14T13:22:38.000Z | base_model.py | pomonam/Self-Tuning-Networks | 3fa949bb1da5beb2b4e7f1d07a26b819b42ad7f3 | [
"MIT"
] | 7 | 2020-10-27T07:05:26.000Z | 2021-06-16T01:33:01.000Z | from abc import ABCMeta
from layers.linear import *
from layers.conv2d import *
import torch.nn as nn
# Add custom layers here.
_STN_LAYERS = [StnLinear, StnConv2d]
| 31.25 | 73 | 0.598769 |
04a4292f7cf69e241515db2ae607573621a94ac2 | 3,610 | py | Python | mnist.py | huisedenanhai/Torch-Baker | e02805e659327554e16b1f233792109990ac300d | [
"MIT"
] | 3 | 2018-09-14T08:40:27.000Z | 2019-06-12T14:54:07.000Z | mnist.py | huisedenanhai/Torch-Baker | e02805e659327554e16b1f233792109990ac300d | [
"MIT"
] | null | null | null | mnist.py | huisedenanhai/Torch-Baker | e02805e659327554e16b1f233792109990ac300d | [
"MIT"
] | null | null | null | from torchvision import datasets
import torchbaker as tb
from torch import nn, optim
from torch.utils.data import DataLoader
from torchvision.transforms import Compose, ToTensor, Normalize
import torch.nn.functional as F
if __name__ == '__main__':
b = tb.Baker()
b.prepare_recipe(MNISTRecipe())
b.train()... | 38 | 119 | 0.590028 |
04a67ebc35b4f07f80f0f7f2893f69b1c95e51a4 | 721 | py | Python | pvapy/pvaPyProblem.py | mrkraimer/testPvaPy | 7d09095bc76bf0a86d8d664c85757ab8369485c8 | [
"MIT"
] | null | null | null | pvapy/pvaPyProblem.py | mrkraimer/testPvaPy | 7d09095bc76bf0a86d8d664c85757ab8369485c8 | [
"MIT"
] | 1 | 2020-07-18T19:50:51.000Z | 2020-07-19T09:58:16.000Z | pvapy/pvaPyProblem.py | mrkraimer/testPvaPy | 7d09095bc76bf0a86d8d664c85757ab8369485c8 | [
"MIT"
] | 2 | 2020-07-18T18:06:57.000Z | 2020-09-10T06:40:34.000Z | from pvapy import Channel, CA, PvTimeStamp, PvAlarm
print('DBRdouble')
channel = Channel('DBRdouble')
timestamp = PvTimeStamp(10, 100)
alarm = PvAlarm(1,1,"mess")
print(channel.get('value'))
print('here 1')
channel.put(alarm,'record[process=false]field(alarm)')
print('here 2')
print(channel.get('value'))
channel.put(ti... | 27.730769 | 62 | 0.736477 |
04a85192c223afca54121d60e415bd78114d791a | 459 | py | Python | Balsn_CTF_2019/Need_some_flags/solution/Need_some_flags_2_exp.py | sces60107/My-CTF-Challenges | 85fe38f31b416e232e5c6ea80eb7a9c69cb5dd5f | [
"MIT"
] | 3 | 2019-10-11T15:45:23.000Z | 2019-10-16T05:42:32.000Z | Balsn_CTF_2019/Need_some_flags/solution/Need_some_flags_2_exp.py | sces60107/My-CTF-Challenges | 85fe38f31b416e232e5c6ea80eb7a9c69cb5dd5f | [
"MIT"
] | null | null | null | Balsn_CTF_2019/Need_some_flags/solution/Need_some_flags_2_exp.py | sces60107/My-CTF-Challenges | 85fe38f31b416e232e5c6ea80eb7a9c69cb5dd5f | [
"MIT"
] | null | null | null | from pwn import *
import hashlib
r=remote("18.205.38.120",10122)
## pow
temp=r.recvuntil("sha256( ")
prefix=r.recvline().split()[0]
i=0
while True:
data=prefix+str(i)
Hash=hashlib.sha256(data)
if Hash.hexdigest()[:5]=="0"*5:
r.sendline(str(i))
break
i+=1
## get flag
r.sendline("0")
r.sendline("syste... | 15.827586 | 33 | 0.655773 |
04a864f819eacebdc5dcb47f669f30a4f94a85d2 | 4,421 | py | Python | hnn/src/apps/training_utils.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 2,075 | 2019-02-25T08:54:38.000Z | 2022-03-31T10:44:50.000Z | hnn/src/apps/training_utils.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 176 | 2019-03-12T02:58:42.000Z | 2022-03-22T20:17:23.000Z | hnn/src/apps/training_utils.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 437 | 2019-03-11T21:36:21.000Z | 2022-03-29T02:40:53.000Z | #
# Author: penhe@microsoft.com
# Date: 01/25/2019
#
""" Utils for training and optimization
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import utils
logger=utils.get_logger()
import numpy as np
import torch
from bert.optimization import BertAdam
d... | 37.786325 | 111 | 0.683103 |
04a8f1e9519e4c6ba6d356c5c2d842492bb0fa06 | 1,020 | py | Python | setup.py | SomeHybrid/mineid | b05216541b9c29a15fa6bbbd95531fed7b43f184 | [
"MIT"
] | null | null | null | setup.py | SomeHybrid/mineid | b05216541b9c29a15fa6bbbd95531fed7b43f184 | [
"MIT"
] | null | null | null | setup.py | SomeHybrid/mineid | b05216541b9c29a15fa6bbbd95531fed7b43f184 | [
"MIT"
] | null | null | null | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import mineid
import pathlib
HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()
setup(
name=mineid.__name__,
version=mineid.__version__,
description="A small Python library for gettin... | 30.909091 | 70 | 0.640196 |
04a96fdf4942d571969168bae0c819b41a089652 | 98 | py | Python | alyBlog/apps/news/templatetags/__init__.py | Hx-someone/aly-blog | e0205777d2ff1642fde5741a5b5c1b06ad675001 | [
"WTFPL"
] | 1 | 2020-04-17T02:15:45.000Z | 2020-04-17T02:15:45.000Z | alyBlog/apps/news/templatetags/__init__.py | Hx-someone/aly-blog | e0205777d2ff1642fde5741a5b5c1b06ad675001 | [
"WTFPL"
] | null | null | null | alyBlog/apps/news/templatetags/__init__.py | Hx-someone/aly-blog | e0205777d2ff1642fde5741a5b5c1b06ad675001 | [
"WTFPL"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Time : 2020/3/2 14:38
@Author :
@File : __init__.py.py
""" | 16.333333 | 25 | 0.5 |
04aabd1a2b734333abe07b14dd34de67181fcaa1 | 1,812 | py | Python | sdk2-src/src/azure-ml/azure/ml/_schema/job/base_job.py | DamovisaOrg/azureml-v2-preview | 9c5ed1003c19f4d5b19dbea4a7c507e101149139 | [
"MIT"
] | 1 | 2021-09-27T07:54:40.000Z | 2021-09-27T07:54:40.000Z | sdk2-src/src/azure-ml/azure/ml/_schema/job/base_job.py | DamovisaOrg/azureml-v2-preview | 9c5ed1003c19f4d5b19dbea4a7c507e101149139 | [
"MIT"
] | null | null | null | sdk2-src/src/azure-ml/azure/ml/_schema/job/base_job.py | DamovisaOrg/azureml-v2-preview | 9c5ed1003c19f4d5b19dbea4a7c507e101149139 | [
"MIT"
] | null | null | null | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from marshmallow import fields
from typing import Dict, Optional, Any
from ..schema import PatchedNested, PathAwareSchema
from .job_me... | 35.529412 | 97 | 0.601545 |
04aae94324251ab7446281affd01bef3e2675193 | 1,926 | py | Python | CCICApp/models.py | kiddhmh/DjangoSpiders | e14b88305acf769f344ef910c238bf55afbec273 | [
"MIT"
] | 2 | 2018-04-19T02:51:05.000Z | 2019-08-12T03:23:31.000Z | CCICApp/models.py | kiddhmh/DjangoSpiders | e14b88305acf769f344ef910c238bf55afbec273 | [
"MIT"
] | 1 | 2018-04-23T06:45:45.000Z | 2018-04-23T06:45:45.000Z | CCICApp/models.py | kiddhmh/DjangoSpiders | e14b88305acf769f344ef910c238bf55afbec273 | [
"MIT"
] | 1 | 2018-04-23T02:12:33.000Z | 2018-04-23T02:12:33.000Z | from django.db import models
# Model
# Model
#Model
| 38.52 | 68 | 0.724818 |
04ab050153e6c6a9c772495f8dcd2968d082dcec | 26 | py | Python | mpids/utils/__init__.py | edgargabriel/mpids | 170f402ecea5af0db4eee39e8d426884dce12ad6 | [
"BSD-2-Clause"
] | 1 | 2020-01-22T03:27:31.000Z | 2020-01-22T03:27:31.000Z | mpids/utils/__init__.py | jrodgers01d/mpids | f771b1d25eba5f5dc8e30e5d86ee0251775b9da1 | [
"BSD-2-Clause"
] | 1 | 2020-05-04T20:25:55.000Z | 2020-05-04T20:25:55.000Z | mpids/utils/__init__.py | jrodgers01d/mpids | f771b1d25eba5f5dc8e30e5d86ee0251775b9da1 | [
"BSD-2-Clause"
] | 2 | 2019-04-08T03:01:31.000Z | 2020-04-27T15:56:28.000Z | from .ParallelIO import *
| 13 | 25 | 0.769231 |
04ac6cd8e960e66674caeff48d0f84f62f95e2a7 | 1,610 | py | Python | stats/offense.py | itsjessie/Python-Baseball | cc91f96bb5c9d4c497ef0fb780ea7088f5d57532 | [
"MIT"
] | null | null | null | stats/offense.py | itsjessie/Python-Baseball | cc91f96bb5c9d4c497ef0fb780ea7088f5d57532 | [
"MIT"
] | null | null | null | stats/offense.py | itsjessie/Python-Baseball | cc91f96bb5c9d4c497ef0fb780ea7088f5d57532 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
from data import games
plays = games[games['type']=='play']
plays.columns= ['type','inning','team', 'player', 'count','pitches','event', 'game_id', 'year']
#print (plays)
hits = plays.loc[plays['event'].str.contains('^(?:S(?!B)|D|T|HR)'), ['inning','event']]
#print... | 29.272727 | 95 | 0.675155 |
04ae32bfd283c4f66f4c1d22537b66c3e64ceea5 | 1,411 | py | Python | app.py | nunezraf/Web_Scraping_and_Document_Databases | 48e29d8efd8dcede898c14910be708fd50b31520 | [
"ADSL"
] | null | null | null | app.py | nunezraf/Web_Scraping_and_Document_Databases | 48e29d8efd8dcede898c14910be708fd50b31520 | [
"ADSL"
] | null | null | null | app.py | nunezraf/Web_Scraping_and_Document_Databases | 48e29d8efd8dcede898c14910be708fd50b31520 | [
"ADSL"
] | null | null | null | # import necessary libraries
from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_marsdata
from pymongo import MongoClient
# create instance of Flask app
app = Flask(__name__)
# Use flask_pymongo to set up mongo connection
# conn = "mongodb://localhost:27017"
# client = p... | 23.516667 | 78 | 0.705174 |
04ae5dd12facb29dcebed0d6a8a168e5d91756ab | 1,580 | py | Python | src/python/backends/py/sprite/__init__.py | andyjost/Sprite | 7ecd6fc7d48d7f62da644e48c12c7b882e1a2929 | [
"MIT"
] | 1 | 2022-03-16T16:37:11.000Z | 2022-03-16T16:37:11.000Z | src/python/backends/py/sprite/__init__.py | andyjost/Sprite | 7ecd6fc7d48d7f62da644e48c12c7b882e1a2929 | [
"MIT"
] | null | null | null | src/python/backends/py/sprite/__init__.py | andyjost/Sprite | 7ecd6fc7d48d7f62da644e48c12c7b882e1a2929 | [
"MIT"
] | null | null | null | '''Python wrappers for libsprite.so.'''
from ._sprite import *
import itertools, six
from six.moves import range
def Fingerprint__reduce__(self):
return Fingerprint, (), None, None, self.__iter__()
def Fingerprint__eq__(self, rhs):
return all(a==b for a,b in six.moves.zip_longest(self, rhs))
def Fingerprint__ne... | 26.333333 | 64 | 0.723418 |
04aee285ad9704ea422fad685253b027b45714b9 | 5,306 | py | Python | source/appModules/msimn.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | source/appModules/msimn.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | source/appModules/msimn.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | #appModules/msimn.py - Outlook Express appModule
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2012 NVDA Contributors
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import winUser
import controlTypes
import displayModel
import textInfos
import api
impo... | 40.19697 | 158 | 0.784583 |
04af3be462be49c77cf685b5d006bc72dfdb498a | 800 | py | Python | week6/w6e1.py | melphick/pybasics | 68508d10b7509943b629b3c627252de60b6a5744 | [
"Apache-2.0"
] | null | null | null | week6/w6e1.py | melphick/pybasics | 68508d10b7509943b629b3c627252de60b6a5744 | [
"Apache-2.0"
] | null | null | null | week6/w6e1.py | melphick/pybasics | 68508d10b7509943b629b3c627252de60b6a5744 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""
A function that returns the multiplication product of three parameters--x, y,
and z has a default value of 1.
a. Call the function with all positional arguments.
b. Call the function with all named arguments.
c. Call the function with a mix of positional and named arguments.
d. Call the function ... | 26.666667 | 82 | 0.7475 |
04b208c0018a77551987b20158335a222e056ca1 | 597 | py | Python | bert/gelu.py | deepdialog/tf2bert | 6b48dd9ade1d5c364805d35c63e7fccf893f5960 | [
"MIT"
] | null | null | null | bert/gelu.py | deepdialog/tf2bert | 6b48dd9ade1d5c364805d35c63e7fccf893f5960 | [
"MIT"
] | 1 | 2021-09-02T12:54:20.000Z | 2021-09-02T12:54:20.000Z | bert/gelu.py | deepdialog/tf2bert | 6b48dd9ade1d5c364805d35c63e7fccf893f5960 | [
"MIT"
] | null | null | null | import math
import tensorflow as tf
def gelu(x):
"""Gaussian Error Linear Unit.
This is a smoother version of the RELU.
Original paper: https://arxiv.org/abs/1606.08415
Args:
x: float Tensor to perform activation.
Returns:
`x` with the GELU activation applied.
"""
cdf = 0.5 * (1.0 + tf.tanh(... | 20.586207 | 66 | 0.606365 |
04b360ef9cb1138d4eaa028383611e0fffa3ee21 | 7,716 | py | Python | calorimeter/plot.py | jevandezande/dsc | 482b32026bd769a0fe0b20750e051e356f1fcdac | [
"MIT"
] | null | null | null | calorimeter/plot.py | jevandezande/dsc | 482b32026bd769a0fe0b20750e051e356f1fcdac | [
"MIT"
] | null | null | null | calorimeter/plot.py | jevandezande/dsc | 482b32026bd769a0fe0b20750e051e356f1fcdac | [
"MIT"
] | null | null | null | import numpy as np
from itertools import cycle
import matplotlib
import matplotlib.pyplot as plt
from .tools import y_at_x
def plotter(
scans,
title=None, style=None,
baseline_subtracted=False, set_zero=False, normalized=False, smoothed=False, peaks=None,
derivative=None,
plot=None,
xlim=No... | 33.402597 | 111 | 0.651503 |
04b40feb5f75992b5a145a00b4bdb91155e08e55 | 55 | py | Python | currency/__init__.py | p4l1ly/currency | 787dfa0bad0ba8c8663631bc18ee57d0b74552c4 | [
"MIT"
] | null | null | null | currency/__init__.py | p4l1ly/currency | 787dfa0bad0ba8c8663631bc18ee57d0b74552c4 | [
"MIT"
] | null | null | null | currency/__init__.py | p4l1ly/currency | 787dfa0bad0ba8c8663631bc18ee57d0b74552c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .fetcher import from_all
| 13.75 | 29 | 0.636364 |
04b4573b4017d6300b1a736bbe04abe5d30c51d9 | 452 | py | Python | lista_ex1.py/exercicio5.py | robinson-1985/mentoria_exercises | 8359cead6ee5351851b04cb45f252e3881b79117 | [
"MIT"
] | null | null | null | lista_ex1.py/exercicio5.py | robinson-1985/mentoria_exercises | 8359cead6ee5351851b04cb45f252e3881b79117 | [
"MIT"
] | null | null | null | lista_ex1.py/exercicio5.py | robinson-1985/mentoria_exercises | 8359cead6ee5351851b04cb45f252e3881b79117 | [
"MIT"
] | null | null | null | ''' 5.Faa um programa que receba o salrio de um funcionrio e o percentual de aumento,
calcule e mostre o valor do aumento e o novo salrio. '''
salario = float(input("Digite o valor do salrio: R$ "))
percentual_de_aumento = float(input("Digite a porcentagem de aumento do salario: "))
valor_do_aumento = salario * (perc... | 45.2 | 88 | 0.756637 |
04b4ad9fcdad3b668ebfdad4cb2989d436e7b726 | 32,672 | py | Python | src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/hardware/mifare/mifare_classic.py | SabheeR/hobbits | 8bfb997940c73467af2ceb0275c470b763d2c1bf | [
"MIT"
] | 304 | 2020-02-07T21:05:22.000Z | 2022-03-24T05:30:37.000Z | src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/hardware/mifare/mifare_classic.py | SabheeR/hobbits | 8bfb997940c73467af2ceb0275c470b763d2c1bf | [
"MIT"
] | 2,107 | 2019-11-05T09:26:16.000Z | 2022-02-14T13:35:36.000Z | src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/hardware/mifare/mifare_classic.py | SabheeR/hobbits | 8bfb997940c73467af2ceb0275c470b763d2c1bf | [
"MIT"
] | 30 | 2020-03-11T14:36:43.000Z | 2022-03-07T04:45:17.000Z | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
import kaitaistruct
from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO
import collections
if parse_version(kaitaistruct.__version__) < parse_version('0.9'):
raise E... | 46.27762 | 256 | 0.531219 |
04b55157cb70920c18083d308f8864cd831540fd | 5,325 | py | Python | umbra/common/protobuf/umbra_grpc.py | serial-coder/umbra | 156883392aad1a5af9a6ad26e07e9e3ed7102004 | [
"Apache-2.0"
] | 19 | 2018-11-19T20:31:33.000Z | 2022-03-08T11:37:21.000Z | umbra/common/protobuf/umbra_grpc.py | serial-coder/umbra | 156883392aad1a5af9a6ad26e07e9e3ed7102004 | [
"Apache-2.0"
] | 20 | 2018-11-01T18:22:33.000Z | 2021-06-17T07:00:34.000Z | umbra/common/protobuf/umbra_grpc.py | serial-coder/umbra | 156883392aad1a5af9a6ad26e07e9e3ed7102004 | [
"Apache-2.0"
] | 20 | 2018-11-07T06:10:50.000Z | 2022-03-28T19:20:59.000Z | # Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: umbra.proto
# plugin: grpclib.plugin.main
import abc
import typing
import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
import grpclib.server
import google.protobuf.struct_pb2
import google.protobuf.timestamp_pb2
from umbra.common... | 28.475936 | 110 | 0.589108 |
04b8baddd0942477cd2721d54222e9d48fe98764 | 1,672 | py | Python | year2019/day2/solve.py | TheAnarchoX/AdventOfCode | f24a3983fb6d14716ef73212a562f5199453ed80 | [
"MIT"
] | null | null | null | year2019/day2/solve.py | TheAnarchoX/AdventOfCode | f24a3983fb6d14716ef73212a562f5199453ed80 | [
"MIT"
] | 3 | 2019-12-18T22:18:06.000Z | 2019-12-18T22:22:40.000Z | year2019/day2/solve.py | TheAnarchoX/AdventOfCode | f24a3983fb6d14716ef73212a562f5199453ed80 | [
"MIT"
] | null | null | null | """ 2019 Day 2 Solver"""
import os
import sys
from typing import Tuple, List
from multiprocessing import Manager, Process
from multiprocessing.managers import ValueProxy
INPUT_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "input.txt")
def solve():
""" Solve https://adventofcode.com/2019/day/2"... | 29.333333 | 83 | 0.591507 |
04bc00e7e672bb917a6554d1ba2cf036a60272b6 | 3,937 | py | Python | configs_custom/mmcls/dog-vs-cat/resnet50_b32x8.py | apulis/ApulisVision | d1f226f4bc769b03c5565b9d6e76dd9823771cc7 | [
"Apache-2.0"
] | 1 | 2020-09-09T05:10:39.000Z | 2020-09-09T05:10:39.000Z | configs_custom/mmcls/dog-vs-cat/resnet50_b32x8.py | apulis/ApulisVision | d1f226f4bc769b03c5565b9d6e76dd9823771cc7 | [
"Apache-2.0"
] | null | null | null | configs_custom/mmcls/dog-vs-cat/resnet50_b32x8.py | apulis/ApulisVision | d1f226f4bc769b03c5565b9d6e76dd9823771cc7 | [
"Apache-2.0"
] | 1 | 2021-03-31T02:00:13.000Z | 2021-03-31T02:00:13.000Z | model = dict(
type='ImageClassifier',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(3, ),
style='pytorch'),
neck=dict(type='GlobalAveragePooling'),
head=dict(
type='LinearClsHead',
num_classes=1000,
in_channels=2048,
... | 34.234783 | 77 | 0.554991 |
04bc20e97c7b91fb6c91377e5dcad98a1ee694a4 | 362 | py | Python | client-server-chatroom/server.py | crista/swarch | 336e885e086bde17cded6acc9afd7904f6c749e3 | [
"MIT"
] | null | null | null | client-server-chatroom/server.py | crista/swarch | 336e885e086bde17cded6acc9afd7904f6c749e3 | [
"MIT"
] | null | null | null | client-server-chatroom/server.py | crista/swarch | 336e885e086bde17cded6acc9afd7904f6c749e3 | [
"MIT"
] | null | null | null | from network import Listener, Handler, poll
handlers = {} # map client handler to user name
port = 8888
server = Listener(port, MyHandler)
while 1:
poll(timeout=0.05) # in seconds
| 15.083333 | 48 | 0.596685 |