hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 4 247 | max_issues_repo_name stringlengths 4 125 | 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 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
51d108784cff76de7b29f2597632b0919f2ce39a | 4,072 | py | Python | insert.py | DigiLog-N/Cassandra_Loaders | ad97e8b5ee4b9dfd4887476f1818fa101075aa8d | [
"Apache-2.0"
] | null | null | null | insert.py | DigiLog-N/Cassandra_Loaders | ad97e8b5ee4b9dfd4887476f1818fa101075aa8d | [
"Apache-2.0"
] | null | null | null | insert.py | DigiLog-N/Cassandra_Loaders | ad97e8b5ee4b9dfd4887476f1818fa101075aa8d | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# insert.py
# https://github.com/DigiLog-N/SynopticDataClient
# Copyright 2020 Canvass Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You m... | 32.83871 | 79 | 0.561886 | ##############################################################################
# insert.py
# https://github.com/DigiLog-N/SynopticDataClient
# Copyright 2020 Canvass Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You m... | 1,744 | 947 | 23 |
d30800ec4925e47b07687e5abc8b953f353accd1 | 184 | py | Python | nwu-eecs-339-db/py-btree-lab/tests/config.py | mzhang-code/courses | 35672c5355cc10ddebb54d17fb7ccbf0f462be00 | [
"MIT"
] | null | null | null | nwu-eecs-339-db/py-btree-lab/tests/config.py | mzhang-code/courses | 35672c5355cc10ddebb54d17fb7ccbf0f462be00 | [
"MIT"
] | null | null | null | nwu-eecs-339-db/py-btree-lab/tests/config.py | mzhang-code/courses | 35672c5355cc10ddebb54d17fb7ccbf0f462be00 | [
"MIT"
] | 1 | 2019-11-29T17:49:37.000Z | 2019-11-29T17:49:37.000Z |
import pytest
from btreelab.disk import Disk, DiskController
@pytest.fixture()
def dc():
'''disk controller
'''
return DiskController(block_size=124, block_num=8)
| 16.727273 | 55 | 0.690217 |
import pytest
from btreelab.disk import Disk, DiskController
@pytest.fixture()
def dc():
'''disk controller
'''
return DiskController(block_size=124, block_num=8)
| 0 | 0 | 0 |
f208f86a147806a8b0c97fa5e9dd1609d1f04c1e | 3,092 | py | Python | gapid_tests/resource_creation_tests/vkCreateFramebuffer_test/vkCreateFramebuffer_test.py | RenfengLiu/vulkan_test_applications | 04359b7184ad94659810213ff63ae71296426182 | [
"Apache-2.0"
] | 55 | 2017-06-20T13:54:31.000Z | 2022-02-08T23:58:11.000Z | gapid_tests/resource_creation_tests/vkCreateFramebuffer_test/vkCreateFramebuffer_test.py | RenfengLiu/vulkan_test_applications | 04359b7184ad94659810213ff63ae71296426182 | [
"Apache-2.0"
] | 53 | 2017-06-15T19:23:07.000Z | 2022-03-30T19:56:30.000Z | gapid_tests/resource_creation_tests/vkCreateFramebuffer_test/vkCreateFramebuffer_test.py | RenfengLiu/vulkan_test_applications | 04359b7184ad94659810213ff63ae71296426182 | [
"Apache-2.0"
] | 42 | 2017-06-15T19:05:40.000Z | 2022-03-30T14:15:25.000Z | # Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, softwa... | 45.470588 | 78 | 0.731565 | # Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, softwa... | 1,795 | 13 | 49 |
2af14be3d99155fb27452df82a3ee04acbf74715 | 16,524 | py | Python | benchmarks/scripts/benchmarks.py | riddopic/delta | 532da849290f9fa63ccacfc176f39f6d4775035d | [
"Apache-2.0"
] | null | null | null | benchmarks/scripts/benchmarks.py | riddopic/delta | 532da849290f9fa63ccacfc176f39f6d4775035d | [
"Apache-2.0"
] | null | null | null | benchmarks/scripts/benchmarks.py | riddopic/delta | 532da849290f9fa63ccacfc176f39f6d4775035d | [
"Apache-2.0"
] | null | null | null | #
# Copyright (2021) The Delta Lake Project 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 ag... | 44.659459 | 131 | 0.653292 | #
# Copyright (2021) The Delta Lake Project 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 ag... | 13,715 | 96 | 681 |
7fd483db80d173ed61885938f51715a5a658b565 | 3,003 | py | Python | sewing/display.py | except-pass/sewing | d6b1098b1d7826da3b2cfb4fe3f591ac5dea5529 | [
"Apache-2.0"
] | 1 | 2021-08-16T23:57:35.000Z | 2021-08-16T23:57:35.000Z | sewing/display.py | except-pass/sewing | d6b1098b1d7826da3b2cfb4fe3f591ac5dea5529 | [
"Apache-2.0"
] | null | null | null | sewing/display.py | except-pass/sewing | d6b1098b1d7826da3b2cfb4fe3f591ac5dea5529 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/display.ipynb (unless otherwise specified).
__all__ = ['encode', 'DiscordEncoder', 'Formatter', 'serialize_content', 'html_content']
# Cell
import discord
# Cell
import json
# Cell
#TODO change the data model for this to something more standard.
# use only strin... | 33.741573 | 92 | 0.55045 | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/display.ipynb (unless otherwise specified).
__all__ = ['encode', 'DiscordEncoder', 'Formatter', 'serialize_content', 'html_content']
# Cell
import discord
# Cell
import json
def encode(u):
if isinstance(u, discord.Message):
ts = u.created_at
ser... | 2,430 | 13 | 193 |
b96f81a47e50f86d3f3575e40a69cd10fa944edd | 13,154 | py | Python | skyportal/handlers/api/comment.py | LSSTDESC/skyportal | 1a433aae67b26ffd3516e65e0fdbf866b4751486 | [
"BSD-3-Clause"
] | null | null | null | skyportal/handlers/api/comment.py | LSSTDESC/skyportal | 1a433aae67b26ffd3516e65e0fdbf866b4751486 | [
"BSD-3-Clause"
] | null | null | null | skyportal/handlers/api/comment.py | LSSTDESC/skyportal | 1a433aae67b26ffd3516e65e0fdbf866b4751486 | [
"BSD-3-Clause"
] | null | null | null | import string
import base64
from distutils.util import strtobool
from marshmallow.exceptions import ValidationError
from baselayer.app.access import permissions, auth_or_token
from ..base import BaseHandler
from ...models import (
DBSession,
Source,
Comment,
Group,
Candidate,
Filter,
Obj,
... | 33.133501 | 108 | 0.504713 | import string
import base64
from distutils.util import strtobool
from marshmallow.exceptions import ValidationError
from baselayer.app.access import permissions, auth_or_token
from ..base import BaseHandler
from ...models import (
DBSession,
Source,
Comment,
Group,
Candidate,
Filter,
Obj,
... | 350 | 12,380 | 69 |
4fc50fa8fdc22ae0a42408d29bb1eaa2f4f6629f | 255 | py | Python | producer.py | Fran006/tarea_kafka | 4956c1469ee28a22cfde3dd0c6de8b5b4ae57062 | [
"Apache-2.0"
] | null | null | null | producer.py | Fran006/tarea_kafka | 4956c1469ee28a22cfde3dd0c6de8b5b4ae57062 | [
"Apache-2.0"
] | null | null | null | producer.py | Fran006/tarea_kafka | 4956c1469ee28a22cfde3dd0c6de8b5b4ae57062 | [
"Apache-2.0"
] | 1 | 2021-11-10T22:42:25.000Z | 2021-11-10T22:42:25.000Z | from kafka import KafkaProducer
import json
producer = KafkaProducer(value_serializer=lambda m: json.dumps(m).encode('ascii'), bootstrap_servers=['localhost:9092'])
producer.send('event', {'id': 123, 'email_vendedor': 'asdas@mail.com'})
producer.flush() | 42.5 | 120 | 0.760784 | from kafka import KafkaProducer
import json
producer = KafkaProducer(value_serializer=lambda m: json.dumps(m).encode('ascii'), bootstrap_servers=['localhost:9092'])
producer.send('event', {'id': 123, 'email_vendedor': 'asdas@mail.com'})
producer.flush() | 0 | 0 | 0 |
c1b599e6e1ca1877962e355a6ed461f34dc75d4a | 153 | py | Python | app/__init__.py | themagpimag/magpi-api | f99b9bc534dc7f44fc7d84d7f266370e5794b467 | [
"MIT"
] | 1 | 2015-08-11T11:44:45.000Z | 2015-08-11T11:44:45.000Z | app/__init__.py | themagpimag/magpi-api | f99b9bc534dc7f44fc7d84d7f266370e5794b467 | [
"MIT"
] | null | null | null | app/__init__.py | themagpimag/magpi-api | f99b9bc534dc7f44fc7d84d7f266370e5794b467 | [
"MIT"
] | null | null | null | import os, sys
sys.path.insert(1, os.path.join(os.path.abspath('.'), 'flaskstuff'))
from flask import Flask
app = Flask(__name__)
from app import views
| 21.857143 | 68 | 0.732026 | import os, sys
sys.path.insert(1, os.path.join(os.path.abspath('.'), 'flaskstuff'))
from flask import Flask
app = Flask(__name__)
from app import views
| 0 | 0 | 0 |
1d16e66cae87b4d4e0d7cb5177e60619c21733ff | 1,471 | py | Python | ssh_telnet/pexpect/ex11_ssh_pexpect_threads.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | 11 | 2021-04-05T09:30:23.000Z | 2022-03-09T13:27:56.000Z | ssh_telnet/pexpect/ex11_ssh_pexpect_threads.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | null | null | null | ssh_telnet/pexpect/ex11_ssh_pexpect_threads.py | levs72/pyneng-examples | d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9 | [
"MIT"
] | 11 | 2021-04-06T03:44:35.000Z | 2022-03-04T21:20:40.000Z | from concurrent.futures import ThreadPoolExecutor
from itertools import repeat
from pprint import pprint
import pexpect
import yaml
import logging
logging.basicConfig(
format="%(threadName)s %(name)s %(levelname)s: %(message)s", level=logging.INFO
)
if __name__ == "__main__":
with open("devices.yaml") as... | 28.288462 | 86 | 0.645139 | from concurrent.futures import ThreadPoolExecutor
from itertools import repeat
from pprint import pprint
import pexpect
import yaml
import logging
logging.basicConfig(
format="%(threadName)s %(name)s %(levelname)s: %(message)s", level=logging.INFO
)
def send_show_command(host, username, password, enable_pass, ... | 987 | 0 | 46 |
39021714010b6620176e6528eda72866dde39f19 | 1,060 | py | Python | HealthKit/healthapp/forms.py | Koushik-Sarker-Seemanto/DatabaseProject | d936d83643242942b903381ef263dc10f8fbc177 | [
"MIT"
] | null | null | null | HealthKit/healthapp/forms.py | Koushik-Sarker-Seemanto/DatabaseProject | d936d83643242942b903381ef263dc10f8fbc177 | [
"MIT"
] | null | null | null | HealthKit/healthapp/forms.py | Koushik-Sarker-Seemanto/DatabaseProject | d936d83643242942b903381ef263dc10f8fbc177 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django import forms
from healthapp.models import UserDoctor, UserPatient, Schedule
| 30.285714 | 163 | 0.710377 | from django.contrib.auth.models import User
from django import forms
from healthapp.models import UserDoctor, UserPatient, Schedule
class DoctorRegForm(forms.ModelForm):
password = forms.CharField(widget=forms.PasswordInput)
class Meta:
model = UserDoctor
fields = ['doctor_name', 'doctor_emai... | 0 | 832 | 92 |
26834ebb2aeaa8b8b055be1d5f31f9e4d6541584 | 127 | py | Python | qbatch/__init__.py | Gab-D-G/qbatch | 3ecff388d7d4d19468403f9b5595e7f8a865ff73 | [
"Unlicense"
] | 29 | 2015-12-11T19:30:41.000Z | 2021-08-30T12:39:48.000Z | qbatch/__init__.py | Gab-D-G/qbatch | 3ecff388d7d4d19468403f9b5595e7f8a865ff73 | [
"Unlicense"
] | 157 | 2015-12-15T20:42:14.000Z | 2021-08-19T16:26:15.000Z | qbatch/__init__.py | gdevenyi/qbatch | 40e62a8232f199c26de2bbe4a619ae474d8398d6 | [
"Unlicense"
] | 15 | 2015-12-15T19:48:38.000Z | 2021-07-09T14:47:09.000Z | from __future__ import absolute_import
from . import qbatch
from .qbatch import qbatchParser
from .qbatch import qbatchDriver
| 21.166667 | 38 | 0.84252 | from __future__ import absolute_import
from . import qbatch
from .qbatch import qbatchParser
from .qbatch import qbatchDriver
| 0 | 0 | 0 |
ef3f4491efa17c348ebc2c021ea1f9365a52f5f0 | 1,950 | py | Python | 6.00.1x/PS7/AdoptionCenter.py | batnam/MITx6.00.1x | f2c342c8b69ecf22b2e40f3ce554255efdc6f7c0 | [
"MIT"
] | null | null | null | 6.00.1x/PS7/AdoptionCenter.py | batnam/MITx6.00.1x | f2c342c8b69ecf22b2e40f3ce554255efdc6f7c0 | [
"MIT"
] | null | null | null | 6.00.1x/PS7/AdoptionCenter.py | batnam/MITx6.00.1x | f2c342c8b69ecf22b2e40f3ce554255efdc6f7c0 | [
"MIT"
] | null | null | null | __author__ = 'ThanhNam'
# Enter your code for the AdoptionCenter class here
# Be sure to include the __init__, get_name, get_species_count, get_number_of_species, and adopt_pet methods.
class AdoptionCenter:
"""
The AdoptionCenter class stores the important information that a
client would need to know about... | 45.348837 | 109 | 0.657949 | __author__ = 'ThanhNam'
# Enter your code for the AdoptionCenter class here
# Be sure to include the __init__, get_name, get_species_count, get_number_of_species, and adopt_pet methods.
class AdoptionCenter:
"""
The AdoptionCenter class stores the important information that a
client would need to know about... | 1,343 | 0 | 156 |
07ccf046f59337ff05c6654450113b1bb0cbf3bc | 830 | py | Python | gammapy/datasets/tests/test_load.py | contrera/gammapy | aa0a74baa977ee2477b5c63e036075f4219792a3 | [
"BSD-3-Clause"
] | null | null | null | gammapy/datasets/tests/test_load.py | contrera/gammapy | aa0a74baa977ee2477b5c63e036075f4219792a3 | [
"BSD-3-Clause"
] | 1 | 2020-10-29T19:55:46.000Z | 2020-10-29T19:55:46.000Z | gammapy/datasets/tests/test_load.py | qpiel/gammapy | cfb976909e63f4d5d578e1495245c0baad69482b | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
from numpy.testing import assert_allclose
from ...utils.testing import requires_data
from ..core import gammapy_extra
from ...datasets import load_poisson_stats_image
@req... | 33.2 | 82 | 0.760241 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
from numpy.testing import assert_allclose
from ...utils.testing import requires_data
from ..core import gammapy_extra
from ...datasets import load_poisson_stats_image
@req... | 308 | 0 | 22 |
f7f700d638e18614ca377341088ad873b1037c34 | 2,301 | py | Python | GPflow/testing/test_triang.py | mlilab/Mixed-Effect-Composite-RNN-Gaussian-Process | dd7da89ce3c41d459a26ad1ce5ed2f40ab4ca85d | [
"Apache-2.0"
] | 24 | 2018-11-29T07:00:59.000Z | 2021-04-22T19:12:31.000Z | GPflow/testing/test_triang.py | mlilab/Mixed-Effect-Composite-RNN-Gaussian-Process | dd7da89ce3c41d459a26ad1ce5ed2f40ab4ca85d | [
"Apache-2.0"
] | 1 | 2018-12-04T11:51:21.000Z | 2018-12-04T11:51:21.000Z | GPflow/testing/test_triang.py | OpenXAIProject/Mixed-Effect-Composite-RNN-Gaussian-Process | dd7da89ce3c41d459a26ad1ce5ed2f40ab4ca85d | [
"Apache-2.0"
] | 12 | 2018-11-30T00:40:13.000Z | 2019-10-30T16:09:52.000Z | import unittest
from gpflow.tf_wraps import vec_to_tri
import tensorflow as tf
import numpy as np
from testing.gpflow_testcase import GPflowTestCase
from gpflow.tf_wraps import vec_to_tri
if __name__ == "__main__":
unittest.main()
| 37.721311 | 88 | 0.65189 | import unittest
from gpflow.tf_wraps import vec_to_tri
import tensorflow as tf
import numpy as np
from testing.gpflow_testcase import GPflowTestCase
from gpflow.tf_wraps import vec_to_tri
class TestVecToTri(GPflowTestCase):
def referenceInverse(self, matrices):
#this is the inverse operation of the vec_to_tri
... | 1,919 | 14 | 130 |
f0434d2467c088882bbe829db3af0534d65a607c | 1,173 | py | Python | kiwi-entry/kiwi/UserManager.py | bubblegumsoldier/kiwi | 91701c1806dcfbc1b038fecf7c2cab8bb07a01d4 | [
"MIT"
] | null | null | null | kiwi-entry/kiwi/UserManager.py | bubblegumsoldier/kiwi | 91701c1806dcfbc1b038fecf7c2cab8bb07a01d4 | [
"MIT"
] | null | null | null | kiwi-entry/kiwi/UserManager.py | bubblegumsoldier/kiwi | 91701c1806dcfbc1b038fecf7c2cab8bb07a01d4 | [
"MIT"
] | null | null | null | from aiohttp.client import ClientSession
from http import HTTPStatus
from sanic.exceptions import abort
| 37.83871 | 96 | 0.581415 | from aiohttp.client import ClientSession
from http import HTTPStatus
from sanic.exceptions import abort
class UserManager:
def __init__(self, base_url):
self.url = base_url
self.register = 'register'
self.auth = 'authenticate'
async def authenticate_user(self, username, session):
... | 914 | -3 | 157 |
38026a46d227486abffd913d93d9c5a5bf30660e | 1,607 | py | Python | GUTG_Vote/views.py | KnightHawk3/GUTG-Vote | 73187427ecf4848f5942b627ccb01a6bb46e20c7 | [
"MIT"
] | null | null | null | GUTG_Vote/views.py | KnightHawk3/GUTG-Vote | 73187427ecf4848f5942b627ccb01a6bb46e20c7 | [
"MIT"
] | null | null | null | GUTG_Vote/views.py | KnightHawk3/GUTG-Vote | 73187427ecf4848f5942b627ccb01a6bb46e20c7 | [
"MIT"
] | null | null | null | from flask import Blueprint, redirect, url_for, request, render_template, flash, g
from flask.ext.login import login_user, logout_user, current_user, login_required
from GUTG_Vote import utilities
from GUTG_Vote.models import User, Game
from GUTG_Vote.forms import LoginForm
from GUTG_Vote.extensions import db
main = ... | 31.509804 | 82 | 0.698818 | from flask import Blueprint, redirect, url_for, request, render_template, flash, g
from flask.ext.login import login_user, logout_user, current_user, login_required
from GUTG_Vote import utilities
from GUTG_Vote.models import User, Game
from GUTG_Vote.forms import LoginForm
from GUTG_Vote.extensions import db
main = ... | 970 | 0 | 111 |
6fbaf79ece07e32cc3a732534e0de0019416c4c2 | 1,349 | py | Python | src/cogs/Apps.py | SlumberDemon/SlEepy | feee98662463d6a17f31a00aad5374d8bee143dd | [
"MIT"
] | null | null | null | src/cogs/Apps.py | SlumberDemon/SlEepy | feee98662463d6a17f31a00aad5374d8bee143dd | [
"MIT"
] | null | null | null | src/cogs/Apps.py | SlumberDemon/SlEepy | feee98662463d6a17f31a00aad5374d8bee143dd | [
"MIT"
] | null | null | null | import discord, dislash, datetime
from dislash import slash_command, SlashInteraction, ContextMenuInteraction
from discord.ext import commands
from src.extras.views import url_button_generator
| 38.542857 | 119 | 0.702001 | import discord, dislash, datetime
from dislash import slash_command, SlashInteraction, ContextMenuInteraction
from discord.ext import commands
from src.extras.views import url_button_generator
class Apps(commands.Cog):
def __init__(self, bot):
self.bot = bot
@dislash.user_command(name="Created at")
... | 865 | 245 | 46 |
5ba26c08e92e3d324c6c278311b3671c8361e603 | 3,460 | py | Python | scripts/getannotations.py | spyysalo/consensus-pipeline | 2301fcd6fa5bacc7daa18abcc93e5abf28a9a8c1 | [
"MIT"
] | null | null | null | scripts/getannotations.py | spyysalo/consensus-pipeline | 2301fcd6fa5bacc7daa18abcc93e5abf28a9a8c1 | [
"MIT"
] | null | null | null | scripts/getannotations.py | spyysalo/consensus-pipeline | 2301fcd6fa5bacc7daa18abcc93e5abf28a9a8c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Get annotations with context from database.
import sys
import os
import re
from logging import warning, error
from standoff import Textbound
try:
from sqlitedict import SqliteDict
except ImportError:
error('failed to import sqlitedict, try `pip3 install sqlitedict`')
raise
d... | 28.833333 | 76 | 0.591329 | #!/usr/bin/env python3
# Get annotations with context from database.
import sys
import os
import re
from logging import warning, error
from standoff import Textbound
try:
from sqlitedict import SqliteDict
except ImportError:
error('failed to import sqlitedict, try `pip3 install sqlitedict`')
raise
de... | 2,557 | 0 | 161 |
63cf91e19f748137ebd544fda7899261450dbabc | 605 | py | Python | botforms/urls.py | johan--/botforms | d10731b658459b1cf15b05820f227c3ac7bf9aa3 | [
"MIT"
] | null | null | null | botforms/urls.py | johan--/botforms | d10731b658459b1cf15b05820f227c3ac7bf9aa3 | [
"MIT"
] | null | null | null | botforms/urls.py | johan--/botforms | d10731b658459b1cf15b05820f227c3ac7bf9aa3 | [
"MIT"
] | null | null | null | """botform URL Configuration
"""
from django.conf.urls import url, include
from rest_framework import routers
from botform import api as form_api
router = routers.DefaultRouter()
router.register(r'forms', form_api.FormsViewSet)
router.register(r'submissions', form_api.SubmissionsViewSet)
urlpatterns = [
url(r'^... | 30.25 | 87 | 0.709091 | """botform URL Configuration
"""
from django.conf.urls import url, include
from rest_framework import routers
from botform import api as form_api
router = routers.DefaultRouter()
router.register(r'forms', form_api.FormsViewSet)
router.register(r'submissions', form_api.SubmissionsViewSet)
urlpatterns = [
url(r'^... | 0 | 0 | 0 |
9424a83d00589bd1ee61bcc276172b2e7b5d853b | 364 | py | Python | spider/goData/client_mongodb.py | hellohuizz/The-Employment-System | 4b6ea74797a39ce3d469acd03945945a626e5100 | [
"Apache-2.0"
] | null | null | null | spider/goData/client_mongodb.py | hellohuizz/The-Employment-System | 4b6ea74797a39ce3d469acd03945945a626e5100 | [
"Apache-2.0"
] | null | null | null | spider/goData/client_mongodb.py | hellohuizz/The-Employment-System | 4b6ea74797a39ce3d469acd03945945a626e5100 | [
"Apache-2.0"
] | null | null | null | from pymongo import MongoClient
| 20.222222 | 50 | 0.620879 | from pymongo import MongoClient
class ConMongodb:
def __init__(self):
self.conn = MongoClient('127.0.0.1',27017)
def con_collection(self,database,collection):
# 连接数据库
db = self.conn[database]
# 连接集合
self.collection = db[collection]
def read_data(self):
#返回全... | 261 | -4 | 103 |
09d397d02fc2b73e519ee160bc9f72a5d0483391 | 351 | py | Python | Aula_3/aaa.py | Mateus-Silva11/AulasPython | d34dc4f62ade438e68b0a80e0baac4d6ec0d378e | [
"MIT"
] | null | null | null | Aula_3/aaa.py | Mateus-Silva11/AulasPython | d34dc4f62ade438e68b0a80e0baac4d6ec0d378e | [
"MIT"
] | null | null | null | Aula_3/aaa.py | Mateus-Silva11/AulasPython | d34dc4f62ade438e68b0a80e0baac4d6ec0d378e | [
"MIT"
] | null | null | null | from operacaoes3 import mais , menos , vezes , divicao , resto , raiz , divicao_f
n1 = int(input('a'))
n2 = int(input('b'))
a = mais(n1,n2)
b = menos(n1,n2)
c = vezes(n1,n2)
d = divicao(n1,n2)
e = resto(n1,n2)
f = raiz(n1,n2)
g = divicao_f(n1,n2)
print(f'{a}')
print(f'{b}')
print(f'{c}')
print(f'{d}')
print(f'{e}... | 15.26087 | 81 | 0.584046 | from operacaoes3 import mais , menos , vezes , divicao , resto , raiz , divicao_f
n1 = int(input('a'))
n2 = int(input('b'))
a = mais(n1,n2)
b = menos(n1,n2)
c = vezes(n1,n2)
d = divicao(n1,n2)
e = resto(n1,n2)
f = raiz(n1,n2)
g = divicao_f(n1,n2)
print(f'{a}')
print(f'{b}')
print(f'{c}')
print(f'{d}')
print(f'{e}... | 0 | 0 | 0 |
218ffd003ad6258797c16b4042895fa4389c24c3 | 5,088 | py | Python | test/update-tests.py | edanaher/scry | 6958acea46ae6d43540092bb7397ebb4fcc97463 | [
"MIT"
] | 1 | 2020-06-09T20:46:39.000Z | 2020-06-09T20:46:39.000Z | test/update-tests.py | edanaher/scry | 6958acea46ae6d43540092bb7397ebb4fcc97463 | [
"MIT"
] | null | null | null | test/update-tests.py | edanaher/scry | 6958acea46ae6d43540092bb7397ebb4fcc97463 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import os
import psycopg2
import sys
# Why is it so hard to get python imports working?
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from scry import scry
if __name__ == "__main__":
main()
| 31.602484 | 149 | 0.64033 | #!/usr/bin/env python
import argparse
import os
import psycopg2
import sys
# Why is it so hard to get python imports working?
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from scry import scry
def parseadd(args):
db = psycopg2.connect("")
cur = db.cursor()
table_inf... | 4,721 | 0 | 92 |
ab148763a282ac4ed2f0fd91c8a2b01c2150e582 | 305 | py | Python | pyrolysis/common/__init__.py | fmerlin/pyrolysis | 2edf1094466b09b4c5d1ab93f5cbc2bb01cc73c3 | [
"MIT"
] | 1 | 2020-05-01T14:14:23.000Z | 2020-05-01T14:14:23.000Z | pyrolysis/common/__init__.py | fmerlin/pyrolysis | 2edf1094466b09b4c5d1ab93f5cbc2bb01cc73c3 | [
"MIT"
] | null | null | null | pyrolysis/common/__init__.py | fmerlin/pyrolysis | 2edf1094466b09b4c5d1ab93f5cbc2bb01cc73c3 | [
"MIT"
] | null | null | null | __version__ = '0.1.5'
try:
import pandas
pandas_df_type = pandas.DataFrame
except ImportError:
pandas_df_type = type(None)
try:
import msgpack
has_msgpack = True
except ImportError:
has_msgpack = False
try:
import os
login = os.getlogin()
except OSError:
login = ''
| 15.25 | 37 | 0.672131 | __version__ = '0.1.5'
try:
import pandas
pandas_df_type = pandas.DataFrame
except ImportError:
pandas_df_type = type(None)
try:
import msgpack
has_msgpack = True
except ImportError:
has_msgpack = False
try:
import os
login = os.getlogin()
except OSError:
login = ''
| 0 | 0 | 0 |
e08c7b206b10f6e7ff785d1da11f76d04ad807cf | 1,555 | py | Python | metax/db/extract_gbff_rrna.py | yesimon/metax_bakeoff_2019 | e90da33a9d9407c6a804fee8d58333212148806c | [
"MIT"
] | 16 | 2019-08-08T16:00:15.000Z | 2021-01-22T00:13:05.000Z | metax/db/extract_gbff_rrna.py | yesimon/metax_bakeoff_2019 | e90da33a9d9407c6a804fee8d58333212148806c | [
"MIT"
] | 4 | 2019-09-23T11:23:01.000Z | 2021-01-20T23:20:50.000Z | metax/db/extract_gbff_rrna.py | yesimon/metax_bakeoff_2019 | e90da33a9d9407c6a804fee8d58333212148806c | [
"MIT"
] | 2 | 2019-10-24T14:50:59.000Z | 2019-12-31T02:57:56.000Z | #!/usr/bin/env python3
import argparse
import sys
import os
from pathlib import Path
from Bio import SeqIO
import gzip
| 37.02381 | 118 | 0.550482 | #!/usr/bin/env python3
import argparse
import sys
import os
from pathlib import Path
from Bio import SeqIO
import gzip
def add_command(subparsers):
parser = subparsers.add_parser('extract-gbff-rrna', description='Extract rRNA entries from GBFF files.')
parser.add_argument('-i', '--input-dir', help='Output dir... | 1,388 | 0 | 46 |
961e5203d3d494ae7891731578eafae7a39ef2dc | 1,818 | py | Python | tools/online_assembler.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 161 | 2020-05-31T03:29:42.000Z | 2022-03-07T08:36:19.000Z | tools/online_assembler.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 74 | 2020-05-26T18:05:48.000Z | 2021-02-13T21:55:39.000Z | tools/online_assembler.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 19 | 2020-05-27T19:22:11.000Z | 2022-02-17T18:53:52.000Z | """ Helper to assemble code from a web page. """
import flask
import subprocess
import tempfile
main_html = r"""
<!DOCTYPE html>
<html><head>
<title>Online compiler</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
<script s... | 25.25 | 88 | 0.640264 | """ Helper to assemble code from a web page. """
import flask
import subprocess
import tempfile
main_html = r"""
<!DOCTYPE html>
<html><head>
<title>Online compiler</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
<script s... | 596 | 0 | 90 |
7cc91d079a51e8d8c6dac891686716599ed68ead | 188 | py | Python | week0/swapy.py | peacekeeper6/Python-Project | d27101dda4b977fcd1143c02670fd1b78759543f | [
"MIT"
] | null | null | null | week0/swapy.py | peacekeeper6/Python-Project | d27101dda4b977fcd1143c02670fd1b78759543f | [
"MIT"
] | 4 | 2022-03-14T21:40:34.000Z | 2022-03-28T21:46:17.000Z | week0/swapy.py | peacekeeper6/Python-Project | d27101dda4b977fcd1143c02670fd1b78759543f | [
"MIT"
] | 1 | 2022-03-14T21:31:59.000Z | 2022-03-14T21:31:59.000Z |
if __name__ == "__main__":
a = input("first number:")
b = input("second number:")
print(', '.join(swap(a, b)))
| 15.666667 | 30 | 0.494681 | def swap(a, b):
if b < a:
a, b = b, a
return a, b
if __name__ == "__main__":
a = input("first number:")
b = input("second number:")
print(', '.join(swap(a, b)))
| 46 | 0 | 22 |
aa4789eaa3baabff0de064cf8ec592610618a86d | 10,124 | py | Python | labelling_tool/tracking/DaSiamRPN/DaSiamRPN.py | abhineet123/animal_detection_ | be0dd60d2b56b267f329b7be71d7f037499f98bc | [
"CC-BY-4.0"
] | 6 | 2020-06-18T16:41:40.000Z | 2022-03-10T07:15:13.000Z | labelling_tool/tracking/DaSiamRPN/DaSiamRPN.py | abhineet123/animal_detection_ | be0dd60d2b56b267f329b7be71d7f037499f98bc | [
"CC-BY-4.0"
] | 1 | 2021-08-11T08:42:28.000Z | 2021-08-11T08:42:28.000Z | labelling_tool/tracking/DaSiamRPN/DaSiamRPN.py | abhineet123/animal_detection_ | be0dd60d2b56b267f329b7be71d7f037499f98bc | [
"CC-BY-4.0"
] | 1 | 2022-02-25T11:06:17.000Z | 2022-02-25T11:06:17.000Z | import os
import sys
import time
import math
import inspect
import copy
import logging
import numpy as np
import cv2
import torch
from torch.autograd import Variable
import torch.nn.functional as F
from .DaSiamRPN_net import SiamRPNvot, SiamRPNBIG, SiamRPNotb
from .run_SiamRPN import generate_anchor, tracker_eval
fro... | 35.152778 | 134 | 0.602529 | import os
import sys
import time
import math
import inspect
import copy
import logging
import numpy as np
import cv2
import torch
from torch.autograd import Variable
import torch.nn.functional as F
from .DaSiamRPN_net import SiamRPNvot, SiamRPNBIG, SiamRPNotb
from .run_SiamRPN import generate_anchor, tracker_eval
fro... | 3,944 | 0 | 108 |
dd7a28c483c819da0124ed863aebb47475aa02bc | 3,776 | py | Python | devel/forms.py | VanirLab/VOS | e6cb3e4e391e583e98d548292b5f272320d38cc4 | [
"MIT"
] | null | null | null | devel/forms.py | VanirLab/VOS | e6cb3e4e391e583e98d548292b5f272320d38cc4 | [
"MIT"
] | null | null | null | devel/forms.py | VanirLab/VOS | e6cb3e4e391e583e98d548292b5f272320d38cc4 | [
"MIT"
] | null | null | null | import random
from collections import OrderedDict
from string import ascii_letters, digits
from django import forms
from django.contrib.auth.models import User, Group
from django.contrib.sites.models import Site
from django.core.mail import send_mail
from django.template import loader
from .models import Us... | 36.307692 | 80 | 0.613083 | import random
from collections import OrderedDict
from string import ascii_letters, digits
from django import forms
from django.contrib.auth.models import User, Group
from django.contrib.sites.models import Site
from django.core.mail import send_mail
from django.template import loader
from .models import Us... | 2,302 | 1,036 | 73 |
8b16473ee83dc682af821beb59c1c5dc297a5544 | 3,006 | py | Python | numpy_ann.py | anushaa51/YTrendNet | 3c5179d493aea6c45ca4258e1f41857947ec953e | [
"Apache-2.0"
] | 1 | 2019-07-08T15:57:36.000Z | 2019-07-08T15:57:36.000Z | numpy_ann.py | anushab05/YTrendNet | 3c5179d493aea6c45ca4258e1f41857947ec953e | [
"Apache-2.0"
] | null | null | null | numpy_ann.py | anushab05/YTrendNet | 3c5179d493aea6c45ca4258e1f41857947ec953e | [
"Apache-2.0"
] | null | null | null | import numpy as np
# hidden layer activation function
# derivate of hidden layer activation function for gradient descent
# output layer activation function
# cost function
# derivative of cost function for gradient descent
| 34.551724 | 80 | 0.619428 | import numpy as np
# hidden layer activation function
def sigmoid(s):
return 1/(1 + np.exp(-s))
# derivate of hidden layer activation function for gradient descent
def delta_sigmoid(s):
return s * (1 - s)
# output layer activation function
def softmax(s):
exps = np.exp(s - np.max(s, axis=1, k... | 2,515 | -11 | 263 |
5a2cb2c9491ab33ef0c17574907ea19101bad7c3 | 1,797 | py | Python | notebooks/models/spoilers/optimizer.py | AnveshAeturi/deep-learning-workshop | 20be7d92f310ca27a176e96e3a0b557f3fee2ec2 | [
"MIT"
] | 486 | 2016-06-23T09:12:57.000Z | 2022-03-03T11:23:38.000Z | notebooks/models/spoilers/optimizer.py | AnveshAeturi/deep-learning-workshop | 20be7d92f310ca27a176e96e3a0b557f3fee2ec2 | [
"MIT"
] | 4 | 2016-06-24T03:36:02.000Z | 2020-05-15T06:59:54.000Z | notebooks/models/spoilers/optimizer.py | AnveshAeturi/deep-learning-workshop | 20be7d92f310ca27a176e96e3a0b557f3fee2ec2 | [
"MIT"
] | 133 | 2016-07-23T02:50:53.000Z | 2022-03-19T03:41:46.000Z | l_in = lasagne.layers.InputLayer((None, 784))
l_out = lasagne.layers.DenseLayer(l_in,
num_units=10,
nonlinearity=lasagne.nonlinearities.softmax)
X_sym = T.matrix()
y_sym = T.ivector()
output = lasagne.layers.get_output(l_out, X_sym)
pred = output.arg... | 30.457627 | 84 | 0.633278 | l_in = lasagne.layers.InputLayer((None, 784))
l_out = lasagne.layers.DenseLayer(l_in,
num_units=10,
nonlinearity=lasagne.nonlinearities.softmax)
X_sym = T.matrix()
y_sym = T.ivector()
output = lasagne.layers.get_output(l_out, X_sym)
pred = output.arg... | 0 | 0 | 0 |
4f3678ead1dd3f3d96e7f7ed489968e2d3d73686 | 14,367 | py | Python | .venv/Lib/site-packages/lemoncheesecake/filter.py | yadavdeepa365/HUDL_PYTHON | e1d5d264e3748f0add18258496f5a850e16b7ee6 | [
"MIT"
] | 34 | 2017-06-12T18:50:36.000Z | 2021-11-29T01:59:07.000Z | .venv/Lib/site-packages/lemoncheesecake/filter.py | yadavdeepa365/HUDL_PYTHON | e1d5d264e3748f0add18258496f5a850e16b7ee6 | [
"MIT"
] | 25 | 2017-12-07T13:35:29.000Z | 2022-03-10T01:27:58.000Z | .venv/Lib/site-packages/lemoncheesecake/filter.py | yadavdeepa365/HUDL_PYTHON | e1d5d264e3748f0add18258496f5a850e16b7ee6 | [
"MIT"
] | 4 | 2019-05-05T03:19:00.000Z | 2021-10-06T13:12:05.000Z | '''
Created on Sep 8, 2016
@author: nicolas
'''
import re
import fnmatch
from functools import reduce
from lemoncheesecake.reporting import load_report
from lemoncheesecake.reporting.reportdir import DEFAULT_REPORT_DIR_NAME
from lemoncheesecake.reporting.report import Result, TestResult, Step, Log, Check, Attachment... | 34.536058 | 123 | 0.661934 | '''
Created on Sep 8, 2016
@author: nicolas
'''
import re
import fnmatch
from functools import reduce
from lemoncheesecake.reporting import load_report
from lemoncheesecake.reporting.reportdir import DEFAULT_REPORT_DIR_NAME
from lemoncheesecake.reporting.report import Result, TestResult, Step, Log, Check, Attachment... | 12,225 | 466 | 1,161 |
06a50c62e1fde1ccf15cad6a38ed701acf4dc5f3 | 20,995 | py | Python | scenegraph/exp-official/taskographyv2medium10_FF/taskographyv2medium10_FF_test.py | taskography/3dscenegraph-dev | 2c261241230fbea1f1c687ff793478248f25c02c | [
"MIT"
] | 1 | 2022-01-30T22:06:57.000Z | 2022-01-30T22:06:57.000Z | scenegraph/exp-official/taskographyv2medium10_FF/taskographyv2medium10_FF_test.py | taskography/3dscenegraph-dev | 2c261241230fbea1f1c687ff793478248f25c02c | [
"MIT"
] | null | null | null | scenegraph/exp-official/taskographyv2medium10_FF/taskographyv2medium10_FF_test.py | taskography/3dscenegraph-dev | 2c261241230fbea1f1c687ff793478248f25c02c | [
"MIT"
] | null | null | null | STATS = [
{
"num_node_expansions": 653,
"plan_length": 167,
"search_time": 0.52,
"total_time": 0.52
},
{
"num_node_expansions": 978,
"plan_length": 167,
"search_time": 0.86,
"total_time": 0.86
},
{
"num_node_expansions": 1087,
... | 22.146624 | 36 | 0.475685 | STATS = [
{
"num_node_expansions": 653,
"plan_length": 167,
"search_time": 0.52,
"total_time": 0.52
},
{
"num_node_expansions": 978,
"plan_length": 167,
"search_time": 0.86,
"total_time": 0.86
},
{
"num_node_expansions": 1087,
... | 0 | 0 | 0 |
9ae1fd07ba143f523cf6ec0b09ff7db797b76542 | 4,448 | py | Python | scratch/parse_flexible_args.py | strukovsv/PyHAML | 75d7774f30809f755dad2867e9ab55cea3019046 | [
"BSD-3-Clause"
] | 21 | 2015-01-27T13:32:46.000Z | 2022-03-12T21:45:12.000Z | scratch/parse_flexible_args.py | strukovsv/PyHAML | 75d7774f30809f755dad2867e9ab55cea3019046 | [
"BSD-3-Clause"
] | 2 | 2017-05-23T11:30:01.000Z | 2019-07-29T01:21:27.000Z | scratch/parse_flexible_args.py | strukovsv/PyHAML | 75d7774f30809f755dad2867e9ab55cea3019046 | [
"BSD-3-Clause"
] | 8 | 2015-07-13T17:46:24.000Z | 2021-12-08T18:13:22.000Z | import re
import ast
import operator
def literal_eval(node_or_string):
"""
Safely evaluate an expression node or a string containing a Python
expression. The string or node provided may only consist of the following
Python literal structures: strings, numbers, tuples, lists, dicts, booleans,
an... | 29.263158 | 80 | 0.510342 | import re
import ast
import operator
def parse_args(input, end=')'):
chunks = re.split(r'(,|%s)' % re.escape(end), input)
output = []
# Continue processing chunks as long as we keep getting something.
last_output = -1
while len(output) != last_output:
last_output = len(output)
... | 2,830 | 0 | 58 |
5e6887bbdad82231a81256d4d50e3159e34d107f | 8,506 | py | Python | old/dig1/sageutil.py | letonchanh/dig-m3 | 98b6f2bd6efeddbd8c047e77f4d3b506abf022b9 | [
"MIT"
] | null | null | null | old/dig1/sageutil.py | letonchanh/dig-m3 | 98b6f2bd6efeddbd8c047e77f4d3b506abf022b9 | [
"MIT"
] | null | null | null | old/dig1/sageutil.py | letonchanh/dig-m3 | 98b6f2bd6efeddbd8c047e77f4d3b506abf022b9 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from sage.all import (operator, flatten, PolynomialRing, SR, QQ, ZZ, RR, sage, oo)
from vu_common import (pause, get_logger,is_iterable, is_str, is_empty)
is_sage_expr = lambda x: isinstance(x, sage.symbolic.expression.Expression)
is_sage_real = lambda x: isi... | 27.175719 | 229 | 0.53715 | from collections import OrderedDict
from sage.all import (operator, flatten, PolynomialRing, SR, QQ, ZZ, RR, sage, oo)
from vu_common import (pause, get_logger,is_iterable, is_str, is_empty)
is_sage_expr = lambda x: isinstance(x, sage.symbolic.expression.Expression)
is_sage_real = lambda x: isi... | 0 | 0 | 0 |
2d9d4e84698d3d2c0c263817fbcf9fb9d2d85765 | 142 | py | Python | src/skdh/io/_extensions/__init__.py | PfizerRD/scikit-digital-health | f834a82d750d9e3cdd35f4f5692a0a388210b821 | [
"MIT"
] | 1 | 2022-03-31T20:56:49.000Z | 2022-03-31T20:56:49.000Z | src/skdh/io/_extensions/__init__.py | PfizerRD/scikit-digital-health | f834a82d750d9e3cdd35f4f5692a0a388210b821 | [
"MIT"
] | null | null | null | src/skdh/io/_extensions/__init__.py | PfizerRD/scikit-digital-health | f834a82d750d9e3cdd35f4f5692a0a388210b821 | [
"MIT"
] | null | null | null | from .read import read_axivity, read_geneactiv
from .gt3x_convert import read_gt3x
__all__ = ("read_axivity", "read_geneactiv", "read_gt3x")
| 28.4 | 57 | 0.795775 | from .read import read_axivity, read_geneactiv
from .gt3x_convert import read_gt3x
__all__ = ("read_axivity", "read_geneactiv", "read_gt3x")
| 0 | 0 | 0 |
52f5eda8651e076c601fe495f7f73ef9cf7c5ced | 3,552 | py | Python | reports/migrations/0001_initial.py | CMU-TRP/podd-api | 6eb5c4598f848f75d131287163cd9babf2a0a0fc | [
"MIT"
] | 3 | 2020-04-26T06:28:50.000Z | 2021-04-05T08:02:26.000Z | reports/migrations/0001_initial.py | CMU-TRP/podd-api | 6eb5c4598f848f75d131287163cd9babf2a0a0fc | [
"MIT"
] | 10 | 2020-06-05T17:36:10.000Z | 2022-03-11T23:16:42.000Z | reports/migrations/0001_initial.py | CMU-TRP/podd-api | 6eb5c4598f848f75d131287163cd9babf2a0a0fc | [
"MIT"
] | 5 | 2021-04-08T08:43:49.000Z | 2021-11-27T06:36:46.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.contrib.gis.db.models.fields
| 39.466667 | 114 | 0.546734 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
... | 0 | 3,346 | 23 |
e1dfe9ea6751bada26fc5b052be6b8b9471c1399 | 1,203 | py | Python | project_template/{{cookiecutter.app_name}}/setup.py | pvandyken/snakebids | 10186d116dc016769e6b43c67f10e0d50264d053 | [
"MIT"
] | null | null | null | project_template/{{cookiecutter.app_name}}/setup.py | pvandyken/snakebids | 10186d116dc016769e6b43c67f10e0d50264d053 | [
"MIT"
] | null | null | null | project_template/{{cookiecutter.app_name}}/setup.py | pvandyken/snakebids | 10186d116dc016769e6b43c67f10e0d50264d053 | [
"MIT"
] | null | null | null | import setuptools
import json
with open("README.rst", "r") as fh:
long_description = fh.read()
with open('pipeline_description.json', 'r') as fh:
pipeline = json.load(fh)
name = pipeline['GeneratedBy'][0]['Name']
description = pipeline['Name']
version = pipeline['GeneratedBy'][0]['Version']
ur... | 29.341463 | 70 | 0.654198 | import setuptools
import json
with open("README.rst", "r") as fh:
long_description = fh.read()
with open('pipeline_description.json', 'r') as fh:
pipeline = json.load(fh)
name = pipeline['GeneratedBy'][0]['Name']
description = pipeline['Name']
version = pipeline['GeneratedBy'][0]['Version']
ur... | 0 | 0 | 0 |
8e6325079667283a268285f4f7694919da11f536 | 7,332 | py | Python | yales2/droplet-AMR-opt/pymooCFD/util/handleData.py | gmclove/pymoo-CFD | fd4a7b1335db33b467fe975ec804f4b055de407c | [
"Apache-2.0"
] | null | null | null | yales2/droplet-AMR-opt/pymooCFD/util/handleData.py | gmclove/pymoo-CFD | fd4a7b1335db33b467fe975ec804f4b055de407c | [
"Apache-2.0"
] | null | null | null | yales2/droplet-AMR-opt/pymooCFD/util/handleData.py | gmclove/pymoo-CFD | fd4a7b1335db33b467fe975ec804f4b055de407c | [
"Apache-2.0"
] | null | null | null | from pymooCFD.setupOpt import checkpointFile, dataDir, nCP, archDir, \
preProcDir, cluster
from pymooCFD.util.sysTools import removeDir #, makeDir, emptyDir
from pymooCFD.setupCFD import runCase
import numpy as np
import time
import os
import tarfile
from dask.distributed import Client
from sys import exit
# d... | 30.677824 | 88 | 0.635161 | from pymooCFD.setupOpt import checkpointFile, dataDir, nCP, archDir, \
preProcDir, cluster
from pymooCFD.util.sysTools import removeDir #, makeDir, emptyDir
from pymooCFD.setupCFD import runCase
import numpy as np
import time
import os
import tarfile
from dask.distributed import Client
from sys import exit
# d... | 3,029 | 0 | 184 |
86b03430e41a966ea5e3eaf883b62becfb48eb41 | 409 | py | Python | _bak/more/test1.py | hello-sea/DeepLearning_Wavelet-LSTM | 1606c16005a5338333b4943f782f57311c6b5e49 | [
"MIT"
] | 95 | 2018-04-13T03:34:51.000Z | 2022-03-30T10:10:28.000Z | _bak/more/test1.py | Dlaiven/DeepLearning_Wavelet-LSTM | 1606c16005a5338333b4943f782f57311c6b5e49 | [
"MIT"
] | 3 | 2019-07-18T11:19:53.000Z | 2020-12-28T05:45:19.000Z | _bak/more/test1.py | Dlaiven/DeepLearning_Wavelet-LSTM | 1606c16005a5338333b4943f782f57311c6b5e49 | [
"MIT"
] | 35 | 2018-07-27T09:21:18.000Z | 2021-11-30T02:13:01.000Z | from scipy import signal
import matplotlib.pyplot as plt
import numpy as np
t = np.linspace(1, 201, 200, endpoint=False)
sig = np.cos(2 * np.pi * 7 * t) + signal.gausspulse(t - 0.4, fc=2)
widths = np.arange(1, 31)
cwtmatr = signal.cwt(sig, signal.ricker, widths)
plt.imshow(cwtmatr, extent=[1, 201, 31, 1], cmap='PRGn'... | 34.083333 | 71 | 0.667482 | from scipy import signal
import matplotlib.pyplot as plt
import numpy as np
t = np.linspace(1, 201, 200, endpoint=False)
sig = np.cos(2 * np.pi * 7 * t) + signal.gausspulse(t - 0.4, fc=2)
widths = np.arange(1, 31)
cwtmatr = signal.cwt(sig, signal.ricker, widths)
plt.imshow(cwtmatr, extent=[1, 201, 31, 1], cmap='PRGn'... | 0 | 0 | 0 |
46a9510d72ae38ad38081220dacac06a010d2c9c | 124 | py | Python | nicos_mlz/toftof/setups/startup.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/toftof/setups/startup.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/toftof/setups/startup.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'minimal NICOS startup setup'
group = 'lowlevel'
sysconfig = dict(
cache = 'tofhw.toftof.frm2:14869',
)
| 15.5 | 43 | 0.693548 | description = 'minimal NICOS startup setup'
group = 'lowlevel'
sysconfig = dict(
cache = 'tofhw.toftof.frm2:14869',
)
| 0 | 0 | 0 |
fc24227f0e215a87ee747c0150d6cd24927c0923 | 118 | py | Python | valhalla/__init__.py | Best10-study/Kakao-Valhalla | 9d60783f67f38882b9935c913af7018bd3087aa1 | [
"Apache-2.0"
] | 10 | 2018-11-11T13:09:06.000Z | 2019-08-13T11:01:33.000Z | valhalla/__init__.py | Best10-study/Kakao-Valhalla | 9d60783f67f38882b9935c913af7018bd3087aa1 | [
"Apache-2.0"
] | 4 | 2018-11-14T03:07:55.000Z | 2018-11-18T06:14:29.000Z | valhalla/__init__.py | Best10-study/Kakao-Valhalla | 9d60783f67f38882b9935c913af7018bd3087aa1 | [
"Apache-2.0"
] | 4 | 2018-11-16T06:51:37.000Z | 2020-02-22T20:14:56.000Z | from valhalla.extract import DataExtractor
from sklearn.pipeline import Pipeline
from ._transform import FeatureConcat | 39.333333 | 42 | 0.881356 | from valhalla.extract import DataExtractor
from sklearn.pipeline import Pipeline
from ._transform import FeatureConcat | 0 | 0 | 0 |
86f60d4ac6c228fc43e7b01916beec33a223dbf4 | 2,449 | py | Python | lab01/guessing_game_graph.py | ryandroll/CS61A_Practice | 01c955e670929be21fa0a085b935d1a43451f083 | [
"Apache-2.0"
] | null | null | null | lab01/guessing_game_graph.py | ryandroll/CS61A_Practice | 01c955e670929be21fa0a085b935d1a43451f083 | [
"Apache-2.0"
] | null | null | null | lab01/guessing_game_graph.py | ryandroll/CS61A_Practice | 01c955e670929be21fa0a085b935d1a43451f083 | [
"Apache-2.0"
] | null | null | null | """Guessing Game Visualization
You do not need to understand any of the code in this file.
"""
# This section avoids asking for user input.
import lab01
lab01.LOWER = 1
lab01.UPPER = 100
lab01.prompt_for_number = prompt_for_number
lab01.is_correct = is_correct
lab01.is_too_high = is_too_high
# This section runs an ... | 37.106061 | 197 | 0.683953 | """Guessing Game Visualization
You do not need to understand any of the code in this file.
"""
# This section avoids asking for user input.
def prompt_for_number(lower, upper):
from random import randint
prompt_for_number.number = randint(lower, upper)
return prompt_for_number.number
def is_correct(gues... | 227 | 0 | 69 |
2df6888285e22ed0f6b1ee4a5e5e52074a12b373 | 680 | py | Python | src/digolds/manipulate/drop_column.py | digolds/dp | 305089cbd2e933a0fff4d044485d591b6a2f3349 | [
"MIT"
] | null | null | null | src/digolds/manipulate/drop_column.py | digolds/dp | 305089cbd2e933a0fff4d044485d591b6a2f3349 | [
"MIT"
] | null | null | null | src/digolds/manipulate/drop_column.py | digolds/dp | 305089cbd2e933a0fff4d044485d591b6a2f3349 | [
"MIT"
] | null | null | null | import pandas as pd
name = 'drop-column'
if __name__ == "__main__":
data = [['tom', 10], ['nick', 15], ['juli', 15]]
df = pd.DataFrame(data, columns = ['Name', 'Age'])
args = {
'--columns':[
'Age',
'Name'
]
}
operator(df, args) | 22.666667 | 64 | 0.567647 | import pandas as pd
def _parse(args):
columns = args.get('--columns')
remain = args.get('--remain', False)
return [columns, remain]
def _drop_column(df, columns, remain):
if remain:
return df.filter(columns, axis=1).reset_index(drop=True)
else:
return df.drop(columns, axis=1).reset... | 317 | 0 | 69 |
14d91785c4e47c8abaef5e5e52cdeb6c231349a9 | 422 | py | Python | sample_webapp/migrations/0003_foo_geojson.py | calocan/rescape_graphene | 20b35e7f7020470da7958e9beb1d10b82e1e20cd | [
"MIT"
] | 1 | 2021-05-08T12:04:54.000Z | 2021-05-08T12:04:54.000Z | sample_webapp/migrations/0003_foo_geojson.py | calocan/rescape_graphene | 20b35e7f7020470da7958e9beb1d10b82e1e20cd | [
"MIT"
] | 6 | 2021-04-08T18:27:30.000Z | 2022-02-10T10:30:50.000Z | sample_webapp/migrations/0003_foo_geojson.py | rescapes/rescape-graphene | 90ac2002636aa9700d5ea459d6aa0699487379f7 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.7 on 2018-11-02 22:15
from django.db import migrations, models
| 22.210526 | 53 | 0.599526 | # Generated by Django 2.0.7 on 2018-11-02 22:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sample_webapp', '0002_foo_geo_collection'),
]
operations = [
migrations.AddField(
model_name='foo',
name='geojson',
... | 0 | 309 | 23 |
cc976d628e959da54d922c002f02bd4799ee0d6e | 6,751 | py | Python | model/resnet.py | collector-m/UniTrack | e8e56e164f2dd40ba590a19ed7a4a75d8da7e2eb | [
"MIT"
] | 240 | 2021-06-20T13:50:42.000Z | 2022-03-31T05:08:29.000Z | model/resnet.py | collector-m/UniTrack | e8e56e164f2dd40ba590a19ed7a4a75d8da7e2eb | [
"MIT"
] | 27 | 2021-07-12T01:19:39.000Z | 2021-12-27T08:05:08.000Z | model/resnet.py | collector-m/UniTrack | e8e56e164f2dd40ba590a19ed7a4a75d8da7e2eb | [
"MIT"
] | 24 | 2021-07-01T09:48:24.000Z | 2022-03-14T06:39:46.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
try:
from torch.hub import load_state_dict_from_url
except ImportError:
from torch.utils.model_zoo import load_url as load_state_dict_from_url
import torchvision.models.resnet as torch_resnet
from torchvision.models.resnet import BasicBlock, Bo... | 42.727848 | 107 | 0.654273 | import torch
import torch.nn as nn
import torch.nn.functional as F
try:
from torch.hub import load_state_dict_from_url
except ImportError:
from torch.utils.model_zoo import load_url as load_state_dict_from_url
import torchvision.models.resnet as torch_resnet
from torchvision.models.resnet import BasicBlock, Bo... | 2,226 | 13 | 203 |
f71fb300004e91ff987107bb558165bb8d7b340e | 14,538 | py | Python | chatto_transform/datastores/sqlalchemy_datastore.py | chatto-hub-test2/Spaceboy2 | 7b6b91baf06290e6b047ae75e7ea61cee4846b3a | [
"Unlicense",
"MIT"
] | null | null | null | chatto_transform/datastores/sqlalchemy_datastore.py | chatto-hub-test2/Spaceboy2 | 7b6b91baf06290e6b047ae75e7ea61cee4846b3a | [
"Unlicense",
"MIT"
] | null | null | null | chatto_transform/datastores/sqlalchemy_datastore.py | chatto-hub-test2/Spaceboy2 | 7b6b91baf06290e6b047ae75e7ea61cee4846b3a | [
"Unlicense",
"MIT"
] | null | null | null | import pandas
from ..schema.schema_base import *
from .datastore_base import DataStore
from .odo_datastore import OdoDataStore
from ..config import config
from functools import lru_cache, partial
from sqlalchemy import Table, MetaData, select
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.automap import ... | 35.896296 | 155 | 0.623882 | import pandas
from ..schema.schema_base import *
from .datastore_base import DataStore
from .odo_datastore import OdoDataStore
from ..config import config
from functools import lru_cache, partial
from sqlalchemy import Table, MetaData, select
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.automap import ... | 11,912 | 38 | 866 |
f772e5b4a86ee9267ab9234ff8197c72c91ef62a | 16,056 | py | Python | models/RelationNetworks/relation_rcnn/core/rcnn.py | RamsteinWR/PneumoniaRSNA1 | 08bdba51292307a78ef711c6be4a63faea240ddf | [
"MIT"
] | null | null | null | models/RelationNetworks/relation_rcnn/core/rcnn.py | RamsteinWR/PneumoniaRSNA1 | 08bdba51292307a78ef711c6be4a63faea240ddf | [
"MIT"
] | null | null | null | models/RelationNetworks/relation_rcnn/core/rcnn.py | RamsteinWR/PneumoniaRSNA1 | 08bdba51292307a78ef711c6be4a63faea240ddf | [
"MIT"
] | null | null | null | """
Fast R-CNN:
data =
{'data': [num_images, c, h, w],
'rois': [num_rois, 5]}
label =
{'label': [num_rois],
'bbox_target': [num_rois, 4 * num_classes],
'bbox_weight': [num_rois, 4 * num_classes]}
roidb extended format [image_index]
['image', 'height', 'width', 'flipped',
'boxes', 'gt_classe... | 41.921671 | 115 | 0.607686 | """
Fast R-CNN:
data =
{'data': [num_images, c, h, w],
'rois': [num_rois, 5]}
label =
{'label': [num_rois],
'bbox_target': [num_rois, 4 * num_classes],
'bbox_weight': [num_rois, 4 * num_classes]}
roidb extended format [image_index]
['image', 'height', 'width', 'flipped',
'boxes', 'gt_classe... | 0 | 0 | 0 |
7cbfc364b8c5913e09428b8051b575c6d9ddf730 | 1,177 | py | Python | tests/medium/plugins/test_file_output.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | null | null | null | tests/medium/plugins/test_file_output.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | null | null | null | tests/medium/plugins/test_file_output.py | hyacker/eventgen | 2d33536e5b830b4bccb620b5239f25609c647c1a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import os
import sys
from mock import MagicMock, patch
from splunk_eventgen.__main__ import parse_args
from splunk_eventgen.eventgen_core import EventGenerator
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
| 30.179487 | 111 | 0.654206 | #!/usr/bin/env python
# encoding: utf-8
import os
import sys
from mock import MagicMock, patch
from splunk_eventgen.__main__ import parse_args
from splunk_eventgen.eventgen_core import EventGenerator
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
class TestFileOutputPlugin(object):
def test_output_data_... | 852 | 14 | 50 |
e8caf316aff1c240c2bd8b5750f5fa64ff151a5c | 994 | py | Python | documentstore_migracao/utils/files.py | robertatakenaka/document-store-migracao | 54e8dc279b336f40a772e204de3142a7bb715382 | [
"BSD-2-Clause"
] | null | null | null | documentstore_migracao/utils/files.py | robertatakenaka/document-store-migracao | 54e8dc279b336f40a772e204de3142a7bb715382 | [
"BSD-2-Clause"
] | null | null | null | documentstore_migracao/utils/files.py | robertatakenaka/document-store-migracao | 54e8dc279b336f40a772e204de3142a7bb715382 | [
"BSD-2-Clause"
] | null | null | null | """ module to utils methods to file """
import os
import shutil
import logging
from documentstore_migracao import config
logger = logging.getLogger(__name__)
| 19.88 | 70 | 0.65493 | """ module to utils methods to file """
import os
import shutil
import logging
from documentstore_migracao import config
logger = logging.getLogger(__name__)
def setup_processing_folder():
paths = config.INITIAL_PATH
for path in paths:
if not os.path.exists(path):
logger.debug("Criando... | 713 | 0 | 115 |
340dfb07bbad6b3d413744279dd2ff9f7f8e7bd0 | 1,059 | py | Python | docs/reST/ext/customversion.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | 2 | 2021-04-03T20:01:35.000Z | 2021-09-09T23:42:21.000Z | docs/reST/ext/customversion.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | docs/reST/ext/customversion.py | czogran/pygame1 | 1591a3295402f914950ae15039b91136d8bf8f79 | [
"Python-2.0",
"OLDAP-2.3"
] | 1 | 2021-06-06T17:52:54.000Z | 2021-06-06T17:52:54.000Z | from sphinx.domains.changeset import versionlabels, VersionChange
from sphinx.locale import _ # just to suppress warnings
try:
from sphinx.domains.changeset import versionlabel_classes
except ImportError:
# versionlabel_classes doesn't exist in old Sphinx versions.
UPDATE_VERIONLABEL_CLASSES = False
else:
... | 32.090909 | 89 | 0.734655 | from sphinx.domains.changeset import versionlabels, VersionChange
from sphinx.locale import _ # just to suppress warnings
try:
from sphinx.domains.changeset import versionlabel_classes
except ImportError:
# versionlabel_classes doesn't exist in old Sphinx versions.
UPDATE_VERIONLABEL_CLASSES = False
else:
... | 574 | 0 | 46 |
36831c603a00768a85c8ba8b8274bcd3f0371013 | 1,945 | py | Python | AspDec/SSCL/word2vec.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 23 | 2020-12-16T15:50:07.000Z | 2022-03-17T05:51:20.000Z | AspDec/SSCL/word2vec.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 3 | 2021-02-01T07:24:35.000Z | 2021-11-24T09:28:35.000Z | AspDec/SSCL/word2vec.py | dumpmemory/AspDecSSCL | 004d73d3248e8fdee1336cfc6490ef4872583665 | [
"MIT"
] | 4 | 2021-05-12T06:49:43.000Z | 2021-10-04T04:41:08.000Z | '''
@author Tian Shi
Please contact tshi@vt.edu
'''
import json
import os
import random
import gensim
import numpy as np
from tqdm import tqdm
def run_word2vec(args):
'''
Run word2vec.
'''
cluster_dir = '../cluster_results'
if not os.path.exists(cluster_dir):
os.mkdir(cluster_dir)
if ... | 24.935897 | 68 | 0.60874 | '''
@author Tian Shi
Please contact tshi@vt.edu
'''
import json
import os
import random
import gensim
import numpy as np
from tqdm import tqdm
def run_word2vec(args):
'''
Run word2vec.
'''
cluster_dir = '../cluster_results'
if not os.path.exists(cluster_dir):
os.mkdir(cluster_dir)
if ... | 0 | 0 | 0 |
c2d27542ebbc9981ab52262f7a073f4fa9ee3436 | 303 | py | Python | GenerateDatapack.py | edgecdec/TobaccoAwarenessMC | 2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90 | [
"MIT"
] | null | null | null | GenerateDatapack.py | edgecdec/TobaccoAwarenessMC | 2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90 | [
"MIT"
] | null | null | null | GenerateDatapack.py | edgecdec/TobaccoAwarenessMC | 2fce9181ae3bb8b65dd4dcbfb4f3363e42e3dd90 | [
"MIT"
] | null | null | null | from GenerateFolders import generateFolders
from GenerateFiles import generateFiles
from AddictionHelperGenerator import addictionHelperGenerator
import shutil
from Constants import *
generateFolders()
generateFiles()
addictionHelperGenerator()
shutil.make_archive('tobacco_awareness', 'zip', rootdir) | 27.545455 | 61 | 0.864686 | from GenerateFolders import generateFolders
from GenerateFiles import generateFiles
from AddictionHelperGenerator import addictionHelperGenerator
import shutil
from Constants import *
generateFolders()
generateFiles()
addictionHelperGenerator()
shutil.make_archive('tobacco_awareness', 'zip', rootdir) | 0 | 0 | 0 |
933c5eecbd0001ecf9e6633f65b9d333411d7767 | 1,391 | py | Python | demo_data_format.py | chrisoldnall/PHS-Code | a37bdb10821b40c40ece21451a29b1327ce4585d | [
"MIT"
] | null | null | null | demo_data_format.py | chrisoldnall/PHS-Code | a37bdb10821b40c40ece21451a29b1327ce4585d | [
"MIT"
] | null | null | null | demo_data_format.py | chrisoldnall/PHS-Code | a37bdb10821b40c40ece21451a29b1327ce4585d | [
"MIT"
] | null | null | null | from final_code.fcts_data_formatting import day_to_month, day_to_quarter, import_datasets, time_interval, add_categories, \
HB_to_areas, extract_data, day_to_quarter, month_to_quarter
import numpy as np
import matplotlib.pyplot as plt
data31, data62, operations, diag, covid = import_dat... | 39.742857 | 131 | 0.698778 | from final_code.fcts_data_formatting import day_to_month, day_to_quarter, import_datasets, time_interval, add_categories, \
HB_to_areas, extract_data, day_to_quarter, month_to_quarter
import numpy as np
import matplotlib.pyplot as plt
data31, data62, operations, diag, covid = import_dat... | 0 | 0 | 0 |
245415851fb2a753e9f96d775498e919aa2a04d2 | 940 | py | Python | src/utils.py | afshinbigboy/imt-rl-mcmc | 4c541c32566979d527b608fbbe36a4403398ebb3 | [
"MIT"
] | 1 | 2021-05-01T16:59:49.000Z | 2021-05-01T16:59:49.000Z | src/utils.py | afshinbigboy/imt-rl-mcmc | 4c541c32566979d527b608fbbe36a4403398ebb3 | [
"MIT"
] | null | null | null | src/utils.py | afshinbigboy/imt-rl-mcmc | 4c541c32566979d527b608fbbe36a4403398ebb3 | [
"MIT"
] | null | null | null | import sys
| 32.413793 | 70 | 0.552128 | import sys
class ColorPrint:
@staticmethod
def print_fail(*messages, end = '\n'):
msg = ' '.join(str(m) for m in messages)
sys.stderr.write('\x1b[1;31m' + msg.strip() + '\x1b[0m' + end)
@staticmethod
def print_pass(*messages, end = '\n'):
msg = ' '.join(str(m) for m in messag... | 685 | 221 | 23 |
09f57377b2f200c0b923b75e399a536a35973e22 | 152 | py | Python | LinkedClips/__init__.py | NSUSpray/LinkedClips | 8cd0974c42632e9be15a60934d7b3e5fd270c214 | [
"MIT"
] | 5 | 2019-11-27T15:44:28.000Z | 2022-03-21T03:54:44.000Z | LinkedClips/__init__.py | NSUSpray/LinkedClips | 8cd0974c42632e9be15a60934d7b3e5fd270c214 | [
"MIT"
] | null | null | null | LinkedClips/__init__.py | NSUSpray/LinkedClips | 8cd0974c42632e9be15a60934d7b3e5fd270c214 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
| 25.333333 | 40 | 0.802632 | from __future__ import absolute_import
def create_instance (c_instance):
from .LinkedClips import LinkedClips
return LinkedClips (c_instance)
| 89 | 0 | 23 |
c4f014e481ebe1253497317b5cde2d3e85a86be6 | 33,527 | py | Python | graphsense/api/addresses_api.py | iknaio/graphsense-python | b61c66b6ec0bb9720036ae61777e90ce63a971cc | [
"MIT"
] | null | null | null | graphsense/api/addresses_api.py | iknaio/graphsense-python | b61c66b6ec0bb9720036ae61777e90ce63a971cc | [
"MIT"
] | 1 | 2022-02-24T11:21:49.000Z | 2022-02-24T11:21:49.000Z | graphsense/api/addresses_api.py | INTERPOL-Innovation-Centre/GraphSense-Maltego-transform | 2a9b352289ab64903a7012c5d84cb4c6d8172ade | [
"MIT"
] | null | null | null | """
GraphSense API
GraphSense API # noqa: E501
The version of the OpenAPI document: 0.5.1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from graphsense.api_client import ApiClient, Endpoint as _Endpoint
from graphsense.model_utils import ( # noq... | 36.323944 | 211 | 0.440272 | """
GraphSense API
GraphSense API # noqa: E501
The version of the OpenAPI document: 0.5.1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from graphsense.api_client import ApiClient, Endpoint as _Endpoint
from graphsense.model_utils import ( # noq... | 32,574 | 0 | 27 |
69378bc6d7659c9fe346d6602e04664de994dad4 | 3,665 | py | Python | bftool/__main__.py | shoriwe/bftool | cb5c84e08f3703ebc86d56ad1cf6a755f7e8e82d | [
"MIT"
] | 2 | 2020-06-16T06:11:19.000Z | 2020-08-26T01:50:19.000Z | bftool/__main__.py | shoriwe/bftool | cb5c84e08f3703ebc86d56ad1cf6a755f7e8e82d | [
"MIT"
] | 18 | 2020-04-27T17:11:35.000Z | 2021-02-21T02:18:17.000Z | bftool/__main__.py | shoriwe/bftool | cb5c84e08f3703ebc86d56ad1cf6a755f7e8e82d | [
"MIT"
] | null | null | null | import argparse
import collections
import json
import random
import string
import sys
import types
import bftool
# Default argument capture for the main function
def _get_arguments() -> argparse.Namespace:
"""Default function to prepare the arguments for the `Runner` during it's execution in a terminal
Retu... | 46.987179 | 119 | 0.635198 | import argparse
import collections
import json
import random
import string
import sys
import types
import bftool
# Default argument capture for the main function
def _get_arguments() -> argparse.Namespace:
"""Default function to prepare the arguments for the `Runner` during it's execution in a terminal
Retu... | 558 | 0 | 46 |
f7ebbd284107fe437f704970e715d15f4b7ea07d | 631 | py | Python | samples/conanfile.py | SiennaSaito/libtcod | 97984740f92758864d2ae9181617a33d2d3c7813 | [
"BSD-3-Clause"
] | 686 | 2018-07-01T15:49:10.000Z | 2022-03-30T14:13:40.000Z | samples/conanfile.py | SiennaSaito/libtcod | 97984740f92758864d2ae9181617a33d2d3c7813 | [
"BSD-3-Clause"
] | 99 | 2018-10-23T17:02:08.000Z | 2022-03-29T18:47:47.000Z | samples/conanfile.py | SiennaSaito/libtcod | 97984740f92758864d2ae9181617a33d2d3c7813 | [
"BSD-3-Clause"
] | 76 | 2018-07-29T03:51:42.000Z | 2022-03-26T03:10:10.000Z | from conans import ConanFile, CMake
| 27.434783 | 53 | 0.554675 | from conans import ConanFile, CMake
class LibtcodSamplesConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
requires = (
"libtcod/[~=1.15]@hexdecimal/stable",
"sdl2/[~=2.0.5]@bincrafters/stable",
)
default_options = {"*:shared": True}
def b... | 267 | 304 | 23 |
07ed54bfb2c231467fae4f929f7219986db1ccf4 | 6,998 | py | Python | scripts/visualize.py | Karthikprabhu22/lynx | 2b0124085cc7a5f1eb3d06a89f6c56f02a087e12 | [
"MIT"
] | null | null | null | scripts/visualize.py | Karthikprabhu22/lynx | 2b0124085cc7a5f1eb3d06a89f6c56f02a087e12 | [
"MIT"
] | 4 | 2020-05-06T20:14:01.000Z | 2020-05-07T07:45:12.000Z | scripts/visualize.py | Karthikprabhu22/lynx | 2b0124085cc7a5f1eb3d06a89f6c56f02a087e12 | [
"MIT"
] | 1 | 2020-08-15T05:24:16.000Z | 2020-08-15T05:24:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from pathlib import Path
import sys
import click
import h5py
import yaml
import lynx
import hoover
import pymaster as nmt
from scipy.optimize import minimize
import emcee
import healpy as hp
import matplotlib.pyplot as plt
from matplotlib.patches import ... | 35.165829 | 97 | 0.615462 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from pathlib import Path
import sys
import click
import h5py
import yaml
import lynx
import hoover
import pymaster as nmt
from scipy.optimize import minimize
import emcee
import healpy as hp
import matplotlib.pyplot as plt
from matplotlib.patches import ... | 5,659 | 0 | 115 |
6763751da420b8743657612a663c583a88edff6e | 1,978 | py | Python | manage.py | lgoodridge/Asteroids-AI | bf6abd2b42db1b13667060c30de13a53aaa05110 | [
"MIT"
] | 4 | 2018-11-06T16:27:11.000Z | 2021-11-12T12:23:54.000Z | manage.py | lgoodridge/Asteroids-AI | bf6abd2b42db1b13667060c30de13a53aaa05110 | [
"MIT"
] | null | null | null | manage.py | lgoodridge/Asteroids-AI | bf6abd2b42db1b13667060c30de13a53aaa05110 | [
"MIT"
] | 1 | 2022-02-25T10:35:34.000Z | 2022-02-25T10:35:34.000Z | """
Script for running management commands for the Asteroids Game / AI.
Usage: python manage.py [--help]
"""
from ai.experiment import merge_experiments
import click
import settings
class TransparentGroup(click.Group):
"""
A Click Group class that passes all provided
arguments to its subcommands without ... | 30.90625 | 74 | 0.71638 | """
Script for running management commands for the Asteroids Game / AI.
Usage: python manage.py [--help]
"""
from ai.experiment import merge_experiments
import click
import settings
class TransparentGroup(click.Group):
"""
A Click Group class that passes all provided
arguments to its subcommands without ... | 99 | 0 | 48 |
b02bcec7907a8cc2bcaf89b751f1bbc626c8b99d | 7,002 | py | Python | bigfastapi/tutorial.py | danieliheonu/bigfastapi | 483554776195c9f38bb46ba719b613360eda1028 | [
"MIT"
] | 1 | 2022-03-20T21:46:05.000Z | 2022-03-20T21:46:05.000Z | bigfastapi/tutorial.py | danieliheonu/bigfastapi | 483554776195c9f38bb46ba719b613360eda1028 | [
"MIT"
] | null | null | null | bigfastapi/tutorial.py | danieliheonu/bigfastapi | 483554776195c9f38bb46ba719b613360eda1028 | [
"MIT"
] | null | null | null | from operator import or_
import sqlalchemy
from fastapi import APIRouter, HTTPException, status
from fastapi.param_functions import Depends
from fastapi.responses import JSONResponse
from fastapi import APIRouter
import fastapi as _fastapi
import sqlalchemy.orm as _orm
from bigfastapi.db.database import get_db
from big... | 37.848649 | 107 | 0.688803 | from operator import or_
import sqlalchemy
from fastapi import APIRouter, HTTPException, status
from fastapi.param_functions import Depends
from fastapi.responses import JSONResponse
from fastapi import APIRouter
import fastapi as _fastapi
import sqlalchemy.orm as _orm
from bigfastapi.db.database import get_db
from big... | 4,983 | 0 | 286 |
34e86699e57eaae95439d97b066c5ec26b48ef0f | 1,194 | py | Python | tyc_area.py | skymap/tyc | ba5175c7fa1e45e9c0ea4881d7211ae2ad6d0cc9 | [
"MIT"
] | null | null | null | tyc_area.py | skymap/tyc | ba5175c7fa1e45e9c0ea4881d7211ae2ad6d0cc9 | [
"MIT"
] | null | null | null | tyc_area.py | skymap/tyc | ba5175c7fa1e45e9c0ea4881d7211ae2ad6d0cc9 | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw
w = 7200
h = 3600
i = 1
j = 0
k = 0
c6 = [(255, 153, 204), (255, 255, 153), (153, 255, 153), (153, 204, 255)]
black = (0, 0, 0)
white = (255, 255, 255)
im = Image.new('RGB', (w, h), white)
draw = ImageDraw.Draw(im)
r = open('index_src.dat', 'r')
src = r.read()
r.close
src ... | 32.27027 | 80 | 0.421273 | from PIL import Image, ImageDraw
w = 7200
h = 3600
i = 1
j = 0
k = 0
c6 = [(255, 153, 204), (255, 255, 153), (153, 255, 153), (153, 204, 255)]
black = (0, 0, 0)
white = (255, 255, 255)
im = Image.new('RGB', (w, h), white)
draw = ImageDraw.Draw(im)
r = open('index_src.dat', 'r')
src = r.read()
r.close
src ... | 0 | 0 | 0 |
d5eb4b2832c31aa9dcedcb5cb4cc3df3b93096ce | 832 | py | Python | rst/sphinx_ext/wordcount.py | beebus/CPUfactory3 | 3331e63f2996542a6bc34d455e3b8d17d733d520 | [
"BSD-3-Clause"
] | 1 | 2019-04-16T14:14:49.000Z | 2019-04-16T14:14:49.000Z | rst/sphinx_ext/wordcount.py | rblack42/GitBuilder | 1944ef2d6d3c6eaee44ffb663e6c20477046dd9c | [
"BSD-3-Clause"
] | null | null | null | rst/sphinx_ext/wordcount.py | rblack42/GitBuilder | 1944ef2d6d3c6eaee44ffb663e6c20477046dd9c | [
"BSD-3-Clause"
] | 3 | 2019-04-16T00:18:39.000Z | 2019-08-30T18:20:46.000Z |
from docutils import nodes
from docutils.parsers.rst import Directive
| 24.470588 | 83 | 0.66226 | def setup(app):
app.add_node(wordcount)
app.add_directive('wordcount',WordcountDirective)
app.connect('doctree-resolved', process_wordcount_nodes)
from docutils import nodes
class wordcount(nodes.General, nodes.Element):
pass
from docutils.parsers.rst import Directive
class WordcountDirective(Direct... | 551 | 99 | 91 |
bcf1b868a4a8b6c143f44a61213975d0cf88b939 | 1,839 | py | Python | mail_coupons.py | Coiling-Dragon/Email_scraper | 22dfa6726164bb0f318a883bf48c0198646b5142 | [
"Apache-2.0"
] | null | null | null | mail_coupons.py | Coiling-Dragon/Email_scraper | 22dfa6726164bb0f318a883bf48c0198646b5142 | [
"Apache-2.0"
] | null | null | null | mail_coupons.py | Coiling-Dragon/Email_scraper | 22dfa6726164bb0f318a883bf48c0198646b5142 | [
"Apache-2.0"
] | null | null | null | import imaplib
import email
from email.header import decode_header
import pandas as pd
mails_df = pd.read_csv('mails.csv')
csv_values = mails_df.values
c = 1
with open('mails_with_coupons.csv', 'w', encoding='utf-8') as f:
out_row = 'EMAIL,PASS,COUPONS\n'
f.write(out_row)
for each in csv_val... | 32.263158 | 86 | 0.588363 | import imaplib
import email
from email.header import decode_header
import pandas as pd
mails_df = pd.read_csv('mails.csv')
csv_values = mails_df.values
c = 1
with open('mails_with_coupons.csv', 'w', encoding='utf-8') as f:
out_row = 'EMAIL,PASS,COUPONS\n'
f.write(out_row)
for each in csv_val... | 0 | 0 | 0 |
5da81609aa9b605da4cf8c44c6852fa7d339ba4e | 3,883 | py | Python | Air_PnP/serializers.py | BranBer/AirPnP | d6ee9cad5d57af222192eaa02fb3267ed2749975 | [
"MIT"
] | 1 | 2020-02-12T05:07:21.000Z | 2020-02-12T05:07:21.000Z | Air_PnP/serializers.py | BranBer/AirPnP | d6ee9cad5d57af222192eaa02fb3267ed2749975 | [
"MIT"
] | null | null | null | Air_PnP/serializers.py | BranBer/AirPnP | d6ee9cad5d57af222192eaa02fb3267ed2749975 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from django.contrib.auth import authenticate
from rest_framework import exceptions
from Air_PnP.models import * | 39.222222 | 184 | 0.666753 | from rest_framework import serializers
from django.contrib.auth import authenticate
from rest_framework import exceptions
from Air_PnP.models import *
class Payment_Info_Serializer(serializers.ModelSerializer):
class Meta:
model = Payment_Info
fields = ['email', 'user']
class Invoices_Serializer(... | 829 | 2,615 | 288 |
2d32035a799216dbf33bc6c52112336dd2e122a5 | 303 | py | Python | utils/date.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | utils/date.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | utils/date.py | josylad/RoomScout | a3d067dd67dfdd43702ea2e89064213dbd469157 | [
"MIT"
] | null | null | null | import datetime
import re
"""
Input is supposed to be in the format yyyy-mm-dd
if it is not then return false
""" | 23.307692 | 83 | 0.613861 | import datetime
import re
"""
Input is supposed to be in the format yyyy-mm-dd
if it is not then return false
"""
def check_format(input):
if isinstance(input, datetime.date):
return True
else:
return bool(re.match(r"[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]", input)) | 158 | 0 | 22 |
ac6774b8af1cc5195c08280dd7ecab780a9d29fe | 2,322 | py | Python | qs_backend/qs_backend/dal/tests/userstockpref_tests/test_unit_select_userstockpref.py | Praneesh/quickstocks | 2ad4f985b7cc11721209cc81c36937e9cf25fb60 | [
"MIT"
] | 2 | 2016-12-28T18:08:23.000Z | 2017-04-01T18:09:55.000Z | qs_backend/qs_backend/dal/tests/userstockpref_tests/test_unit_select_userstockpref.py | Praneesh/quickstocks | 2ad4f985b7cc11721209cc81c36937e9cf25fb60 | [
"MIT"
] | null | null | null | qs_backend/qs_backend/dal/tests/userstockpref_tests/test_unit_select_userstockpref.py | Praneesh/quickstocks | 2ad4f985b7cc11721209cc81c36937e9cf25fb60 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# __author__ = "Praneesh Kataru"
# __credits__ = []
# __version__ = "0.1.1"
# __maintainer__ = "Praneesh Kataru"
# __email__ = "pranuvitmsse05@gmail.com"
# __status__ = "Prototype"
import unittest
from pprint import pprint
from qs_backend.dal.user_stock_pref_dal import UserS... | 38.065574 | 114 | 0.717054 | #! /usr/bin/env python3
# __author__ = "Praneesh Kataru"
# __credits__ = []
# __version__ = "0.1.1"
# __maintainer__ = "Praneesh Kataru"
# __email__ = "pranuvitmsse05@gmail.com"
# __status__ = "Prototype"
import unittest
from pprint import pprint
from qs_backend.dal.user_stock_pref_dal import UserS... | 1,689 | 0 | 162 |
98c4e07e264eb503bc873002e824f308fbf7f99b | 20,838 | py | Python | deprecated_code/workflows/mpi/imaging-pipelines-mpi.py | ska-telescope/algorithm-reference-library | 1b2c8d6079249202864abf8c60cdea40f0f123cb | [
"Apache-2.0"
] | 22 | 2016-12-14T11:20:07.000Z | 2021-08-13T15:23:41.000Z | deprecated_code/workflows/mpi/imaging-pipelines-mpi.py | ska-telescope/algorithm-reference-library | 1b2c8d6079249202864abf8c60cdea40f0f123cb | [
"Apache-2.0"
] | 30 | 2017-06-27T09:15:38.000Z | 2020-09-11T18:16:37.000Z | deprecated_code/workflows/mpi/imaging-pipelines-mpi.py | SKA-ScienceDataProcessor/algorithm-reference-library | 1b2c8d6079249202864abf8c60cdea40f0f123cb | [
"Apache-2.0"
] | 20 | 2017-07-02T03:45:49.000Z | 2019-12-11T17:19:01.000Z |
# coding: utf-8
# # Pipeline processing using serial workflows.
#
# This is a serial unrolled version of the predict step
# In[1]:
#get_ipython().run_line_magic('matplotlib', 'inline')
import os
import sys
sys.path.append(os.path.join('..', '..'))
from data_models.parameters import arl_path
from mpi4py import ... | 39.61597 | 160 | 0.584029 |
# coding: utf-8
# # Pipeline processing using serial workflows.
#
# This is a serial unrolled version of the predict step
# In[1]:
#get_ipython().run_line_magic('matplotlib', 'inline')
import os
import sys
sys.path.append(os.path.join('..', '..'))
from data_models.parameters import arl_path
from mpi4py import ... | 810 | 0 | 46 |
9994d71687ae7eefbb738f2c4ac54a5aaed706d5 | 1,133 | py | Python | logconfig.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | 1 | 2020-08-03T16:24:06.000Z | 2020-08-03T16:24:06.000Z | logconfig.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | logconfig.py | neitzke/stokes-numerics | 8845aef7598ca245d095cca690bf48568758a8c9 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import logging
# to change log level globally, use eg logconfig.loglevel(logging.WARN)
# to change level for an individual module, eg logconfig.loglevel(logging.DEBUG, "framedata")
| 37.766667 | 130 | 0.700794 | from __future__ import absolute_import
import logging
def logconfig(console=True,filename='/tmp/harmonic.log'):
formatter = logging.Formatter('[%(asctime)s] [%(processName)s] [%(name)s] [%(levelname)s] %(message)s', datefmt='%m-%d %H:%M')
root = logging.getLogger('')
root.setLevel(logging.INFO)
i... | 867 | 0 | 45 |
51dc1e8064d7b160d9261339c4c0f6d7a7c1fc43 | 851 | py | Python | src/genie/libs/parser/iosxe/tests/ShowRunPolicyMap/cli/equal/golden_output4_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowRunPolicyMap/cli/equal/golden_output4_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowRunPolicyMap/cli/equal/golden_output4_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | expected_output = {
'policy_map': {
'policy-cbwfq-1': {'class': {
'class-gold': {'bandwidth_percent': '40',
'random_detect': ['dscp-based', 'ecn']},
'class-silver': {'bandwidth_percent': '20',
'random_detect': ['dscp-based', 'ec... | 50.058824 | 74 | 0.415981 | expected_output = {
'policy_map': {
'policy-cbwfq-1': {'class': {
'class-gold': {'bandwidth_percent': '40',
'random_detect': ['dscp-based', 'ecn']},
'class-silver': {'bandwidth_percent': '20',
'random_detect': ['dscp-based', 'ec... | 0 | 0 | 0 |
148aa55044dfa89d96bc3711e30b04ff24054650 | 251 | py | Python | hw4/4.5.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | null | null | null | hw4/4.5.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | 40 | 2021-12-30T15:57:10.000Z | 2022-01-26T16:44:24.000Z | hw4/4.5.py | ArtemNikolaev/gb-hw | b82403e39dc1ca530dc438309fc98ba89ce4337b | [
"Unlicense"
] | 1 | 2022-03-12T19:17:26.000Z | 2022-03-12T19:17:26.000Z | # https://github.com/ArtemNikolaev/gb-hw/issues/26
from functools import reduce
print(multiply())
| 17.928571 | 54 | 0.673307 | # https://github.com/ArtemNikolaev/gb-hw/issues/26
from functools import reduce
def even_100_1000():
return (i for i in range(100, 1001) if i % 2 == 0)
def multiply():
return reduce(lambda a, b: a * b, even_100_1000())
print(multiply())
| 103 | 0 | 46 |
a8dce581227cd102c0aaac141e019905d5830e17 | 1,460 | py | Python | Array/Merge_Without_Extra_Space.py | Pratik110/Python | 033ade0dff3dc3bee91eefb53d7eb87a4f4f003d | [
"MIT"
] | null | null | null | Array/Merge_Without_Extra_Space.py | Pratik110/Python | 033ade0dff3dc3bee91eefb53d7eb87a4f4f003d | [
"MIT"
] | null | null | null | Array/Merge_Without_Extra_Space.py | Pratik110/Python | 033ade0dff3dc3bee91eefb53d7eb87a4f4f003d | [
"MIT"
] | null | null | null | Link = "https://practice.geeksforgeeks.org/problems/merge-two-sorted-arrays-1587115620/1"
Description = "Given two sorted arrays arr1[] and arr2[] of sizes n and m in non-decreasing order." \
"Merge them in sorted order without using any extra space. Modify arr1 so that it" \
"contains the f... | 50.344828 | 266 | 0.595205 | Link = "https://practice.geeksforgeeks.org/problems/merge-two-sorted-arrays-1587115620/1"
Description = "Given two sorted arrays arr1[] and arr2[] of sizes n and m in non-decreasing order." \
"Merge them in sorted order without using any extra space. Modify arr1 so that it" \
"contains the f... | 212 | -5 | 48 |
7ef419f19fd5dd3e6ac9cd2c444b90048270e5da | 825 | py | Python | aws_embedded_metrics/logger/metric.py | 02strich/aws-embedded-metrics-python | 4c5718e580dfb12529673a6b54810adfbfd54242 | [
"Apache-2.0"
] | 130 | 2019-11-18T19:39:55.000Z | 2022-03-28T09:56:25.000Z | aws_embedded_metrics/logger/metric.py | 02strich/aws-embedded-metrics-python | 4c5718e580dfb12529673a6b54810adfbfd54242 | [
"Apache-2.0"
] | 50 | 2019-11-18T22:22:33.000Z | 2022-02-06T11:03:31.000Z | aws_embedded_metrics/logger/metric.py | 02strich/aws-embedded-metrics-python | 4c5718e580dfb12529673a6b54810adfbfd54242 | [
"Apache-2.0"
] | 23 | 2019-11-19T00:06:41.000Z | 2021-12-09T02:01:40.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates.
# 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... | 37.5 | 74 | 0.718788 | # Copyright 2019 Amazon.com, Inc. or its affiliates.
# 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... | 150 | 0 | 76 |
21a25efbf47ea04a49cca1dc67f47104e5dcf1e5 | 747 | py | Python | setup.py | SPRCSY/tomago-sdk-py | cbeef646d28f29a3dc7c1d48be1e882383948647 | [
"Apache-2.0"
] | null | null | null | setup.py | SPRCSY/tomago-sdk-py | cbeef646d28f29a3dc7c1d48be1e882383948647 | [
"Apache-2.0"
] | null | null | null | setup.py | SPRCSY/tomago-sdk-py | cbeef646d28f29a3dc7c1d48be1e882383948647 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
import io
setup(
name='tomago-sdk-py',
version='1.5.1',
description="Python SDKs for Blockchain.",
long_description=io.open('README.md', encoding='utf-8').read(),
url='https://github.com/arxanchain/tomago-sdk-py/',
download_url=... | 26.678571 | 83 | 0.617135 | #!/usr/bin/env python
from setuptools import setup, find_packages
import io
setup(
name='tomago-sdk-py',
version='1.5.1',
description="Python SDKs for Blockchain.",
long_description=io.open('README.md', encoding='utf-8').read(),
url='https://github.com/arxanchain/tomago-sdk-py/',
download_url=... | 0 | 0 | 0 |
a3e15ba80a2347e1590fe3cb20ee82eff35f9dda | 10,519 | py | Python | tools/archive.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tools/archive.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tools/archive.py | ganadist/r8 | 850b5a4725954b677103a3a575239d0f330c0b0f | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import create_maven_release
import gradle
import jdk
import optparse
import os
try:
i... | 40.148855 | 93 | 0.681719 | #!/usr/bin/env python
# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import create_maven_release
import gradle
import jdk
import optparse
import os
try:
i... | 9,574 | 0 | 322 |
ef8d700f6c034510e4036e7f091c9874efee9ad5 | 1,320 | py | Python | model_engine/inference.py | OsmosisAI/ModelEngine | e1024a2e384791b623d58383aa93ca566e191092 | [
"Apache-2.0"
] | null | null | null | model_engine/inference.py | OsmosisAI/ModelEngine | e1024a2e384791b623d58383aa93ca566e191092 | [
"Apache-2.0"
] | null | null | null | model_engine/inference.py | OsmosisAI/ModelEngine | e1024a2e384791b623d58383aa93ca566e191092 | [
"Apache-2.0"
] | 1 | 2021-09-22T15:29:30.000Z | 2021-09-22T15:29:30.000Z | # Copyright 2020 BlueChasm LLC dba OsmosisAI.
#
# 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... | 25.384615 | 83 | 0.702273 | # Copyright 2020 BlueChasm LLC dba OsmosisAI.
#
# 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... | 164 | 328 | 89 |
c4106d42cdb85aecc71332cd737e27926f2f5e32 | 3,814 | py | Python | SpinorBECSimulation/CoherentStateChebyshev/chebyshev_functions.py | ZachGlassman/SpinorBECSimulation | 8821a8bc150eda2aa36ce6b39ff178a3ddc99df1 | [
"MIT"
] | null | null | null | SpinorBECSimulation/CoherentStateChebyshev/chebyshev_functions.py | ZachGlassman/SpinorBECSimulation | 8821a8bc150eda2aa36ce6b39ff178a3ddc99df1 | [
"MIT"
] | null | null | null | SpinorBECSimulation/CoherentStateChebyshev/chebyshev_functions.py | ZachGlassman/SpinorBECSimulation | 8821a8bc150eda2aa36ce6b39ff178a3ddc99df1 | [
"MIT"
] | null | null | null | import numpy as np
import math
def alpha_help(a,n):
"""function to compute some approximations
Parameters
----------
a : complex
number
n : int
number
Returns
ln : complex
approximation
"""
if a.real == 0 and a.imag == 0:
if n == 0:
... | 23.115152 | 68 | 0.520713 | import numpy as np
import math
def find_nmax(tot, m):
first = np.mod(tot - abs(m), 2)
return (tot - abs(m) - first) / 2 + 1
def alpha_help(a,n):
"""function to compute some approximations
Parameters
----------
a : complex
number
n : int
number
Returns
ln :... | 79 | 0 | 23 |
4a045d6909aa525ec2c6af87ff3fdbf9a8b3aef3 | 4,996 | py | Python | tests/test_result.py | shawnbrown/squint | a9d326ff8edb2e2b740c4355fd953edd2c0cf114 | [
"Apache-2.0"
] | 3 | 2020-01-11T23:29:15.000Z | 2020-05-30T09:39:15.000Z | tests/test_result.py | shawnbrown/squint | a9d326ff8edb2e2b740c4355fd953edd2c0cf114 | [
"Apache-2.0"
] | 3 | 2019-10-15T13:23:31.000Z | 2020-07-23T22:13:11.000Z | tests/test_result.py | shawnbrown/squint | a9d326ff8edb2e2b740c4355fd953edd2c0cf114 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import sys
from .common import unittest
from squint._compatibility.itertools import islice
from squint._utils import IterItems
from squint.result import Result
| 33.986395 | 87 | 0.571257 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import sys
from .common import unittest
from squint._compatibility.itertools import islice
from squint._utils import IterItems
from squint.result import Result
class TestFetch(unittest.TestCase):
def test_nonmappings(self):
"""Check collection... | 3,005 | 1,619 | 145 |
74f169df072f3ba8e22ae7cfeb29fb01c317f0cb | 21,254 | py | Python | p2/multiagent/multiAgents.py | patrickmcgrory/cs188 | e5c5995ad187e8edfaf5446dd40e84497461ae90 | [
"BSD-3-Clause"
] | 22 | 2016-03-31T23:04:51.000Z | 2021-11-06T08:45:56.000Z | p2/multiagent/multiAgents.py | naderm/cs188 | e5c5995ad187e8edfaf5446dd40e84497461ae90 | [
"BSD-3-Clause"
] | null | null | null | p2/multiagent/multiAgents.py | naderm/cs188 | e5c5995ad187e8edfaf5446dd40e84497461ae90 | [
"BSD-3-Clause"
] | 39 | 2015-04-12T12:07:06.000Z | 2021-12-01T21:55:04.000Z | # multiAgents.py
# --------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to
# http://inst.eecs.b... | 36.08489 | 107 | 0.622847 | # multiAgents.py
# --------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to
# http://inst.eecs.b... | 3,642 | 0 | 248 |
60c7aab9263493986520396ca1327fe5b14d50e6 | 4,151 | py | Python | res_mods/mods/packages/xvm_battle/python/replay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | null | null | null | res_mods/mods/packages/xvm_battle/python/replay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | 1 | 2016-04-03T13:31:39.000Z | 2016-04-03T16:48:26.000Z | res_mods/mods/packages/xvm_battle/python/replay.py | peterbartha/ImmunoMod | cbf8cd49893d7082a347c1f72c0e39480869318a | [
"MIT"
] | null | null | null | """ XVM (c) www.modxvm.com 2013-2017 """
#####################################################################
# imports
import simplejson
import traceback
import BigWorld
import game
from Avatar import PlayerAvatar
from BattleReplay import BattleReplay, g_replayCtrl
from PlayerEvents import g_playerEvents
from gui.... | 34.02459 | 115 | 0.607564 | """ XVM (c) www.modxvm.com 2013-2017 """
#####################################################################
# imports
import simplejson
import traceback
import BigWorld
import game
from Avatar import PlayerAvatar
from BattleReplay import BattleReplay, g_replayCtrl
from PlayerEvents import g_playerEvents
from gui.... | 3,112 | 0 | 135 |
dbc0023dae7400b46fc4a3f80a594c5bdf65519c | 3,184 | py | Python | pretrain/pri3d/common/solver.py | kudo1026/Pri3D | 8bf8a3ec4393db3da6c0662ff49d5788ea188e20 | [
"MIT"
] | 103 | 2021-07-06T17:05:03.000Z | 2022-03-30T06:10:04.000Z | pretrain/pri3d/common/solver.py | kudo1026/Pri3D | 8bf8a3ec4393db3da6c0662ff49d5788ea188e20 | [
"MIT"
] | 5 | 2021-10-13T14:35:32.000Z | 2022-03-31T23:40:44.000Z | pretrain/pri3d/common/solver.py | kudo1026/Pri3D | 8bf8a3ec4393db3da6c0662ff49d5788ea188e20 | [
"MIT"
] | 3 | 2021-09-24T09:00:44.000Z | 2021-10-14T19:17:01.000Z | import logging
from torch.optim import SGD, Adam
from torch.optim.lr_scheduler import LambdaLR, StepLR, MultiStepLR
from torch import nn
class PolyLR(LambdaLR):
"""DeepLab learning rate policy"""
| 35.377778 | 106 | 0.65201 | import logging
from torch.optim import SGD, Adam
from torch.optim.lr_scheduler import LambdaLR, StepLR, MultiStepLR
from torch import nn
def initialize_optimizer(params, config):
if config.optimizer.optimizer == 'SGD':
return SGD(params, lr=config.optimizer.lr,
momentum=config.optimizer.sgd_mom... | 2,774 | 13 | 193 |
e2546d8c561e8bcc5bfeb467a3ebf005076c7ed6 | 1,410 | py | Python | 2020/day17.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | 2020/day17.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | 2020/day17.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | from collections import Counter
from itertools import product
import numpy as np
import advent
if __name__ == '__main__':
main()
| 26.111111 | 91 | 0.573759 | from collections import Counter
from itertools import product
import numpy as np
import advent
def main():
data = advent.get_input(2020, 17)
print(solve(data, part=1))
print(solve(data, part=2))
def solve(data, part: int):
grid = np.array([[list(l) for l in data.strip().splitlines()]])
if part... | 1,154 | 0 | 115 |
5457809fc46eebc92588721ee5a6c91bd2068792 | 3,533 | py | Python | mypackage/_mypyromodule.py | camlab-bioml/scvi-tools-skeleton | 2819e20bba9b7db9301f0d8bab33381093d6edc1 | [
"BSD-3-Clause"
] | 8 | 2021-02-16T10:21:59.000Z | 2022-01-14T10:48:37.000Z | mypackage/_mypyromodule.py | camlab-bioml/scvi-tools-skeleton | 2819e20bba9b7db9301f0d8bab33381093d6edc1 | [
"BSD-3-Clause"
] | 10 | 2021-01-26T00:01:47.000Z | 2022-03-01T03:39:05.000Z | mypackage/_mypyromodule.py | camlab-bioml/scvi-tools-skeleton | 2819e20bba9b7db9301f0d8bab33381093d6edc1 | [
"BSD-3-Clause"
] | 4 | 2021-05-17T17:27:33.000Z | 2022-01-26T16:19:22.000Z | import pyro
import pyro.distributions as dist
import torch
from scvi import _CONSTANTS
from scvi.module.base import PyroBaseModuleClass, auto_move_data
from scvi.nn import DecoderSCVI, Encoder
class MyPyroModule(PyroBaseModuleClass):
"""
Skeleton Variational auto-encoder Pyro model.
Here we implement a b... | 36.42268 | 90 | 0.613926 | import pyro
import pyro.distributions as dist
import torch
from scvi import _CONSTANTS
from scvi.module.base import PyroBaseModuleClass, auto_move_data
from scvi.nn import DecoderSCVI, Encoder
class MyPyroModule(PyroBaseModuleClass):
"""
Skeleton Variational auto-encoder Pyro model.
Here we implement a b... | 2,640 | 0 | 133 |
9b203be1cdf9d808ea319102ec9e1767a80807ba | 6,471 | py | Python | examples/example_compute_virtualmachine.py | zikalino/AzurePythonExamples | 23f9c173f0736f4e7ff66dde0402ef88da4ccc8f | [
"MIT"
] | 1 | 2020-09-04T14:38:13.000Z | 2020-09-04T14:38:13.000Z | examples/example_compute_virtualmachine.py | zikalino/AzurePythonExamples | 23f9c173f0736f4e7ff66dde0402ef88da4ccc8f | [
"MIT"
] | null | null | null | examples/example_compute_virtualmachine.py | zikalino/AzurePythonExamples | 23f9c173f0736f4e7ff66dde0402ef88da4ccc8f | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import os
f... | 38.064706 | 165 | 0.532066 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import os
f... | 0 | 0 | 0 |
b7b05e24047747d5379002c2e983d449318e3256 | 1,692 | py | Python | showcase/migrations/0007_auto_20190112_1627.py | aseufert/sporttechiq | 90812142bedf63fed9d1e5f3b246b78299aa45f7 | [
"MIT"
] | null | null | null | showcase/migrations/0007_auto_20190112_1627.py | aseufert/sporttechiq | 90812142bedf63fed9d1e5f3b246b78299aa45f7 | [
"MIT"
] | null | null | null | showcase/migrations/0007_auto_20190112_1627.py | aseufert/sporttechiq | 90812142bedf63fed9d1e5f3b246b78299aa45f7 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2019-01-12 16:27
from django.db import migrations, models
import showcase.file_size_validator
| 37.6 | 134 | 0.634752 | # Generated by Django 2.0 on 2019-01-12 16:27
from django.db import migrations, models
import showcase.file_size_validator
class Migration(migrations.Migration):
dependencies = [
('showcase', '0006_auto_20190110_0159'),
]
operations = [
migrations.AddField(
model_name='stati... | 0 | 1,544 | 23 |
f83dea9758f213b0e8e2e9abfa0e77a70c0d6852 | 620 | py | Python | analyzer/migrations/0013_auto_20191118_1544.py | elvinaqa/Amazon-Review-Analyzer-Summarizer-Python-NLP-ML- | 6c70e84ffbcb8c8fd65a7fe0847e1f0eb779f759 | [
"Unlicense"
] | 1 | 2020-09-10T11:26:05.000Z | 2020-09-10T11:26:05.000Z | analyzer/migrations/0013_auto_20191118_1544.py | elvinaqa/Amazon-Review-Analyzer-Summarizer-Python-NLP-ML- | 6c70e84ffbcb8c8fd65a7fe0847e1f0eb779f759 | [
"Unlicense"
] | null | null | null | analyzer/migrations/0013_auto_20191118_1544.py | elvinaqa/Amazon-Review-Analyzer-Summarizer-Python-NLP-ML- | 6c70e84ffbcb8c8fd65a7fe0847e1f0eb779f759 | [
"Unlicense"
] | null | null | null | # Generated by Django 2.2.6 on 2019-11-18 11:44
import datetime
from django.db import migrations, models
| 24.8 | 123 | 0.593548 | # Generated by Django 2.2.6 on 2019-11-18 11:44
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('analyzer', '0012_auto_20191118_1543'),
]
operations = [
migrations.RenameField(
model_name='product',
... | 0 | 490 | 23 |
1fc8ea8d797d815dbafa96ffd0013142703a6de9 | 50,533 | py | Python | app/libs/opasDocPermissions.py | Psychoanalytic-Electronic-Publishing/OpenPubArchive-Content-Server | 031b79b8e0dd5e1c22e2a51394cab846763a451a | [
"Apache-2.0"
] | null | null | null | app/libs/opasDocPermissions.py | Psychoanalytic-Electronic-Publishing/OpenPubArchive-Content-Server | 031b79b8e0dd5e1c22e2a51394cab846763a451a | [
"Apache-2.0"
] | 115 | 2020-09-02T20:01:26.000Z | 2022-03-30T11:47:23.000Z | app/libs/opasDocPermissions.py | Psychoanalytic-Electronic-Publishing/OpenPubArchive-Content-Server | 031b79b8e0dd5e1c22e2a51394cab846763a451a | [
"Apache-2.0"
] | 2 | 2020-10-15T13:52:10.000Z | 2020-10-20T13:42:51.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import datetime
import time
import opasConfig
import models
import logging
import localsecrets
# import urllib.parse
# import json
import sys
# from opasAPISupportLib import save_opas_session_cookie
sys.path.append("..") # Adds higher directory to python mo... | 53.304852 | 202 | 0.572517 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import datetime
import time
import opasConfig
import models
import logging
import localsecrets
# import urllib.parse
# import json
import sys
# from opasAPISupportLib import save_opas_session_cookie
sys.path.append("..") # Adds higher directory to python mo... | 11,394 | 0 | 218 |
40fbb92c604af78ae8abdd9f0581a69abc062ce6 | 399 | py | Python | specdal/operators/__init__.py | EnSpec/specdal.github.io | 4a89f5de6d8feb9472813da9767eafb78c0fe19a | [
"MIT"
] | 13 | 2018-03-09T07:45:29.000Z | 2021-09-15T21:41:28.000Z | specdal/operators/__init__.py | EnSpec/specdal.github.io | 4a89f5de6d8feb9472813da9767eafb78c0fe19a | [
"MIT"
] | 8 | 2018-05-14T14:06:50.000Z | 2021-08-23T09:17:00.000Z | specdal/operators/__init__.py | EnSpec/specdal.github.io | 4a89f5de6d8feb9472813da9767eafb78c0fe19a | [
"MIT"
] | 12 | 2017-08-30T18:06:13.000Z | 2021-06-08T18:54:16.000Z | from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
from .proximal_join import proximal_join, get_column_types
from .interpolate import interpolate
from .stitch import sti... | 33.25 | 93 | 0.784461 | from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
from .proximal_join import proximal_join, get_column_types
from .interpolate import interpolate
from .stitch import sti... | 0 | 0 | 0 |
ac6b1ef8fdf9ff2381db86bc500d15f0ccda651f | 977 | py | Python | 04_jump_the_five/jump.py | dwidmaye/tiny_python_projects | 3b03a667ad2b73d19126732a4018580cfecb35ed | [
"MIT"
] | null | null | null | 04_jump_the_five/jump.py | dwidmaye/tiny_python_projects | 3b03a667ad2b73d19126732a4018580cfecb35ed | [
"MIT"
] | null | null | null | 04_jump_the_five/jump.py | dwidmaye/tiny_python_projects | 3b03a667ad2b73d19126732a4018580cfecb35ed | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : Derek Widmayer <dwidmaye@gmail.com>
Date : 2021-01-10
Purpose: Rock the Casbah
"""
import argparse
# --------------------------------------------------
def get_args():
"""Jump the five"""
parser = argparse.ArgumentParser(
description='Jump the five',
for... | 22.72093 | 115 | 0.460594 | #!/usr/bin/env python3
"""
Author : Derek Widmayer <dwidmaye@gmail.com>
Date : 2021-01-10
Purpose: Rock the Casbah
"""
import argparse
# --------------------------------------------------
def get_args():
"""Jump the five"""
parser = argparse.ArgumentParser(
description='Jump the five',
for... | 0 | 0 | 0 |
d414981108f85165d9d4ca5669ff02f44bd6cea3 | 8,029 | py | Python | models-tf1/preprocess_data.py | vlada-rozova/bladder-cancer | 05005600948eacf25cd1ae164a2f46ae15ce2cf3 | [
"MIT"
] | 1 | 2022-03-05T02:51:47.000Z | 2022-03-05T02:51:47.000Z | models-tf1/preprocess_data.py | vlada-rozova/bladder-cancer | 05005600948eacf25cd1ae164a2f46ae15ce2cf3 | [
"MIT"
] | null | null | null | models-tf1/preprocess_data.py | vlada-rozova/bladder-cancer | 05005600948eacf25cd1ae164a2f46ae15ce2cf3 | [
"MIT"
] | 1 | 2021-01-22T15:59:08.000Z | 2021-01-22T15:59:08.000Z | import os
import os.path
import glob
import cv2
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
IMAGENET_MEAN_BGR = [103.939, 116.779, 123.68]
def load_images(data_path, image_height, image_width, plot=False):
"""
Read an image in BGR,
resize to image_height x image_width,
subtr... | 32.905738 | 102 | 0.61116 | import os
import os.path
import glob
import cv2
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
IMAGENET_MEAN_BGR = [103.939, 116.779, 123.68]
def load_images(data_path, image_height, image_width, plot=False):
"""
Read an image in BGR,
resize to image_height x image_width,
subtr... | 512 | 0 | 23 |
6f45aea8b544b9ccd10b35307ac7d38d809c6c2e | 201 | py | Python | Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/python/tvm/relay/nn.py | mengkai94/training_results_v0.6 | 43dc3e250f8da47b5f8833197d74cb8cf1004fc9 | [
"Apache-2.0"
] | 64 | 2021-05-02T14:42:34.000Z | 2021-05-06T01:35:03.000Z | python/tvm/relay/nn.py | ganzhiliang/tvm | b076cad542524cb3744149d953c341b5815f6474 | [
"Apache-2.0"
] | 23 | 2019-07-29T05:21:52.000Z | 2020-08-31T18:51:42.000Z | python/tvm/relay/nn.py | ganzhiliang/tvm | b076cad542524cb3744149d953c341b5815f6474 | [
"Apache-2.0"
] | 51 | 2019-07-12T05:10:25.000Z | 2021-07-28T16:19:06.000Z | # pylint: disable=wildcard-import, unused-import, unused-wildcard-import
"""Neural network related operators."""
# Re-export in a specific file name so that autodoc can pick it up
from .op.nn import *
| 40.2 | 72 | 0.761194 | # pylint: disable=wildcard-import, unused-import, unused-wildcard-import
"""Neural network related operators."""
# Re-export in a specific file name so that autodoc can pick it up
from .op.nn import *
| 0 | 0 | 0 |
9ae9056d879bbb3f32bdea9b7d41bf7ae82b80b5 | 3,154 | py | Python | api/__init__.py | jieggii/witless | 5ed678bf5a7b8602d6052715a198a56c46f62d02 | [
"WTFPL"
] | 7 | 2021-11-14T13:54:50.000Z | 2022-03-05T06:06:41.000Z | api/__init__.py | jieggii/witless | 5ed678bf5a7b8602d6052715a198a56c46f62d02 | [
"WTFPL"
] | null | null | null | api/__init__.py | jieggii/witless | 5ed678bf5a7b8602d6052715a198a56c46f62d02 | [
"WTFPL"
] | null | null | null | from aiofile import AIOFile
from os import remove
from re import findall
from api import util
from os.path import getsize
from os import listdir
from random import randint
| 25.642276 | 83 | 0.553583 | from aiofile import AIOFile
from os import remove
from re import findall
from api import util
from os.path import getsize
from os import listdir
from random import randint
async def improve_result(result: str):
rnd = randint(0, 4)
if rnd == 0: # ну чиста для прекола иногда бот пишет постироничнее....
... | 2,824 | 36 | 268 |
b56bee90b4215634a95bf4e633d4903390ad51f0 | 15,864 | py | Python | tests/cli/publish/test_publish.py | daobook/hatch | 1cf39ad1a11ce90bc77fb7fdc4b9202433509179 | [
"MIT"
] | null | null | null | tests/cli/publish/test_publish.py | daobook/hatch | 1cf39ad1a11ce90bc77fb7fdc4b9202433509179 | [
"MIT"
] | null | null | null | tests/cli/publish/test_publish.py | daobook/hatch | 1cf39ad1a11ce90bc77fb7fdc4b9202433509179 | [
"MIT"
] | null | null | null | import os
import secrets
import tarfile
import time
import zipfile
from collections import defaultdict
import httpx
import pytest
from hatch.config.constants import PublishEnvVars
from hatch.utils.ci import running_in_ci
PUBLISHER_TOKEN = os.environ.get('HATCH_CI_PUBLISHER_TOKEN')
pytestmark = [
pytest.mark.ski... | 32.84472 | 114 | 0.649962 | import os
import secrets
import tarfile
import time
import zipfile
from collections import defaultdict
import httpx
import pytest
from hatch.config.constants import PublishEnvVars
from hatch.utils.ci import running_in_ci
PUBLISHER_TOKEN = os.environ.get('HATCH_CI_PUBLISHER_TOKEN')
pytestmark = [
pytest.mark.ski... | 14,797 | 173 | 412 |
5b6ffd45074769f3afaecfb79816ae32eb72fdb0 | 10,009 | py | Python | src/no_padding_unit_strides.py | rileyhannigan/DeepLearningVisualizations | b83c69ada5fb81acc42fde891dd6045a4eebe493 | [
"MIT"
] | null | null | null | src/no_padding_unit_strides.py | rileyhannigan/DeepLearningVisualizations | b83c69ada5fb81acc42fde891dd6045a4eebe493 | [
"MIT"
] | null | null | null | src/no_padding_unit_strides.py | rileyhannigan/DeepLearningVisualizations | b83c69ada5fb81acc42fde891dd6045a4eebe493 | [
"MIT"
] | null | null | null | from manim import *
import numpy as np
# creates lists of lists of squares, used for input, kernel, and output
# moves kernel around and displays output squares one at a time
# creates padding
| 57.522989 | 131 | 0.636527 | from manim import *
import numpy as np
class NoPaddingUnitStrides(Scene):
# creates lists of lists of squares, used for input, kernel, and output
def create_squares(self, height, width, size, padding, c, up_shift, left_shift):
total_squares = []
for i in range(height):
... | 9,639 | 13 | 137 |
f294135649d390d81ded077a590de5d0b88465de | 350 | py | Python | feed/urls.py | DeanBiton/JobSeeker | ed60ec1ab4a047700d72b44d7a042dd834e43abd | [
"MIT"
] | null | null | null | feed/urls.py | DeanBiton/JobSeeker | ed60ec1ab4a047700d72b44d7a042dd834e43abd | [
"MIT"
] | null | null | null | feed/urls.py | DeanBiton/JobSeeker | ed60ec1ab4a047700d72b44d7a042dd834e43abd | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.feed, name='feed'),
path('post/<int:pk>/', views.PostDetailView.as_view(), name='post-detail'),
path('post/<int:pk>/delete/', views.PostDeleteView.as_view(), name='post-delete'),
path('post/new/', views.PostCreateView.as_v... | 31.818182 | 86 | 0.668571 | from django.urls import path
from . import views
urlpatterns = [
path('', views.feed, name='feed'),
path('post/<int:pk>/', views.PostDetailView.as_view(), name='post-detail'),
path('post/<int:pk>/delete/', views.PostDeleteView.as_view(), name='post-delete'),
path('post/new/', views.PostCreateView.as_v... | 0 | 0 | 0 |
60b9ecd703c18e205ce332ad07cdc2632ae08239 | 1,554 | py | Python | button/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | 3 | 2017-09-03T17:17:44.000Z | 2017-12-10T12:26:46.000Z | button/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | null | null | null | button/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | 2 | 2017-10-01T01:10:55.000Z | 2018-07-15T19:49:29.000Z | ''' demo of reading a button
2017-0808 PePo - added OLED display to demo
Adafruit article:
https://learn.adafruit.com/micropython-hardware-digital-i-slash-o/digital-inputs
'''
import machine, time
import ssd1306
__LED_PIN = const(14) #GPIO14
__BUTTON_PIN = const(12) #GPIO12
#define led to be set on / off by button... | 26.338983 | 81 | 0.647362 | ''' demo of reading a button
2017-0808 PePo - added OLED display to demo
Adafruit article:
https://learn.adafruit.com/micropython-hardware-digital-i-slash-o/digital-inputs
'''
import machine, time
import ssd1306
__LED_PIN = const(14) #GPIO14
__BUTTON_PIN = const(12) #GPIO12
#define led to be set on / off by button... | 504 | 0 | 44 |
0ed30c27d88286245f7f8350be353500778ba256 | 27,161 | py | Python | tests/ope/test_meta_slate.py | han20192019/newRL | 53598edab284b4364d127ec5662137de3f9c1206 | [
"Apache-2.0"
] | 387 | 2020-07-19T14:56:36.000Z | 2022-03-29T15:25:21.000Z | tests/ope/test_meta_slate.py | han20192019/newRL | 53598edab284b4364d127ec5662137de3f9c1206 | [
"Apache-2.0"
] | 89 | 2020-10-04T17:04:42.000Z | 2022-03-27T10:43:15.000Z | tests/ope/test_meta_slate.py | han20192019/newRL | 53598edab284b4364d127ec5662137de3f9c1206 | [
"Apache-2.0"
] | 53 | 2020-08-18T09:52:22.000Z | 2022-03-30T23:16:13.000Z | from copy import deepcopy
from dataclasses import dataclass
import itertools
import re
from typing import Dict
from typing import Optional
import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal
import pytest
from obp.ope import SlateIndependentIPS
from obp.ope import SlateOffPolicyEvalua... | 35.644357 | 133 | 0.699385 | from copy import deepcopy
from dataclasses import dataclass
import itertools
import re
from typing import Dict
from typing import Optional
import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal
import pytest
from obp.ope import SlateIndependentIPS
from obp.ope import SlateOffPolicyEvalua... | 2,070 | 0 | 22 |
ba8e540faa742cb0c08a2833ab89a8271fb5c208 | 6,100 | py | Python | unityparser/view_factory.py | adrianogil/SublimeUnityIntel | b3f3d686654c4dd62b3a792488d63bfd8105ce6a | [
"MIT"
] | null | null | null | unityparser/view_factory.py | adrianogil/SublimeUnityIntel | b3f3d686654c4dd62b3a792488d63bfd8105ce6a | [
"MIT"
] | null | null | null | unityparser/view_factory.py | adrianogil/SublimeUnityIntel | b3f3d686654c4dd62b3a792488d63bfd8105ce6a | [
"MIT"
] | null | null | null | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
__popup_path__ = os.path.join(__path__, 'popup')
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
if __popup_path__ not in sys.path:
sys.path.insert(0, __popup_path__)
from ... | 37.195122 | 88 | 0.621803 | import os, sys
__file__ = os.path.normpath(os.path.abspath(__file__))
__path__ = os.path.dirname(__file__)
__popup_path__ = os.path.join(__path__, 'popup')
# print(__path__)
if __path__ not in sys.path:
sys.path.insert(0, __path__)
if __popup_path__ not in sys.path:
sys.path.insert(0, __popup_path__)
from ... | 4,673 | -3 | 663 |
0fa697b9befc7417a9ae9af626234a8357c50e5d | 485 | py | Python | operators/utils/http_connection/script.py | thhapke/dilocal | 1d3c1b7b1a4513e9bff7efd77f680f66014ff499 | [
"MIT"
] | null | null | null | operators/utils/http_connection/script.py | thhapke/dilocal | 1d3c1b7b1a4513e9bff7efd77f680f66014ff499 | [
"MIT"
] | null | null | null | operators/utils/http_connection/script.py | thhapke/dilocal | 1d3c1b7b1a4513e9bff7efd77f680f66014ff499 | [
"MIT"
] | null | null | null | # Mock apis needs to be commented before used within SAP Data Intelligence
#from diadmin.dimockapi.mock_api import mock_api
#api = mock_api(__file__)
import os
import json
import requests
import http.client
from base64 import b64encode
api.add_generator(gen) | 22.045455 | 74 | 0.740206 | # Mock apis needs to be commented before used within SAP Data Intelligence
#from diadmin.dimockapi.mock_api import mock_api
#api = mock_api(__file__)
import os
import json
import requests
import http.client
from base64 import b64encode
def gen():
#att = {'user':user,'tenant':tenant,'password':api.config.passw... | 201 | 0 | 23 |
41345779e4ff29c248e42e597575a0a23cdd48b2 | 5,772 | py | Python | nessusha/nessusha/Archive/v3.py | SanPersie/NessusHa | c7663d7ff58e3a5eaf25505a862af3d9b9a52f09 | [
"MIT"
] | null | null | null | nessusha/nessusha/Archive/v3.py | SanPersie/NessusHa | c7663d7ff58e3a5eaf25505a862af3d9b9a52f09 | [
"MIT"
] | null | null | null | nessusha/nessusha/Archive/v3.py | SanPersie/NessusHa | c7663d7ff58e3a5eaf25505a862af3d9b9a52f09 | [
"MIT"
] | null | null | null | from tkinter import filedialog
from bs4 import *
import re
from pprint import *
import pprint
import xlsxwriter
from tkinter import *
# from tkinter.filedialog import askopenfilename
Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing
filename = filedialog.askopenfilename() #... | 34.562874 | 119 | 0.472107 | from tkinter import filedialog
from bs4 import *
import re
from pprint import *
import pprint
import xlsxwriter
from tkinter import *
# from tkinter.filedialog import askopenfilename
Tk().withdraw() # we don't want a full GUI, so keep the root window from appearing
filename = filedialog.askopenfilename() #... | 5,003 | 0 | 100 |