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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28bc5e0e8fd4904ff40f8f2f91f7f0148893977b | 840 | py | Python | qleader/views/result_receiver.py | QuantMarkFramework/WebMark | dccd524c5217bc7b365dcd3fbc4fce59827e95fa | [
"MIT"
] | null | null | null | qleader/views/result_receiver.py | QuantMarkFramework/WebMark | dccd524c5217bc7b365dcd3fbc4fce59827e95fa | [
"MIT"
] | null | null | null | qleader/views/result_receiver.py | QuantMarkFramework/WebMark | dccd524c5217bc7b365dcd3fbc4fce59827e95fa | [
"MIT"
] | 1 | 2021-07-27T05:41:34.000Z | 2021-07-27T05:41:34.000Z | from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated
from qleader.initializers import create_result
import json
@api_view(["GET", "POST"])
@permission_classes([IsAuthen... | 32.307692 | 76 | 0.69881 |
70e53cc95d4ef6b2befb55509d432d01f9a777e0 | 7,176 | py | Python | examples/pwr_run/checkpointing/short/random2/job17.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/short/random2/job17.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/short/random2/job17.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 30.931034 | 118 | 0.69607 |
0c8a89a87663b95a7cf0abb5c75d9f8fd7a1989a | 8,836 | py | Python | Mayank/blpapi_python3.5.5/examples/IntradayBarExample.py | anshulkgupta/viznow | 119511770e1f5e137fa01e5f3cd56005a2871268 | [
"MIT"
] | null | null | null | Mayank/blpapi_python3.5.5/examples/IntradayBarExample.py | anshulkgupta/viznow | 119511770e1f5e137fa01e5f3cd56005a2871268 | [
"MIT"
] | null | null | null | Mayank/blpapi_python3.5.5/examples/IntradayBarExample.py | anshulkgupta/viznow | 119511770e1f5e137fa01e5f3cd56005a2871268 | [
"MIT"
] | null | null | null | # IntradayBarExample.py
import blpapi
import copy
import datetime
from optparse import OptionParser, Option, OptionValueError
BAR_DATA = blpapi.Name("barData")
BAR_TICK_DATA = blpapi.Name("barTickData")
OPEN = blpapi.Name("open")
HIGH = blpapi.Name("high")
LOW = blpapi.Name("low")
CLOSE = blpapi.Name("close")
VOLUME... | 35.063492 | 78 | 0.598234 |
01eb9890cd257953fcf51b33754b0ad7ae5d91ba | 10,204 | py | Python | L1Trigger/L1TMuonEndCap/test/RunTrackFinder_data.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1Trigger/L1TMuonEndCap/test/RunTrackFinder_data.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1Trigger/L1TMuonEndCap/test/RunTrackFinder_data.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | from __future__ import print_function
## 11.02.16: Copied from https://raw.githubusercontent.com/dcurry09/EMTF8/master/L1Trigger/L1TMuonEndCap/test/runMuonEndCap.py
import FWCore.ParameterSet.Config as cms
import os
import sys
import commands
import subprocess
process = cms.Process('L1TMuonEmulation')
process.add_(c... | 44.951542 | 154 | 0.73677 |
bfa104acece8d44fa80aed2e30b97348504a1deb | 3,530 | py | Python | tests/test_examples.py | UltronAI/habitat-sim | f8fd41a56b9ad2cbc4781d2a16291ca83ce91964 | [
"MIT"
] | 1,457 | 2019-02-21T21:42:41.000Z | 2022-03-29T13:34:28.000Z | tests/test_examples.py | Shubodh/habitat-sim | 83b97f42199855e63407d898e20e99780dfc79c0 | [
"MIT"
] | 1,131 | 2019-02-27T16:14:06.000Z | 2022-03-31T15:41:24.000Z | tests/test_examples.py | Shubodh/habitat-sim | 83b97f42199855e63407d898e20e99780dfc79c0 | [
"MIT"
] | 316 | 2019-02-26T22:45:38.000Z | 2022-03-26T04:55:32.000Z | import itertools
from os import path as osp
import pytest
import habitat_sim
from utils import run_main_subproc
def powerset(iterable):
s = list(iterable)
return itertools.chain.from_iterable(
itertools.combinations(s, r) for r in range(len(s) + 1)
)
@pytest.mark.gfxtest
@pytest.mark.skipif(
... | 27.578125 | 86 | 0.586686 |
d349ed055628fcb84583875bad0b9e5e4e7afded | 5,179 | py | Python | bokeh/util/testing.py | evidation-health/bokeh | 2c580d93419033b962d36e3c46d7606cc2f24606 | [
"BSD-3-Clause"
] | 1 | 2017-08-02T23:12:03.000Z | 2017-08-02T23:12:03.000Z | bokeh/util/testing.py | evidation-health/bokeh | 2c580d93419033b962d36e3c46d7606cc2f24606 | [
"BSD-3-Clause"
] | null | null | null | bokeh/util/testing.py | evidation-health/bokeh | 2c580d93419033b962d36e3c46d7606cc2f24606 | [
"BSD-3-Clause"
] | null | null | null | """ Functions to help with testing Bokeh and reporting issues.
"""
from __future__ import absolute_import, print_function
import mock
import threading
import time
import uuid
import unittest
import requests
from requests.exceptions import ConnectionError
from bokeh.server import start, configure
from bokeh.server.app... | 27.115183 | 81 | 0.64163 |
1d563045fc9732d8dd9eb071dee608abe96ea83e | 80 | py | Python | data/__init__.py | tstringer/pypic | df9cc915954ede4073981f02bad6aef193c9bb4b | [
"MIT"
] | null | null | null | data/__init__.py | tstringer/pypic | df9cc915954ede4073981f02bad6aef193c9bb4b | [
"MIT"
] | null | null | null | data/__init__.py | tstringer/pypic | df9cc915954ede4073981f02bad6aef193c9bb4b | [
"MIT"
] | null | null | null | """Database API"""
from .upload import create_upload_table, insert_upload_data
| 20 | 59 | 0.8 |
dae971e7fd21437431f8c708ff025933583f6fab | 4,949 | py | Python | tests/lib/bes/fs/test_file_metadata_db.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | tests/lib/bes/fs/test_file_metadata_db.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | tests/lib/bes/fs/test_file_metadata_db.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-
import os.path as path
from bes.testing.unit_test import unit_test
from bes.fs.detail.file_metadata_db import file_metadata_db
from bes.fs.file_metadata import file_metadata
from bes.fs.file_util import fil... | 48.048544 | 93 | 0.680137 |
039765f87ad5b97ea8c1ba9a7137352579fd8340 | 3,328 | py | Python | scripts/main.py | antoine-spahr/Equation-Reading-by-Robot-Tracking | c7c08283ecf39b15440bf71a7cbe9419365833cb | [
"MIT"
] | null | null | null | scripts/main.py | antoine-spahr/Equation-Reading-by-Robot-Tracking | c7c08283ecf39b15440bf71a7cbe9419365833cb | [
"MIT"
] | null | null | null | scripts/main.py | antoine-spahr/Equation-Reading-by-Robot-Tracking | c7c08283ecf39b15440bf71a7cbe9419365833cb | [
"MIT"
] | null | null | null | import click
import os
import sys
sys.path.append('../')
import imageio
import numexpr
import matplotlib.pyplot as plt
from src.detection.detector import Detector
from src.tracking.tracker import Tracker
from src.utils.output_utils import draw_output_frame, save_video
from src.utils.print_utils import print_progessb... | 36.571429 | 122 | 0.661959 |
5fbaa6982b3f22da797fe7834ef87cb2f5ee85ec | 952 | py | Python | spectogram analysis/tsne.py | wittycodes/micro-snippets | 2d774671ef85c813f0305b2e21c6ead4f0b2f73e | [
"MIT"
] | null | null | null | spectogram analysis/tsne.py | wittycodes/micro-snippets | 2d774671ef85c813f0305b2e21c6ead4f0b2f73e | [
"MIT"
] | null | null | null | spectogram analysis/tsne.py | wittycodes/micro-snippets | 2d774671ef85c813f0305b2e21c6ead4f0b2f73e | [
"MIT"
] | null | null | null | from sklearn import datasets
from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
thres=250
a=Image.open('spec.jpeg')
a.load()
a=a.convert('L')
ar = np.asarray(a, dtype="int32" )
print(np.average(ar))
b=np.tanh(ar-np.average(ar))
c=b-np.min(b)
intensity=np.sum(n... | 15.354839 | 43 | 0.588235 |
7e89b2a176e85160a3dc535d30f337c3261bbe0a | 247 | py | Python | python/testData/inspections/PyCompatibilityInspection/starExpression.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2018-12-29T09:53:39.000Z | 2018-12-29T09:53:42.000Z | python/testData/inspections/PyCompatibilityInspection/starExpression.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | null | null | null | python/testData/inspections/PyCompatibilityInspection/starExpression.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 1 | 2018-10-03T12:35:06.000Z | 2018-10-03T12:35:06.000Z | t = (1, <warning descr="Python versions < 3.5 do not support starred expressions in tuples, lists, and sets">*(2, 3)</warning>)
a, <warning descr="Python versions < 3.0 do not support starred expressions as assignment targets">*b</warning>, c = t
| 82.333333 | 127 | 0.716599 |
88e61f3258d0b964daebd0d78ee8e0473babd059 | 391 | py | Python | icekit/plugins/location/content_plugins.py | ic-labs/django-icekit | c507ea5b1864303732c53ad7c5800571fca5fa94 | [
"MIT"
] | 52 | 2016-09-13T03:50:58.000Z | 2022-02-23T16:25:08.000Z | icekit/plugins/location/content_plugins.py | ic-labs/django-icekit | c507ea5b1864303732c53ad7c5800571fca5fa94 | [
"MIT"
] | 304 | 2016-08-11T14:17:30.000Z | 2020-07-22T13:35:18.000Z | icekit/plugins/location/content_plugins.py | ic-labs/django-icekit | c507ea5b1864303732c53ad7c5800571fca5fa94 | [
"MIT"
] | 12 | 2016-09-21T18:46:35.000Z | 2021-02-15T19:37:50.000Z | """
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class LocationPlugin(ContentPlugin):
model = models.LocationItem
category = _('Assets')
render_template = ... | 24.4375 | 65 | 0.762148 |
0b6fb229c07622e1337f3c698fa2f4ff27be1e91 | 15,805 | py | Python | tests/python/test_basic_models.py | Kirandeep787/xgboost | cf4f019ed63b94a8ba15d854a44feeaeeec385b0 | [
"Apache-2.0"
] | null | null | null | tests/python/test_basic_models.py | Kirandeep787/xgboost | cf4f019ed63b94a8ba15d854a44feeaeeec385b0 | [
"Apache-2.0"
] | 1 | 2020-10-05T13:10:36.000Z | 2020-10-05T13:10:36.000Z | tests/python/test_basic_models.py | Kirandeep787/xgboost | cf4f019ed63b94a8ba15d854a44feeaeeec385b0 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import xgboost as xgb
import unittest
import os
import json
import testing as tm
import pytest
import locale
import tempfile
dpath = 'demo/data/'
dtrain = xgb.DMatrix(dpath + 'agaricus.txt.train')
dtest = xgb.DMatrix(dpath + 'agaricus.txt.test')
rng = np.random.RandomState(1994)
def json_model(mo... | 38.928571 | 79 | 0.56944 |
e5084759a98ede0f04f0401096ddae6df077ad9b | 21,296 | py | Python | neutron/tests/functional/agent/l3/framework.py | osic-neutron/neutron-ipcapacity | 678cbadb0be57203e0cc4c493082d2d54afc7c17 | [
"Apache-2.0"
] | null | null | null | neutron/tests/functional/agent/l3/framework.py | osic-neutron/neutron-ipcapacity | 678cbadb0be57203e0cc4c493082d2d54afc7c17 | [
"Apache-2.0"
] | null | null | null | neutron/tests/functional/agent/l3/framework.py | osic-neutron/neutron-ipcapacity | 678cbadb0be57203e0cc4c493082d2d54afc7c17 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 44.091097 | 79 | 0.637538 |
b3bed81c847f23bc5d607d0c8794a65c80594445 | 2,815 | py | Python | knowledge_base/utils.py | jakubro/knowledge_base | 07efafef728a70866ef2466f94876cca91088bf6 | [
"MIT"
] | null | null | null | knowledge_base/utils.py | jakubro/knowledge_base | 07efafef728a70866ef2466f94876cca91088bf6 | [
"MIT"
] | null | null | null | knowledge_base/utils.py | jakubro/knowledge_base | 07efafef728a70866ef2466f94876cca91088bf6 | [
"MIT"
] | null | null | null | import itertools
from typing import List
def incrementdefault(obj: dict, key, default: int = 0) -> int:
"""Increments value stored in the `obj` under `key`.
Returns the incremented value.
If value with specified key does not exist, then initializes it with
`default` and then increments it.
"""
... | 27.598039 | 76 | 0.611012 |
efa3d3d90bf6deb1ea8dbdcf03f20196aa72645d | 1,399 | py | Python | src/scripts/webscrapers/weather.py | AnimatorOfSouls/Team-News | 41b025cd93ca29d64b6d1ce535d160a978671b0c | [
"MIT"
] | 1 | 2022-02-13T15:26:18.000Z | 2022-02-13T15:26:18.000Z | src/scripts/webscrapers/weather.py | AnimatorOfSouls/Team-News | 41b025cd93ca29d64b6d1ce535d160a978671b0c | [
"MIT"
] | null | null | null | src/scripts/webscrapers/weather.py | AnimatorOfSouls/Team-News | 41b025cd93ca29d64b6d1ce535d160a978671b0c | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import json
import numpy as np
def makeurl(country):
return f'https://www.google.com/search?q=weather+{country}'
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"
LANGUAGE ... | 29.145833 | 130 | 0.622588 |
6ba079f1b04589b28a32e3fffd83ec9f5ad90d72 | 1,000 | py | Python | byteps/server/__init__.py | ChrisQiqiang/allocation | 762d11052fbd2a71560a909ca4760f65da6866c3 | [
"Apache-2.0"
] | 3,361 | 2019-06-25T11:53:10.000Z | 2022-03-31T07:42:28.000Z | byteps/server/__init__.py | ChrisQiqiang/allocation | 762d11052fbd2a71560a909ca4760f65da6866c3 | [
"Apache-2.0"
] | 315 | 2019-06-26T05:20:55.000Z | 2022-03-29T10:02:44.000Z | byteps/server/__init__.py | ChrisQiqiang/allocation | 762d11052fbd2a71560a909ca4760f65da6866c3 | [
"Apache-2.0"
] | 506 | 2019-06-25T12:24:07.000Z | 2022-03-31T07:06:19.000Z | # Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 35.714286 | 80 | 0.678 |
1eed894901812f61f67ead284fa53edca9d7990d | 1,626 | py | Python | client/client.py | Asienwald/PSEC-CA2-SPAM | 7385678e7c193bf5b611f1314004b9ee85e08f8c | [
"MIT"
] | null | null | null | client/client.py | Asienwald/PSEC-CA2-SPAM | 7385678e7c193bf5b611f1314004b9ee85e08f8c | [
"MIT"
] | null | null | null | client/client.py | Asienwald/PSEC-CA2-SPAM | 7385678e7c193bf5b611f1314004b9ee85e08f8c | [
"MIT"
] | null | null | null | import asyncio
import pickle
class Client():
pdata = []
# run the loops for async
def run(self, message):
self.loop = asyncio.new_event_loop()
self.loop.run_until_complete(self.handle_server(message))
self.loop.close()
# close loop
def close_client(self):
self.loop... | 28.034483 | 74 | 0.598401 |
2bf3310b8460e56e9b0ee4424d54530c3bc64ce6 | 493 | py | Python | Apps/phdigitalshadows/dsapi/model/ds_model.py | ryanbsaunders/phantom-apps | 1befda793a08d366fbd443894f993efb1baf9635 | [
"Apache-2.0"
] | 74 | 2019-10-22T02:00:53.000Z | 2022-03-15T12:56:13.000Z | Apps/phdigitalshadows/dsapi/model/ds_model.py | ryanbsaunders/phantom-apps | 1befda793a08d366fbd443894f993efb1baf9635 | [
"Apache-2.0"
] | 375 | 2019-10-22T20:53:50.000Z | 2021-11-09T21:28:43.000Z | Apps/phdigitalshadows/dsapi/model/ds_model.py | ryanbsaunders/phantom-apps | 1befda793a08d366fbd443894f993efb1baf9635 | [
"Apache-2.0"
] | 175 | 2019-10-23T15:30:42.000Z | 2021-11-05T21:33:31.000Z | # File: ds_model.py
#
# Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
#
from abc import ABCMeta, abstractmethod
class DSModel(object, metaclass=ABCMeta):
@staticmethod
def cast(value, to_type):
try:
return to_type(value)
except (ValueError, TypeError... | 20.541667 | 77 | 0.626775 |
a41ce48eaf43490b0bcb2973de4c8cd4944e571a | 4,701 | py | Python | dataflowlauncher/utils/pub_sub_utils.py | QubitProducts/dataflow_launcher | 3378332483ca8a744c2990ce6ebdf76eb5f0d66f | [
"MIT"
] | 14 | 2017-11-24T13:59:28.000Z | 2019-11-02T13:33:12.000Z | dataflowlauncher/utils/pub_sub_utils.py | QubitProducts/dataflow_launcher | 3378332483ca8a744c2990ce6ebdf76eb5f0d66f | [
"MIT"
] | 2 | 2017-12-05T11:15:44.000Z | 2018-03-01T13:19:14.000Z | dataflowlauncher/utils/pub_sub_utils.py | QubitProducts/dataflow_launcher | 3378332483ca8a744c2990ce6ebdf76eb5f0d66f | [
"MIT"
] | 5 | 2017-12-04T23:14:13.000Z | 2020-02-29T16:57:13.000Z | import logging
import time
SEPARATOR = '-'
CATCH_ALL_SUBSCRIPTION = 'default-subscription'
def get_pubsub_name(project_id, resource_type, name):
return 'projects/{}/{}/{}'.format(project_id, resource_type, name)
def get_topic_name(project_id, topic):
return get_pubsub_name(project_id, 'topics', topic)
de... | 36.726563 | 79 | 0.694533 |
15bafbe90663a21d889b0307d0c93525656b2eb9 | 5,022 | py | Python | pysparksamples/clinical_job.py | aws-samples/aws-glue-athena-tcga | 03287ef03f2a025921ed276dbb1f1a1feb266b8c | [
"MIT-0"
] | 4 | 2022-01-19T21:18:09.000Z | 2022-01-19T21:20:51.000Z | pysparksamples/clinical_job.py | aws-samples/aws-glue-athena-tcga | 03287ef03f2a025921ed276dbb1f1a1feb266b8c | [
"MIT-0"
] | null | null | null | pysparksamples/clinical_job.py | aws-samples/aws-glue-athena-tcga | 03287ef03f2a025921ed276dbb1f1a1feb266b8c | [
"MIT-0"
] | 1 | 2021-06-10T18:53:55.000Z | 2021-06-10T18:53:55.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without ... | 31 | 116 | 0.674233 |
66fe7908732422b4a46136899a6618d54588767b | 311 | py | Python | mmdet/apis/__init__.py | cizhenshi/Rscup2019-Object-Detection-Track-3th-Solution | e2ffe1a0c01789c369cfe21a7d0372239a4a4682 | [
"Apache-2.0"
] | 8 | 2019-12-20T06:23:00.000Z | 2021-07-02T09:37:31.000Z | mmdet/apis/__init__.py | clw5180/Rscup2019-Object-Detection-Track-3th-Solution | e2ffe1a0c01789c369cfe21a7d0372239a4a4682 | [
"Apache-2.0"
] | 1 | 2019-12-31T05:16:15.000Z | 2019-12-31T05:16:15.000Z | mmdet/apis/__init__.py | cizhenshi/Rscup2019-Object-Detection-Track-3th-Solution | e2ffe1a0c01789c369cfe21a7d0372239a4a4682 | [
"Apache-2.0"
] | 3 | 2019-12-20T06:23:09.000Z | 2020-10-27T14:12:38.000Z | from .env import init_dist, get_root_logger, set_random_seed
from .train import train_detector
from .inference import init_detector, inference_detector, show_result
__all__ = [
'init_dist', 'get_root_logger', 'set_random_seed', 'train_detector',
'init_detector', 'inference_detector', 'show_result'
]
| 31.1 | 72 | 0.784566 |
bdfe6e4914ce5353ab4d8a24bbd91ac241fb7cfd | 252 | py | Python | example/code/make_example.py | ryanedmundkessler/parametric_empirical_bayes | 65b89ad3e84b99318da899fdee2e9dfe2610afbc | [
"MIT"
] | 3 | 2021-03-18T22:51:06.000Z | 2021-04-18T03:56:15.000Z | example/code/make_example.py | ryanedmundkessler/parametric_empirical_bayes | 65b89ad3e84b99318da899fdee2e9dfe2610afbc | [
"MIT"
] | null | null | null | example/code/make_example.py | ryanedmundkessler/parametric_empirical_bayes | 65b89ad3e84b99318da899fdee2e9dfe2610afbc | [
"MIT"
] | 1 | 2021-03-16T02:47:59.000Z | 2021-03-16T02:47:59.000Z | import os, sys, subprocess, shutil
python_lib_path = '../../lib/python/'
shutil.copytree(python_lib_path, './python_lib/')
from python_lib.make_utils import *
clear_dirs(['../output/'])
run_rbatch(program = 'example.R')
shutil.rmtree('python_lib') | 22.909091 | 49 | 0.72619 |
191ad66f82409e9baf6b58117359dd63362d8ffa | 3,956 | py | Python | remarkablefuse/fuser.py | peteh/remarkable-fuse | f2092e0d86fa644ccc4f4480a291afe72cce5746 | [
"Apache-2.0"
] | 1 | 2021-02-18T11:35:11.000Z | 2021-02-18T11:35:11.000Z | remarkablefuse/fuser.py | peteh/remarkable-fuse | f2092e0d86fa644ccc4f4480a291afe72cce5746 | [
"Apache-2.0"
] | null | null | null | remarkablefuse/fuser.py | peteh/remarkable-fuse | f2092e0d86fa644ccc4f4480a291afe72cce5746 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import with_statement
import os
import sys
import errno
import shutil
from fusepy import FUSE, FuseOSError, Operations
class Passthrough(Operations):
def __init__(self, root):
self.root = root
# Helpers
# =======
def _full_path(self, partial):
... | 27.859155 | 87 | 0.596309 |
aee776d04206d764b6e9bfa98efa7f7a906506e3 | 2,034 | py | Python | switchmap/cli/start.py | PalisadoesFoundation/switchmap-ng | bc3d5faa662cf78df01884fc60780a43564ca47a | [
"Apache-2.0"
] | 6 | 2017-06-24T05:44:25.000Z | 2018-03-03T16:04:44.000Z | switchmap/cli/start.py | PalisadoesFoundation/switchmap-ng | bc3d5faa662cf78df01884fc60780a43564ca47a | [
"Apache-2.0"
] | 72 | 2017-01-08T00:23:28.000Z | 2017-06-03T18:27:01.000Z | switchmap/cli/start.py | PalisadoesFoundation/switchmap-ng | bc3d5faa662cf78df01884fc60780a43564ca47a | [
"Apache-2.0"
] | 3 | 2016-12-11T04:16:23.000Z | 2017-03-30T16:33:13.000Z | #!/usr/bin/env python3
"""switchmap CLI functions for 'start'.
Functions to start daemons
"""
# Main python libraries
import sys
# Switchmap-NG imports
from switchmap.utils import general
from switchmap.main.agent import Agent, AgentAPI, AgentDaemon
from switchmap.constants import (
API_EXECUTABLE, API_GUNICORN... | 20.545455 | 65 | 0.638643 |
7355d474f9cc7b794691efddb96b898b08c85780 | 1,477 | py | Python | bertdotbill/app.py | berttejeda/bert.bill | 41f575974ee627793be47d6c352803010ddbcf05 | [
"BSD-3-Clause"
] | null | null | null | bertdotbill/app.py | berttejeda/bert.bill | 41f575974ee627793be47d6c352803010ddbcf05 | [
"BSD-3-Clause"
] | null | null | null | bertdotbill/app.py | berttejeda/bert.bill | 41f575974ee627793be47d6c352803010ddbcf05 | [
"BSD-3-Clause"
] | null | null | null | from bertdotbill.defaults import app_name
from bertdotbill.api import API
from bertdotbill.entrypoint import get_entrypoint
from bertdotbill.ui import UI
from bertdotbill.cli import parse_args
from bertdotbill.config import Config
from bertdotbill.logger import Logger
import sys
import webview
# Read command-line args... | 29.54 | 88 | 0.736628 |
0bde28d6ec79cf5cd59e0a8e987065ed43233185 | 14,149 | py | Python | uwkm_streamfields/icons.py | Logmytech/uwkm_streamfields | d5d2d879ed6037c384f9b4102128cd7cc4f938e6 | [
"BSD-3-Clause"
] | null | null | null | uwkm_streamfields/icons.py | Logmytech/uwkm_streamfields | d5d2d879ed6037c384f9b4102128cd7cc4f938e6 | [
"BSD-3-Clause"
] | null | null | null | uwkm_streamfields/icons.py | Logmytech/uwkm_streamfields | d5d2d879ed6037c384f9b4102128cd7cc4f938e6 | [
"BSD-3-Clause"
] | null | null | null | from wagtail.core.blocks import ChoiceBlock
class IconChoiceBlock(ChoiceBlock):
choices = [
('address-book', 'address-book'),
('address-book-o', 'address-book-o'),
('address-card', 'address-card'),
('address-card-o', 'address-card-o'),
('adjust', 'adjust'),
('american-sign-language-interpreting', 'america... | 30.960613 | 81 | 0.557354 |
f9279fd546392b26db0dcbde66dc10776b1b40e2 | 6,456 | py | Python | prebind.py | hinesmr/mica | 82d26b9c6b04e1b8cea7d80c054e2cf482a58520 | [
"Apache-2.0"
] | 6 | 2015-01-26T16:14:43.000Z | 2019-08-22T01:29:24.000Z | prebind.py | hinesmr/mica | 82d26b9c6b04e1b8cea7d80c054e2cf482a58520 | [
"Apache-2.0"
] | 3 | 2015-01-06T13:31:28.000Z | 2016-10-11T16:52:09.000Z | prebind.py | hinesmr/mica | 82d26b9c6b04e1b8cea7d80c054e2cf482a58520 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
try:
import http.client as http_client
except ImportError:
# Python 2
import httplib as http_client
#http_client.HTTPConnection.debuglevel = 1
#http_client.HTTPSConnection.debuglevel = 1
import sys, os
import urllib
import random, binascii
from urlparse import urlpa... | 36.067039 | 149 | 0.497831 |
ae48c7888ec86522f37e796172c7649673cc9107 | 802 | py | Python | change_version.py | nkstonks/string-utils | a7b04d7fb4874165178fec20b36023b525c01b03 | [
"MIT"
] | null | null | null | change_version.py | nkstonks/string-utils | a7b04d7fb4874165178fec20b36023b525c01b03 | [
"MIT"
] | 1 | 2021-05-19T01:48:31.000Z | 2021-05-19T01:48:31.000Z | change_version.py | nkstonks/string-utils | a7b04d7fb4874165178fec20b36023b525c01b03 | [
"MIT"
] | null | null | null | from sys import argv
script, update_factor = argv
with open("VERSION", "r") as thing:
current_version = thing.read()
# Making new version number
update_numbers = current_version.split(".")
# for debug reasons
# print(update_numbers)
if update_factor == "minor":
number_to_change = int(update_numbers[-1])
... | 25.0625 | 47 | 0.695761 |
4ae1932f769511c0fc1202f0640e4f1379f76dff | 3,843 | py | Python | variantgrid/celery.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | variantgrid/celery.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | variantgrid/celery.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | # noinspection HttpUrlsUsage
"""
Set default Django settings module for the 'celery' program. Setup as per:
http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html
"""
import logging
import os
import celery
import rollbar
from celery import Celery
from celery.schedules import crontab
from ... | 31.760331 | 89 | 0.732761 |
fc35bbdc865cd54b99e5546aa8c8be04b895a491 | 5,339 | py | Python | wsgi/iportalen_django/bookings/admin.py | I-sektionen/i-portalen | 1713e5814d40c0da1bf3278d60a561e7d3df3550 | [
"MIT"
] | 4 | 2016-09-21T17:06:01.000Z | 2018-02-06T16:36:44.000Z | wsgi/iportalen_django/bookings/admin.py | I-sektionen/i-portalen | 1713e5814d40c0da1bf3278d60a561e7d3df3550 | [
"MIT"
] | 149 | 2016-03-07T23:50:47.000Z | 2022-03-11T23:16:33.000Z | wsgi/iportalen_django/bookings/admin.py | I-sektionen/i-portalen | 1713e5814d40c0da1bf3278d60a561e7d3df3550 | [
"MIT"
] | 1 | 2016-03-07T23:02:06.000Z | 2016-03-07T23:02:06.000Z | from django.contrib import admin
from django.db.models.aggregates import Max, Min
from django.http import HttpResponseRedirect
from django.utils.safestring import mark_safe
from .models import (
Bookable,
Booking,
BookingSlot,
VariableCostAmount,
Invoice,
VariableCostTemplate,
FixedCostTempl... | 30.861272 | 113 | 0.719236 |
e26bdb368dca66be613d064e8cd43cd196f72d68 | 11,730 | py | Python | Tests/test_Parser.py | AIxer/PyNARS | 443b6a5e1c9779a1b861df1ca51ce5a190998d2e | [
"MIT"
] | null | null | null | Tests/test_Parser.py | AIxer/PyNARS | 443b6a5e1c9779a1b861df1ca51ce5a190998d2e | [
"MIT"
] | null | null | null | Tests/test_Parser.py | AIxer/PyNARS | 443b6a5e1c9779a1b861df1ca51ce5a190998d2e | [
"MIT"
] | null | null | null |
from pynars.Narsese._py.Variable import VarPrefix, Variable
from pynars.Narsese._py.Sentence import Sentence, Tense
import Narsese
from pynars.Narsese import Budget
from pynars.Narsese import Compound, Connector
import unittest
from pynars.Narsese import Question, Quest, Judgement, Goal
from pynars.NARS.DataStructure... | 39.628378 | 125 | 0.607417 |
e3c1f1ffb9efc0c7162f169c2b796a5298d2c322 | 913 | py | Python | demo1-test/__init__.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | 1 | 2019-02-03T08:41:52.000Z | 2019-02-03T08:41:52.000Z | demo1-test/__init__.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | null | null | null | demo1-test/__init__.py | arjunsatyapal/lantern | 073e1f86c6ef9234ab654af035e3870cb22f0dc4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# 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 ag... | 31.482759 | 74 | 0.750274 |
ea4b1193e2eabc289daca8f0cb9232a558a6d0a0 | 74,835 | py | Python | theano/gof/cc.py | alexlee-gk/Theano | e4e08782d3a10d010d3a99bc87fd0fc3b0465405 | [
"BSD-3-Clause"
] | null | null | null | theano/gof/cc.py | alexlee-gk/Theano | e4e08782d3a10d010d3a99bc87fd0fc3b0465405 | [
"BSD-3-Clause"
] | null | null | null | theano/gof/cc.py | alexlee-gk/Theano | e4e08782d3a10d010d3a99bc87fd0fc3b0465405 | [
"BSD-3-Clause"
] | 1 | 2020-07-30T16:55:30.000Z | 2020-07-30T16:55:30.000Z | """
Defines Linkers that deal with C implementations.
"""
from __future__ import absolute_import, print_function, division
# Python imports
from copy import copy
import os
import sys
import logging
import numpy
import theano
from theano import config
from theano.compat import PY3
from theano.compat import izip
fro... | 37.719254 | 168 | 0.572473 |
c5acc0a02e4c582b785201cb75bf9cdf4d152577 | 1,633 | py | Python | src/acrolib/plotting.py | JeroenDM/acrolib | c431fcb74dc72ff6f89505efa38cab1808463fa9 | [
"MIT"
] | null | null | null | src/acrolib/plotting.py | JeroenDM/acrolib | c431fcb74dc72ff6f89505efa38cab1808463fa9 | [
"MIT"
] | null | null | null | src/acrolib/plotting.py | JeroenDM/acrolib | c431fcb74dc72ff6f89505efa38cab1808463fa9 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
def get_default_axes3d(xlim=[-1, 1], ylim=[-1, 1], zlim=[-1, 1]):
""" Create a default `mpl_toolkits.mplot3d.Axes3D` object with default
axis limits on all axis from -1 to 1, and labels on the... | 33.326531 | 74 | 0.57624 |
6ad0d3d5c2f51919c187393d716532bcc4db1a2c | 2,563 | py | Python | kubernetes/test/test_apiextensions_v1beta1_api.py | iguazio/python | c2684bb479d44a49a2010ec4ede5ffa7b17349dd | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_apiextensions_v1beta1_api.py | iguazio/python | c2684bb479d44a49a2010ec4ede5ffa7b17349dd | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_apiextensions_v1beta1_api.py | iguazio/python | c2684bb479d44a49a2010ec4ede5ffa7b17349dd | [
"Apache-2.0"
] | 1 | 2019-01-10T11:13:52.000Z | 2019-01-10T11:13:52.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 20.504 | 105 | 0.643777 |
738dff8c62bb9041c90727d81783583d583e7154 | 439 | py | Python | 04_Listas/06_notas_dez_alunos.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 04_Listas/06_notas_dez_alunos.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 04_Listas/06_notas_dez_alunos.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | notas = []
for i in range(0, 10):
notasAluno = []
for j in range(0, 4):
notasAluno.append(
float(raw_input('Informe a nota do aluno %.d: ' % (i + 1))))
notas.append(notasAluno)
alunosMedia = 0
for notasAluno in notas:
somaNotas = 0
for nota in notasAluno:
somaNotas += no... | 24.388889 | 72 | 0.587699 |
df6bde20760b43d0beee8626c3e411353538de5b | 11,205 | py | Python | airflow/www/app.py | jyoff/airflow | e79d8d223808f9f75ba0e6cfce210b2c65390fd0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/www/app.py | jyoff/airflow | e79d8d223808f9f75ba0e6cfce210b2c65390fd0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/www/app.py | jyoff/airflow | e79d8d223808f9f75ba0e6cfce210b2c65390fd0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#... | 40.451264 | 97 | 0.590004 |
16b64be31d30bf1278d7e67bf2be9edec5e0a279 | 20,743 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_express_route_connections_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_express_route_connections_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_express_route_connections_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.469586 | 250 | 0.682544 |
11e5b8b334055b64c61b186a22b91326479ee840 | 3,021 | py | Python | python/file_sorter/scripts/hash_files.py | danb0b/code_file_sorter | ded70aa9c461becb6caa88da04e4d234ac3a62fb | [
"MIT"
] | null | null | null | python/file_sorter/scripts/hash_files.py | danb0b/code_file_sorter | ded70aa9c461becb6caa88da04e4d234ac3a62fb | [
"MIT"
] | null | null | null | python/file_sorter/scripts/hash_files.py | danb0b/code_file_sorter | ded70aa9c461becb6caa88da04e4d234ac3a62fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 7 23:49:30 2020
@author: danaukes
"""
import file_sorter.support as fus
import file_sorter.images as fui
import yaml
import os
import argparse
if __name__=='__main__':
parser = argparse.ArgumentParser()
parser.add_argument('path',metavar='path',type=str... | 34.329545 | 184 | 0.646475 |
9b6397d8e555218b41fc40725779b338245479c3 | 1,918 | py | Python | Behavioral/Type_Object/4_custom_inheritance.py | SatishGodaPearl/gameprogrammingpatterns | adaa0efa43e5dc69f8b9eb86c5527f52fe24738b | [
"MIT"
] | null | null | null | Behavioral/Type_Object/4_custom_inheritance.py | SatishGodaPearl/gameprogrammingpatterns | adaa0efa43e5dc69f8b9eb86c5527f52fe24738b | [
"MIT"
] | null | null | null | Behavioral/Type_Object/4_custom_inheritance.py | SatishGodaPearl/gameprogrammingpatterns | adaa0efa43e5dc69f8b9eb86c5527f52fe24738b | [
"MIT"
] | null | null | null | """
Each monster in the game is simply an instance of class Monster
The Breed class contains the information that's shared between all the monsters of the same breed
- Starting Health
- Attack String
Each Monster instance is given a reference to a Breed object containing the information for that breed.
Defi... | 24.278481 | 104 | 0.654327 |
87e2fab9c3796ad12845333e18ff51793dd97b5e | 616 | py | Python | scripts/09_basic_link_web_crawler.py | Kirklin12/python-scripts | cb448c2dc3593dbfbe1ca47b49193b320115aae5 | [
"MIT"
] | 2,076 | 2015-01-02T06:23:55.000Z | 2022-03-30T11:29:05.000Z | scripts/09_basic_link_web_crawler.py | neonjunkyards/python-scripts | cb448c2dc3593dbfbe1ca47b49193b320115aae5 | [
"MIT"
] | 28 | 2021-04-06T06:17:02.000Z | 2021-05-07T10:03:43.000Z | scripts/09_basic_link_web_crawler.py | neonjunkyards/python-scripts | cb448c2dc3593dbfbe1ca47b49193b320115aae5 | [
"MIT"
] | 760 | 2015-01-04T15:58:57.000Z | 2022-03-26T13:13:33.000Z | import requests
import re
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
# regex
link_re = re.compile(r'href="(.*?)"')
def crawl(url):
req = requests.get(url)
# Check if successful
if(req.status_code != 200):
return []
# Find links
links ... | 17.6 | 48 | 0.623377 |
38cb8406f13de612fb23b597609d594d7a9f7683 | 1,232 | py | Python | second/dynamic/devices/synthia.py | CMU-Light-Curtains/ObjectDetection | d2002f6d1ebcf05a78f179bf0474703ed0211ac0 | [
"BSD-3-Clause"
] | null | null | null | second/dynamic/devices/synthia.py | CMU-Light-Curtains/ObjectDetection | d2002f6d1ebcf05a78f179bf0474703ed0211ac0 | [
"BSD-3-Clause"
] | null | null | null | second/dynamic/devices/synthia.py | CMU-Light-Curtains/ObjectDetection | d2002f6d1ebcf05a78f179bf0474703ed0211ac0 | [
"BSD-3-Clause"
] | null | null | null | import tqdm
from second.dynamic.data.synthia import SynthiaVideoDataset
from second.dynamic.devices.device import Device
class SynthiaGTState(Device):
def __init__(self, env, split, latency=40, cam=False, colored_pc=False):
"""
Args:
env: (simply.Environment) simulation environment.
... | 38.5 | 118 | 0.629058 |
15d644a8b4aa9ac4d78c223d4da6a7049ae5338e | 5,320 | py | Python | bin/mutt2task.py | gaalcaras/dotfiles | d703e9c7b630533f2e768b3ef9465ed5efe767af | [
"MIT"
] | 2 | 2019-03-22T19:47:08.000Z | 2022-01-20T03:20:17.000Z | bin/mutt2task.py | gaalcaras/dotfiles | d703e9c7b630533f2e768b3ef9465ed5efe767af | [
"MIT"
] | null | null | null | bin/mutt2task.py | gaalcaras/dotfiles | d703e9c7b630533f2e768b3ef9465ed5efe767af | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# Add a mail as task to taskwarrior.
# Works best in conjuction with taskopen script.
#
# Adapted from https://github.com/artur-shaik/mutt2task to python3.
#
# Add this to your .muttrc:
# macro index,pager t "<pipe-message>mutt2task.py<enter>"
"""
import os
import sys
... | 28.756757 | 95 | 0.624248 |
3bec0e9d5085447739661c703c5a828ccf2872ea | 2,030 | py | Python | docs/source/conf.py | lukaspanni/ImageCopy | 5d2ca83164ffed28881bd5ce1faefc3717ef2380 | [
"MIT"
] | 1 | 2020-06-05T07:12:52.000Z | 2020-06-05T07:12:52.000Z | docs/source/conf.py | lukaspanni/ImageCopy | 5d2ca83164ffed28881bd5ce1faefc3717ef2380 | [
"MIT"
] | 21 | 2020-05-03T18:18:42.000Z | 2022-03-01T18:00:42.000Z | docs/source/conf.py | lukaspanni/ImageCopy | 5d2ca83164ffed28881bd5ce1faefc3717ef2380 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35 | 85 | 0.66601 |
4c7c7d778a4a3aaa2ec70a52a6c13b5dc2cf4dd8 | 1,970 | py | Python | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/linecache/linecache_example.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/linecache/linecache_example.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/linecache/linecache_example.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Example use of linecache module.
See http://blog.doughellmann.com/2007/04/pymotw-linecache.html
"""
# end_pymotw_header
import linecache
import os
import tempfile
lorem = """Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Vivamus eget elit. In posuere mi non
risus. Mauris id quam... | 33.389831 | 83 | 0.758883 |
a50bf3255aaf9afdd7dfb7068791dc770be680c6 | 6,849 | py | Python | sample_models.py | zhulingchen/AIND-VUI-Capstone | 5474d3693674cee3736cdc74e2b299749e34b5b5 | [
"MIT"
] | null | null | null | sample_models.py | zhulingchen/AIND-VUI-Capstone | 5474d3693674cee3736cdc74e2b299749e34b5b5 | [
"MIT"
] | 1 | 2021-10-12T22:58:45.000Z | 2021-10-12T22:58:45.000Z | sample_models.py | zhulingchen/AIND-VUI-Capstone | 5474d3693674cee3736cdc74e2b299749e34b5b5 | [
"MIT"
] | null | null | null | from keras import backend as K
from keras.models import Model
from keras.layers import (BatchNormalization, Conv1D, Dense, Input,
TimeDistributed, Activation, Bidirectional, SimpleRNN, GRU, LSTM)
def simple_rnn_model(input_dim, output_dim=29):
""" Build a recurrent network for speech
"""
# Main acous... | 44.474026 | 113 | 0.689882 |
cb3c6a53cbdde693eeec3e9d1deb8b7191be6021 | 11,784 | py | Python | src/olympia/signing/views.py | petercpg/addons-server | 892e442ee61fe2592f19969357ed5d40a9e9fb2e | [
"BSD-3-Clause"
] | 3 | 2020-03-05T18:17:14.000Z | 2020-03-09T01:24:38.000Z | src/olympia/signing/views.py | petercpg/addons-server | 892e442ee61fe2592f19969357ed5d40a9e9fb2e | [
"BSD-3-Clause"
] | null | null | null | src/olympia/signing/views.py | petercpg/addons-server | 892e442ee61fe2592f19969357ed5d40a9e9fb2e | [
"BSD-3-Clause"
] | null | null | null | import functools
from django import forms
from django.utils.translation import ugettext
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
import olympia.core.logger
from olympia import amo
fr... | 40.21843 | 78 | 0.624745 |
7f13b4bb86c62c5862ee1a5aa50624e8a4f70653 | 1,900 | py | Python | sols/21.py | Paul11100/LeetCode | 9896c579dff1812c0c76964db8d60603ee715e35 | [
"MIT"
] | null | null | null | sols/21.py | Paul11100/LeetCode | 9896c579dff1812c0c76964db8d60603ee715e35 | [
"MIT"
] | null | null | null | sols/21.py | Paul11100/LeetCode | 9896c579dff1812c0c76964db8d60603ee715e35 | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution(object):
# # Iterative (accepted), Time: O(m + n), Space: O(1)
# def insert(self, pos_node, node):
# node.next = pos_node.next
... | 30.15873 | 67 | 0.479474 |
9fd5f65f7460403c955ff73101f723487d66a5ef | 3,294 | py | Python | keystone-15.0.0/keystone/server/flask/request_processing/json_body.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | keystone-15.0.0/keystone/server/flask/request_processing/json_body.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | keystone-15.0.0/keystone/server/flask/request_processing/json_body.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # 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
# distributed under t... | 47.057143 | 79 | 0.67456 |
95796b57483ba73accfe3d59023c7d62b5463d32 | 2,473 | py | Python | fabfile.py | datakvant/datakvant.github.io | c2417ef759ef8843da2dc82b1c8f6cd0f4f06a2d | [
"Apache-2.0"
] | 54 | 2016-02-04T11:59:11.000Z | 2022-02-23T14:35:21.000Z | fabfile.py | datakvant/datakvant.github.io | c2417ef759ef8843da2dc82b1c8f6cd0f4f06a2d | [
"Apache-2.0"
] | 17 | 2018-09-12T12:47:15.000Z | 2022-03-11T23:16:26.000Z | fabfile.py | datakvant/datakvant.github.io | c2417ef759ef8843da2dc82b1c8f6cd0f4f06a2d | [
"Apache-2.0"
] | 27 | 2018-04-24T15:16:33.000Z | 2022-02-27T19:15:19.000Z | from fabric.api import *
import fabric.contrib.project as project
import os
import shutil
import sys
import SocketServer
from pelican.server import ComplexHTTPRequestHandler
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'output'
DEPLOY_PATH = env.deploy_path
# Remote server co... | 26.031579 | 76 | 0.675293 |
5cbbc5e30355282f4db92310ddc505c45aaaf0ec | 7,248 | py | Python | explainers/explainers/templates/template_featimp_explainer.py | pragnesh-ai/driverlessai-recipes | 97371a2d2cd853cdeeb15037f462af96d81a7c0b | [
"Apache-2.0"
] | 194 | 2019-04-23T10:25:13.000Z | 2022-03-29T04:19:28.000Z | explainers/explainers/templates/template_featimp_explainer.py | pragnesh-ai/driverlessai-recipes | 97371a2d2cd853cdeeb15037f462af96d81a7c0b | [
"Apache-2.0"
] | 50 | 2019-06-24T20:17:51.000Z | 2022-03-16T20:05:37.000Z | explainers/explainers/templates/template_featimp_explainer.py | pragnesh-ai/driverlessai-recipes | 97371a2d2cd853cdeeb15037f462af96d81a7c0b | [
"Apache-2.0"
] | 85 | 2019-03-27T12:26:43.000Z | 2022-01-27T13:15:37.000Z | """Feature importance explainer template which can be used create explainer with global and local feature importance explanations."""
import json
import random
import datatable as dt
from h2oaicore.mli.oss.byor.core.explainers import CustomExplainer
from h2oaicore.mli.oss.byor.core.explanations import (
CustomEx... | 38.759358 | 133 | 0.622379 |
b55b32538a7775d43ab01d7215144a8fdbe71cff | 4,218 | py | Python | scripts/tsne.py | anonymous20201002/chemprop | 3e36f6a3bb36194366feadb31be94dfc7e98fd91 | [
"MIT"
] | 1 | 2022-02-12T06:39:32.000Z | 2022-02-12T06:39:32.000Z | scripts/tsne.py | anonymous20201002/chemprop | 3e36f6a3bb36194366feadb31be94dfc7e98fd91 | [
"MIT"
] | null | null | null | scripts/tsne.py | anonymous20201002/chemprop | 3e36f6a3bb36194366feadb31be94dfc7e98fd91 | [
"MIT"
] | null | null | null | import os
import sys
import time
from typing import List
from matplotlib import offsetbox
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
import numpy as np
from rdkit import Chem
from rdkit.Chem import Draw
from sklearn.manifold import TSNE
from tap import Tap
from tqdm import tqdm
sys.path.app... | 38.345455 | 132 | 0.681128 |
4210b3fe53a097b7f83d625d16d16c78837e8cd3 | 678 | py | Python | setup.py | Zhangjt9317/SOM_GUI | f8c2128182f7ca4b1b049db12abfbbf26061abf9 | [
"MIT"
] | null | null | null | setup.py | Zhangjt9317/SOM_GUI | f8c2128182f7ca4b1b049db12abfbbf26061abf9 | [
"MIT"
] | 4 | 2020-03-24T18:09:14.000Z | 2021-08-23T20:36:02.000Z | setup.py | Zhangjt9317/SOM_GUI | f8c2128182f7ca4b1b049db12abfbbf26061abf9 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="SOM_GUI-Zhangjt9317", # Replace with your own username
version="0.0.1",
author="Jingtian Zhang",
author_email="jtz9317@gmail.com",
description="GUI for SOM tool",
long_description=long... | 30.818182 | 64 | 0.669617 |
8c0a90aa2a55898b256261bcfe90bb0bfad7dd2d | 7,446 | py | Python | scanpy/preprocessing/_normalization.py | mkmkryu/scanpy2 | f3db32a142dc31c1b628380db1c969a6d0b9dc3a | [
"BSD-3-Clause"
] | 1 | 2021-01-15T22:13:26.000Z | 2021-01-15T22:13:26.000Z | scanpy/preprocessing/_normalization.py | mkmkryu/scanpy2 | f3db32a142dc31c1b628380db1c969a6d0b9dc3a | [
"BSD-3-Clause"
] | 1 | 2020-06-16T17:14:45.000Z | 2020-06-16T17:14:45.000Z | scanpy/preprocessing/_normalization.py | mkmkryu/scanpy2 | f3db32a142dc31c1b628380db1c969a6d0b9dc3a | [
"BSD-3-Clause"
] | 2 | 2020-06-16T16:42:40.000Z | 2020-08-28T16:59:42.000Z | from typing import Optional, Union, Iterable, Dict
import numpy as np
from anndata import AnnData
from scipy.sparse import issparse
from sklearn.utils import sparsefuncs
from .. import logging as logg
from .._compat import Literal
from .._utils import view_to_actual
def _normalize_data(X, counts, after=None, copy=F... | 36.679803 | 100 | 0.6296 |
48b61cbaf46cfb7a51e8f286cf7b5a9ee989f4b4 | 1,333 | py | Python | setup.py | DanielLSM/schedule-sim | 9230ea3db774105eebe643c8baf054a518f4f7e7 | [
"MIT"
] | null | null | null | setup.py | DanielLSM/schedule-sim | 9230ea3db774105eebe643c8baf054a518f4f7e7 | [
"MIT"
] | null | null | null | setup.py | DanielLSM/schedule-sim | 9230ea3db774105eebe643c8baf054a518f4f7e7 | [
"MIT"
] | null | null | null | import re
from setuptools import setup, find_packages
import sys
if sys.version_info.major != 3:
print('This Python is only compatible with Python 3, but you are running '
'Python {}. The installation will likely fail.'.format(
sys.version_info.major))
setup(
name='schedule-sim',
p... | 32.512195 | 78 | 0.666167 |
e61af8a706a93dbad69ca3c14494358a1f36d664 | 10,897 | py | Python | python/asteria/config.py | IceCubeOpenSource/USSR | d96158cb835245c40e5fc57239c6038c87b3ac01 | [
"BSD-3-Clause"
] | 2 | 2019-05-03T21:09:16.000Z | 2019-11-20T18:40:52.000Z | python/asteria/config.py | IceCubeOpenSource/USSR | d96158cb835245c40e5fc57239c6038c87b3ac01 | [
"BSD-3-Clause"
] | 27 | 2019-03-19T16:02:46.000Z | 2021-07-07T19:36:57.000Z | python/asteria/config.py | icecube/ASTERIA | d96158cb835245c40e5fc57239c6038c87b3ac01 | [
"BSD-3-Clause"
] | 2 | 2019-03-12T22:36:46.000Z | 2019-05-14T14:14:06.000Z | # Simulation management class adapted from https://github.com/desihub/specsim.
# The specsim project is distributed under a 3-clause BSD style license:
#
# Copyright (c) 2015, Specsim Developers <dkirkby@uci.edu>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modificati... | 36.323333 | 92 | 0.63623 |
2c2ccc96642cc6693a59d63e57dca14c7469c539 | 743 | py | Python | diceRoller.py | griledchicken/VAMPY-2017-CS | 1bc71734751850b580b481eac51c5c235d0ca9e2 | [
"MIT"
] | null | null | null | diceRoller.py | griledchicken/VAMPY-2017-CS | 1bc71734751850b580b481eac51c5c235d0ca9e2 | [
"MIT"
] | null | null | null | diceRoller.py | griledchicken/VAMPY-2017-CS | 1bc71734751850b580b481eac51c5c235d0ca9e2 | [
"MIT"
] | null | null | null | import random as r
dice = input("What kind of dice would you like to roll? Choose between d4, d6, d8, d10, d12, d20, d100, or dcustomNumber(just type a number) ")
if dice in["D4", "d4"]:
dice4 = r.randint(1,4)
print(str(dice4))
elif dice in["D6", "d6"]:
dice6 = r.randint(1,6)
print(str(dice6))
elif dice in["D8", "d... | 25.62069 | 143 | 0.650067 |
b34e445dd6513023d15546b511675f4cce4338f8 | 1,454 | py | Python | ope-backend/src/core/validations/__init__.py | clauddio-silva/ope-1 | 8be8a10c0db3d2f17e8e90a594abdf5770d53fa3 | [
"CC0-1.0"
] | null | null | null | ope-backend/src/core/validations/__init__.py | clauddio-silva/ope-1 | 8be8a10c0db3d2f17e8e90a594abdf5770d53fa3 | [
"CC0-1.0"
] | null | null | null | ope-backend/src/core/validations/__init__.py | clauddio-silva/ope-1 | 8be8a10c0db3d2f17e8e90a594abdf5770d53fa3 | [
"CC0-1.0"
] | null | null | null | # UserValidations
from .user_validations.create_user_validation import create_user_validation
from .user_validations.get_user_by_id_validation import get_user_validation
from .user_validations.update_user_validation import update_user_validation
from .user_validations.delete_user_validation import delete_user_validatio... | 51.928571 | 102 | 0.920908 |
6c2e35119d8dc9b27cb30eb5bfaf4be32ffcbb05 | 392 | py | Python | profesor/migrations/0002_remove_profesor_phone_number.py | saulmestanza/Solicitudes | 080f396025f75f21065251bd2af3f696d293ba3a | [
"Apache-2.0"
] | 2 | 2018-08-17T20:32:20.000Z | 2019-05-24T15:38:43.000Z | profesor/migrations/0002_remove_profesor_phone_number.py | saulmestanza/Solicitudes | 080f396025f75f21065251bd2af3f696d293ba3a | [
"Apache-2.0"
] | null | null | null | profesor/migrations/0002_remove_profesor_phone_number.py | saulmestanza/Solicitudes | 080f396025f75f21065251bd2af3f696d293ba3a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-08-03 10:25
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('profesor', '0001_initial'),
]
operations = [
migrations.RemoveField(
m... | 19.6 | 49 | 0.612245 |
abee201621ba5dcb02baa75d5d8d56cbb3ccc6c3 | 4,125 | py | Python | pirates/effects/GroundFog.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 3 | 2021-02-25T06:38:13.000Z | 2022-03-22T07:00:15.000Z | pirates/effects/GroundFog.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | null | null | null | pirates/effects/GroundFog.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 1 | 2021-02-25T06:38:17.000Z | 2021-02-25T06:38:17.000Z | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.effects.GroundFog
from pandac.PandaModules import *
from direct.showbase.DirectObject import *
from direct.interval.IntervalGlob... | 49.698795 | 210 | 0.698909 |
329c6ded400c0e4061ec86c61b39ba401e8a890e | 1,102 | py | Python | talker/main.py | junction-earnit/earnit-app | fc14b02860cce76af7c0d76ed114facac7706939 | [
"MIT"
] | null | null | null | talker/main.py | junction-earnit/earnit-app | fc14b02860cce76af7c0d76ed114facac7706939 | [
"MIT"
] | 5 | 2019-12-30T05:09:12.000Z | 2021-09-02T02:17:03.000Z | talker/main.py | junction-earnit/earnit-app | fc14b02860cce76af7c0d76ed114facac7706939 | [
"MIT"
] | null | null | null | import requests
import time
last_seen_time = 0
def shouldSendMessage(current_data):
global last_seen_time
if not current_data.get("options", {}).get("phishing", False):
return False
last = current_data.get("options", {}).get("lastPhishing", 0)
if last > last_seen_time:
last_seen_time ... | 29 | 182 | 0.665154 |
d833b6b9891d186bf79afe521c96b0c9dcd4548c | 6,403 | py | Python | lib/surface/compute/target_http_proxies/create.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/target_http_proxies/create.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/target_http_proxies/create.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 38.341317 | 92 | 0.742777 |
f486f0ef4a9ce5fc24dd2d20ca002c4d1eab3635 | 1,306 | py | Python | config/providers.py | nilsreichert/core | 048f45a2073f3a5c827f445bdf938c28a756af04 | [
"MIT"
] | null | null | null | config/providers.py | nilsreichert/core | 048f45a2073f3a5c827f445bdf938c28a756af04 | [
"MIT"
] | null | null | null | config/providers.py | nilsreichert/core | 048f45a2073f3a5c827f445bdf938c28a756af04 | [
"MIT"
] | null | null | null | """ Providers Configuration File """
from masonite.providers import (
AppProvider,
SessionProvider,
RouteProvider,
StatusCodeProvider,
SassProvider,
WhitenoiseProvider,
MailProvider,
UploadProvider,
ViewProvider,
HelpersProvider,
QueueProvider,
BroadcastProvider,
Cac... | 21.766667 | 75 | 0.634763 |
fa0744bedc14562201107beaafa82d3cbfd379f6 | 436 | py | Python | gwpv/progress.py | damibabayemi/gwpv | e6705787fc2e25b72eaef2508357b1f0b9258581 | [
"MIT"
] | 8 | 2020-04-17T18:25:57.000Z | 2020-11-05T00:30:31.000Z | gwpv/progress.py | damibabayemi/gwpv | e6705787fc2e25b72eaef2508357b1f0b9258581 | [
"MIT"
] | 1 | 2020-05-06T11:47:48.000Z | 2020-05-06T11:47:48.000Z | gwpv/progress.py | nilsleiffischer/gwpv | 2b65be422ffcfc443547db6e4b1b3c2832a7f621 | [
"MIT"
] | 1 | 2020-04-19T02:27:15.000Z | 2020-04-19T02:27:15.000Z | import logging
from tqdm import tqdm
class TqdmLoggingHandler(logging.Handler):
def __init__(self, level=logging.NOTSET):
super(TqdmLoggingHandler, self).__init__(level)
def emit(self, record):
try:
msg = self.format(record)
tqdm.write(msg)
self.flush()
... | 24.222222 | 55 | 0.610092 |
16f33acaf1d79f79b6fc21df9b95d3f8fb6ec5de | 3,185 | py | Python | allgemein/db_sqlite.py | kanopus1958/Python | 795d0e7c3479032a71e1c1246391772619e1e6ef | [
"MIT"
] | null | null | null | allgemein/db_sqlite.py | kanopus1958/Python | 795d0e7c3479032a71e1c1246391772619e1e6ef | [
"MIT"
] | null | null | null | allgemein/db_sqlite.py | kanopus1958/Python | 795d0e7c3479032a71e1c1246391772619e1e6ef | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Programm : db_sqlite.py
# Version : 1.00
# SW-Stand : 19.05.2022
# Autor : Kanopus1958
# Beschreibung : Test verschiendener SQLite DB-Funktionen
import os
import time
from rwm_mod01 import show_header
from rwm_class01 import MyDB
G_OS = ('Windows')... | 27.456897 | 78 | 0.57394 |
9fe64a8c55eac19c3a77e0ec9c3ceb625d3a99a5 | 36,919 | py | Python | dax/processors.py | atbenmurray/dax | ad81922fbd3b685491ceea94799932908ecad8a8 | [
"MIT"
] | null | null | null | dax/processors.py | atbenmurray/dax | ad81922fbd3b685491ceea94799932908ecad8a8 | [
"MIT"
] | null | null | null | dax/processors.py | atbenmurray/dax | ad81922fbd3b685491ceea94799932908ecad8a8 | [
"MIT"
] | 1 | 2018-09-14T15:52:35.000Z | 2018-09-14T15:52:35.000Z | """ Processor class define for Scan and Session."""
from builtins import object
from past.builtins import basestring
import logging
import re
import os
from . import XnatUtils, task
from .errors import AutoProcessorError
try:
basestring
except NameError:
basestring = str
__copyright__ = 'Copyright 2013 Va... | 38.985216 | 105 | 0.57098 |
c3b26f83aece28c54db3382e400737670cca6a95 | 6,662 | py | Python | trax/supervised/training_test.py | FelipeSulser/trax | 9419cd7230442f0d82f33034eefcb8c1ebbac67b | [
"Apache-2.0"
] | null | null | null | trax/supervised/training_test.py | FelipeSulser/trax | 9419cd7230442f0d82f33034eefcb8c1ebbac67b | [
"Apache-2.0"
] | null | null | null | trax/supervised/training_test.py | FelipeSulser/trax | 9419cd7230442f0d82f33034eefcb8c1ebbac67b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Trax 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 a... | 39.188235 | 80 | 0.683879 |
16f913fdde1fe4bbdd3a3d50dbc4779335cda08e | 2,828 | py | Python | alipay/aop/api/domain/GroupBrief.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/GroupBrief.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/GroupBrief.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class GroupBrief(object):
def __init__(self):
self._gmt_create = None
self._group_id = None
self._group_img = None
self._group_name = None
self._master_uid = Non... | 28 | 71 | 0.577793 |
f96ef2f349e3308c01d003b597248764eafe64e9 | 1,128 | py | Python | data/p4VQE/R4/benchmark/startPyquil652.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil652.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil652.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=11
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(1) # number=2
pr... | 22.56 | 64 | 0.606383 |
1ad69f0f42f8cbb7b6322f7ff5cac2583032039b | 6,298 | py | Python | substitute_anthro.py | eanderson-ei/nv-admin | 88fc46170936bc276bfdb242e1482c6861c74875 | [
"Apache-2.0"
] | null | null | null | substitute_anthro.py | eanderson-ei/nv-admin | 88fc46170936bc276bfdb242e1482c6861c74875 | [
"Apache-2.0"
] | null | null | null | substitute_anthro.py | eanderson-ei/nv-admin | 88fc46170936bc276bfdb242e1482c6861c74875 | [
"Apache-2.0"
] | null | null | null | """
Name: Admin_Tools/Substitute_Anthro.py
Author: Erik Anderson
Created: November 21, 2019
Revised: November 21, 2019
Version: Created using Python 2.7.10, Arc version 10.4.1
Requires: ArcGIS version 10.1 or later, Basic (ArcView) license or better;
Replaces a provide anthropogenic feature layer with another... | 40.896104 | 87 | 0.588758 |
0813598b6ef3d4d7a9bc7d4428a8b3d2c0f936c3 | 4,970 | py | Python | test/test_lib.py | perlman/cloud-volume | e3c01f69e6519f0c53d13d39e7a42bb38d63a936 | [
"BSD-3-Clause"
] | 1 | 2021-02-12T12:15:33.000Z | 2021-02-12T12:15:33.000Z | test/test_lib.py | perlman/cloud-volume | e3c01f69e6519f0c53d13d39e7a42bb38d63a936 | [
"BSD-3-Clause"
] | null | null | null | test/test_lib.py | perlman/cloud-volume | e3c01f69e6519f0c53d13d39e7a42bb38d63a936 | [
"BSD-3-Clause"
] | null | null | null | import pytest
import numpy as np
import cloudvolume.lib as lib
from cloudvolume.lib import Bbox, Vec
def test_divisors():
divisors = (
(1, (1,)),
(2, (1,2)),
(3, (1,3)),
(4, (1,2,4)),
(6, (1,2,3,6)),
(35, (1,5,7,35)),
(128, (1,2,4,8,16,32,64,128)),
(258, (1,2,3,6,43,86,129,258)),
... | 25.228426 | 116 | 0.582294 |
170d6a658cde8102cc68f9b53cead49298527dc2 | 168 | py | Python | find char in string.py | keerthana1502/python_practice | 8c0499e014826af78f9a88730551ace3fa79686d | [
"bzip2-1.0.6"
] | null | null | null | find char in string.py | keerthana1502/python_practice | 8c0499e014826af78f9a88730551ace3fa79686d | [
"bzip2-1.0.6"
] | null | null | null | find char in string.py | keerthana1502/python_practice | 8c0499e014826af78f9a88730551ace3fa79686d | [
"bzip2-1.0.6"
] | null | null | null | a=input("Enter a string = ")
b=input("Enter a character = ")
if (b in a):
print("the given character is found")
else:
print("the given character is not found")
| 24 | 45 | 0.654762 |
4c534a9fe57c2e44375a033ffd8a3f10208e78b0 | 235 | py | Python | lavavu/__main__.py | OKaluza/LavaVu | bfb45659d25caef04b5c2b1484b72d662276d9ea | [
"CC-BY-4.0"
] | 23 | 2016-01-26T23:06:53.000Z | 2019-06-11T08:31:32.000Z | lavavu/__main__.py | OKaluza/LavaVu | bfb45659d25caef04b5c2b1484b72d662276d9ea | [
"CC-BY-4.0"
] | 73 | 2016-03-16T03:02:35.000Z | 2019-07-18T07:29:52.000Z | lavavu/__main__.py | OKaluza/LavaVu | bfb45659d25caef04b5c2b1484b72d662276d9ea | [
"CC-BY-4.0"
] | 6 | 2016-03-25T23:22:49.000Z | 2018-01-16T14:38:09.000Z | #!/usr/bin/env python
def main():
#Run interactive with args via python
from . import lavavu
import sys
import platform
lv = lavavu.Viewer(*sys.argv[1:])
lv.interactive()
if __name__ == '__main__':
main()
| 18.076923 | 41 | 0.634043 |
7b8703931bacf57c9cd5f4adbeffc69dc6ddfd7b | 3,213 | py | Python | scuole/campuses/management/commands/bootstrapcampuses_v2.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | 1 | 2019-03-12T04:30:02.000Z | 2019-03-12T04:30:02.000Z | scuole/campuses/management/commands/bootstrapcampuses_v2.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | 616 | 2017-08-18T21:15:39.000Z | 2022-03-25T11:17:10.000Z | scuole/campuses/management/commands/bootstrapcampuses_v2.py | texastribune/scuole | 8ab316ee50ef0d8e71b94b50dc889d10c6e83412 | [
"MIT"
] | null | null | null | from csv import DictReader
from json import dumps, load
from os.path import join
from django.conf import settings
from django.contrib.gis.geos import GEOSGeometry
from django.core.management.base import BaseCommand, CommandError
from django.utils.text import slugify
from scuole.campuses.models import Campus
from scuo... | 33.123711 | 81 | 0.602552 |
2eaa3bbbbc26f404a7f23d241c84bc101d596687 | 111 | py | Python | src/dataverk/connectors/databases/db2.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 3 | 2019-09-29T20:48:46.000Z | 2021-03-31T10:16:07.000Z | src/dataverk/connectors/databases/db2.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 148 | 2019-02-08T12:30:58.000Z | 2021-03-11T15:31:55.000Z | src/dataverk/connectors/databases/db2.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 1 | 2020-11-18T14:10:05.000Z | 2020-11-18T14:10:05.000Z | from dataverk.connectors.databases.base import DBBaseConnector
class Db2Connector(DBBaseConnector):
pass
| 18.5 | 62 | 0.828829 |
1ac4e460cfff7fb7c0749aabfe52f619a099dcae | 490 | py | Python | migration/migrator/migrations/course/20210204140110_modify_subsection.py | jportorreal00/Submitty | c32256472e9cfaac7c13a3b07a558314eff447af | [
"BSD-3-Clause"
] | 411 | 2016-06-14T20:52:25.000Z | 2022-03-31T21:20:25.000Z | migration/migrator/migrations/course/20210204140110_modify_subsection.py | KaelanWillauer/Submitty | cf9b6ceda15ec0a661e2ca81ea7864790094c64a | [
"BSD-3-Clause"
] | 5,730 | 2016-05-23T21:04:32.000Z | 2022-03-31T10:08:06.000Z | migration/migrator/migrations/course/20210204140110_modify_subsection.py | KaelanWillauer/Submitty | cf9b6ceda15ec0a661e2ca81ea7864790094c64a | [
"BSD-3-Clause"
] | 423 | 2016-09-22T21:11:30.000Z | 2022-03-29T18:55:28.000Z |
def up(config, database, semester, course):
database.execute("UPDATE users SET registration_subsection = '' WHERE registration_subsection IS NULL")
database.execute("ALTER TABLE users ALTER COLUMN registration_subsection SET DEFAULT '', ALTER COLUMN registration_subsection SET NOT NULL")
def down(config, dat... | 61.25 | 145 | 0.8 |
98d8951f1433bbe7165ecd4b6c1920c07b741695 | 301 | py | Python | .venv/lib/python3.6/site-packages/sphinxcontrib/websupport/version.py | danielltm/sample | 9f8dc92653bf26ae08451a2bfc1491b71cc31502 | [
"MIT"
] | 69 | 2019-02-18T12:07:35.000Z | 2022-03-12T10:38:32.000Z | .venv/lib/python3.6/site-packages/sphinxcontrib/websupport/version.py | danielltm/sample | 9f8dc92653bf26ae08451a2bfc1491b71cc31502 | [
"MIT"
] | 12 | 2018-12-06T22:06:49.000Z | 2022-02-25T17:40:44.000Z | .venv/lib/python3.6/site-packages/sphinxcontrib/websupport/version.py | danielltm/sample | 9f8dc92653bf26ae08451a2bfc1491b71cc31502 | [
"MIT"
] | 28 | 2019-03-22T01:07:13.000Z | 2022-02-21T16:38:27.000Z | # -*- coding: utf-8 -*-
"""
sphinxcontrib.websupport.version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2007-2018 by the Sphinx team, see README.
:license: BSD, see LICENSE for details.
"""
__version__ = '1.1.0'
__version_info__ = tuple(map(int, __version__.split('.')))
| 25.083333 | 67 | 0.58804 |
8bb2272643a047383c26bcc1a396ab4f507777c7 | 2,879 | py | Python | o2a/mappers/extensions/prepare_mapper_extension.py | adolnik/oozie-to-airflow | e4eed9098fb91c234a2c9c6505ca84a54e6a9e32 | [
"Apache-2.0"
] | 61 | 2019-05-23T14:41:53.000Z | 2022-03-03T11:33:38.000Z | o2a/mappers/extensions/prepare_mapper_extension.py | adolnik/oozie-to-airflow | e4eed9098fb91c234a2c9c6505ca84a54e6a9e32 | [
"Apache-2.0"
] | 505 | 2019-05-20T15:21:09.000Z | 2022-03-01T23:10:31.000Z | o2a/mappers/extensions/prepare_mapper_extension.py | adolnik/oozie-to-airflow | e4eed9098fb91c234a2c9c6505ca84a54e6a9e32 | [
"Apache-2.0"
] | 33 | 2019-05-23T01:30:47.000Z | 2022-03-28T10:25:09.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 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 agr... | 38.386667 | 93 | 0.641542 |
015e750c1a1b0510aa1c3ee76e1e8ea2feb99028 | 6,066 | py | Python | eureka/tests/test_lightcurve_fitting.py | gianninapr/Eureka | c5cd2f935322c56f14091878d6cf2c15a6653feb | [
"MIT"
] | 15 | 2020-08-07T12:12:17.000Z | 2022-03-29T10:20:38.000Z | eureka/tests/test_lightcurve_fitting.py | gianninapr/Eureka | c5cd2f935322c56f14091878d6cf2c15a6653feb | [
"MIT"
] | 159 | 2020-08-05T14:34:59.000Z | 2022-03-31T21:02:10.000Z | eureka/tests/test_lightcurve_fitting.py | gianninapr/Eureka | c5cd2f935322c56f14091878d6cf2c15a6653feb | [
"MIT"
] | 17 | 2021-06-16T09:40:41.000Z | 2022-03-22T18:28:07.000Z | #! /usr/bin/env python
"""Tests for the ``lightcurve_fitting`` package.
Authors
-------
Joe Filippazzo
Use
---
These tests can be run via the command line (omit the ``-s`` to
suppress verbose output to stdout):
::
pytest -s test_lightcurve_fitting.py
"""
import unittest
import numpy as n... | 33.32967 | 105 | 0.6121 |
08c4f95a3627dab590f54d74a85b67510d8f4c02 | 5,263 | py | Python | trans_sec/packet/packet_telemetry.py | termlen0/transparent-security | ea58da4c8de8300b24ba72a69f77b8ab39ada072 | [
"Apache-2.0"
] | 1 | 2021-05-12T17:55:52.000Z | 2021-05-12T17:55:52.000Z | trans_sec/packet/packet_telemetry.py | termlen0/transparent-security | ea58da4c8de8300b24ba72a69f77b8ab39ada072 | [
"Apache-2.0"
] | null | null | null | trans_sec/packet/packet_telemetry.py | termlen0/transparent-security | ea58da4c8de8300b24ba72a69f77b8ab39ada072 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 Cable Television Laboratories, 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 ... | 38.137681 | 79 | 0.554247 |
980dba5347fa9e1273fdeadcfa5baa780b02e688 | 6,211 | py | Python | var/spack/repos/builtin/packages/cdo/package.py | jdeaton/spack | ff4e155cbaf2f7b5c7b03a0c06408e0a62cae676 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/cdo/package.py | jdeaton/spack | ff4e155cbaf2f7b5c7b03a0c06408e0a62cae676 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/cdo/package.py | jdeaton/spack | ff4e155cbaf2f7b5c7b03a0c06408e0a62cae676 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Cdo(AutotoolsPackage):
"""CDO is a collection of command line Operators to manipulate and ... | 46.699248 | 134 | 0.634036 |
e170068fb00b5811a837ea362a1e3222da44ef35 | 2,421 | py | Python | plugins/commands.py | Aswankannan/video | 99b321be8f13dfde99c0ebce9ecf080f3038b79d | [
"MIT"
] | null | null | null | plugins/commands.py | Aswankannan/video | 99b321be8f13dfde99c0ebce9ecf080f3038b79d | [
"MIT"
] | null | null | null | plugins/commands.py | Aswankannan/video | 99b321be8f13dfde99c0ebce9ecf080f3038b79d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from script import script
@Client.on_message(filters.command(["start"]) & filters.private)
async def start(client, message):
try:
await ... | 32.28 | 89 | 0.515903 |
40bdac857a9eef9fab1f853f904cf3e54cb80278 | 1,916 | py | Python | power_data_to_sat_passes/optukopter/optukopter_raw_power_file2meanmaxspectrum.py | abrahamneben/orbcomm_beam_mapping | 71b3e7d6e4214db0a6f4e68ebeeb7d7f846f5004 | [
"MIT"
] | 1 | 2019-04-10T02:50:19.000Z | 2019-04-10T02:50:19.000Z | power_data_to_sat_passes/optukopter/optukopter_raw_power_file2meanmaxspectrum.py | abrahamneben/orbcomm_beam_mapping | 71b3e7d6e4214db0a6f4e68ebeeb7d7f846f5004 | [
"MIT"
] | null | null | null | power_data_to_sat_passes/optukopter/optukopter_raw_power_file2meanmaxspectrum.py | abrahamneben/orbcomm_beam_mapping | 71b3e7d6e4214db0a6f4e68ebeeb7d7f846f5004 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# parse a single column of a satpower file into a spectrogram
# freqs are colums
# times are rows, say, every few seconds record a power measurement
import sys
import numpy as np
import os
def read_next_spectrum(f,colnum):
header = ''
inheader = True
while inheader:
nextline = f.readline()
... | 26.985915 | 132 | 0.714509 |
00fb5b5d5f5030d0ef9ac21e6b4be72b3ceae3cf | 1,397 | py | Python | paper/manuscript/legend.py | niconiconi/Libra | d8b4bebd70c1b0681fdecb66fbadeccb3f9d926e | [
"Apache-2.0"
] | 28 | 2020-01-05T12:05:57.000Z | 2021-11-23T16:18:40.000Z | paper/manuscript/legend.py | niconiconi/Libra | d8b4bebd70c1b0681fdecb66fbadeccb3f9d926e | [
"Apache-2.0"
] | 1 | 2020-08-10T17:15:38.000Z | 2020-08-11T16:14:46.000Z | paper/manuscript/legend.py | niconiconi/Libra | d8b4bebd70c1b0681fdecb66fbadeccb3f9d926e | [
"Apache-2.0"
] | 13 | 2020-01-31T05:53:37.000Z | 2021-08-02T14:05:43.000Z | import pylab
import matplotlib.pyplot as plt
fig = pylab.figure()
figlegend = pylab.figure(figsize=(40,1.4))
ax = fig.add_subplot(111)
rects1 = ax.plot(range(12), color='b',linewidth=5,marker='o',markersize=15,fillstyle='full')
rects2 = ax.plot(range(12), color='r',linewidth=5,marker='^',markersize=15,fillstyle='full'... | 60.73913 | 209 | 0.694345 |
6ca201565b9fc3d9dce5894604b81b897347357f | 16,763 | py | Python | pgadmin/setup.py | ericsgagnon/docker-ide | c9fbdf7a0b3e2a3430a9bd5c0cbd036526e94220 | [
"MIT"
] | null | null | null | pgadmin/setup.py | ericsgagnon/docker-ide | c9fbdf7a0b3e2a3430a9bd5c0cbd036526e94220 | [
"MIT"
] | null | null | null | pgadmin/setup.py | ericsgagnon/docker-ide | c9fbdf7a0b3e2a3430a9bd5c0cbd036526e94220 | [
"MIT"
] | null | null | null | /pgadmin4/setup.py
#########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2021, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################... | 32.933202 | 79 | 0.577582 |
a0cae0cd9b844c6458c280ad7c501b11c27ca009 | 11,628 | py | Python | kpaggregator/functions.py | anonymous-conferences/keyphrase_clustering | b7ecd457da9184596e05b446879c0e4cfc9b7cf6 | [
"Apache-2.0"
] | null | null | null | kpaggregator/functions.py | anonymous-conferences/keyphrase_clustering | b7ecd457da9184596e05b446879c0e4cfc9b7cf6 | [
"Apache-2.0"
] | null | null | null | kpaggregator/functions.py | anonymous-conferences/keyphrase_clustering | b7ecd457da9184596e05b446879c0e4cfc9b7cf6 | [
"Apache-2.0"
] | null | null | null |
import codecs
import collections
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
def make_keywords_dicts(file):
keyword_dict = dict()
tfidf_dict = dict()
max_kw_lenght=0
for line in codecs.open(file, 'r', "utf-8"):
splitted_line = line.split('\t')
tokens=spl... | 43.226766 | 108 | 0.553234 |
412114230c0c7dd02fb0a25735d3b4fde5bd547a | 12,335 | py | Python | src/greentest/test_queue.py | hackaugusto/gevent | ab5272c5b6fade84ea001f579748898a6d56d5ba | [
"MIT"
] | null | null | null | src/greentest/test_queue.py | hackaugusto/gevent | ab5272c5b6fade84ea001f579748898a6d56d5ba | [
"MIT"
] | null | null | null | src/greentest/test_queue.py | hackaugusto/gevent | ab5272c5b6fade84ea001f579748898a6d56d5ba | [
"MIT"
] | null | null | null | # Some simple queue module tests, plus some failure conditions
# to ensure the Queue locks remain stable.
from gevent import monkey; monkey.patch_all()
from gevent import queue as Queue
import threading
import time
import unittest
QUEUE_SIZE = 5
# A thread to run a function that unclogs a blocked Queue.
class _Trigg... | 37.378788 | 83 | 0.597568 |
c07478c1c2aed3ab92fec5ccc6c48d79de039d5e | 19,659 | py | Python | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/20-sender_receiver_31.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/20-sender_receiver_31.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/20-sender_receiver_31.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 37.733205 | 89 | 0.58004 |
38072f70922e535177081ec89d9f3455e6f1d991 | 3,762 | py | Python | ndcube/tests/test_plotting.py | DanRyanIrish/ndcube | f98f97ad9e65a8ddd79f047d76c596599cf94882 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ndcube/tests/test_plotting.py | DanRyanIrish/ndcube | f98f97ad9e65a8ddd79f047d76c596599cf94882 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | ndcube/tests/test_plotting.py | DanRyanIrish/ndcube | f98f97ad9e65a8ddd79f047d76c596599cf94882 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np
import pytest
import sunpy.visualization.animator
from astropy.visualization.wcsaxes import WCSAxes
from ndcube.tests.helpers import figure_test
@figure_test
def test_plot_1D_cube(ndcube_1d_l):
fig = plt.figure()
ax = ndcube_1d_l.pl... | 33.891892 | 90 | 0.492291 |
7876456461eb694046b47a5b35054b24f3cda7b5 | 5,107 | py | Python | algos/collect_trajectories.py | feloundou/safe-experts | 9592bd48ce7eed721a36cb688dd10dc7f527a13b | [
"Apache-2.0"
] | null | null | null | algos/collect_trajectories.py | feloundou/safe-experts | 9592bd48ce7eed721a36cb688dd10dc7f527a13b | [
"Apache-2.0"
] | null | null | null | algos/collect_trajectories.py | feloundou/safe-experts | 9592bd48ce7eed721a36cb688dd10dc7f527a13b | [
"Apache-2.0"
] | null | null | null |
from tqdm import tqdm
import os
import numpy as np
import torch
import os.path as osp
import gym
import safety_gym
from run_policy_sim_ppo import load_policy_and_env
class SerializedBuffer:
def __init__(self, path, device):
tmp = torch.load(path)
self.buffer_size = self._n = tmp['state'].size(0... | 27.456989 | 91 | 0.59252 |
b46a8e38f55b41bf8522ca8423ab22912939b509 | 8,651 | py | Python | octopus_deploy_swagger_client/models/lifecycle_progression_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/lifecycle_progression_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/lifecycle_progression_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | 31.572993 | 180 | 0.641544 |
aff6f4444e2f467b0d4ebf6297ade1e39fdb53d9 | 179 | py | Python | tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_MovingAverage_Seasonal_DayOfWeek_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_MovingAverage_Seasonal_DayOfWeek_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_MovingAverage_Seasonal_DayOfWeek_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['RelativeDifference'] , ['MovingAverage'] , ['Seasonal_DayOfWeek'] , ['MLP'] ); | 44.75 | 101 | 0.776536 |
a288a7708a75b64f40df75f3f634f6b862f0281a | 663 | py | Python | config.py | mkiterian/fix_buck | 4eefd9a1c695f8037f0e80599156fb57667578ef | [
"MIT"
] | null | null | null | config.py | mkiterian/fix_buck | 4eefd9a1c695f8037f0e80599156fb57667578ef | [
"MIT"
] | null | null | null | config.py | mkiterian/fix_buck | 4eefd9a1c695f8037f0e80599156fb57667578ef | [
"MIT"
] | null | null | null | class Config(object):
SQLALCHEMY_TRACK_MODIFICATIONS = False
class DevelopmentConfig(Config):
SECRET_KEY = 'asdfh87sf454yhggfd45dererfds22as112'
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/bck_fix'
# SQLALCHEMY_DATABASE_URI = 'postgres://mjpkpslhyxsugc:c96eb886222059ab00d391a4bb957cd624608e67993... | 34.894737 | 184 | 0.770739 |
8f96c4555cf0335851f6f86bf94d7321ac19fc69 | 1,483 | py | Python | flask_weather/weather/noaa.py | vamshikr/flask_sure_weather | b21db8005af32b7312b1ba5af4b27efb08846043 | [
"MIT"
] | 3 | 2022-01-21T00:48:14.000Z | 2022-01-21T00:48:21.000Z | flask_weather/weather/noaa.py | vamshikr/flask_sure_weather | b21db8005af32b7312b1ba5af4b27efb08846043 | [
"MIT"
] | 1 | 2021-06-02T00:35:52.000Z | 2021-06-02T00:35:52.000Z | flask_weather/weather/noaa.py | vamshikr/flask_sure_weather | b21db8005af32b7312b1ba5af4b27efb08846043 | [
"MIT"
] | null | null | null | import json
import logging
import os
from http import HTTPStatus
import requests
from flask_weather.exceptions import WeatherServiceException
from flask_weather.weather.base_service import BaseWeatherService
class NoaaWeather(BaseWeatherService):
"""
NOAA Service
"""
SERVICE_NAME = 'noaa'
BASE_U... | 29.078431 | 82 | 0.63857 |
f91478a290951f6de62196d9435a68e884488fec | 1,461 | py | Python | WizardMon/WizardMon.py | InBrewJ/op-doorbell | d85b2152c9fa311eb131c744110481dbbc7effc4 | [
"CC0-1.0"
] | null | null | null | WizardMon/WizardMon.py | InBrewJ/op-doorbell | d85b2152c9fa311eb131c744110481dbbc7effc4 | [
"CC0-1.0"
] | null | null | null | WizardMon/WizardMon.py | InBrewJ/op-doorbell | d85b2152c9fa311eb131c744110481dbbc7effc4 | [
"CC0-1.0"
] | null | null | null | import pika
import json
import time
from datetime import timezone
import datetime
from Schema import HeartbeatSchema, HookSchema
from Broker import Broker
class WizardMon:
def __init__(self, deviceId):
self.deviceId = deviceId
self.broker = Broker()
print("Init-ed")
def _get_timestamp... | 32.466667 | 59 | 0.619439 |
c5c5ef70e1687a0c72105a6d1e9e7108e6f3bc78 | 1,735 | py | Python | nara_wpe/testofflinealgorithm.py | darkdante2209/nara-wpe-api | d349c45771526ebe106dfbd52a58e98e819f6958 | [
"MIT"
] | null | null | null | nara_wpe/testofflinealgorithm.py | darkdante2209/nara-wpe-api | d349c45771526ebe106dfbd52a58e98e819f6958 | [
"MIT"
] | null | null | null | nara_wpe/testofflinealgorithm.py | darkdante2209/nara-wpe-api | d349c45771526ebe106dfbd52a58e98e819f6958 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 19 11:09:43 2020
@author: Admin
"""
import soundfile as sf
import numpy as np
import pathlib
import os
import IPython
from utils import stft, istft
import tensorflow as tf
import matplotlib.pyplot as plt
from tf_wpe import wpe, get_power
project_root = pathlib.Path(os.pa... | 26.287879 | 87 | 0.714697 |
8f4649de3d292d299ce2222936f7d94db3614776 | 2,276 | py | Python | fhirclient/models/messageheader_tests.py | JamesSkane/smart_resources | 85c362542b85ebc43ec00cd04915b114ee95f9c0 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/messageheader_tests.py | JamesSkane/smart_resources | 85c362542b85ebc43ec00cd04915b114ee95f9c0 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/messageheader_tests.py | JamesSkane/smart_resources | 85c362542b85ebc43ec00cd04915b114ee95f9c0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 0.5.0.5149 on 2015-07-06.
# 2015, SMART Health IT.
import os
import io
import unittest
import json
from . import messageheader
from .fhirdate import FHIRDate
class MessageHeaderTests(unittest.TestCase):
def instantiate_from(self, filename):... | 42.943396 | 90 | 0.685852 |
df7b8bb2662baa720c0008e90a7710a6348e572c | 8,239 | py | Python | mysite_env/Lib/site-packages/django/db/migrations/migration.py | Hongyil1/Django-learning-project | 13d4a5731f81a538e91d8fc7fad0587245056aea | [
"Apache-2.0"
] | null | null | null | mysite_env/Lib/site-packages/django/db/migrations/migration.py | Hongyil1/Django-learning-project | 13d4a5731f81a538e91d8fc7fad0587245056aea | [
"Apache-2.0"
] | null | null | null | mysite_env/Lib/site-packages/django/db/migrations/migration.py | Hongyil1/Django-learning-project | 13d4a5731f81a538e91d8fc7fad0587245056aea | [
"Apache-2.0"
] | null | null | null | from django.db.transaction import atomic
from .exceptions import IrreversibleError
class Migration:
"""
The base.css class for all migrations.
Migration files will import this from django.db.migrations.Migration
and subclass it as a class called Migration. It will have one or more
of the followi... | 42.911458 | 104 | 0.650929 |
195171118175c7c9fed725b1292991cadc79591c | 1,272 | py | Python | storm-core/src/dev/resources/tester_bolt.py | iskoda/incubator-storm | a702c3c13f8b063a83ce55bdb52f0a9609fcddd3 | [
"Apache-2.0"
] | 8 | 2018-05-30T11:08:04.000Z | 2021-01-05T08:45:38.000Z | storm-core/src/dev/resources/tester_bolt.py | iskoda/incubator-storm | a702c3c13f8b063a83ce55bdb52f0a9609fcddd3 | [
"Apache-2.0"
] | 9 | 2020-05-15T20:34:55.000Z | 2021-12-14T21:14:52.000Z | storm-core/src/dev/resources/tester_bolt.py | iskoda/incubator-storm | a702c3c13f8b063a83ce55bdb52f0a9609fcddd3 | [
"Apache-2.0"
] | 13 | 2016-11-07T06:20:07.000Z | 2021-02-25T06:57:04.000Z | # -*- coding: utf-8 -*-
# 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
# ... | 34.378378 | 74 | 0.703616 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.