hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bb979d457152ae5439a9b0fb0f3ee26373bc50e6 | 1,270 | py | Python | video_message_parser.py | stonexu1986/carlife-protocol-analysis-tool | 10c8ea30e27e3db81382cea3b8ef7663479a535f | [
"Apache-2.0"
] | null | null | null | video_message_parser.py | stonexu1986/carlife-protocol-analysis-tool | 10c8ea30e27e3db81382cea3b8ef7663479a535f | [
"Apache-2.0"
] | null | null | null | video_message_parser.py | stonexu1986/carlife-protocol-analysis-tool | 10c8ea30e27e3db81382cea3b8ef7663479a535f | [
"Apache-2.0"
] | null | null | null | import struct
import binascii
from common_constant import const
def parse_header(header, message):
print("parsing video message header:")
print(header)
msg_data_len, timestamp, service_type = struct.unpack('>III', header)
service_type_hex = hex(service_type)[2:].rjust(8, '0')
service_type_hex =... | 27.608696 | 74 | 0.716535 |
dc3e9c3730eec2fa33bf9ba97e2754c5ca45947d | 29,543 | py | Python | cogs/stats.py | CuteFwan/Koishi | 34c1681a1308cd4e9ea02c027a2800638ad4baf9 | [
"MIT"
] | 22 | 2019-03-23T13:05:03.000Z | 2021-09-23T07:17:46.000Z | cogs/stats.py | CuteFwan/Koishi-db-beta | 34c1681a1308cd4e9ea02c027a2800638ad4baf9 | [
"MIT"
] | 4 | 2019-04-01T23:22:45.000Z | 2020-06-22T15:09:39.000Z | cogs/stats.py | CuteFwan/Koishi-db-beta | 34c1681a1308cd4e9ea02c027a2800638ad4baf9 | [
"MIT"
] | 5 | 2019-04-25T19:14:51.000Z | 2021-07-04T13:07:16.000Z | import discord
from discord.ext import commands
import time
import datetime
from io import BytesIO
from .utils import pretty
import typing
from math import cos, sin, radians, ceil
from PIL import Image, ImageOps, ImageDraw, ImageFilter, ImageEnhance, ImageFont
import logging
logger = logging.getLogger(__name__)
statu... | 42.204286 | 154 | 0.4967 |
0b87d1947b9f204e32acc1d2582802774251c65d | 1,589 | py | Python | src/iBeatles/session/load_normalization_tab.py | ornlneutronimaging/iBeatles | 0a6ca1e18780cf08ad97b6cedede5a23f52bc953 | [
"MIT"
] | 3 | 2017-04-27T06:58:05.000Z | 2020-01-21T07:12:30.000Z | src/iBeatles/session/load_normalization_tab.py | ornlneutronimaging/iBeatles | 0a6ca1e18780cf08ad97b6cedede5a23f52bc953 | [
"MIT"
] | 99 | 2019-05-09T14:05:56.000Z | 2022-03-30T19:13:31.000Z | src/iBeatles/session/load_normalization_tab.py | ornlneutronimaging/iBeatles | 0a6ca1e18780cf08ad97b6cedede5a23f52bc953 | [
"MIT"
] | null | null | null | from .. import DataType
from ..step2.initialization import Initialization as Step2Initialization
from ..step2.gui_handler import Step2GuiHandler
from ..utilities.pyqrgraph import Pyqtgrah as PyqtgraphUtilities
class LoadNormalization:
def __init__(self, parent=None):
self.parent = parent
self.ses... | 37.833333 | 113 | 0.693518 |
7c8441e2104ae142c5ab012545f0a24e1750af57 | 25,223 | py | Python | src/oci/announcements_service/announcement_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-09-10T22:09:45.000Z | 2021-12-24T17:00:07.000Z | src/oci/announcements_service/announcement_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/announcements_service/announcement_client.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 50.852823 | 261 | 0.663165 |
c9639a87495a2c8a2033c8a841665f0771693de5 | 24,305 | py | Python | src/genie/libs/parser/iosxe/tests/test_show_cdp.py | svautour/genieparser | 7416c9a4b44582be835a0646fb7fad92a5181c7d | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/test_show_cdp.py | svautour/genieparser | 7416c9a4b44582be835a0646fb7fad92a5181c7d | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/test_show_cdp.py | svautour/genieparser | 7416c9a4b44582be835a0646fb7fad92a5181c7d | [
"Apache-2.0"
] | null | null | null | import unittest
from unittest.mock import Mock
from pyats.topology import Device
from genie.metaparser.util.exceptions import SchemaEmptyParserError
from genie.libs.parser.iosxe.show_cdp import ShowCdpNeighbors, ShowCdpNeighborsDetail
class test_show_cdp_neighbors(unittest.TestCase):
device = Device(name='aDe... | 40.373754 | 154 | 0.51512 |
c8ad5359098156ad9129d3f9d0912a4ee353f2b7 | 11,576 | py | Python | melati/wallet/wallet_puzzle_store.py | luzofex/melati-blockchain | bddc95ed3a8c5631488cd44a9e76b764c19b4568 | [
"Apache-2.0"
] | 12 | 2021-07-13T15:39:57.000Z | 2022-02-09T04:32:12.000Z | melati/wallet/wallet_puzzle_store.py | luzofex/melati-blockchain | bddc95ed3a8c5631488cd44a9e76b764c19b4568 | [
"Apache-2.0"
] | 1 | 2021-07-16T12:41:41.000Z | 2021-07-16T12:42:48.000Z | melati/wallet/wallet_puzzle_store.py | luzofex/melati-blockchain | bddc95ed3a8c5631488cd44a9e76b764c19b4568 | [
"Apache-2.0"
] | 3 | 2021-07-13T05:35:30.000Z | 2021-08-06T13:11:14.000Z | import asyncio
import logging
from typing import List, Optional, Set, Tuple
import aiosqlite
from blspy import G1Element
from melati.types.blockchain_format.sized_bytes import bytes32
from melati.util.db_wrapper import DBWrapper
from melati.util.ints import uint32
from melati.wallet.derivation_record import Derivatio... | 33.074286 | 117 | 0.600726 |
377cccfdc389d44c13dd2e679a358b2c6004b336 | 1,781 | py | Python | samples/generated_samples/aiplatform_generated_aiplatform_v1_dataset_service_import_data_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 1 | 2022-03-30T05:23:29.000Z | 2022-03-30T05:23:29.000Z | samples/generated_samples/aiplatform_generated_aiplatform_v1_dataset_service_import_data_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/aiplatform_generated_aiplatform_v1_dataset_service_import_data_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 32.381818 | 85 | 0.758563 |
70008805d3ac2bacc70e355e34e30394cbeaf742 | 12,417 | py | Python | eve/utils.py | rs/eve | 32fd02f1cea6d1db9192fac8dcf1a38681c0307b | [
"BSD-3-Clause"
] | 1 | 2017-10-31T17:36:58.000Z | 2017-10-31T17:36:58.000Z | eve/utils.py | rs/eve | 32fd02f1cea6d1db9192fac8dcf1a38681c0307b | [
"BSD-3-Clause"
] | null | null | null | eve/utils.py | rs/eve | 32fd02f1cea6d1db9192fac8dcf1a38681c0307b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
eve.utils
~~~~~~~~~
Utility functions and classes.
:copyright: (c) 2014 by Nicola Iarocci.
:license: BSD, see LICENSE for more details.
"""
import eve
import hashlib
import werkzeug.exceptions
from flask import request
from flask import current_app as app
from datetim... | 32.420366 | 82 | 0.646372 |
0869285fe228a715d39728b6e6ddb54ca171517d | 9,177 | py | Python | src/io_utils/read/geo_ts_readers/mixins.py | wpreimes/io_utils | 9ef4161a5bc65ab2fabee0e2c7cf873f19cf7a17 | [
"MIT"
] | null | null | null | src/io_utils/read/geo_ts_readers/mixins.py | wpreimes/io_utils | 9ef4161a5bc65ab2fabee0e2c7cf873f19cf7a17 | [
"MIT"
] | 4 | 2021-07-09T09:03:12.000Z | 2021-12-20T17:24:32.000Z | src/io_utils/read/geo_ts_readers/mixins.py | wpreimes/io_utils | 9ef4161a5bc65ab2fabee0e2c7cf873f19cf7a17 | [
"MIT"
] | null | null | null | import warnings
import os
import numpy as np
import pandas as pd
from datetime import datetime, timedelta
import netCDF4 as nc
from pygeogrids.grids import CellGrid
import xarray as xr
class ContiguousRaggedTsCellReaderMixin:
"""
Adds functionality to read whole cells. Can be added to time series
readers ... | 34.115242 | 80 | 0.562275 |
4c8233ac9d0f24c1922c19bdb6400df65c615035 | 62,527 | py | Python | code/vox_fluoro/history/vox_fluoro_norm_nadam_elu_act_final/vox_fluoro_norm_nadam_elu_act_final.py | john-drago/fluoro | b757af60940c4395101a39a15f3ac4213f40fdce | [
"MIT"
] | 4 | 2021-03-01T15:34:37.000Z | 2021-06-03T08:56:39.000Z | code/vox_fluoro/history/vox_fluoro_norm_nadam_elu_act_final/vox_fluoro_norm_nadam_elu_act_final.py | john-drago/fluoro | b757af60940c4395101a39a15f3ac4213f40fdce | [
"MIT"
] | null | null | null | code/vox_fluoro/history/vox_fluoro_norm_nadam_elu_act_final/vox_fluoro_norm_nadam_elu_act_final.py | john-drago/fluoro | b757af60940c4395101a39a15f3ac4213f40fdce | [
"MIT"
] | null | null | null | import numpy as np
import h5py
import tensorflow as tf
# import keras
import os
import sys
import pickle
# 2019-09-18
# We are continuing the usage of the architecture based on the residual nets
# In this file, we are going to normalize the calibration inputs from -1 to 1.
# We likewise are going to normalize the lab... | 50.876322 | 413 | 0.737377 |
cba5312298851d3e2bc36cfb9dd566d07d38755e | 5,951 | py | Python | main.py | tomimara52/ConsoleSnake | 023ab0bece1342d3efa70f02ae7f3609baaa7da1 | [
"MIT"
] | 10 | 2021-01-29T07:50:49.000Z | 2021-01-29T19:58:06.000Z | main.py | tomimara52/ConsoleSnake | 023ab0bece1342d3efa70f02ae7f3609baaa7da1 | [
"MIT"
] | null | null | null | main.py | tomimara52/ConsoleSnake | 023ab0bece1342d3efa70f02ae7f3609baaa7da1 | [
"MIT"
] | 3 | 2021-01-29T16:27:53.000Z | 2021-01-29T17:05:31.000Z | # -*- coding: UTF-8 -*-
import time
import os
from random import randint
from getch import KBHit
class Snake:
def __init__(self, x, y):
self.parts = [[1, 1]]
self.length = 1
self.dir = 'd'
self.skins = ['O']
self.fruit = [randint(2, x), randint(2, y)]
self.size = [... | 31.321053 | 112 | 0.460259 |
ec73e057837951ae6c635c834fda609db9ff8268 | 1,421 | py | Python | app.py | ArtyDev57/face_recon | c0a79b3fe41e0db37cb13ce54e17bef8f8dbf685 | [
"MIT"
] | 4 | 2020-05-22T03:17:03.000Z | 2021-07-29T04:24:02.000Z | app.py | ArtyDev57/face_recon | c0a79b3fe41e0db37cb13ce54e17bef8f8dbf685 | [
"MIT"
] | null | null | null | app.py | ArtyDev57/face_recon | c0a79b3fe41e0db37cb13ce54e17bef8f8dbf685 | [
"MIT"
] | 1 | 2020-10-01T11:58:05.000Z | 2020-10-01T11:58:05.000Z | #!/usr/bin/env python3
from flask import Flask, jsonify
from flask_jwt_extended import JWTManager
from routers import *
from werkzeug.exceptions import HTTPException
import flask_cors
import appconfig as conf
app = Flask(__name__)
# Cross Origin Resource
flask_cors.CORS(app, supports_credentials=True, resources={r"/... | 31.577778 | 110 | 0.746657 |
1f53ce9471aa42602780d9169b575924aaa6b7fc | 50,286 | py | Python | openstackclient/tests/unit/volume/v2/test_volume.py | alvarosimon/python-openstackclient | 2ab3396f19796935ddcb281b865d37839a4f84f7 | [
"Apache-2.0"
] | null | null | null | openstackclient/tests/unit/volume/v2/test_volume.py | alvarosimon/python-openstackclient | 2ab3396f19796935ddcb281b865d37839a4f84f7 | [
"Apache-2.0"
] | null | null | null | openstackclient/tests/unit/volume/v2/test_volume.py | alvarosimon/python-openstackclient | 2ab3396f19796935ddcb281b865d37839a4f84f7 | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distr... | 32.172745 | 79 | 0.564869 |
b25095282f3612ca9bdf56971b8731ba9c4b65f1 | 2,743 | py | Python | Scanner/SensorLogger.py | AntonSh/PiProjects | e6971bfbc53c35df5c444de7753e4675fa593902 | [
"MIT"
] | 1 | 2015-03-16T04:19:02.000Z | 2015-03-16T04:19:02.000Z | Scanner/SensorLogger.py | AntonSh/RaspberryFridge | e6971bfbc53c35df5c444de7753e4675fa593902 | [
"MIT"
] | null | null | null | Scanner/SensorLogger.py | AntonSh/RaspberryFridge | e6971bfbc53c35df5c444de7753e4675fa593902 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import subprocess
import time
import sys
import signal
from datetime import datetime, date
import argparse
import sqlite3 as lite
import os
import os.path
import GPIOControl
import SensorReader
import Utils
# Constants
logFile = "../logs/control.log"
databaseFile = "../Data/sensor_stream.db"
# Grac... | 25.877358 | 127 | 0.620489 |
f401cb1b5a1819e93bb565dd8a30eb8b49f2d188 | 2,930 | py | Python | gbe/scheduling/views/delete_event_view.py | bethlakshmi/gbe-divio-djangocms-python2.7 | 6e9b2c894162524bbbaaf73dcbe927988707231d | [
"Apache-2.0"
] | 1 | 2021-03-14T11:56:47.000Z | 2021-03-14T11:56:47.000Z | gbe/scheduling/views/delete_event_view.py | bethlakshmi/gbe-divio-djangocms-python2.7 | 6e9b2c894162524bbbaaf73dcbe927988707231d | [
"Apache-2.0"
] | 180 | 2019-09-15T19:52:46.000Z | 2021-11-06T23:48:01.000Z | gbe/scheduling/views/delete_event_view.py | bethlakshmi/gbe-divio-djangocms-python2.7 | 6e9b2c894162524bbbaaf73dcbe927988707231d | [
"Apache-2.0"
] | null | null | null | from django.views.generic import View
from django.views.decorators.cache import never_cache
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.urls import reverse
from... | 37.564103 | 69 | 0.621502 |
a6755b0dc090f1669a31529aaad139d4076a1efc | 68 | py | Python | src/lib/post_processors/face_recognition/dlib/defaults.py | l-maia/viseron | d762be93db74f780db13ac332bf8673c41592aa9 | [
"MIT"
] | null | null | null | src/lib/post_processors/face_recognition/dlib/defaults.py | l-maia/viseron | d762be93db74f780db13ac332bf8673c41592aa9 | [
"MIT"
] | null | null | null | src/lib/post_processors/face_recognition/dlib/defaults.py | l-maia/viseron | d762be93db74f780db13ac332bf8673c41592aa9 | [
"MIT"
] | null | null | null | FACE_RECOGNITION_PATH = "/config/face_recognition"
EXPIRE_AFTER = 5
| 22.666667 | 50 | 0.823529 |
9330bc7f76f3b61047d412a825b55aff83a7d939 | 5,864 | py | Python | nextdl/extractor/sky.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | 1 | 2021-12-19T13:55:20.000Z | 2021-12-19T13:55:20.000Z | nextdl/extractor/sky.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | null | null | null | nextdl/extractor/sky.py | devenu85/nextdl | 0b458f556e2e0be80cb94bd9a9b1405ad2e9182d | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import extract_attributes, smuggle_url, strip_or_none, urljoin
from .common import InfoExtractor
class SkyBaseIE(InfoExtractor):
BRIGHTCOVE_URL_TEMPLATE = (
"http://players.brightcove.net/%s/%s_default/index.html?videoId=%s"
... | 38.077922 | 160 | 0.543997 |
977b250fa6c7c91cbd3ec25e5f6396bd7f6616c1 | 3,060 | py | Python | forcePlates/MayaIntegration/plugin/maya_interaction.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | forcePlates/MayaIntegration/plugin/maya_interaction.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | forcePlates/MayaIntegration/plugin/maya_interaction.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null |
## Centre of Pressure Uncertainty for Virtual Character Control
## McGill Computer Graphics Lab
##
## Released under the MIT license. This code is free to be modified
## and distributed.
##
## Author: Monty Thibault, montythibault@gmail.com
## Last Updated: Sep 02, 2016
## ------------------------------------... | 20.816327 | 84 | 0.742484 |
0a6a5d13324d6c663e9142d8a70d655328b1ea65 | 6,428 | py | Python | sdk/python/kfp/components/for_loop_test.py | votti/pipelines | 1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f | [
"Apache-2.0"
] | 1 | 2022-03-30T05:22:19.000Z | 2022-03-30T05:22:19.000Z | sdk/python/kfp/components/for_loop_test.py | votti/pipelines | 1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f | [
"Apache-2.0"
] | 1 | 2020-02-06T12:53:44.000Z | 2020-02-06T12:53:44.000Z | sdk/python/kfp/components/for_loop_test.py | votti/pipelines | 1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.509804 | 85 | 0.526602 |
d6f1d9496d00491686a91327e147ab0b39254720 | 1,582 | py | Python | -MakeSenseofCensus-/code.py | hemangi44/greyatom-python-for-data-science | 2598b537e8bd720de78c02bae51ed770c6483b9e | [
"MIT"
] | 1 | 2020-04-10T10:32:59.000Z | 2020-04-10T10:32:59.000Z | -MakeSenseofCensus-/code.py | hemangi44/greyatom-python-for-data-science | 2598b537e8bd720de78c02bae51ed770c6483b9e | [
"MIT"
] | null | null | null | -MakeSenseofCensus-/code.py | hemangi44/greyatom-python-for-data-science | 2598b537e8bd720de78c02bae51ed770c6483b9e | [
"MIT"
] | null | null | null | # --------------
# Importing header files
import numpy as np
# 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
data=np.genfromtxt(path,delimiter=",",skip_header=1)
census=np.concatenate((data,new_record))
print(census... | 19.530864 | 105 | 0.639064 |
4ddcecb56ffb2d4978ad4ae4a4c97873169af790 | 9,337 | py | Python | numba/cuda/simulator/kernelapi.py | avdul-q101/numba | 199798e2c849b5e63eeef36972566fda7b84625c | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 3 | 2017-08-11T13:05:44.000Z | 2021-08-10T07:47:13.000Z | numba/cuda/simulator/kernelapi.py | avdul-q101/numba | 199798e2c849b5e63eeef36972566fda7b84625c | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | numba/cuda/simulator/kernelapi.py | avdul-q101/numba | 199798e2c849b5e63eeef36972566fda7b84625c | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2017-05-09T04:22:43.000Z | 2017-05-09T04:22:43.000Z | '''
Implements the cuda module as called from within an executing kernel
(@cuda.jit-decorated function).
'''
from contextlib import contextmanager
import sys
import threading
import traceback
import numpy as np
from numba.np import numpy_support
class Dim3(object):
'''
Used to implement thread/block indice... | 25.099462 | 80 | 0.573203 |
7ec40d3105db2ba6ba1079af0a0261f33329d482 | 5,185 | py | Python | entropytriangle/coordsentropic.py | Jaimedlrm/entropytriangle | 46076aa6e9e06777df4dcf885cd951afdf1de168 | [
"MIT"
] | 2 | 2019-08-07T07:13:38.000Z | 2019-08-07T07:13:41.000Z | entropytriangle/coordsentropic.py | Jaimedlrm/entropytriangle | 46076aa6e9e06777df4dcf885cd951afdf1de168 | [
"MIT"
] | null | null | null | entropytriangle/coordsentropic.py | Jaimedlrm/entropytriangle | 46076aa6e9e06777df4dcf885cd951afdf1de168 | [
"MIT"
] | 1 | 2021-03-13T18:24:14.000Z | 2021-03-13T18:24:14.000Z | '''
Functions used for calculating variables used in the Entropy Triangle Plotting phase
'''
from numpy import nan_to_num as nan_to_num
from warnings import warn as warning
import pandas as pd # DataFrames manipulation
import matplotlib.pyplot as plt
#Definition of the variables
#SMET
derivedSplitSmetCo... | 28.646409 | 156 | 0.687175 |
3f245742fc6060d3e8660627c1601b7ce5077dd4 | 9,414 | py | Python | tests/test_OFTI.py | sefffal/orbitize | e10f57e2a2a181ae3642e66a6aaadd0016579d3d | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/test_OFTI.py | sefffal/orbitize | e10f57e2a2a181ae3642e66a6aaadd0016579d3d | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/test_OFTI.py | sefffal/orbitize | e10f57e2a2a181ae3642e66a6aaadd0016579d3d | [
"BSD-3-Clause-Clear"
] | null | null | null | """
Test the orbitize.sampler OFTI class which performs OFTI on astrometric data
"""
import numpy as np
import os
import pytest
import matplotlib.pyplot as plt
import time
import orbitize
import orbitize.sampler as sampler
import orbitize.driver
import orbitize.priors as priors
import orbitize.system as system
from orb... | 36.207692 | 134 | 0.663374 |
c6ac1f319d703198880f7390f516dc1564ae4f52 | 2,648 | py | Python | citrix_hypervisor/tests/test_lab.py | tdimnet/integrations-core | a78133a3b71a1b8377fa214d121a98647031ab06 | [
"BSD-3-Clause"
] | 663 | 2016-08-23T05:23:45.000Z | 2022-03-29T00:37:23.000Z | citrix_hypervisor/tests/test_lab.py | tdimnet/integrations-core | a78133a3b71a1b8377fa214d121a98647031ab06 | [
"BSD-3-Clause"
] | 6,642 | 2016-06-09T16:29:20.000Z | 2022-03-31T22:24:09.000Z | citrix_hypervisor/tests/test_lab.py | tdimnet/integrations-core | a78133a3b71a1b8377fa214d121a98647031ab06 | [
"BSD-3-Clause"
] | 1,222 | 2017-01-27T15:51:38.000Z | 2022-03-31T18:17:51.000Z | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import pytest
from datadog_checks.base import is_affirmative
from datadog_checks.citrix_hypervisor import CitrixHypervisorCheck
from datadog_checks.dev.utils import get_metadata_metrics
METRIC... | 29.422222 | 98 | 0.651057 |
f76bdcf0b7dd18d292bf8beee536c595663042ef | 23,611 | py | Python | Lib/traceback.py | cseci/python | 82d847087557bcca866dbf6398f1c156e9ff5d3a | [
"0BSD"
] | 2,441 | 2020-07-31T06:45:53.000Z | 2022-03-30T15:56:49.000Z | Lib/traceback.py | cseci/python | 82d847087557bcca866dbf6398f1c156e9ff5d3a | [
"0BSD"
] | 238 | 2020-10-21T04:54:00.000Z | 2022-03-31T21:49:03.000Z | Lib/traceback.py | cseci/python | 82d847087557bcca866dbf6398f1c156e9ff5d3a | [
"0BSD"
] | 93 | 2020-08-09T12:00:17.000Z | 2022-03-25T07:57:24.000Z | """Extract, format and print information about Python stack traces."""
import collections
import itertools
import linecache
import sys
__all__ = ['extract_stack', 'extract_tb', 'format_exception',
'format_exception_only', 'format_list', 'format_stack',
'format_tb', 'print_exc', 'format_exc', 'pr... | 38.205502 | 87 | 0.635805 |
c21126a1c5fa31fa64282d6973ddfcb26e5b7a91 | 755 | py | Python | manage.py | SophieO1970/Pitch | 9aaf52d2b3e8bcbcf96d332227b04ec0e5f37ac1 | [
"MIT"
] | null | null | null | manage.py | SophieO1970/Pitch | 9aaf52d2b3e8bcbcf96d332227b04ec0e5f37ac1 | [
"MIT"
] | null | null | null | manage.py | SophieO1970/Pitch | 9aaf52d2b3e8bcbcf96d332227b04ec0e5f37ac1 | [
"MIT"
] | null | null | null | from app import create_app, db
from flask_script import Manager, Server
from app.models import User
from flask_migrate import Migrate, MigrateCommand
# Creating app instance
app = create_app('development')
manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', MigrateCommand)
manager.add_command(... | 23.59375 | 133 | 0.741722 |
5d67ba40a1587647d63139eb8b0c789758676cb7 | 467 | py | Python | pmcts/utilities/indexing.py | Weizhe-Chen/pareto-mcts | 9154029a5668438762807743e452a9ea05cf00bd | [
"MIT"
] | 12 | 2021-02-12T21:26:20.000Z | 2022-02-01T06:54:04.000Z | pmcts/utilities/indexing.py | Weizhe-Chen/pareto-mcts | 9154029a5668438762807743e452a9ea05cf00bd | [
"MIT"
] | null | null | null | pmcts/utilities/indexing.py | Weizhe-Chen/pareto-mcts | 9154029a5668438762807743e452a9ea05cf00bd | [
"MIT"
] | 3 | 2020-11-11T01:13:24.000Z | 2021-07-03T19:34:15.000Z | import numpy as np
def xy_to_ij(xy, extent, max_row, max_col):
# x -> j
j = (xy[:, 0] - extent[0]) / (extent[1] - extent[0]) * max_col
j = np.round(j, decimals=6)
j[j < 0] = 0
j[j > max_col] = max_col
# y -> i
i = (xy[:, 1] - extent[2]) / (extent[3] - extent[2]) * max_row
i = np.round(... | 25.944444 | 66 | 0.511777 |
2957c75a638ff864ee06c885cde437a6e45b0675 | 1,185 | py | Python | tests/unit/flow/test_flow_change_gateway.py | Karnak123/jina | 9eba4feb3afa2e49c779b46f77c5022bdcb944aa | [
"Apache-2.0"
] | 4 | 2021-06-29T04:14:31.000Z | 2021-08-01T07:01:08.000Z | tests/unit/flow/test_flow_change_gateway.py | Karnak123/jina | 9eba4feb3afa2e49c779b46f77c5022bdcb944aa | [
"Apache-2.0"
] | 1 | 2021-12-25T09:06:13.000Z | 2021-12-25T09:06:13.000Z | tests/unit/flow/test_flow_change_gateway.py | Karnak123/jina | 9eba4feb3afa2e49c779b46f77c5022bdcb944aa | [
"Apache-2.0"
] | 1 | 2021-07-05T12:42:40.000Z | 2021-07-05T12:42:40.000Z | import pytest
from jina import Flow
from jina.enums import GatewayProtocolType
from tests import random_docs
@pytest.mark.parametrize('protocol', ['http', 'websocket', 'grpc'])
@pytest.mark.parametrize('changeto_protocol', ['grpc', 'http', 'websocket'])
def test_change_gateway(protocol, changeto_protocol, mocker):
... | 34.852941 | 79 | 0.716456 |
5f5fbe58198361c86a353c101d62f4c61ef6c638 | 104 | py | Python | apps/forum/apps.py | picsldev/pyerp | e998e3e99a4e45033d54a6b1df50697f7288f67f | [
"MIT"
] | null | null | null | apps/forum/apps.py | picsldev/pyerp | e998e3e99a4e45033d54a6b1df50697f7288f67f | [
"MIT"
] | null | null | null | apps/forum/apps.py | picsldev/pyerp | e998e3e99a4e45033d54a6b1df50697f7288f67f | [
"MIT"
] | null | null | null | # Librerias Django
from django.apps import AppConfig
class ForumConfig(AppConfig):
name = 'forum'
| 14.857143 | 33 | 0.75 |
082380bca1f9228a1a8e5bd83a95db06153587a8 | 17,013 | py | Python | spearmint/launcher.py | pdeboer/Spearmint | 54d615e0541d457f7947787aaec7260667a34ab8 | [
"RSA-MD"
] | null | null | null | spearmint/launcher.py | pdeboer/Spearmint | 54d615e0541d457f7947787aaec7260667a34ab8 | [
"RSA-MD"
] | null | null | null | spearmint/launcher.py | pdeboer/Spearmint | 54d615e0541d457f7947787aaec7260667a34ab8 | [
"RSA-MD"
] | null | null | null | # -*- coding: utf-8 -*-
# Spearmint
#
# Academic and Non-Commercial Research Use Software License and Terms
# of Use
#
# Spearmint is a software package to perform Bayesian optimization
# according to specific algorithms (the “Software”). The Software is
# designed to automatically run experiments (thus the code name
... | 39.93662 | 116 | 0.703168 |
efaf5cfd2bc95a4f04fd69a586c14f3136956cc9 | 688 | py | Python | setup.py | emhayusa/webinar | 5fa05e17a0328f3f1fa2bed647830b85f4c17471 | [
"MIT"
] | null | null | null | setup.py | emhayusa/webinar | 5fa05e17a0328f3f1fa2bed647830b85f4c17471 | [
"MIT"
] | null | null | null | setup.py | emhayusa/webinar | 5fa05e17a0328f3f1fa2bed647830b85f4c17471 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='webinar',
version='0.2',
author="Muhammad Hasannudin Yusa",
author_email="emhayusa@gmail.com",
description="A webinar bot package",
long_description=long_description,
long_description_content_type="te... | 25.481481 | 57 | 0.696221 |
ae4bbba5a1c752236e5481d7249208a5c9f4d81f | 4,553 | py | Python | benchmark/startQiskit_noisy1610.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1610.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1610.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=60
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 32.29078 | 82 | 0.620909 |
ba258ede85e9a3bab517ea3c0573461912de4f6f | 26,279 | py | Python | test/functional/test_runner.py | CodeIsTheKey/raptoreum | 8a44d39f985c503f08969f91e0c946042c173496 | [
"MIT"
] | 1 | 2021-12-18T04:44:10.000Z | 2021-12-18T04:44:10.000Z | test/functional/test_runner.py | CodeIsTheKey/raptoreum | 8a44d39f985c503f08969f91e0c946042c173496 | [
"MIT"
] | null | null | null | test/functional/test_runner.py | CodeIsTheKey/raptoreum | 8a44d39f985c503f08969f91e0c946042c173496 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... | 40.243492 | 195 | 0.642719 |
0e154dbd21f4977e4e5baabee1ddf840bd6df148 | 201 | py | Python | app.py | Prodops3pg/dockerdemo | c7bd967d568b4225c2cf022cfebf211b3b47dc58 | [
"MIT"
] | null | null | null | app.py | Prodops3pg/dockerdemo | c7bd967d568b4225c2cf022cfebf211b3b47dc58 | [
"MIT"
] | null | null | null | app.py | Prodops3pg/dockerdemo | c7bd967d568b4225c2cf022cfebf211b3b47dc58 | [
"MIT"
] | 1 | 2018-08-11T06:02:55.000Z | 2018-08-11T06:02:55.000Z | # app.py
from flask import Flask
app = Flask(__name__)
app.config.from_pyfile('config.py')
@app.route('/ping')
def ping():
return 'PONG'
if __name__ == '__main__':
app.run(host='0.0.0.0', port=80)
| 16.75 | 35 | 0.676617 |
a54f5ecd0b8da6555841a2c118a9a84bb95c9dfe | 2,257 | py | Python | addons14/document_page/wizard/document_page_create_menu.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-06-10T14:59:13.000Z | 2021-06-10T14:59:13.000Z | addons14/document_page/wizard/document_page_create_menu.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | null | null | null | addons14/document_page/wizard/document_page_create_menu.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-04-09T09:44:44.000Z | 2021-04-09T09:44:44.000Z | # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class DocumentPageCreateMenu(models.TransientModel):
"""Create Menu."""
_name = "document.page.create.menu"
_description = "Wizard Create Menu"
... | 34.19697 | 80 | 0.576429 |
0536ea8e065cf6a9712e6285f00ccc1fcc2e85d4 | 3,299 | py | Python | cryspy/A_functions_base/function_1_gamma_nu.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | cryspy/A_functions_base/function_1_gamma_nu.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | cryspy/A_functions_base/function_1_gamma_nu.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | """
Functions:
- gammanu_to_tthphi
- tthphi_to_gammanu
- recal_int_to_tthphi_grid
- recal_int_to_gammanu_grid
- app_grid
- app_2d
"""
import math
def gammanu_to_tthphi(gamma, nu):
"""Transfer gamma-nu to ttheta-phi.
gamma
is the angle in the equatorial plane
nu
i... | 29.19469 | 77 | 0.588663 |
c3c4650a9519652a1b2ad75bd06cbc3a1eb1203e | 1,959 | py | Python | var/spack/repos/builtin/packages/gem5/package.py | weijianwen/spack | 7ad58b47e4890b3c120e0e35ccf297f90e388e5d | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-12-10T12:41:38.000Z | 2019-12-10T12:41:38.000Z | var/spack/repos/builtin/packages/gem5/package.py | weijianwen/spack | 7ad58b47e4890b3c120e0e35ccf297f90e388e5d | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/gem5/package.py | weijianwen/spack | 7ad58b47e4890b3c120e0e35ccf297f90e388e5d | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 39.979592 | 78 | 0.668709 |
e830080c62ce8e1ec28f0fa56e4a72c3b8620102 | 56 | py | Python | hordak/models/__init__.py | audience-platform/django-hordak | aa3a18438136a020794b1c0b10603dd78fa7aa76 | [
"MIT"
] | 187 | 2016-12-12T10:58:11.000Z | 2022-03-27T08:14:19.000Z | hordak/models/__init__.py | audience-platform/django-hordak | aa3a18438136a020794b1c0b10603dd78fa7aa76 | [
"MIT"
] | 62 | 2016-12-10T00:12:47.000Z | 2022-03-16T09:23:05.000Z | hordak/models/__init__.py | audience-platform/django-hordak | aa3a18438136a020794b1c0b10603dd78fa7aa76 | [
"MIT"
] | 47 | 2016-12-12T11:07:31.000Z | 2022-03-15T20:30:07.000Z | from .core import *
from .statement_csv_import import *
| 18.666667 | 35 | 0.785714 |
c1298aebb71f1922d86c3d1ea4007e5e8dbf31f0 | 6,223 | py | Python | code/gaussian/plot_gaussian_results.py | davidwhogg/DiffractionMicroscopy | 948849db85e5fc58cc1ef9e6bd57a6d77dacee86 | [
"MIT"
] | 3 | 2015-12-28T17:06:25.000Z | 2019-06-18T15:49:41.000Z | code/gaussian/plot_gaussian_results.py | davidwhogg/DiffractionMicroscopy | 948849db85e5fc58cc1ef9e6bd57a6d77dacee86 | [
"MIT"
] | 15 | 2015-12-28T17:14:32.000Z | 2016-09-05T00:12:04.000Z | code/gaussian/plot_gaussian_results.py | davidwhogg/DiffractionMicroscopy | 948849db85e5fc58cc1ef9e6bd57a6d77dacee86 | [
"MIT"
] | null | null | null | """
This file is part of the DiffractionMicroscopy project.
Copyright 2015 David W. Hogg (NYU).
"""
import glob
import numpy as np
import pickle as cp
import pylab as plt
from gaussian import *
Truth = 1. / np.array([47., 13., 11.]) # MUST BE ALIGNED WITH gaussian.py
def hogg_savefig(fn, **kwargs):
print("writin... | 35.357955 | 110 | 0.585891 |
c9aa94a3f6fcfe2b4ba6eca2337c02eaf30d1fdb | 43,061 | py | Python | test_gql/tests.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 5 | 2017-03-30T18:02:11.000Z | 2021-07-20T16:02:34.000Z | test_gql/tests.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 15 | 2016-02-24T13:16:59.000Z | 2021-09-03T11:47:15.000Z | test_gql/tests.py | Winking-maniac/lingvodoc | f037bf0e91ccdf020469037220a43e63849aa24a | [
"Apache-2.0"
] | 22 | 2015-09-25T07:13:40.000Z | 2021-08-04T18:08:26.000Z | import pytest
import os
from subprocess import PIPE, Popen
from configparser import ConfigParser
import transaction
from pyramid.httpexceptions import HTTPForbidden
from pyramid.paster import get_appsettings
from lingvodoc.scripts.initializedb import data_init
#from lingvodoc.utils.creation import create_dbdiction... | 41.806796 | 124 | 0.446158 |
d46fcdda1c76b19be152bddc570e06ea77d48c73 | 493 | py | Python | zdppy_requests/exceptions.py | zhangdapeng520/zdppy_requests | 154af90a413172e3d291044a33718ae98eb051b7 | [
"MIT"
] | null | null | null | zdppy_requests/exceptions.py | zhangdapeng520/zdppy_requests | 154af90a413172e3d291044a33718ae98eb051b7 | [
"MIT"
] | null | null | null | zdppy_requests/exceptions.py | zhangdapeng520/zdppy_requests | 154af90a413172e3d291044a33718ae98eb051b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2022/2/22 15:34
# @Author : 张大鹏
# @Site :
# @File : exceptions.py
# @Software: PyCharm
class StatusCodeError(Exception):
def __init__(self, *args):
super(StatusCodeError, self).__init__(*args)
class ParamError(Exception):
def __init__... | 22.409091 | 52 | 0.640974 |
f1e5b46111f56aa3264d5b8f226b776178703a99 | 124,104 | py | Python | twisted/test/test_ftp.py | djmitche/Twisted | 0b404060400d35d23e7f2ba2963b3d47540d8f81 | [
"MIT",
"Unlicense"
] | null | null | null | twisted/test/test_ftp.py | djmitche/Twisted | 0b404060400d35d23e7f2ba2963b3d47540d8f81 | [
"MIT",
"Unlicense"
] | null | null | null | twisted/test/test_ftp.py | djmitche/Twisted | 0b404060400d35d23e7f2ba2963b3d47540d8f81 | [
"MIT",
"Unlicense"
] | null | null | null | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
FTP tests.
"""
import os
import errno
from StringIO import StringIO
import getpass
from zope.interface import implements
from zope.interface.verify import verifyClass
from twisted.trial import unittest
from twisted.python.randbytes import i... | 35.097285 | 94 | 0.600964 |
44fdba74831f16efae82caae5c8ccfdaad9ab1d1 | 3,509 | py | Python | stories/migrations/0001_initial.py | luterien/madcyoa | 1af9140717fd00c5c671ccbcd09d75df51dee263 | [
"Apache-2.0"
] | null | null | null | stories/migrations/0001_initial.py | luterien/madcyoa | 1af9140717fd00c5c671ccbcd09d75df51dee263 | [
"Apache-2.0"
] | null | null | null | stories/migrations/0001_initial.py | luterien/madcyoa | 1af9140717fd00c5c671ccbcd09d75df51dee263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-14 08:48
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateM... | 38.988889 | 147 | 0.54346 |
13a28d9d54276c55c9677a549c7bb9a1b8c516da | 12,348 | py | Python | doc/source/conf.py | vighneshbirodkar/scikit-image | 766745c0498a82852c3044fb205c9970ba1caee2 | [
"BSD-3-Clause"
] | null | null | null | doc/source/conf.py | vighneshbirodkar/scikit-image | 766745c0498a82852c3044fb205c9970ba1caee2 | [
"BSD-3-Clause"
] | 2 | 2016-01-08T18:30:49.000Z | 2016-07-21T07:55:29.000Z | doc/source/conf.py | vighneshbirodkar/scikit-image | 766745c0498a82852c3044fb205c9970ba1caee2 | [
"BSD-3-Clause"
] | 2 | 2017-05-09T13:33:37.000Z | 2018-12-23T10:57:18.000Z | # -*- coding: utf-8 -*-
#
# skimage documentation build configuration file, created by
# sphinx-quickstart on Sat Aug 22 13:00:30 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 31.5 | 80 | 0.642776 |
316f66e4427a5da93f77be6cb560ad3744cd6985 | 1,978 | py | Python | observations/api.py | dbca-wa/penguins | 9e107d071cd38d9d05a673a52061753cae458d83 | [
"Apache-2.0"
] | null | null | null | observations/api.py | dbca-wa/penguins | 9e107d071cd38d9d05a673a52061753cae458d83 | [
"Apache-2.0"
] | 8 | 2021-03-31T20:09:47.000Z | 2022-03-29T22:03:38.000Z | observations/api.py | dbca-wa/penguins | 9e107d071cd38d9d05a673a52061753cae458d83 | [
"Apache-2.0"
] | 3 | 2019-01-14T04:53:40.000Z | 2019-01-22T01:46:31.000Z | from rest_framework import viewsets
from rest_framework import filters
from observations.models import PenguinCount, PenguinObservation, Video
from utils import RetrievePartialUpdateDestroyAPIView
import datetime
class PenguinCountViewSet(viewsets.ReadOnlyModelViewSet):
model = PenguinCount
class PenguinObserv... | 35.963636 | 72 | 0.548534 |
a4e4a9fc69ec9f755596ceb2ceccbc3f45791696 | 2,169 | py | Python | hw/ip/otbn/dv/rig/rig/gens/untaken_branch.py | GregAC/opentitan | 40b607b776d7b10cfc2899cc0d724d00dc0c91a2 | [
"Apache-2.0"
] | 1,375 | 2019-11-05T15:11:00.000Z | 2022-03-28T17:50:43.000Z | hw/ip/otbn/dv/rig/rig/gens/untaken_branch.py | GregAC/opentitan | 40b607b776d7b10cfc2899cc0d724d00dc0c91a2 | [
"Apache-2.0"
] | 7,045 | 2019-11-05T16:05:45.000Z | 2022-03-31T23:08:08.000Z | hw/ip/otbn/dv/rig/rig/gens/untaken_branch.py | GregAC/opentitan | 40b607b776d7b10cfc2899cc0d724d00dc0c91a2 | [
"Apache-2.0"
] | 428 | 2019-11-05T15:00:20.000Z | 2022-03-28T15:34:57.000Z | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import random
from typing import Optional, List, Tuple
from ..model import Model
from ..program import ProgInsn, Program
from .branch_gen import BranchGen
from shared.ins... | 32.863636 | 79 | 0.613186 |
9dca069f2390b06371f04d55ed8307421655900f | 6,996 | py | Python | sympy/unify/core.py | qcgm1978/sympy | cc46047f4449b525b7b0edd4c634bf93d6e7c83d | [
"BSD-3-Clause"
] | 1 | 2021-06-24T09:01:18.000Z | 2021-06-24T09:01:18.000Z | sympy/unify/core.py | qcgm1978/sympy | cc46047f4449b525b7b0edd4c634bf93d6e7c83d | [
"BSD-3-Clause"
] | 3 | 2021-02-28T03:58:40.000Z | 2021-03-07T06:12:47.000Z | sympy/unify/core.py | qcgm1978/sympy | cc46047f4449b525b7b0edd4c634bf93d6e7c83d | [
"BSD-3-Clause"
] | 1 | 2020-08-12T10:51:20.000Z | 2020-08-12T10:51:20.000Z | """ Generic Unification algorithm for expression trees with lists of children
This implementation is a direct translation of
Artificial Intelligence: A Modern Approach by Stuart Russel and Peter Norvig
Second edition, section 9.2, page 276
It is modified in the following ways:
1. We allow associative and commutati... | 30.155172 | 78 | 0.546598 |
aec99cd978c75cf0662b6527d2bd0665796d11f6 | 2,268 | py | Python | ML_model.py | MichelKu/Stress_Hospital_Staff | 027a37ad7483f91b9a465b7dc201d0c91e8723ab | [
"CC0-1.0"
] | null | null | null | ML_model.py | MichelKu/Stress_Hospital_Staff | 027a37ad7483f91b9a465b7dc201d0c91e8723ab | [
"CC0-1.0"
] | null | null | null | ML_model.py | MichelKu/Stress_Hospital_Staff | 027a37ad7483f91b9a465b7dc201d0c91e8723ab | [
"CC0-1.0"
] | 1 | 2021-04-08T09:15:00.000Z | 2021-04-08T09:15:00.000Z | # Efter att tidtagit de olika modellerna föll valet på Random forest.
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import StandardScaler
import sqlite3
sc = StandardScaler()
classifier11 = R... | 36 | 154 | 0.738977 |
19f702375a952a21c5e7987d48a0f3dff3b73ff9 | 11,195 | py | Python | text/nltk/corpus/__init__.py | LisaDawn/TextBlob | 6b76c3f568a3cea16389d6bdb1b3e5a9dc6043e9 | [
"MIT"
] | 2 | 2015-03-10T14:33:16.000Z | 2015-03-10T14:33:18.000Z | text/nltk/corpus/__init__.py | LisaDawn/TextBlob | 6b76c3f568a3cea16389d6bdb1b3e5a9dc6043e9 | [
"MIT"
] | null | null | null | text/nltk/corpus/__init__.py | LisaDawn/TextBlob | 6b76c3f568a3cea16389d6bdb1b3e5a9dc6043e9 | [
"MIT"
] | null | null | null | # Natural Language Toolkit: Corpus Readers
#
# Copyright (C) 2001-2013 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
# [xx] this docstring isnt' up-to-date!
"""
NLTK corpus readers. The modules in this package provide func... | 39.839858 | 127 | 0.689951 |
d75e4ed83d7612ba172d4dc33ade1bf9b794d5c2 | 759 | py | Python | scripts/forcefield/test_ff.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 8 | 2016-09-07T01:59:31.000Z | 2021-03-06T12:14:31.000Z | scripts/forcefield/test_ff.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | null | null | null | scripts/forcefield/test_ff.py | jhwnkim/nanopores | 98b3dbb5d36464fbdc03f59d224d38e4255324ce | [
"MIT"
] | 4 | 2017-12-06T17:43:01.000Z | 2020-05-01T05:41:14.000Z | # (c) 2017 Gregor Mitscha-Baude
import numpy as np
from nanopores import user_params
import nanopores.models.pughpore as pugh
from folders import fields
ddata = {2: dict(name="Dpugh", Nmax=1e5, dim=2, r=0.11, h=1.0),
3: dict(name="Dpugh", Nmax=2e6, dim=3, r=0.11, h=2.0)}
physp = dict(
bV = -0.08,
Qmo... | 24.483871 | 70 | 0.631094 |
866ecd51fea15b427bb5e38717130887e781a264 | 2,208 | py | Python | setup.py | basnijholt/pyfeast | b6d8832b3a101900ed8b50127c1884ef74b34750 | [
"BSD-3-Clause"
] | null | null | null | setup.py | basnijholt/pyfeast | b6d8832b3a101900ed8b50127c1884ef74b34750 | [
"BSD-3-Clause"
] | null | null | null | setup.py | basnijholt/pyfeast | b6d8832b3a101900ed8b50127c1884ef74b34750 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import configparser
import sys
import os.path
import numpy
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from create_cython_files import create_feast_pxd, create_feast_pyx
def guess_libraries():
"""Return the configuration fo... | 25.090909 | 80 | 0.622736 |
9eef4507a1049f444dd8f98165d5ad407fe8b023 | 1,263 | py | Python | project/project/urls.py | minaee/cd557 | 4db87e1412709d1dff70a5d10642814e35a251f1 | [
"MIT"
] | null | null | null | project/project/urls.py | minaee/cd557 | 4db87e1412709d1dff70a5d10642814e35a251f1 | [
"MIT"
] | null | null | null | project/project/urls.py | minaee/cd557 | 4db87e1412709d1dff70a5d10642814e35a251f1 | [
"MIT"
] | null | null | null | """project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 38.272727 | 85 | 0.700713 |
a8d84820ab9b497e8a89ca130036fc7a1dadbf32 | 18,418 | py | Python | src/pgen/parser/tokenize.py | blockpy-edu/skulpt | dc70288aedcd7670605ef28f8525546440b39f93 | [
"MIT"
] | 4 | 2020-01-19T01:42:06.000Z | 2021-05-13T09:51:38.000Z | src/pgen/parser/tokenize.py | blockpy-edu/skulpt | dc70288aedcd7670605ef28f8525546440b39f93 | [
"MIT"
] | null | null | null | src/pgen/parser/tokenize.py | blockpy-edu/skulpt | dc70288aedcd7670605ef28f8525546440b39f93 | [
"MIT"
] | 4 | 2019-10-16T21:50:53.000Z | 2021-01-11T06:25:57.000Z | # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.
# All rights reserved.
"""Tokenization help for Python programs.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method which is called
repeatedly to get the next line o... | 36.255906 | 88 | 0.531654 |
073918726a49278ba5dcaaf69dfabc5622ce723b | 2,177 | py | Python | models/decoders/simple_decoder.py | thanhhau097/keras_ocr | bf453aada51c86c9166cc780982683726b6c091e | [
"Apache-2.0"
] | 1 | 2020-03-06T10:53:28.000Z | 2020-03-06T10:53:28.000Z | models/decoders/simple_decoder.py | thanhhau097/ocr | bf453aada51c86c9166cc780982683726b6c091e | [
"Apache-2.0"
] | 2 | 2020-01-28T22:13:55.000Z | 2020-09-25T22:21:05.000Z | models/decoders/simple_decoder.py | thanhhau097/ocr | bf453aada51c86c9166cc780982683726b6c091e | [
"Apache-2.0"
] | 3 | 2020-01-24T07:22:17.000Z | 2020-05-03T17:32:16.000Z | from keras.layers import *
from keras.layers.merge import add, concatenate
from utils.gpu_utils import gru
class SimpleDecoder():
def __init__(self):
pass
def __call__(self, input_tensor, *args, **kwargs):
# RNN layer
# lstm_1 = LSTM(256, return_sequences=True, kernel_initializer='he_n... | 47.326087 | 120 | 0.641249 |
4f79b3b6e720361ec05da634f362da0b311b9cb6 | 2,321 | py | Python | pdlog/accessor.py | DataProphet/pdlog | 5af741d18734dfd9e935311ba990cf09d2e88be6 | [
"MIT"
] | 3 | 2020-05-27T14:46:50.000Z | 2021-05-27T08:15:39.000Z | pdlog/accessor.py | DataProphet/pdlog | 5af741d18734dfd9e935311ba990cf09d2e88be6 | [
"MIT"
] | 4 | 2020-05-31T06:45:48.000Z | 2020-05-31T07:02:39.000Z | pdlog/accessor.py | DataProphet/pdlog | 5af741d18734dfd9e935311ba990cf09d2e88be6 | [
"MIT"
] | null | null | null | from typing import Any
import pandas as pd
from . import logging
@pd.api.extensions.register_dataframe_accessor("log")
class LogAccessor:
def __init__(self, data: pd.DataFrame):
self._data = data
def dropna(self, *args: Any, **kwargs: Any) -> pd.DataFrame:
return logging.log_filter(self._da... | 40.719298 | 83 | 0.646273 |
f360cb0716dfc877fab8ad2b977b3a1b825bde04 | 4,679 | py | Python | evgraf/crystal_reduction.py | pmla/evgraf | 13cb56e3fe5db35a41fab61e7a7a642c2f8e295e | [
"MIT"
] | 8 | 2019-12-12T13:27:00.000Z | 2022-01-29T02:30:36.000Z | evgraf/crystal_reduction.py | pmla/evgraf | 13cb56e3fe5db35a41fab61e7a7a642c2f8e295e | [
"MIT"
] | null | null | null | evgraf/crystal_reduction.py | pmla/evgraf | 13cb56e3fe5db35a41fab61e7a7a642c2f8e295e | [
"MIT"
] | null | null | null | import numpy as np
from collections import namedtuple
from ase import Atoms
from ase.geometry import find_mic
from ase.geometry.dimensionality.disjoint_set import DisjointSet
from .crystal_reducer import CrystalReducer
Reduced = namedtuple('ReducedCrystal', 'rmsd factor atoms components map')
def assign_atoms_to_cl... | 35.992308 | 79 | 0.673007 |
f5124a79217574a86438218182021646d58e5490 | 608 | py | Python | app/deployments/migrations/0035_erddapdataset_greater_than_hourly.py | gulfofmaine/buoy_barn | f04047fe17a45dbb58a3aac7703edd16616a6dfd | [
"MIT"
] | 1 | 2021-08-06T19:26:06.000Z | 2021-08-06T19:26:06.000Z | app/deployments/migrations/0035_erddapdataset_greater_than_hourly.py | gulfofmaine/buoy_barn | f04047fe17a45dbb58a3aac7703edd16616a6dfd | [
"MIT"
] | 152 | 2019-09-20T11:56:58.000Z | 2022-03-25T10:01:12.000Z | app/deployments/migrations/0035_erddapdataset_greater_than_hourly.py | gulfofmaine/buoy_barn | f04047fe17a45dbb58a3aac7703edd16616a6dfd | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-16 13:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('deployments', '0034_erddapdataset_refresh_attempted'),
]
operations = [
migrations.AddField(
model_name='erddapdataset',
... | 32 | 237 | 0.682566 |
c09e10df0569fb64dd713aa3f09c9fded15688e2 | 3,622 | py | Python | mmdetection/configs/_base_/models/faster_rcnn_r50_fpn_cocoOS_wAnchor.py | dimitymiller/openset_detection | 1f020537f7089a588f08ec4cb534dbad439cf9ff | [
"BSD-3-Clause"
] | 4 | 2022-01-17T14:34:49.000Z | 2022-03-24T05:33:56.000Z | mmdetection/configs/_base_/models/faster_rcnn_r50_fpn_cocoOS_wAnchor.py | MartinaProgrammer/openset_detection | e3dddbb70bbc204d7640b7b9a64936894b03a604 | [
"BSD-3-Clause"
] | 1 | 2021-11-01T03:08:44.000Z | 2021-11-05T01:39:33.000Z | mmdetection/configs/_base_/models/faster_rcnn_r50_fpn_cocoOS_wAnchor.py | MartinaProgrammer/openset_detection | e3dddbb70bbc204d7640b7b9a64936894b03a604 | [
"BSD-3-Clause"
] | 1 | 2021-11-15T13:06:14.000Z | 2021-11-15T13:06:14.000Z | # model settings
model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
... | 33.229358 | 105 | 0.505798 |
28be0b096b8a0983f95d60fe40bc0d8cf988e2c3 | 42,823 | py | Python | tencentcloud/dcdb/v20180411/dcdb_client.py | snowxmas/tencentcloud-sdk-python | fb527dcfc6b52a210e79d581f85cb8cde1ea9c85 | [
"Apache-2.0"
] | null | null | null | tencentcloud/dcdb/v20180411/dcdb_client.py | snowxmas/tencentcloud-sdk-python | fb527dcfc6b52a210e79d581f85cb8cde1ea9c85 | [
"Apache-2.0"
] | null | null | null | tencentcloud/dcdb/v20180411/dcdb_client.py | snowxmas/tencentcloud-sdk-python | fb527dcfc6b52a210e79d581f85cb8cde1ea9c85 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 42.357072 | 110 | 0.60269 |
0cd2d5731a912ff53cc95da54d9b900c43d9df09 | 35,676 | py | Python | lib/gui/utils.py | oveis/DeepVideoFaceSwap | e507f94d4f5d74c36e41c386c6fb14bb745a4885 | [
"MIT"
] | 5 | 2019-05-17T11:54:04.000Z | 2020-10-06T18:45:17.000Z | lib/gui/utils.py | oveis/DeepVideoFaceSwap | e507f94d4f5d74c36e41c386c6fb14bb745a4885 | [
"MIT"
] | null | null | null | lib/gui/utils.py | oveis/DeepVideoFaceSwap | e507f94d4f5d74c36e41c386c6fb14bb745a4885 | [
"MIT"
] | 5 | 2019-06-05T00:20:24.000Z | 2019-09-15T15:40:23.000Z | #!/usr/bin/env python3
""" Utility functions for the GUI """
import logging
import os
import platform
import sys
import tkinter as tk
from tkinter import filedialog, ttk
from PIL import Image, ImageTk
from lib.Serializer import JSONSerializer
from .tooltip import Tooltip
logger = logging.getLogger(__name__) # pylin... | 41.971765 | 99 | 0.584427 |
8a94b65c8e7b0376f015cf470ac530673656f01f | 4,086 | py | Python | large_image/cache_util/cachefactory.py | juliejsanchez/large_image | ae3cd1e605d9ab32a6401325d1618e7ee857acc6 | [
"Apache-2.0"
] | null | null | null | large_image/cache_util/cachefactory.py | juliejsanchez/large_image | ae3cd1e605d9ab32a6401325d1618e7ee857acc6 | [
"Apache-2.0"
] | null | null | null | large_image/cache_util/cachefactory.py | juliejsanchez/large_image | ae3cd1e605d9ab32a6401325d1618e7ee857acc6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#############################################################################
# Copyright Kitware 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
#
# ht... | 37.833333 | 96 | 0.61723 |
ecefe43cec65d278a8d5dec872724c2164393136 | 4,970 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLES2/KHR/robustness.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLES2/KHR/robustness.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GLES2/KHR/robustness.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''OpenGL extension KHR.robustness
This module customises the behaviour of the
OpenGL.raw.GLES2.KHR.robustness to provide a more
Python-friendly API
Overview (from the spec)
Several recent trends in how OpenGL ES integrates into modern computer
systems have created new requirements for robustness and s... | 44.774775 | 76 | 0.784105 |
3e894f9786ff0bfdbaba587bcccad2a36dfaf16b | 7,672 | py | Python | JumpscaleCore/servers/tmux/Tmux.py | gneumann333/jumpscaleX_core | 777d249fa3668c6e802c2f765f4b82fb39c3e5fa | [
"Apache-2.0"
] | null | null | null | JumpscaleCore/servers/tmux/Tmux.py | gneumann333/jumpscaleX_core | 777d249fa3668c6e802c2f765f4b82fb39c3e5fa | [
"Apache-2.0"
] | null | null | null | JumpscaleCore/servers/tmux/Tmux.py | gneumann333/jumpscaleX_core | 777d249fa3668c6e802c2f765f4b82fb39c3e5fa | [
"Apache-2.0"
] | null | null | null | from .Session import Session
from Jumpscale import j
import libtmux as tmuxp
import time
import psutil
JSBASE = j.baseclasses.object
skip = j.baseclasses.testtools._skip
class Tmux(j.baseclasses.object, j.baseclasses.testtools):
__jslocation__ = "j.servers.tmux"
def _init(self, **kwargs):
self._serv... | 28.309963 | 126 | 0.557742 |
ed47371da84d739de137bb4329526f151cd3a293 | 8,512 | py | Python | docs/conf.py | FRidh/python-geometry | 62cb6210bcad3b1e4c1a7e0516ca17138793c1b3 | [
"BSD-3-Clause"
] | 8 | 2015-12-16T04:39:12.000Z | 2021-04-08T15:49:23.000Z | docs/conf.py | FRidh/python-geometry | 62cb6210bcad3b1e4c1a7e0516ca17138793c1b3 | [
"BSD-3-Clause"
] | 1 | 2015-08-07T15:03:02.000Z | 2015-08-07T15:03:02.000Z | docs/conf.py | FRidh/python-geometry | 62cb6210bcad3b1e4c1a7e0516ca17138793c1b3 | [
"BSD-3-Clause"
] | 2 | 2015-03-23T02:03:04.000Z | 2020-01-09T05:01:50.000Z | # -*- coding: utf-8 -*-
#
# python-geometry documentation build configuration file, created by
# sphinx-quickstart on Sat Apr 19 11:25:20 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fil... | 31.643123 | 79 | 0.718985 |
4e8c537a3dfb7649c1aa6fe48cfeaff1d1532a6c | 28,710 | py | Python | samtranslator/model/sam_resources.py | sliedig/serverless-application-model | ee7e6cd84cea349d7698b2a8d6695f554b5aa302 | [
"Apache-2.0"
] | 2 | 2020-06-07T13:00:43.000Z | 2021-11-29T22:29:52.000Z | samtranslator/model/sam_resources.py | davfaulk/serverless-application-model | 6c963549c279868b6241e2abed907df74cb3d2b2 | [
"Apache-2.0"
] | null | null | null | samtranslator/model/sam_resources.py | davfaulk/serverless-application-model | 6c963549c279868b6241e2abed907df74cb3d2b2 | [
"Apache-2.0"
] | null | null | null | """ SAM macro definitions """
from six import string_types
import samtranslator.model.eventsources
import samtranslator.model.eventsources.pull
import samtranslator.model.eventsources.push
import samtranslator.model.eventsources.cloudwatchlogs
from .api.api_generator import ApiGenerator
from .s3_utils.uri_parser impor... | 49.160959 | 120 | 0.653953 |
8a7203652f253930fe6f9204807a355b929a050b | 616 | py | Python | app.py | reveil/varnishtest | 51c203300c0ba5a8d61b726b9dba5a9a0ff5f5aa | [
"MIT"
] | null | null | null | app.py | reveil/varnishtest | 51c203300c0ba5a8d61b726b9dba5a9a0ff5f5aa | [
"MIT"
] | null | null | null | app.py | reveil/varnishtest | 51c203300c0ba5a8d61b726b9dba5a9a0ff5f5aa | [
"MIT"
] | null | null | null | from time import sleep
from flask import Flask, request
app = Flask('varnishtest')
def row(key, value):
return '<tr><td>' + str(key) + '</td><td>' + str(value) + '</td></tr>'
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def view(path):
result = '<!DOCTYPE html><html lang="en"><head><ti... | 28 | 94 | 0.592532 |
bfe863505d48e41d6577f847801e3f0fcc158abd | 587 | py | Python | busy_beaver/apps/slack_integration/api/slash_command.py | BinSquare/busy-beaver | b8063a7e434eb47e638697719896880781f9783f | [
"MIT"
] | 55 | 2019-05-05T01:20:58.000Z | 2022-01-10T18:03:05.000Z | busy_beaver/apps/slack_integration/api/slash_command.py | BinSquare/busy-beaver | b8063a7e434eb47e638697719896880781f9783f | [
"MIT"
] | 222 | 2019-05-03T16:31:26.000Z | 2021-08-28T23:49:03.000Z | busy_beaver/apps/slack_integration/api/slash_command.py | BinSquare/busy-beaver | b8063a7e434eb47e638697719896880781f9783f | [
"MIT"
] | 19 | 2019-04-27T19:49:32.000Z | 2020-06-30T19:52:09.000Z | import logging
from flask import jsonify, request
from flask.views import MethodView
from .decorators import slack_verification_required
from busy_beaver.apps.slack_integration.slash_command import process_slash_command
logger = logging.getLogger(__name__)
class SlackSlashCommandDispatchResource(MethodView):
"... | 27.952381 | 82 | 0.775128 |
47fe7ef22a5d34b271d786e4dd6c60943dfc734a | 295 | py | Python | Space-bound.py | VaultHack/Codename-GAME- | 86faefb872298dc71494110bdc22ebb3f31a0350 | [
"Apache-2.0"
] | 3 | 2018-03-21T18:27:40.000Z | 2018-03-29T06:25:50.000Z | Space-bound.py | VaultHack/Codename-GAME- | 86faefb872298dc71494110bdc22ebb3f31a0350 | [
"Apache-2.0"
] | null | null | null | Space-bound.py | VaultHack/Codename-GAME- | 86faefb872298dc71494110bdc22ebb3f31a0350 | [
"Apache-2.0"
] | 2 | 2018-03-21T18:27:55.000Z | 2018-03-29T06:25:37.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Authors: Bogdan Pahomov(github: @VaultHack), Ostap Bodnar (@TheDevilsSon), Lana (@undergrave), Vitaliy Farbitnyk, Oleksandra Gorjievska (@SandraGorzhi)
# @Date: 2018-03-21
# @Email: shtormless@gmail.com Github: @VaultHack
#Team: GAMEDEV
| 42.142857 | 155 | 0.698305 |
bbae087e9d10e329a0516c6d8184c6d818a5f341 | 113 | py | Python | transport/transport_common.py | osedoxin/LWZ303-RS232 | 505d9bba10e70e5b8cc845285110eb3f675127c2 | [
"MIT"
] | null | null | null | transport/transport_common.py | osedoxin/LWZ303-RS232 | 505d9bba10e70e5b8cc845285110eb3f675127c2 | [
"MIT"
] | null | null | null | transport/transport_common.py | osedoxin/LWZ303-RS232 | 505d9bba10e70e5b8cc845285110eb3f675127c2 | [
"MIT"
] | 1 | 2022-01-16T12:36:26.000Z | 2022-01-16T12:36:26.000Z | FLAG_CLOSE = b"CLOSE"
FLAG_CONNECT = b"CONNECT"
FLAG_HELLO = b"HELLO"
FLAG_READ = b"READ"
FLAG_RESET = b"RESET"
| 18.833333 | 25 | 0.725664 |
81cdf00f53e91747133d369cc2c70a561b8edad2 | 10,742 | py | Python | topaz/modules/marshal.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 241 | 2015-01-02T18:49:09.000Z | 2022-03-15T15:08:45.000Z | topaz/modules/marshal.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 16 | 2015-05-04T21:31:08.000Z | 2020-06-04T22:49:36.000Z | topaz/modules/marshal.py | mswart/topaz | 4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae | [
"BSD-3-Clause"
] | 24 | 2015-02-15T05:35:11.000Z | 2022-03-22T13:29:04.000Z | from __future__ import absolute_import
from topaz.module import ModuleDef
from topaz.objects.arrayobject import W_ArrayObject
from topaz.objects.boolobject import W_TrueObject, W_FalseObject
from topaz.objects.intobject import W_FixnumObject
from topaz.objects.hashobject import W_HashObject
from topaz.objects.nilobject... | 36.787671 | 92 | 0.551946 |
c266cde923eedfce2e6acc354a4f395465a50e4d | 11,030 | py | Python | servo/api.py | DanielHHowell/servox | 789f6b1fe6afaf41b754a866d0f8bbbe079eab4f | [
"Apache-2.0"
] | null | null | null | servo/api.py | DanielHHowell/servox | 789f6b1fe6afaf41b754a866d0f8bbbe079eab4f | [
"Apache-2.0"
] | null | null | null | servo/api.py | DanielHHowell/servox | 789f6b1fe6afaf41b754a866d0f8bbbe079eab4f | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import abc
import datetime
import enum
from typing import Any, Dict, List, Optional, Tuple, Union
import backoff
import devtools
import httpx
import pydantic
import servo.types
import servo.utilities
USER_AGENT = "github.com/opsani/servox"
class OptimizerStatuses(str, enum.Enum... | 35.466238 | 163 | 0.644424 |
bb9f0b683834d69b2130af92411c80b5453b184f | 5,982 | py | Python | sdk/python/pulumi_azure_nextgen/keyvault/v20161001/secret.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/keyvault/v20161001/secret.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/keyvault/v20161001/secret.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 42.126761 | 432 | 0.641591 |
cb2709fc7a46e230dfe4f7aa9ae68694c5ab46d8 | 258 | py | Python | pysnmp/proto/secmod/rfc3414/__init__.py | RKinsey/pysnmp | 96b5cf31e2f5d19f34d0dd1075014c488f6a5789 | [
"BSD-2-Clause"
] | 492 | 2016-03-13T11:03:13.000Z | 2022-03-21T02:52:57.000Z | pysnmp/proto/secmod/rfc3414/__init__.py | bartomo/pysnmp | becd15c79c9a6b5696928ecd50bf5cca8b1770a1 | [
"BSD-2-Clause"
] | 372 | 2016-03-29T22:42:05.000Z | 2022-03-26T10:28:25.000Z | pysnmp/proto/secmod/rfc3414/__init__.py | bartomo/pysnmp | becd15c79c9a6b5696928ecd50bf5cca8b1770a1 | [
"BSD-2-Clause"
] | 197 | 2016-03-13T11:01:54.000Z | 2022-03-07T19:52:15.000Z | #
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysnmp/license.html
#
from pysnmp.proto.secmod.rfc3414 import service
SnmpUSMSecurityModel = service.SnmpUSMSecurityModel
| 25.8 | 59 | 0.77907 |
27bbe658d4d59d74ab3c4c12178e6e399d27181d | 2,908 | py | Python | tests/scripts/thread-cert/Cert_5_8_03_KeyIncrementRollOver.py | MarekPorwisz/openthread-zep | acd72411235a0630a4efaeac8969419d15fecdaa | [
"BSD-3-Clause"
] | 1 | 2022-03-18T11:20:13.000Z | 2022-03-18T11:20:13.000Z | tests/scripts/thread-cert/Cert_5_8_03_KeyIncrementRollOver.py | MarekPorwisz/openthread-zep | acd72411235a0630a4efaeac8969419d15fecdaa | [
"BSD-3-Clause"
] | 3 | 2017-03-30T22:36:13.000Z | 2020-05-29T15:04:28.000Z | tests/scripts/thread-cert/Cert_5_8_03_KeyIncrementRollOver.py | MarekPorwisz/openthread-zep | acd72411235a0630a4efaeac8969419d15fecdaa | [
"BSD-3-Clause"
] | 1 | 2016-07-05T14:44:21.000Z | 2016-07-05T14:44:21.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 36.810127 | 78 | 0.686382 |
00538d30b30a0a51c16c73ab7671168eb768b019 | 639 | py | Python | controls/chromecats/chromecats_main.py | daviddbarrero/pandora | 3c28147e9abb1c7e9180f510506f0ae8677b7ed7 | [
"MIT"
] | 1 | 2019-08-08T22:54:43.000Z | 2019-08-08T22:54:43.000Z | controls/chromecats/chromecats_main.py | neura-8/pandora | 3c28147e9abb1c7e9180f510506f0ae8677b7ed7 | [
"MIT"
] | null | null | null | controls/chromecats/chromecats_main.py | neura-8/pandora | 3c28147e9abb1c7e9180f510506f0ae8677b7ed7 | [
"MIT"
] | 1 | 2019-09-06T17:58:39.000Z | 2019-09-06T17:58:39.000Z | from __future__ import print_function
import time
import pychromecast
# Your Chromecast device Friendly Name
device_friendly_name = "Andy"
chromecasts = pychromecast.get_chromecasts()
# select Chromecast device
print(chromecasts)
for x in range(len(chromecasts)):
print( chromecasts[x].device.friendly_name)
cast... | 15.585366 | 88 | 0.766823 |
80fc17b6a2c86289d6210d1aa985ffab19bfa6ae | 2,234 | py | Python | prescient/simulator/data_manager.py | iSoron/Prescient | a3c1d7c5840893ff43dca48c40dc90f083292d26 | [
"BSD-3-Clause"
] | 1 | 2021-10-14T20:39:50.000Z | 2021-10-14T20:39:50.000Z | prescient/simulator/data_manager.py | iSoron/Prescient | a3c1d7c5840893ff43dca48c40dc90f083292d26 | [
"BSD-3-Clause"
] | null | null | null | prescient/simulator/data_manager.py | iSoron/Prescient | a3c1d7c5840893ff43dca48c40dc90f083292d26 | [
"BSD-3-Clause"
] | null | null | null | # ___________________________________________________________________________
#
# Prescient
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
# This software is ... | 30.60274 | 83 | 0.748433 |
6bd4baf4fa9d421ebe2933f0e15d959166a43c78 | 4,886 | py | Python | sdk/python/tests/unit/test_data_sources.py | benjamintanweihao/feast | b550e591f815aff53accdd064589ef06b6607d97 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/unit/test_data_sources.py | benjamintanweihao/feast | b550e591f815aff53accdd064589ef06b6607d97 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/unit/test_data_sources.py | benjamintanweihao/feast | b550e591f815aff53accdd064589ef06b6607d97 | [
"Apache-2.0"
] | null | null | null | import pytest
from feast import ValueType
from feast.data_format import ProtoFormat
from feast.data_source import (
KafkaSource,
KinesisSource,
PushSource,
RequestDataSource,
RequestSource,
)
from feast.field import Field
from feast.infra.offline_stores.bigquery_source import BigQuerySource
from fe... | 33.013514 | 87 | 0.66844 |
6e2d77d0237b9e04479e37de676b4eea87734206 | 13,978 | py | Python | src/lib/models/networks/msra_resnet_attention.py | leobean/CenterNet_simple | 13e2eab2c049563afde5defdf90434a310a32d02 | [
"MIT"
] | null | null | null | src/lib/models/networks/msra_resnet_attention.py | leobean/CenterNet_simple | 13e2eab2c049563afde5defdf90434a310a32d02 | [
"MIT"
] | null | null | null | src/lib/models/networks/msra_resnet_attention.py | leobean/CenterNet_simple | 13e2eab2c049563afde5defdf90434a310a32d02 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Bin Xiao (Bin.Xiao@microsoft.com)
# Modified by Xingyi Zhou
# ------------------------------------------------------------------------------
from __future__ i... | 35.387342 | 125 | 0.544498 |
d59414354231a90712ac1e9223842b54fbb4e452 | 2,696 | py | Python | scripts/require-ppx-coda.py | jackpaparian/coda | 6da61361bdfda7f0de0ce525230b35bac965cb17 | [
"Apache-2.0"
] | 1 | 2020-05-05T07:31:26.000Z | 2020-05-05T07:31:26.000Z | scripts/require-ppx-coda.py | kunxian-xia/coda | 93295e8b4db5f4f2d192a26f90146bf322808ef8 | [
"Apache-2.0"
] | null | null | null | scripts/require-ppx-coda.py | kunxian-xia/coda | 93295e8b4db5f4f2d192a26f90146bf322808ef8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# In dune files, require preprocessing by ppx_coda, so that the version syntax linter is always run
import subprocess
import string
import sexpdata
dune_string = subprocess.check_output(['find','src','-name','dune'])
dune_paths_raw = string.split (dune_string,'\n')
# filter out dune paths where w... | 36.931507 | 141 | 0.619436 |
1104bf92ac8d58ec08bc2a9d2724d8d9dbf925dd | 1,047 | py | Python | tools/help-center-exporter/print-articles.py | mpillar/zendesk-tools | 0ebaaac2d1481f4459fef60be352b223e75099e3 | [
"MIT"
] | 2 | 2015-03-04T16:42:52.000Z | 2016-03-24T04:00:03.000Z | tools/help-center-exporter/print-articles.py | mpillar/zendesk-tools | 0ebaaac2d1481f4459fef60be352b223e75099e3 | [
"MIT"
] | null | null | null | tools/help-center-exporter/print-articles.py | mpillar/zendesk-tools | 0ebaaac2d1481f4459fef60be352b223e75099e3 | [
"MIT"
] | null | null | null | """
Python script to print all zendesk domain articles as a single entity. Useful for checking global
formatting properties or your articles.
N.B. this python app currently does not have a wrapper script.
"""
import sys
from zendesk.api import DomainConfiguration
from zendesk.api import HelpCenter
from zendesk.forma... | 33.774194 | 97 | 0.667622 |
88da6156f6b5febfcc0d456db9c14838c57d9ed1 | 577 | py | Python | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/_Learning/problems/problem_09_getters_and_setters.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 5 | 2021-06-02T23:44:25.000Z | 2021-12-27T16:21:57.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/_Learning/problems/problem_09_getters_and_setters.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 22 | 2021-05-31T01:33:25.000Z | 2021-10-18T18:32:39.000Z | WEEKS/CD_Sata-Structures/_RESOURCES/python-prac/Overflow/_Learning/problems/problem_09_getters_and_setters.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 3 | 2021-06-19T03:37:47.000Z | 2021-08-31T00:49:51.000Z | # GETTERS AND SETTERS
#
# Create a class named "ValueHolder". On the class, create:
# * A constructor that takes self and one argument and sets the value of the
# value holder to the value passed in
# * A getter property named "value" that returns the value of the object
# * A setter property named "value" that will ... | 24.041667 | 78 | 0.696707 |
02e215a2ca318eed658fdd07bbe781dfa23a64d8 | 2,643 | py | Python | plugins/action/mnt_session_profiler_count_info.py | steinzi/ansible-ise | 0add9c8858ed8e0e5e7219fbaf0c936b6d7cc6c0 | [
"MIT"
] | null | null | null | plugins/action/mnt_session_profiler_count_info.py | steinzi/ansible-ise | 0add9c8858ed8e0e5e7219fbaf0c936b6d7cc6c0 | [
"MIT"
] | null | null | null | plugins/action/mnt_session_profiler_count_info.py | steinzi/ansible-ise | 0add9c8858ed8e0e5e7219fbaf0c936b6d7cc6c0 | [
"MIT"
] | null | null | null | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
try:
from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_validate import (
AnsibleArgSpecValidator,
)
except ImportError:
ANSIBLE_UTILS_IS_INST... | 33.0375 | 128 | 0.659478 |
c458c5f6b93e5e0c543a5db7924ec3eee9d2bf1e | 5,548 | py | Python | avatar_models/utils/create_ade20k_vqa_dataset.py | rafiberlin/sose21-pm-language-and-vision-g1 | c7f9e8912abc25191fb823a1f3ee2e0a374a1bc6 | [
"MIT"
] | null | null | null | avatar_models/utils/create_ade20k_vqa_dataset.py | rafiberlin/sose21-pm-language-and-vision-g1 | c7f9e8912abc25191fb823a1f3ee2e0a374a1bc6 | [
"MIT"
] | 46 | 2021-04-30T15:28:40.000Z | 2021-08-21T15:26:34.000Z | avatar_models/utils/create_ade20k_vqa_dataset.py | rafiberlin/sose21-pm-language-and-vision-g1 | c7f9e8912abc25191fb823a1f3ee2e0a374a1bc6 | [
"MIT"
] | 1 | 2021-08-07T19:41:12.000Z | 2021-08-07T19:41:12.000Z | from avatar_models.utils.util import get_config
import os
import json
from tqdm import tqdm
import pandas as pd
import random
import jsonlines
def read_ade20k_object_annotations():
"""
Returns the annoations
:return:object_annotations, image_annotations, rel_annotations
"""
conf = get_config()
... | 39.347518 | 135 | 0.633742 |
31946ea5d4fe4f6cad6352870f2bebb218705087 | 236 | py | Python | src/masonite/commands/UpCommand.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 1,816 | 2018-02-14T01:59:51.000Z | 2022-03-31T17:09:20.000Z | src/masonite/commands/UpCommand.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 340 | 2018-02-11T00:27:26.000Z | 2022-03-21T12:00:24.000Z | src/masonite/commands/UpCommand.py | cercos/masonite | f7f220efa7fae833683e9f07ce13c3795a87d3b8 | [
"MIT"
] | 144 | 2018-03-18T00:08:16.000Z | 2022-02-26T01:51:58.000Z | import os
from .Command import Command
class UpCommand(Command):
"""
Brings the server out of maintenance state.
up
"""
def handle(self):
os.remove(".down")
self.info("Server is online again !")
| 14.75 | 47 | 0.605932 |
c53800a23a509fda29312b818dc32c87657d746e | 7,198 | py | Python | tensorflow_model_analysis/api/tfma_unit_test.py | kennysong/model-analysis | ac0a1ca2cd9d79ebb19c5cb47b10a54129ec7dc4 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/api/tfma_unit_test.py | kennysong/model-analysis | ac0a1ca2cd9d79ebb19c5cb47b10a54129ec7dc4 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/api/tfma_unit_test.py | kennysong/model-analysis | ac0a1ca2cd9d79ebb19c5cb47b10a54129ec7dc4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.353535 | 111 | 0.661851 |
dc4f3de97f57496825767d92d56c351ea17dab48 | 1,718 | py | Python | twitoff/predict.py | max-moore/twitoff | 0ffe3cd0cdfde6960d8cb6203b790fe909f6dc0b | [
"MIT"
] | null | null | null | twitoff/predict.py | max-moore/twitoff | 0ffe3cd0cdfde6960d8cb6203b790fe909f6dc0b | [
"MIT"
] | null | null | null | twitoff/predict.py | max-moore/twitoff | 0ffe3cd0cdfde6960d8cb6203b790fe909f6dc0b | [
"MIT"
] | null | null | null | """Prediction of User based on tweet embeddings."""
#importing
import numpy as np
from sklearn.linear_model import LogisticRegression
from .models import User
from .twitter import BASILICA
def predict_user(user0_name, user1_name, tweet_text): # tweet text is a hypothetical tweet that the user passes in
"""
Dete... | 44.051282 | 114 | 0.750291 |
d2096d3197c8b3456d0ffcda00bd910207c02fe0 | 164 | py | Python | frequencia/core/templatetags/simpletags.py | andersonqueiroz/frequencia | 7dae9bb6115759edb8e8297565d0dd1b638ac94a | [
"MIT"
] | 1 | 2021-11-22T17:17:03.000Z | 2021-11-22T17:17:03.000Z | frequencia/core/templatetags/simpletags.py | andersonqueiroz/frequencia | 7dae9bb6115759edb8e8297565d0dd1b638ac94a | [
"MIT"
] | 11 | 2019-06-18T11:19:23.000Z | 2021-08-23T12:04:54.000Z | frequencia/core/templatetags/simpletags.py | andersonqueiroz/frequencia | 7dae9bb6115759edb8e8297565d0dd1b638ac94a | [
"MIT"
] | 2 | 2019-04-09T16:23:22.000Z | 2022-01-27T19:13:19.000Z | from django import template
from django.conf import settings
register = template.Library()
@register.simple_tag
def current_version():
return settings.VERSION | 20.5 | 32 | 0.804878 |
e53fe9cd85b89d436383bd4825c3f22add18f049 | 701 | py | Python | setup.py | danklotz/RRMPG | 6f3e4d694d97f3f92df5380b5ca88bcc123199e9 | [
"MIT"
] | null | null | null | setup.py | danklotz/RRMPG | 6f3e4d694d97f3f92df5380b5ca88bcc123199e9 | [
"MIT"
] | null | null | null | setup.py | danklotz/RRMPG | 6f3e4d694d97f3f92df5380b5ca88bcc123199e9 | [
"MIT"
] | 1 | 2018-12-18T21:09:04.000Z | 2018-12-18T21:09:04.000Z | from distutils.core import setup
import rrmpg
setup(
name="rrmpg",
version=rrmpg.__reversion__,
author=rrmpg.__author__,
author_email="f.kratzert[at]gmail.com",
description=("Rainfall-Runoff-Model-PlayGround: a Python library for"
"hydrological modeling."),
url="https//www.git... | 31.863636 | 73 | 0.653352 |
b568bd80858bc9d3b97d230a77818e35da70ea3a | 383 | py | Python | wbb/utils/botinfo.py | sylphiette/WilliamButcherBot | 1f715f2664ecd10fe6770ce609d799ea2c17b716 | [
"MIT"
] | null | null | null | wbb/utils/botinfo.py | sylphiette/WilliamButcherBot | 1f715f2664ecd10fe6770ce609d799ea2c17b716 | [
"MIT"
] | null | null | null | wbb/utils/botinfo.py | sylphiette/WilliamButcherBot | 1f715f2664ecd10fe6770ce609d799ea2c17b716 | [
"MIT"
] | null | null | null | BOT_ID = 0
BOT_NAME = ""
BOT_USERNAME = ""
BOT_DC_ID = 0
async def get_info(app):
global BOT_ID, BOT_NAME, BOT_USERNAME, BOT_DC_ID
getme = await app.get_me()
BOT_ID = getme.id
if getme.last_name:
BOT_NAME = getme.first_name + " " + getme.last_name
else:
BOT_NAME = getme.first_name... | 21.277778 | 59 | 0.660574 |
47e744c07ec7901b2d0f5056dd65201f4516cec6 | 579 | py | Python | src/sensationdriver/profiler.py | sebastianludwig/SensationDriver | 8787afa8fb55a43af69d83192a4f09a4279b5c00 | [
"MIT"
] | null | null | null | src/sensationdriver/profiler.py | sebastianludwig/SensationDriver | 8787afa8fb55a43af69d83192a4f09a4279b5c00 | [
"MIT"
] | null | null | null | src/sensationdriver/profiler.py | sebastianludwig/SensationDriver | 8787afa8fb55a43af69d83192a4f09a4279b5c00 | [
"MIT"
] | null | null | null | import time
import itertools
class Profiler(object):
def __init__(self):
self.entries = []
def save_data(self, path):
def flatten(entry):
return itertools.chain(entry[:2], entry[2])
def convert(entry):
return ';'.join(str(element).replace("\n", ';') for element... | 25.173913 | 81 | 0.566494 |
3c5dc469faa4afa171fc90646f78bb1da692742a | 25,477 | py | Python | nuitka/tree/ReformulationFunctionStatements.py | em3ndez/Nuitka | a5a036a94c1842d1cd72f27c0c67461798fdf977 | [
"Apache-2.0"
] | 1 | 2019-09-09T19:27:43.000Z | 2019-09-09T19:27:43.000Z | nuitka/tree/ReformulationFunctionStatements.py | em3ndez/Nuitka | a5a036a94c1842d1cd72f27c0c67461798fdf977 | [
"Apache-2.0"
] | 1 | 2019-02-21T13:05:17.000Z | 2019-02-21T13:05:17.000Z | nuitka/tree/ReformulationFunctionStatements.py | em3ndez/Nuitka | a5a036a94c1842d1cd72f27c0c67461798fdf977 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 32.579284 | 91 | 0.646779 |
56a43a4b261257454609b6505fa4da65ca1a26b8 | 12,655 | py | Python | nasbench2_subset_pred.py | debadeepta/zero-cost-nas | e14ee81078ed1a2f0e11d4db6e12bddf4b309776 | [
"Apache-2.0"
] | null | null | null | nasbench2_subset_pred.py | debadeepta/zero-cost-nas | e14ee81078ed1a2f0e11d4db6e12bddf4b309776 | [
"Apache-2.0"
] | null | null | null | nasbench2_subset_pred.py | debadeepta/zero-cost-nas | e14ee81078ed1a2f0e11d4db6e12bddf4b309776 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Samsung Electronics Co., Ltd.
#
# 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... | 81.121795 | 6,292 | 0.663216 |
4643e34ee0f7fc963093ab9a445fca3eec3bbe3e | 486 | py | Python | setup.py | kvdogan/advanced_tools | 7e93232374980d83fda8051496a190188c11fe0d | [
"MIT"
] | null | null | null | setup.py | kvdogan/advanced_tools | 7e93232374980d83fda8051496a190188c11fe0d | [
"MIT"
] | null | null | null | setup.py | kvdogan/advanced_tools | 7e93232374980d83fda8051496a190188c11fe0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
from setuptools import setup, find_packages
setup(
name='advanced_tools',
version='0.6',
description='Utility functions,scripts for daily operations',
url='http://github.com/kvdogan/advanced_tools',
author='kvdogan',
packages=find_packages(),
include... | 24.3 | 88 | 0.699588 |
c666711e0252afa1b07b778137aa6ac2626db0f8 | 1,510 | py | Python | aliyunsdkcore/auth/url_encoder.py | gikoluo/aliyun-python-sdk-core | 5c4e79ad5f7668af048ae1a18d424c4919131a9c | [
"MIT"
] | 1 | 2019-05-30T03:53:33.000Z | 2019-05-30T03:53:33.000Z | aliyun-python-sdk-release-test/aliyunsdkcore/auth/url_encoder.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-release-test/aliyunsdkcore/auth/url_encoder.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | 4 | 2017-07-27T11:27:01.000Z | 2020-09-01T07:49:21.000Z | # 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... | 29.607843 | 73 | 0.689404 |
185a0d5f3e5bd6a492c6dbc3a52a1fe3e79947f8 | 1,308 | py | Python | ecowitt2mqtt/data.py | mike240se/ecowitt2mqtt | 2f922f3d287b0935eb05122da6dba4b557ec97e6 | [
"MIT"
] | null | null | null | ecowitt2mqtt/data.py | mike240se/ecowitt2mqtt | 2f922f3d287b0935eb05122da6dba4b557ec97e6 | [
"MIT"
] | null | null | null | ecowitt2mqtt/data.py | mike240se/ecowitt2mqtt | 2f922f3d287b0935eb05122da6dba4b557ec97e6 | [
"MIT"
] | null | null | null | """Define helpers to process data from an Ecowitt device."""
import meteocalc
from ecowitt2mqtt.const import (
DATA_POINT_DEWPOINT,
DATA_POINT_FEELSLIKEF,
DATA_POINT_HEATINDEX,
DATA_POINT_HUMIDITY,
DATA_POINT_TEMPF,
DATA_POINT_WINDCHILL,
DATA_POINT_WINDSPEEDMPH,
LOGGER,
)
def process_... | 29.727273 | 83 | 0.707951 |
c520583e6d33d9782f60d9ae2cc0d224b918a56c | 10,208 | py | Python | docs/conf.py | Unite-Genomics/django-cognito-jwt | 75aa2a90c91a45233dea418d2a847104aae5a9ec | [
"MIT"
] | 139 | 2018-08-15T13:26:21.000Z | 2022-03-20T15:37:05.000Z | docs/conf.py | Unite-Genomics/django-cognito-jwt | 75aa2a90c91a45233dea418d2a847104aae5a9ec | [
"MIT"
] | 31 | 2019-01-10T20:48:35.000Z | 2022-02-10T12:13:07.000Z | docs/conf.py | Unite-Genomics/django-cognito-jwt | 75aa2a90c91a45233dea418d2a847104aae5a9ec | [
"MIT"
] | 50 | 2018-12-13T10:35:27.000Z | 2022-03-20T06:40:10.000Z | # -*- coding: utf-8 -*-
#
# django-cognito-jwt documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 10 17:06:14 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated ... | 29 | 80 | 0.702782 |
1c01d2ea71039b8a3339431f7c58939870329af5 | 53,319 | py | Python | clients/python-experimental/generated/openapi_client/api_client.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-experimental/generated/openapi_client/api_client.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-experimental/generated/openapi_client/api_client.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
The version of the OpenAPI document: 1.1.2-pre.0
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
from dataclasses import dataclass
from decimal import D... | 38.862245 | 120 | 0.591403 |
fe99ed590525baa19138b9476290b9752e101ee8 | 3,390 | py | Python | pollme/settings.py | Sbborashetti/pollme | deed93939238e3f59e6c910caddfe10d5644559c | [
"MIT"
] | null | null | null | pollme/settings.py | Sbborashetti/pollme | deed93939238e3f59e6c910caddfe10d5644559c | [
"MIT"
] | null | null | null | pollme/settings.py | Sbborashetti/pollme | deed93939238e3f59e6c910caddfe10d5644559c | [
"MIT"
] | null | null | null | """
Django settings for pollme project.
Generated by 'django-admin startproject' using Django 2.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# ... | 26.484375 | 91 | 0.70118 |
630a02f14b7ce854b9662a2b57ded038b87249d9 | 423 | py | Python | users/migrations/0004_profile_social_stackoverflow.py | Kimutai01/kimsearch | dcf484c91b25d09ad2d5b736e363a6dc3bbe7031 | [
"MIT"
] | null | null | null | users/migrations/0004_profile_social_stackoverflow.py | Kimutai01/kimsearch | dcf484c91b25d09ad2d5b736e363a6dc3bbe7031 | [
"MIT"
] | null | null | null | users/migrations/0004_profile_social_stackoverflow.py | Kimutai01/kimsearch | dcf484c91b25d09ad2d5b736e363a6dc3bbe7031 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2022-01-13 09:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0003_profile_location_skill'),
]
operations = [
migrations.AddField(
model_name='profile',
name='social_stack... | 22.263158 | 74 | 0.621749 |
e4be150f44ea8de4f803cbec2442d587fa7bf2f5 | 5,097 | py | Python | code/nn/act.py | niuwk/infonets | 274e97c9a86144dd52cbe90caffff578a2f5d178 | [
"BSD-3-Clause"
] | 8 | 2018-06-20T23:20:43.000Z | 2020-01-12T01:32:06.000Z | code/nn/act.py | niuwk/infonets | 274e97c9a86144dd52cbe90caffff578a2f5d178 | [
"BSD-3-Clause"
] | null | null | null | code/nn/act.py | niuwk/infonets | 274e97c9a86144dd52cbe90caffff578a2f5d178 | [
"BSD-3-Clause"
] | 4 | 2018-06-26T20:28:13.000Z | 2021-06-17T13:39:56.000Z | # act.py
"""
Created on Sat May 5 22:24:18 2018
@author: Wentao Huang
"""
#import torch as tc
#from torch.nn import functional as F
#from ..utils.helper import is_number, to_Param
from .base import Base
from .fun import *
class PLU(Base):
r"""
Applies the piecewise linear unit function element-wise,
:ma... | 29.462428 | 99 | 0.586031 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.