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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d193971fddcbd7411b4d55a4b6316790b093ebd3 | 1,598 | py | Python | plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/actions/isolate_endpoint/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/actions/isolate_endpoint/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/actions/isolate_endpoint/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import insightconnect_plugin_runtime
from .schema import IsolateEndpointInput, IsolateEndpointOutput, Input, Output, Component
# Custom imports below
from insightconnect_plugin_runtime.exceptions import PluginException
from time import sleep
| 42.052632 | 128 | 0.694618 | import insightconnect_plugin_runtime
from .schema import IsolateEndpointInput, IsolateEndpointOutput, Input, Output, Component
# Custom imports below
from insightconnect_plugin_runtime.exceptions import PluginException
from time import sleep
class IsolateEndpoint(insightconnect_plugin_runtime.Action):
def __init... | 1,239 | 39 | 76 |
721511e93bbd906c6644ab97531e22339bea98e2 | 172 | py | Python | tkinter/minimal - function version/main-2.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | tkinter/minimal - function version/main-2.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | tkinter/minimal - function version/main-2.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z | #!/usr/bin/env python
try:
import Tkinter as tk # Python 2
except:
import tkinter as tk # Python 3
root = tk.Tk()
# all functions put here
root.mainloop()
| 13.230769 | 35 | 0.645349 | #!/usr/bin/env python
try:
import Tkinter as tk # Python 2
except:
import tkinter as tk # Python 3
root = tk.Tk()
# all functions put here
root.mainloop()
| 0 | 0 | 0 |
dfd9b1e75ed2fc966b5408c91275f7a5d91b32c5 | 223 | py | Python | appengine_config.py | johanalexandersson91/job_interview | e8fca4d09788232e807bf7c872a3a3b227f230f8 | [
"MIT"
] | null | null | null | appengine_config.py | johanalexandersson91/job_interview | e8fca4d09788232e807bf7c872a3a3b227f230f8 | [
"MIT"
] | null | null | null | appengine_config.py | johanalexandersson91/job_interview | e8fca4d09788232e807bf7c872a3a3b227f230f8 | [
"MIT"
] | null | null | null | from google.appengine.ext import ndb
from google.appengine.ext import vendor
context = ndb.get_context()
context.set_cache_policy(lambda key: False)
context.set_memcache_policy(lambda key: False)
vendor.add('backend/lib') | 27.875 | 46 | 0.816143 | from google.appengine.ext import ndb
from google.appengine.ext import vendor
context = ndb.get_context()
context.set_cache_policy(lambda key: False)
context.set_memcache_policy(lambda key: False)
vendor.add('backend/lib') | 0 | 0 | 0 |
0e091e83d228d2edb7bcf2d74efd0ad8145f49f6 | 583 | py | Python | producers/config.py | gurleen/dtv-gfx-next | 529c226a30c9b668a44e2a2470c3593287867caf | [
"MIT"
] | null | null | null | producers/config.py | gurleen/dtv-gfx-next | 529c226a30c9b668a44e2a2470c3593287867caf | [
"MIT"
] | null | null | null | producers/config.py | gurleen/dtv-gfx-next | 529c226a30c9b668a44e2a2470c3593287867caf | [
"MIT"
] | null | null | null | import os
import sys
from pathlib import Path
from janus import Queue
import aiofiles
from loguru import logger
from .decorator import producer
if getattr("sys", "frozen", False):
app_path = sys._MEIPASS
else:
app_path = Path(os.path.dirname(os.path.abspath(__file__))).parent
@producer
| 24.291667 | 78 | 0.682676 | import os
import sys
from pathlib import Path
from janus import Queue
import aiofiles
from loguru import logger
from .decorator import producer
if getattr("sys", "frozen", False):
app_path = sys._MEIPASS
else:
app_path = Path(os.path.dirname(os.path.abspath(__file__))).parent
@producer
async def read_from_... | 261 | 0 | 22 |
5cf8cbea5af960f8c09d506f40ecfe407a7b0ce5 | 1,813 | py | Python | Algorithms/Selection-Sort/Python/main.py | KumarjitDas/Algorithms | aec0b7b853bb4a2f4d81a6a04236402baf2af7f7 | [
"MIT"
] | null | null | null | Algorithms/Selection-Sort/Python/main.py | KumarjitDas/Algorithms | aec0b7b853bb4a2f4d81a6a04236402baf2af7f7 | [
"MIT"
] | null | null | null | Algorithms/Selection-Sort/Python/main.py | KumarjitDas/Algorithms | aec0b7b853bb4a2f4d81a6a04236402baf2af7f7 | [
"MIT"
] | null | null | null | import random
def find_shortest(array: list[int]) -> int:
""" Find the shortest element in an array.
find_shortest
=============
The `find_shortest` function takes an array and finds the shortest element
in it.
Parameters
----------
array: list[int]
An array/list of integers
Retu... | 24.835616 | 119 | 0.540541 | import random
def find_shortest(array: list[int]) -> int:
""" Find the shortest element in an array.
find_shortest
=============
The `find_shortest` function takes an array and finds the shortest element
in it.
Parameters
----------
array: list[int]
An array/list of integers
Retu... | 0 | 0 | 0 |
77ece26b4baa06da181d56cf4230de39c42cc7dd | 1,322 | py | Python | neodroidaudition/audio_utilities/persistence.py | cnheider/audition | fe65285d0c8befe2141bb0a2789b23e2e079e651 | [
"Apache-2.0"
] | 1 | 2021-12-17T01:46:31.000Z | 2021-12-17T01:46:31.000Z | neodroidaudition/audio_utilities/persistence.py | cnheider/audition | fe65285d0c8befe2141bb0a2789b23e2e079e651 | [
"Apache-2.0"
] | null | null | null | neodroidaudition/audio_utilities/persistence.py | cnheider/audition | fe65285d0c8befe2141bb0a2789b23e2e079e651 | [
"Apache-2.0"
] | 2 | 2021-01-31T14:58:08.000Z | 2021-01-31T14:58:23.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Christian Heider Nielsen'
__doc__ = r'''
Created on 17-12-2020
'''
import os
import numpy
import soundfile
| 23.192982 | 63 | 0.580938 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'Christian Heider Nielsen'
__doc__ = r'''
Created on 17-12-2020
'''
import os
import numpy
import soundfile
def audio_read(path, norm=True, start=0, stop=None):
path = os.path.abspath(path)
if not os.path.exists(path):
raise... | 1,080 | 0 | 46 |
56c0caa3b444276400ffa1911422130543d104ef | 534 | py | Python | less/storage.py | andreyfedoseev/django-less | 983cca278e742618eed4e4abd514724e11583d9c | [
"MIT"
] | 7 | 2015-03-08T22:52:05.000Z | 2017-01-19T19:12:24.000Z | less/storage.py | rantecki/django-less | 5ced3f861b02f2e8483ce4b6229490a6fd99acf5 | [
"MIT"
] | 1 | 2016-02-09T12:49:46.000Z | 2016-02-20T20:16:43.000Z | less/storage.py | rantecki/django-less | 5ced3f861b02f2e8483ce4b6229490a6fd99acf5 | [
"MIT"
] | 6 | 2016-02-09T10:41:55.000Z | 2018-11-20T03:19:45.000Z | from django.core.files.storage import FileSystemStorage
from less.settings import LESS_ROOT
class LessFileStorage(FileSystemStorage):
"""
Standard file system storage for files handled by django-less.
The default for ``location`` is ``LESS_ROOT``
"""
| 33.375 | 70 | 0.638577 | from django.core.files.storage import FileSystemStorage
from less.settings import LESS_ROOT
class LessFileStorage(FileSystemStorage):
"""
Standard file system storage for files handled by django-less.
The default for ``location`` is ``LESS_ROOT``
"""
def __init__(self, location=None, base_url=Non... | 238 | 0 | 26 |
0649ab434e2e5c47b50a36e0856893b57ace6c94 | 5,043 | py | Python | isip/utils.py | TheRipperJhon/Isip | fad1f10b02f9e075451588cc6a18a46cc5fbd66b | [
"MIT"
] | 60 | 2017-12-01T14:46:01.000Z | 2022-02-22T19:17:42.000Z | isip/utils.py | TheRipperJhon/Isip | fad1f10b02f9e075451588cc6a18a46cc5fbd66b | [
"MIT"
] | null | null | null | isip/utils.py | TheRipperJhon/Isip | fad1f10b02f9e075451588cc6a18a46cc5fbd66b | [
"MIT"
] | 16 | 2018-11-05T13:21:30.000Z | 2021-04-26T17:36:30.000Z | # The MIT License (MIT)
# Copyright (c) 2014 Halit Alptekin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy... | 24.014286 | 119 | 0.565536 | # The MIT License (MIT)
# Copyright (c) 2014 Halit Alptekin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy... | 0 | 0 | 0 |
4c832143bc6a04fd328bca0df4469922def5346e | 794 | py | Python | test/TestUsingBareVariablesIsDeprecated.py | eahlstrom/ansible-lint | abc946f378a3690a4cb06eb9a7e9d60fb46fb35d | [
"MIT"
] | 1 | 2020-05-14T20:42:37.000Z | 2020-05-14T20:42:37.000Z | test/TestUsingBareVariablesIsDeprecated.py | eahlstrom/ansible-lint | abc946f378a3690a4cb06eb9a7e9d60fb46fb35d | [
"MIT"
] | 1 | 2020-11-09T17:39:54.000Z | 2020-11-09T17:39:54.000Z | test/TestUsingBareVariablesIsDeprecated.py | eahlstrom/ansible-lint | abc946f378a3690a4cb06eb9a7e9d60fb46fb35d | [
"MIT"
] | null | null | null | import unittest
from ansiblelint import Runner, RulesCollection
from ansiblelint.rules.UsingBareVariablesIsDeprecatedRule import UsingBareVariablesIsDeprecatedRule
| 36.090909 | 99 | 0.719144 | import unittest
from ansiblelint import Runner, RulesCollection
from ansiblelint.rules.UsingBareVariablesIsDeprecatedRule import UsingBareVariablesIsDeprecatedRule
class TestUsingBareVariablesIsDeprecated(unittest.TestCase):
collection = RulesCollection()
def setUp(self):
self.collection.register(Usi... | 451 | 155 | 23 |
8c2a59561cbf918616b780849f51cfad01f31e7a | 11,859 | py | Python | plugins/scheduler.py | bisnuray/Music_Player | 82c86fedebf3b89d9874e765804888861d5b059a | [
"MIT"
] | 2 | 2021-10-05T18:57:25.000Z | 2021-10-06T06:40:23.000Z | plugins/scheduler.py | bisnuray/Music_Player | 82c86fedebf3b89d9874e765804888861d5b059a | [
"MIT"
] | null | null | null | plugins/scheduler.py | bisnuray/Music_Player | 82c86fedebf3b89d9874e765804888861d5b059a | [
"MIT"
] | 3 | 2021-10-05T18:57:29.000Z | 2021-10-14T06:22:27.000Z |
from logger import LOGGER
import re
import calendar
from datetime import datetime
from contextlib import suppress
import pytz
from config import Config
from youtube_search import YoutubeSearch
from youtube_dl import YoutubeDL
from pyrogram import(
Client,
filters
)
from pyrogram.types import (
InlineK... | 41.177083 | 245 | 0.555527 |
from logger import LOGGER
import re
import calendar
from datetime import datetime
from contextlib import suppress
import pytz
from config import Config
from youtube_search import YoutubeSearch
from youtube_dl import YoutubeDL
from pyrogram import(
Client,
filters
)
from pyrogram.types import (
InlineK... | 10,630 | 0 | 88 |
a500013cab86276c0e07533d0ab2779631f99b3d | 316 | py | Python | zero.py | SolarLiner/django-node | 0d094301c57fdcd9369dfe40a87566c7092a25d9 | [
"MIT"
] | null | null | null | zero.py | SolarLiner/django-node | 0d094301c57fdcd9369dfe40a87566c7092a25d9 | [
"MIT"
] | null | null | null | zero.py | SolarLiner/django-node | 0d094301c57fdcd9369dfe40a87566c7092a25d9 | [
"MIT"
] | null | null | null | import time
import zmq
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://localhost:5000")
print("Client started")
i = 0
while True:
socket.send_string(f"Current iteration is: {i}")
msg = socket.recv_string()
print("Received message %s" % msg)
time.sleep(1)
i += 1
| 18.588235 | 52 | 0.670886 | import time
import zmq
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://localhost:5000")
print("Client started")
i = 0
while True:
socket.send_string(f"Current iteration is: {i}")
msg = socket.recv_string()
print("Received message %s" % msg)
time.sleep(1)
i += 1
| 0 | 0 | 0 |
fa21546f11e712e38c3e3def6d68463ed8c2db57 | 6,743 | py | Python | hardhat/recipes/python/base.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/base.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/base.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | import json
import os
import re
import shutil
from string import Template
from ..base import Downloader, Recipe, Configure, Make, MakeInstall
from ..base import TarballRecipe, GnuRecipe, GetVersionMixin
from hardhat.util import run, read_url, Object
from hardhat.urls import Urls
from hardhat.version import Versions, ex... | 29.968889 | 78 | 0.564141 | import json
import os
import re
import shutil
from string import Template
from ..base import Downloader, Recipe, Configure, Make, MakeInstall
from ..base import TarballRecipe, GnuRecipe, GetVersionMixin
from hardhat.util import run, read_url, Object
from hardhat.urls import Urls
from hardhat.version import Versions, ex... | 5,287 | 847 | 247 |
cba42e301210dc5f7e7880c2bd84e2b347962e40 | 67 | py | Python | algorithms/encoding/__init__.py | lschw/rl-experiments | 8b911b5d655288a60b12ffbacc123e3a3c78638c | [
"MIT"
] | null | null | null | algorithms/encoding/__init__.py | lschw/rl-experiments | 8b911b5d655288a60b12ffbacc123e3a3c78638c | [
"MIT"
] | null | null | null | algorithms/encoding/__init__.py | lschw/rl-experiments | 8b911b5d655288a60b12ffbacc123e3a3c78638c | [
"MIT"
] | null | null | null | from .state_aggregation import *
from .box_discretization import *
| 22.333333 | 33 | 0.820896 | from .state_aggregation import *
from .box_discretization import *
| 0 | 0 | 0 |
2fb6ba00783e02d3e3dcc8d98c14457d995be5fe | 8,449 | py | Python | code/ml/models.py | s231644/rucompoundsplitter | 606d4ac085ea0b3f8c764ebf413d66d2ec45cab4 | [
"Apache-2.0"
] | null | null | null | code/ml/models.py | s231644/rucompoundsplitter | 606d4ac085ea0b3f8c764ebf413d66d2ec45cab4 | [
"Apache-2.0"
] | null | null | null | code/ml/models.py | s231644/rucompoundsplitter | 606d4ac085ea0b3f8c764ebf413d66d2ec45cab4 | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from overrides import overrides
| 34.206478 | 112 | 0.588117 | import torch
from torch import nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from overrides import overrides
class LSTMIsCompoundClassifier(nn.Module):
def __init__(
self,
n_vocab: int,
d_input: int,
d_rnn: int,
n_layers: in... | 7,859 | 269 | 180 |
3ca08e643b99dc6c9b69393ef76b64b0945613c4 | 3,615 | py | Python | handlers.py | mode9/xlsxstyle | 6311c6088672d6a39555bd735e1b443583692289 | [
"MIT"
] | null | null | null | handlers.py | mode9/xlsxstyle | 6311c6088672d6a39555bd735e1b443583692289 | [
"MIT"
] | null | null | null | handlers.py | mode9/xlsxstyle | 6311c6088672d6a39555bd735e1b443583692289 | [
"MIT"
] | null | null | null | from typing import Generator, Dict, Iterable, List
import time
from openpyxl.styles.cell_style import StyleArray
from openpyxl.worksheet.worksheet import Worksheet, Cell
| 30.378151 | 117 | 0.609959 | from typing import Generator, Dict, Iterable, List
import time
from openpyxl.styles.cell_style import StyleArray
from openpyxl.worksheet.worksheet import Worksheet, Cell
class Header:
def __init__(self, row: Iterable = None):
self._names = {}
self._idxes = {}
self._row = row if row else [... | 2,762 | 616 | 92 |
96f32ba1f46ec2964e4253b050fa840cc0918f28 | 9,991 | py | Python | checks/bundled/lparstats/tests/conftest.py | ian28223/datadog-unix-agent | 09c75778b512361c83ff10e7cdb37b887bcaa8fe | [
"Apache-2.0"
] | 13 | 2018-08-11T01:40:51.000Z | 2022-01-02T09:07:43.000Z | checks/bundled/lparstats/tests/conftest.py | ian28223/datadog-unix-agent | 09c75778b512361c83ff10e7cdb37b887bcaa8fe | [
"Apache-2.0"
] | 21 | 2018-05-28T13:16:23.000Z | 2021-08-19T15:43:40.000Z | checks/bundled/lparstats/tests/conftest.py | ian28223/datadog-unix-agent | 09c75778b512361c83ff10e7cdb37b887bcaa8fe | [
"Apache-2.0"
] | 15 | 2018-05-10T15:09:41.000Z | 2022-03-21T06:46:21.000Z | # Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2018 Datadog, Inc.
import pytest
import utils.process
ORIGINAL_SUBPROC_OUTPUT = utils.process.get_sub... | 59.118343 | 99 | 0.367231 | # Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2018 Datadog, Inc.
import pytest
import utils.process
ORIGINAL_SUBPROC_OUTPUT = utils.process.get_sub... | 544 | 0 | 45 |
1f5d84e5a1f4bdb8a4808ca76519630af14b9cf3 | 1,124 | py | Python | build_tooling/tooling.py | mgeerdsen/dockerfiles | 584cfbe65cf8ca1cbea2d0b4ddf2723aa0ab3b13 | [
"MIT"
] | 1 | 2019-10-22T18:24:56.000Z | 2019-10-22T18:24:56.000Z | build_tooling/tooling.py | mgeerdsen/dockerfiles | 584cfbe65cf8ca1cbea2d0b4ddf2723aa0ab3b13 | [
"MIT"
] | 10 | 2018-02-08T15:43:51.000Z | 2019-08-23T11:48:24.000Z | build_tooling/tooling.py | wellcomecollection/dockerfiles | 9ca5fe6fc5abda232ab641dc2d13b81999e746a4 | [
"MIT"
] | 4 | 2018-09-10T09:49:25.000Z | 2019-01-17T14:53:03.000Z | # -*- encoding: utf-8 -*-
import errno
import os
import shlex
import subprocess
# Root of the Git repository
ROOT = subprocess.check_output([
'git', 'rev-parse', '--show-toplevel']).decode('ascii').strip()
# Hash of the current commit
CURRENT_COMMIT = subprocess.check_output([
'git', 'rev-parse', 'HEAD']).d... | 25.545455 | 74 | 0.66548 | # -*- encoding: utf-8 -*-
import errno
import os
import shlex
import subprocess
# Root of the Git repository
ROOT = subprocess.check_output([
'git', 'rev-parse', '--show-toplevel']).decode('ascii').strip()
# Hash of the current commit
CURRENT_COMMIT = subprocess.check_output([
'git', 'rev-parse', 'HEAD']).d... | 0 | 0 | 0 |
3bebdba244e574fd0522b81ced463b1608b0c1df | 2,408 | py | Python | imstegan/algo/edge.py | trantuan4132/imstegan | b70fd9b8fbcdaebeb630f42033b992fdccb5006d | [
"MIT"
] | 7 | 2022-03-10T06:43:25.000Z | 2022-03-10T08:29:01.000Z | imstegan/algo/edge.py | trantuan4132/imstegan | b70fd9b8fbcdaebeb630f42033b992fdccb5006d | [
"MIT"
] | null | null | null | imstegan/algo/edge.py | trantuan4132/imstegan | b70fd9b8fbcdaebeb630f42033b992fdccb5006d | [
"MIT"
] | null | null | null | import warnings
from typing import Any
import numpy as np
from ..utils import message_to_binary, binary_to_message, rgb_to_gray, conv2d
__all__ = ["SobelLSB"]
class SobelLSB():
"""Edge-based LSB embedding using Sobel kernel, idea described in:
`"Edge-based image steganography", Saiful Islam, Mangat R Mo... | 35.411765 | 101 | 0.565615 | import warnings
from typing import Any
import numpy as np
from ..utils import message_to_binary, binary_to_message, rgb_to_gray, conv2d
__all__ = ["SobelLSB"]
def _to_grayscale(image):
if image.ndim > 2:
if image.shape[2] == 3:
img = rgb_to_gray(image)
warnings.warn("Image is R... | 1,924 | 0 | 134 |
c35862053eab88650dbbfc600232cf1398bd80f2 | 257 | py | Python | web_ui/models.py | cisco-gve/epnm_usage_tool | e67fbdd80d7d51b110c317db4935120dd19781b9 | [
"Apache-2.0"
] | 2 | 2019-11-26T07:50:58.000Z | 2020-01-13T17:32:05.000Z | web_ui/models.py | gve-sw/epnm_usage_tool | e67fbdd80d7d51b110c317db4935120dd19781b9 | [
"Apache-2.0"
] | null | null | null | web_ui/models.py | gve-sw/epnm_usage_tool | e67fbdd80d7d51b110c317db4935120dd19781b9 | [
"Apache-2.0"
] | 2 | 2017-10-12T23:00:51.000Z | 2018-03-02T13:40:46.000Z | from django.db import models
# Create your models here.
| 16.0625 | 30 | 0.63035 | from django.db import models
# Create your models here.
class epnm_info(models.Model):
host = ''
user = ''
password = ''
def get_info(self):
r_dict={
'host' : self.host,
'user' : self.user,
'password' : self.password,
}
return r_dict
| 108 | 70 | 22 |
f5924c6c305eb74700484a8beaea8d76b80eae13 | 1,222 | py | Python | arkham.py | hardingalexh/agent-of-the-king | 72beca960cd3d9ac8a16dde7750156662b2788c0 | [
"Apache-2.0"
] | 3 | 2020-12-21T04:37:43.000Z | 2020-12-21T22:59:11.000Z | arkham.py | hardingalexh/agent-of-the-king | 72beca960cd3d9ac8a16dde7750156662b2788c0 | [
"Apache-2.0"
] | 5 | 2019-09-27T13:20:20.000Z | 2019-09-27T13:25:11.000Z | arkham.py | hardingalexh/agent-of-the-king | 72beca960cd3d9ac8a16dde7750156662b2788c0 | [
"Apache-2.0"
] | null | null | null | import os
import random
import re
import requests
import discord
from discord.ext import commands
from cogs.arkhamdb import Arkhamdb
from cogs.dice import Dice
from cogs.bag import Bag
from cogs.blob import Blob
from cogs.funko import Funko
from cogs.marvelcdb import Marvelcdb
from dotenv import load_dotenv
load_do... | 26.565217 | 81 | 0.718494 | import os
import random
import re
import requests
import discord
from discord.ext import commands
from cogs.arkhamdb import Arkhamdb
from cogs.dice import Dice
from cogs.bag import Bag
from cogs.blob import Blob
from cogs.funko import Funko
from cogs.marvelcdb import Marvelcdb
from dotenv import load_dotenv
load_do... | 597 | 0 | 22 |
bca3f39a6b2321f3d4a06e75611b6bbc5ce62cfe | 3,395 | py | Python | andrei/reinforce.py | andrei-radulescu-banu/SLM-Lab | fd6e1a177550f4cb5a7f36e25e80c68470e4848c | [
"MIT"
] | null | null | null | andrei/reinforce.py | andrei-radulescu-banu/SLM-Lab | fd6e1a177550f4cb5a7f36e25e80c68470e4848c | [
"MIT"
] | null | null | null | andrei/reinforce.py | andrei-radulescu-banu/SLM-Lab | fd6e1a177550f4cb5a7f36e25e80c68470e4848c | [
"MIT"
] | null | null | null | from torch.distributions import Categorical
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
gamma = 0.99
if __name__ == '__main__':
main()
| 42.4375 | 128 | 0.653314 | from torch.distributions import Categorical
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
gamma = 0.99
class Pi(nn.Module):
def __init__(self, in_dim, out_dim):
super(Pi, self).__init__()
layers = [
nn.Linear(in_dim, 64), # in_dim number o... | 3,018 | -1 | 184 |
72b10da32ea2bbe990f09f48c31aa0a30ba4dabe | 187 | py | Python | 05-iterator-generator/generator_expm_3.py | saidulislam/Python-Experiment | 0f63e0e6682b7a4d09f01a60adc926de2111e930 | [
"Apache-2.0"
] | null | null | null | 05-iterator-generator/generator_expm_3.py | saidulislam/Python-Experiment | 0f63e0e6682b7a4d09f01a60adc926de2111e930 | [
"Apache-2.0"
] | null | null | null | 05-iterator-generator/generator_expm_3.py | saidulislam/Python-Experiment | 0f63e0e6682b7a4d09f01a60adc926de2111e930 | [
"Apache-2.0"
] | null | null | null | gen = silly_generator()
for item in gen:
print(item)
# #Python
# #Rocks
# #So do you! | 14.384615 | 24 | 0.57754 | def silly_generator():
yield "Python"
yield "Rocks"
yield "So do you!"
gen = silly_generator()
for item in gen:
print(item)
# #Python
# #Rocks
# #So do you! | 64 | 0 | 23 |
3024c38f69f8a1a0badb9bcbaabe275a5deb98fb | 6,433 | py | Python | Editor/dist_pini.py | RangHo/pini-engine | e1407724de32a433b7b46e0ee2469240b70d960b | [
"MIT"
] | null | null | null | Editor/dist_pini.py | RangHo/pini-engine | e1407724de32a433b7b46e0ee2469240b70d960b | [
"MIT"
] | null | null | null | Editor/dist_pini.py | RangHo/pini-engine | e1407724de32a433b7b46e0ee2469240b70d960b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os,sys,shutil
import zipfile,glob,subprocess
import traceback
try:
option = {
"stdout":subprocess.PIPE,
"stderr":subprocess.PIPE
}
cwd = os.path.abspath(os.path.dirname(__file__))
print "c",cwd,__file__
if len(cwd) == 0:
cwd = "."
sys.path.append(myjoin(cwd,"..","Engine"))
... | 30.927885 | 105 | 0.675734 | # -*- coding: utf-8 -*-
import os,sys,shutil
import zipfile,glob,subprocess
import traceback
def u(text):
return unicode(text,"utf-8")
def myjoin(*args):
path = os.path.join(*args)
path = os.path.abspath(path)
return path
def luaCompileWithLuac(desc,path):
try:
for dirname, dirnames, filenames in os.walk(path... | 797 | 0 | 92 |
92e28fe86a8133991e604e48589456acf999634f | 3,183 | py | Python | rollout/command/deploy.py | debtsy/rollout | dc97bf94b0e158a5671b32a9e82338dd41154893 | [
"MIT"
] | null | null | null | rollout/command/deploy.py | debtsy/rollout | dc97bf94b0e158a5671b32a9e82338dd41154893 | [
"MIT"
] | null | null | null | rollout/command/deploy.py | debtsy/rollout | dc97bf94b0e158a5671b32a9e82338dd41154893 | [
"MIT"
] | null | null | null | from rollout import connect
from .util import get_service_name
import os
from collections import defaultdict
import subprocess as sub
from slackclient import SlackClient
| 32.479592 | 140 | 0.636192 | from rollout import connect
from .util import get_service_name
import os
from collections import defaultdict
import subprocess as sub
from slackclient import SlackClient
def perform_notifications(conf, message):
slack_conf = conf.get('notifications', {}).get('slack', None)
if slack_conf is None:
retur... | 2,917 | 0 | 92 |
fc054ef3c68de857b1b477a7bee7d0643dfda0e3 | 79 | py | Python | api/wsgi.py | ubirch/qrcode-decoder-playground | 33472ede29b0e605a8fa140bea1605ab515da0b5 | [
"Apache-2.0"
] | null | null | null | api/wsgi.py | ubirch/qrcode-decoder-playground | 33472ede29b0e605a8fa140bea1605ab515da0b5 | [
"Apache-2.0"
] | null | null | null | api/wsgi.py | ubirch/qrcode-decoder-playground | 33472ede29b0e605a8fa140bea1605ab515da0b5 | [
"Apache-2.0"
] | null | null | null | from .app import app
# production specific config
app.config['DEBUG'] = False
| 15.8 | 28 | 0.746835 | from .app import app
# production specific config
app.config['DEBUG'] = False
| 0 | 0 | 0 |
6381c62ea53007521248f046a84c975b44bba846 | 648 | py | Python | game_of_life/utilities.py | ziebam/game_of_life | 380df75cdb3b94ef967f3c11e1c749bca4a178ea | [
"MIT"
] | 1 | 2020-07-28T18:55:35.000Z | 2020-07-28T18:55:35.000Z | game_of_life/utilities.py | ziebam/game_of_life | 380df75cdb3b94ef967f3c11e1c749bca4a178ea | [
"MIT"
] | null | null | null | game_of_life/utilities.py | ziebam/game_of_life | 380df75cdb3b94ef967f3c11e1c749bca4a178ea | [
"MIT"
] | null | null | null | """The project's utilities.
This module provides utility functions that don't fit any other module.
"""
from typing import List
def load_board_state(path_to_file: str) -> List[List[int]]:
"""Loads the initial board state from file.
Args:
path_to_file: A path to the file, preferably constructed with... | 23.142857 | 71 | 0.640432 | """The project's utilities.
This module provides utility functions that don't fit any other module.
"""
from typing import List
def load_board_state(path_to_file: str) -> List[List[int]]:
"""Loads the initial board state from file.
Args:
path_to_file: A path to the file, preferably constructed with... | 0 | 0 | 0 |
d47c2e2a44e909d75bfe38be8a3565f0fb33cee9 | 3,015 | py | Python | test/test.py | luclepot/unknownpasta | 53cff8ff92b9d986d06753f2fa4bbacf7138d689 | [
"MIT"
] | null | null | null | test/test.py | luclepot/unknownpasta | 53cff8ff92b9d986d06753f2fa4bbacf7138d689 | [
"MIT"
] | null | null | null | test/test.py | luclepot/unknownpasta | 53cff8ff92b9d986d06753f2fa4bbacf7138d689 | [
"MIT"
] | null | null | null | import unknownpasta
import numpy as np
import matplotlib.pyplot as plt
# call lucs_tools.formatting.joyful.joy_text to plot the string
# lucs_tools.formatting.joyful.text(
# input_string,
# 90,
# fontsize=5.5,
# weight='light',
# factor=3.,
# write_lines=True,
# )
# text = """it ... | 75.375 | 786 | 0.740962 | import unknownpasta
import numpy as np
import matplotlib.pyplot as plt
# call lucs_tools.formatting.joyful.joy_text to plot the string
# lucs_tools.formatting.joyful.text(
# input_string,
# 90,
# fontsize=5.5,
# weight='light',
# factor=3.,
# write_lines=True,
# )
# text = """it ... | 0 | 0 | 0 |
409e7e1253cfd3d06bf144565ce92b083d219a29 | 1,878 | py | Python | setup.py | thejoeejoee/django-allauth-cas | 5db34b546eb32524a3a1a4b90f411e370ac7ad9b | [
"MIT"
] | null | null | null | setup.py | thejoeejoee/django-allauth-cas | 5db34b546eb32524a3a1a4b90f411e370ac7ad9b | [
"MIT"
] | null | null | null | setup.py | thejoeejoee/django-allauth-cas | 5db34b546eb32524a3a1a4b90f411e370ac7ad9b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from setuptools import find_packages, setup
from allauth_cas import __version__
BASE_DIR = os.path.dirname(__file__)
with open(os.path.join(BASE_DIR, 'README.rst')) as readme:
README = readme.read()
setup(
name='django-allauth-cas',
version=__version__,
description... | 31.3 | 58 | 0.586794 | # -*- coding: utf-8 -*-
import os
from setuptools import find_packages, setup
from allauth_cas import __version__
BASE_DIR = os.path.dirname(__file__)
with open(os.path.join(BASE_DIR, 'README.rst')) as readme:
README = readme.read()
setup(
name='django-allauth-cas',
version=__version__,
description... | 0 | 0 | 0 |
db35cb48422eff7f5bdb79383c7972928ec9d7e0 | 1,677 | py | Python | pwnypack/shellcode/arm/thumb.py | iksteen/dpf | e0a5a8e6ef3f4f1f7e1b91ee379711f4a49cb0e6 | [
"MIT"
] | 133 | 2015-04-07T07:37:49.000Z | 2022-01-12T13:34:34.000Z | pwnypack/shellcode/arm/thumb.py | iksteen/dpf | e0a5a8e6ef3f4f1f7e1b91ee379711f4a49cb0e6 | [
"MIT"
] | 3 | 2016-04-21T12:40:21.000Z | 2019-04-04T10:11:53.000Z | pwnypack/shellcode/arm/thumb.py | iksteen/dpf | e0a5a8e6ef3f4f1f7e1b91ee379711f4a49cb0e6 | [
"MIT"
] | 31 | 2015-05-28T03:34:14.000Z | 2020-06-20T08:54:02.000Z | from pwnypack.shellcode.arm import ARM
from pwnypack.target import Target
__all__ = ['ARMThumb']
class ARMThumb(ARM):
"""
Environment that targets a generic, unrestricted ARM architecture using
the Thumb instruction set.
"""
| 32.25 | 82 | 0.55814 | from pwnypack.shellcode.arm import ARM
from pwnypack.target import Target
__all__ = ['ARMThumb']
class ARMThumb(ARM):
"""
Environment that targets a generic, unrestricted ARM architecture using
the Thumb instruction set.
"""
def __init__(self, endian=None, *args, **kwargs):
super(ARMThu... | 1,297 | 0 | 135 |
d949a0bb9cffeed582f6f13c4cb0450d0658354a | 1,045 | py | Python | adoctor-diag-executor/adoctor_diag_executor/conf/default_config.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | adoctor-diag-executor/adoctor_diag_executor/conf/default_config.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | adoctor-diag-executor/adoctor_diag_executor/conf/default_config.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | #!/usr/bin/python3
# ******************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
# licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a c... | 34.833333 | 98 | 0.598086 | #!/usr/bin/python3
# ******************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
# licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a c... | 0 | 0 | 0 |
b38044726cf6222a81fb8be82779634ab86f045a | 16,668 | py | Python | layer_list_to_k210_layer.py | DIT4FUN/kendryte-model-compiler | 92f7baf48b16a77007c53f4e1623c1f9ba1e7de8 | [
"Apache-2.0"
] | 7 | 2019-11-25T10:41:21.000Z | 2021-03-18T14:16:19.000Z | layer_list_to_k210_layer.py | DIT4FUN/kendryte-model-compiler | 92f7baf48b16a77007c53f4e1623c1f9ba1e7de8 | [
"Apache-2.0"
] | null | null | null | layer_list_to_k210_layer.py | DIT4FUN/kendryte-model-compiler | 92f7baf48b16a77007c53f4e1623c1f9ba1e7de8 | [
"Apache-2.0"
] | 6 | 2019-07-19T09:10:34.000Z | 2020-12-08T05:08:34.000Z | '''
* Copyright 2018 Canaan 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... | 35.388535 | 132 | 0.609131 | '''
* Copyright 2018 Canaan 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... | 14,866 | 846 | 283 |
98f8043c08ab21c59bae75db421cfb8e3785fc3c | 3,560 | py | Python | Tools/cpu_usage.py | reginaldojunior/XU3EM | ddabdd4b3985fca57c01d94883ef875bbe4d95b4 | [
"BSD-3-Clause"
] | null | null | null | Tools/cpu_usage.py | reginaldojunior/XU3EM | ddabdd4b3985fca57c01d94883ef875bbe4d95b4 | [
"BSD-3-Clause"
] | null | null | null | Tools/cpu_usage.py | reginaldojunior/XU3EM | ddabdd4b3985fca57c01d94883ef875bbe4d95b4 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python3
import sys
from time import sleep
import csv
import numpy as np
import subprocess
from pprint import pprint
#PATH = os.environ['HOME'] + '/Dropbox/big.Little_optimal_frequencies/data/'
main()
| 19.347826 | 130 | 0.650281 | #! /usr/bin/env python3
import sys
from time import sleep
import csv
import numpy as np
import subprocess
from pprint import pprint
#PATH = os.environ['HOME'] + '/Dropbox/big.Little_optimal_frequencies/data/'
def get_process_pid(name):
pgrep=subprocess.Popen(["pgrep", name],stdout=subprocess.PIPE)
pid = pgrep.c... | 3,149 | 0 | 186 |
33822bf9be5352f6b774ec1323317ab5f5c78bd5 | 6,043 | py | Python | mutis/tests/test_correlation.py | IAA-CSIC/MUTIS | 063fbd11538c837ef1cc44dc0f39870f87395f11 | [
"BSD-3-Clause"
] | 2 | 2021-05-18T13:30:07.000Z | 2021-09-23T08:54:38.000Z | mutis/tests/test_correlation.py | IAA-CSIC/MUTIS | 063fbd11538c837ef1cc44dc0f39870f87395f11 | [
"BSD-3-Clause"
] | 24 | 2021-05-14T08:00:29.000Z | 2021-12-07T03:37:33.000Z | mutis/tests/test_correlation.py | IAA-CSIC/MUTIS | 063fbd11538c837ef1cc44dc0f39870f87395f11 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
from numpy.testing import assert_allclose
from mutis.correlation import Correlation
from mutis.signal import Signal
@pytest.fixture
| 38.490446 | 96 | 0.648519 | import numpy as np
import pytest
from numpy.testing import assert_allclose
from mutis.correlation import Correlation
from mutis.signal import Signal
@pytest.fixture
def corr():
times1 = np.linspace(2, 6, 40)
values1 = np.sin(times1)
dvalues1 = 0.05 * values1
times2 = np.linspace(8, 12, 40)
dvalue... | 5,681 | 0 | 187 |
60175e688082d22f596864bd12e29a7971a2f8de | 3,318 | py | Python | traits/traits.py | 0x022b/flexget-plugin-traits | c0721a8217fce880493c376392cca99166e80f53 | [
"MIT"
] | null | null | null | traits/traits.py | 0x022b/flexget-plugin-traits | c0721a8217fce880493c376392cca99166e80f53 | [
"MIT"
] | null | null | null | traits/traits.py | 0x022b/flexget-plugin-traits | c0721a8217fce880493c376392cca99166e80f53 | [
"MIT"
] | null | null | null | from flexget import plugin
from flexget.event import event
from flexget.utils import qualities
from flexget.utils.qualities import QualityComponent
from loguru import logger
from typing import List
logger = logger.bind(name="traits")
class Traits:
"""
Override FlexGet's built-in quality requirement types wi... | 33.18 | 87 | 0.520193 | from flexget import plugin
from flexget.event import event
from flexget.utils import qualities
from flexget.utils.qualities import QualityComponent
from loguru import logger
from typing import List
logger = logger.bind(name="traits")
class Traits:
"""
Override FlexGet's built-in quality requirement types wi... | 1,718 | 0 | 130 |
7590d0dd804f145e73ede5b015aa57fcb2400c8e | 3,903 | py | Python | scripts/distort.py | UMich-BipedLab/SegmentationMapping | b58eec234ae6fd78a2e7ba8b2398ff05fb467e19 | [
"MIT"
] | 36 | 2019-06-23T20:47:25.000Z | 2022-03-22T02:49:56.000Z | scripts/distort.py | crankler/SegmentationMapping | f4f95fa848ff59e322488d5b17e6ea1bdd15831c | [
"MIT"
] | 3 | 2020-06-07T09:22:04.000Z | 2021-08-02T19:01:12.000Z | scripts/distort.py | crankler/SegmentationMapping | f4f95fa848ff59e322488d5b17e6ea1bdd15831c | [
"MIT"
] | 13 | 2019-06-23T20:50:52.000Z | 2022-02-18T10:59:12.000Z | """
Demonstrating how to undistort images.
Reads in the given calibration file, parses it, and uses it to undistort the given
image. Then display both the original and undistorted images.
To use:
python undistort.py image calibration_file
"""
import numpy as np
import cv2
import matplotlib.pyplot as plt
import ... | 34.539823 | 89 | 0.555983 | """
Demonstrating how to undistort images.
Reads in the given calibration file, parses it, and uses it to undistort the given
image. Then display both the original and undistorted images.
To use:
python undistort.py image calibration_file
"""
import numpy as np
import cv2
import matplotlib.pyplot as plt
import ... | 1,539 | 1,883 | 46 |
ee15789e7c67f8683d14f230cee2134d629e6610 | 401 | py | Python | test/test.py | pandocker/pandoc-docx-utils | b216d0b67db40c2394cf629c42eb4861481af151 | [
"MIT"
] | 3 | 2019-05-31T03:13:08.000Z | 2020-12-02T15:53:10.000Z | test/test.py | pandocker/pandoc-docx-utils | b216d0b67db40c2394cf629c42eb4861481af151 | [
"MIT"
] | null | null | null | test/test.py | pandocker/pandoc-docx-utils | b216d0b67db40c2394cf629c42eb4861481af151 | [
"MIT"
] | 2 | 2018-11-30T04:02:46.000Z | 2019-06-01T06:52:58.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pandoc_docx_utils import ExtractBulletList
import panflute as pf
if __name__ == "__main__":
main()
| 22.277778 | 53 | 0.630923 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pandoc_docx_utils import ExtractBulletList
import panflute as pf
def main():
with open("markdown.md", "r") as f:
md = f.read()
doc = pf.Doc(*pf.convert_text(md), format="docx")
pf.debug("doc: {}".format(*doc.content))
ebl = ExtractBulletList(... | 220 | 0 | 23 |
75bdb68a67244f21513a47f038c784df0158e119 | 1,948 | py | Python | analyse_repos.py | Lyken17/Deep-Learning-Framework-Popularity | 78eb8ac874f4f062da9e559b6b1c5ff755216416 | [
"MIT"
] | 1 | 2018-12-07T03:04:15.000Z | 2018-12-07T03:04:15.000Z | analyse_repos.py | Lyken17/Deep-Learning-Framework-Popularity | 78eb8ac874f4f062da9e559b6b1c5ff755216416 | [
"MIT"
] | null | null | null | analyse_repos.py | Lyken17/Deep-Learning-Framework-Popularity | 78eb8ac874f4f062da9e559b6b1c5ff755216416 | [
"MIT"
] | null | null | null | import os, sys
import os.path as osp
import subprocess
import shutil
from pprint import pprint
# import git
# from git import Repo
frameworks = (
"torch",
"tensorflow",
"mxnet",
"theano",
"keras",
"matlab",
"torch_c"
)
root = "test"
proj = "3D-ResNets-PyTorch"
for (dirpath, dirnames, ... | 23.190476 | 74 | 0.555955 | import os, sys
import os.path as osp
import subprocess
import shutil
from pprint import pprint
# import git
# from git import Repo
frameworks = (
"torch",
"tensorflow",
"mxnet",
"theano",
"keras",
"matlab",
"torch_c"
)
def find_keywords(path, word_bag):
with open(path, "r") as fp:
... | 1,152 | 0 | 46 |
6743ee20651bfb8f9873560c756a32be11f748fc | 10,980 | py | Python | syncli/api/transport.py | comodit/synapse-client | 9bc7fcc09367bc1f6ac7baff6f38fde9cbcdbf39 | [
"MIT"
] | 2 | 2016-06-23T05:57:37.000Z | 2021-02-02T06:47:35.000Z | syncli/api/transport.py | comodit/synapse-client | 9bc7fcc09367bc1f6ac7baff6f38fde9cbcdbf39 | [
"MIT"
] | null | null | null | syncli/api/transport.py | comodit/synapse-client | 9bc7fcc09367bc1f6ac7baff6f38fde9cbcdbf39 | [
"MIT"
] | 2 | 2017-09-23T00:05:51.000Z | 2019-05-13T15:43:48.000Z | import threading
import pika
import time
import json
import sys
from pprint import pformat
from Queue import Empty
from ssl import CERT_REQUIRED
from pika import PlainCredentials
from pika import SelectConnection
from pika.adapters.select_connection import SelectPoller
from syncli.config import config
from syncli.lo... | 37.346939 | 79 | 0.557013 | import threading
import pika
import time
import json
import sys
from pprint import pformat
from Queue import Empty
from ssl import CERT_REQUIRED
from pika import PlainCredentials
from pika import SelectConnection
from pika.adapters.select_connection import SelectPoller
from syncli.config import config
from syncli.lo... | 9,221 | 27 | 449 |
82d2443ff75e7c8cbbf491b166727e68af5e38b5 | 903 | py | Python | peeringdb/migrations/0015_auto_20210227_1258.py | ggidofalvy-tc/peering-manager | 0c358b108494f51936264f3ec5d600c20827a745 | [
"Apache-2.0"
] | 173 | 2020-08-08T15:38:08.000Z | 2022-03-21T11:35:25.000Z | peeringdb/migrations/0015_auto_20210227_1258.py | ggidofalvy-tc/peering-manager | 0c358b108494f51936264f3ec5d600c20827a745 | [
"Apache-2.0"
] | 192 | 2020-08-08T22:03:45.000Z | 2022-03-31T04:20:44.000Z | peeringdb/migrations/0015_auto_20210227_1258.py | ggidofalvy-tc/peering-manager | 0c358b108494f51936264f3ec5d600c20827a745 | [
"Apache-2.0"
] | 33 | 2020-08-14T21:24:38.000Z | 2022-03-06T14:55:13.000Z | # Generated by Django 3.1.6 on 2021-02-27 11:58
from django.db import migrations, models
| 26.558824 | 63 | 0.565891 | # Generated by Django 3.1.6 on 2021-02-27 11:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0014_auto_20201208_1856"),
]
operations = [
migrations.AddField(
model_name="facility",
name="floor",
... | 0 | 789 | 23 |
eee3f4823fac8c98d8e4272e945ab73d32f76775 | 610 | py | Python | weboobToFile/helpers/serializer.py | QuentinBay/weboobToFile | a42d6a36f74dbc5d865c4e668f2d0bdc2ab9feea | [
"BSD-2-Clause"
] | null | null | null | weboobToFile/helpers/serializer.py | QuentinBay/weboobToFile | a42d6a36f74dbc5d865c4e668f2d0bdc2ab9feea | [
"BSD-2-Clause"
] | null | null | null | weboobToFile/helpers/serializer.py | QuentinBay/weboobToFile | a42d6a36f74dbc5d865c4e668f2d0bdc2ab9feea | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import time
import os
from pretty import get_pretty_json
import webbrowser
| 24.4 | 71 | 0.721311 | # -*- coding: utf-8 -*-
import json
import time
import os
from pretty import get_pretty_json
import webbrowser
def create_fileName():
name = str(time.strftime("%d-%m-%YT%H:%M:%S"))+"_comptes_jean-mi.json"
return name
# print sum(len(v) for v in content.itervalues())
def write_content(filePath, content):
content ... | 428 | 0 | 69 |
547a5c13b9de2907191cc65b5d2a1c9d17506d12 | 211 | py | Python | utilities/mytests/xxx.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | utilities/mytests/xxx.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | utilities/mytests/xxx.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null |
from datetime import datetime
# current date and time
now = datetime.now()
timestamp = datetime.timestamp(now)
print(type(timestamp))
print("timestamp =", timestamp)
print(datetime.fromtimestamp(timestamp)) | 17.583333 | 40 | 0.772512 |
from datetime import datetime
# current date and time
now = datetime.now()
timestamp = datetime.timestamp(now)
print(type(timestamp))
print("timestamp =", timestamp)
print(datetime.fromtimestamp(timestamp)) | 0 | 0 | 0 |
8a4c267bf18f555847f045e803a8d04ae847b40d | 2,001 | py | Python | py/25. Reverse Nodes in k-Group.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | 3 | 2021-08-07T07:01:34.000Z | 2021-08-07T07:03:02.000Z | py/25. Reverse Nodes in k-Group.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | py/25. Reverse Nodes in k-Group.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/reverse-nodes-in-k-group/
# Given a linked list, reverse the nodes of a linked list k at a time and return
# its modified list.
# k is a positive integer and is less than or equal to the length of the linked
# list. If the number of nodes is not a multiple of k then left-out nodes, in ... | 32.274194 | 81 | 0.524238 | # https://leetcode.com/problems/reverse-nodes-in-k-group/
# Given a linked list, reverse the nodes of a linked list k at a time and return
# its modified list.
# k is a positive integer and is less than or equal to the length of the linked
# list. If the number of nodes is not a multiple of k then left-out nodes, in ... | 1,038 | -6 | 76 |
d85857d59dd197a7f8b805807562dacfc4fd057c | 5,471 | py | Python | contrib/python-sdk/test/test_command_line.py | wyatuestc/pai | 65b44e1ab37cab0790af392a016cc9fb1d2318fe | [
"MIT"
] | 2 | 2018-07-16T03:40:31.000Z | 2018-11-15T02:45:59.000Z | contrib/python-sdk/test/test_command_line.py | wyatuestc/pai | 65b44e1ab37cab0790af392a016cc9fb1d2318fe | [
"MIT"
] | 139 | 2019-07-05T06:22:28.000Z | 2020-07-07T06:33:57.000Z | contrib/python-sdk/test/test_command_line.py | wyatuestc/pai | 65b44e1ab37cab0790af392a016cc9fb1d2318fe | [
"MIT"
] | 1 | 2019-10-29T08:39:31.000Z | 2019-10-29T08:39:31.000Z | import unittest
import os
from copy import deepcopy
from subprocess import CalledProcessError
from shutil import rmtree
from openpaisdk.command_line import Engine
from openpaisdk.utils import run_command
from openpaisdk.utils import OrganizedList as ol
from openpaisdk.job import Job, Namespace, from_file
from typing im... | 40.828358 | 121 | 0.630232 | import unittest
import os
from copy import deepcopy
from subprocess import CalledProcessError
from shutil import rmtree
from openpaisdk.command_line import Engine
from openpaisdk.utils import run_command
from openpaisdk.utils import OrganizedList as ol
from openpaisdk.job import Job, Namespace, from_file
from typing im... | 4,434 | 588 | 115 |
52ef01aa59580edd9b3cededa08205c3cd7472d3 | 2,090 | py | Python | app.py | naomisdev/sqlalchemy-challenge | 7e22d57a053828e4d3eab3b99b09f3e6f7fc06c3 | [
"ADSL"
] | null | null | null | app.py | naomisdev/sqlalchemy-challenge | 7e22d57a053828e4d3eab3b99b09f3e6f7fc06c3 | [
"ADSL"
] | null | null | null | app.py | naomisdev/sqlalchemy-challenge | 7e22d57a053828e4d3eab3b99b09f3e6f7fc06c3 | [
"ADSL"
] | null | null | null | # 1. Import Flask
from flask import Flask,jsonify
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
import datetime as dt
engine = create_engine("sqlite:///Resources/hawaii.sqlite")
Base = automap_base()
Base.prepare(engine,r... | 28.630137 | 174 | 0.702871 | # 1. Import Flask
from flask import Flask,jsonify
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
import datetime as dt
engine = create_engine("sqlite:///Resources/hawaii.sqlite")
Base = automap_base()
Base.prepare(engine,r... | 1,256 | 0 | 110 |
ed2c0f0566051edae091ff8472024c5adc816b7c | 4,590 | py | Python | graph/ExperimentConductor.py | Draeius/loopwalk_kernel | bbe0dd55275936abd4099e8c89f4f2bdca3d2be5 | [
"MIT"
] | null | null | null | graph/ExperimentConductor.py | Draeius/loopwalk_kernel | bbe0dd55275936abd4099e8c89f4f2bdca3d2be5 | [
"MIT"
] | null | null | null | graph/ExperimentConductor.py | Draeius/loopwalk_kernel | bbe0dd55275936abd4099e8c89f4f2bdca3d2be5 | [
"MIT"
] | null | null | null | import itertools
from enum import Enum
from graph.GraphLoader import DatasetLoader
from graph.GridSearch import GridSearch
| 37.933884 | 108 | 0.519172 | import itertools
from enum import Enum
from graph.GraphLoader import DatasetLoader
from graph.GridSearch import GridSearch
class ExperimentConductor:
sets = Enum('Sets', 'all small large reduced custom')
datasets = {
sets.all: ["BZR", "COX2", "DHFR", "MUTAG", "NCI1", "PTC_FR"],
sets.small: [... | 3,739 | 703 | 23 |
917903674eca4ea23b0aa379b9063c2048d520b8 | 2,305 | py | Python | test/munge_test.py | NERSC/nersc_sdn | ea6c6486d2390a06b31411397e71e53e5aa8a82b | [
"BSD-3-Clause-LBNL"
] | null | null | null | test/munge_test.py | NERSC/nersc_sdn | ea6c6486d2390a06b31411397e71e53e5aa8a82b | [
"BSD-3-Clause-LBNL"
] | null | null | null | test/munge_test.py | NERSC/nersc_sdn | ea6c6486d2390a06b31411397e71e53e5aa8a82b | [
"BSD-3-Clause-LBNL"
] | null | null | null | # Shifter, Copyright (c) 2015, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of any
# required approvals from the U.S. Dept. of Energy). All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are per... | 39.741379 | 79 | 0.68243 | # Shifter, Copyright (c) 2015, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of any
# required approvals from the U.S. Dept. of Energy). All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are per... | 1,000 | 18 | 185 |
3c9b766434027524e0637377bd5b6d37042fbd15 | 713 | py | Python | onnx_jax/handlers/backend/matmul.py | gglin001/onnx_jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | 9 | 2021-04-12T02:37:14.000Z | 2022-03-28T23:31:40.000Z | onnx_jax/handlers/backend/matmul.py | gglin001/onnx-jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | null | null | null | onnx_jax/handlers/backend/matmul.py | gglin001/onnx-jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | null | null | null | import jax.numpy as jnp
from jax import jit
from onnx_jax.handlers.backend_handler import BackendHandler
from onnx_jax.handlers.handler import onnx_op
from onnx_jax.pb_wrapper import OnnxNode
@onnx_op("MatMul")
| 23.766667 | 60 | 0.670407 | import jax.numpy as jnp
from jax import jit
from onnx_jax.handlers.backend_handler import BackendHandler
from onnx_jax.handlers.handler import onnx_op
from onnx_jax.pb_wrapper import OnnxNode
@onnx_op("MatMul")
class MatMul(BackendHandler):
@classmethod
def _common(cls, node: OnnxNode, **kwargs):
@ji... | 294 | 183 | 22 |
8cb7c38a9d2619bce88093a903ad720eb75d9882 | 649 | py | Python | api/config.py | verhovyh/Currency_Service | c230fca0f554741d8e3519dbe1185a7219dbf500 | [
"MIT"
] | null | null | null | api/config.py | verhovyh/Currency_Service | c230fca0f554741d8e3519dbe1185a7219dbf500 | [
"MIT"
] | null | null | null | api/config.py | verhovyh/Currency_Service | c230fca0f554741d8e3519dbe1185a7219dbf500 | [
"MIT"
] | null | null | null | import os
config = {"dev": DevelopmentConfig, "prod": ProductionConfig, "docker": DockerDevConfig}
| 24.037037 | 88 | 0.731895 | import os
class Config:
SECRET_KEY = "testkey"
SQLALCHEMY_TRACK_MODIFICATIONS = False
LOG_FILE = "api.log"
class DevelopmentConfig(Config):
SQLALCHEMY_DATABASE_URI = "postgresql://testusr:password@127.0.0.1:5432/testdb"
# SQLALCHEMY_DATABASE_URI = 'postgres://127.0.0.1:5432'
DEBUG = True
c... | 0 | 452 | 92 |
9e51b5f3858ed8e9d12dd47908ac5c3856559989 | 2,075 | py | Python | api/tests/conftest.py | sjohnson31/ttbud | 456de60c7765f33630a8fd4bd18c4f6e75e1bf67 | [
"MIT"
] | 5 | 2020-05-21T17:44:08.000Z | 2021-09-27T03:57:45.000Z | api/tests/conftest.py | ttbud/ttbud | 2162c4f3a49d706f38b0791d88db20f6b2098ed6 | [
"MIT"
] | 220 | 2020-05-05T01:11:22.000Z | 2022-02-26T20:14:26.000Z | api/tests/conftest.py | ttbud/ttbud | 2162c4f3a49d706f38b0791d88db20f6b2098ed6 | [
"MIT"
] | 1 | 2020-05-21T17:45:21.000Z | 2020-05-21T17:45:21.000Z | import asyncio
import random
import time
from typing import Any, AsyncIterator
import pytest
from aioredis import Redis
from fakeredis.aioredis import FakeRedis
from pytest_mock import MockerFixture
from src.room_store.memory_room_archive import MemoryRoomArchive
from src.room_store.memory_room_store import MemoryRoo... | 29.225352 | 88 | 0.773012 | import asyncio
import random
import time
from typing import Any, AsyncIterator
import pytest
from aioredis import Redis
from fakeredis.aioredis import FakeRedis
from pytest_mock import MockerFixture
from src.room_store.memory_room_archive import MemoryRoomArchive
from src.room_store.memory_room_store import MemoryRoo... | 621 | 0 | 136 |
1bc316180274b78acdb656dd9624620fb5802c42 | 3,607 | py | Python | K_ARM_Opt.py | PurduePAML/K-ARM_Backdoor_Optimization | 8c837fd386f64f0cb2a1021e2d94a327339187ff | [
"MIT"
] | 10 | 2021-06-22T23:05:01.000Z | 2022-02-21T21:23:31.000Z | K_ARM_Opt.py | PurduePAML/K-ARM_Backdoor_Optimization | 8c837fd386f64f0cb2a1021e2d94a327339187ff | [
"MIT"
] | null | null | null | K_ARM_Opt.py | PurduePAML/K-ARM_Backdoor_Optimization | 8c837fd386f64f0cb2a1021e2d94a327339187ff | [
"MIT"
] | 2 | 2022-01-20T20:07:11.000Z | 2022-02-03T20:54:57.000Z | # K-Arm Optimization
########################################################################################################################################
### K_Arm_Opt functions load data based on different trigger types, then create an instance of K-Arm scanner and run optimization ###
### It returns the target... | 34.682692 | 154 | 0.64153 | # K-Arm Optimization
########################################################################################################################################
### K_Arm_Opt functions load data based on different trigger types, then create an instance of K-Arm scanner and run optimization ###
### It returns the target... | 2,806 | 0 | 23 |
d431024a0475707fdc2ac858d62b93c6d4b74b96 | 8,799 | py | Python | crypto/bytectf-2020/APAKE/server.py | BadMonkey7/funny-ctf-challenge | 827caed5ab54f1da9217dfa25b034b9b398b11ef | [
"MIT"
] | 2 | 2020-10-22T08:13:52.000Z | 2021-01-16T06:56:24.000Z | crypto/bytectf-2020/APAKE/server.py | BadMonkey7/funny-ctf-challenge | 827caed5ab54f1da9217dfa25b034b9b398b11ef | [
"MIT"
] | null | null | null | crypto/bytectf-2020/APAKE/server.py | BadMonkey7/funny-ctf-challenge | 827caed5ab54f1da9217dfa25b034b9b398b11ef | [
"MIT"
] | null | null | null | from gmssl import sm3, func
from binascii import a2b_hex, b2a_hex
sm2p256v1_ecc_table = {
'n': 'FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123',
'p': 'FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF',
'g': '32c4ae2c1f1981195f9904466a39c9948fe30bbff2660be1715a4589334c74c7'... | 41.116822 | 116 | 0.524378 | from gmssl import sm3, func
from binascii import a2b_hex, b2a_hex
sm2p256v1_ecc_table = {
'n': 'FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123',
'p': 'FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF',
'g': '32c4ae2c1f1981195f9904466a39c9948fe30bbff2660be1715a4589334c74c7'... | 7,218 | -1 | 292 |
433341581ddc8c2f0a17eff7e795dc589b084ac1 | 96 | py | Python | 20160522.py | JaeGyu/PythonEx_1 | e67053db6ca7431c3dd66351c190c53229e3f141 | [
"MIT"
] | null | null | null | 20160522.py | JaeGyu/PythonEx_1 | e67053db6ca7431c3dd66351c190c53229e3f141 | [
"MIT"
] | null | null | null | 20160522.py | JaeGyu/PythonEx_1 | e67053db6ca7431c3dd66351c190c53229e3f141 | [
"MIT"
] | null | null | null | #_*_ coding: utf-8 _*_
my_func(input("이름을 입력하세요 : ")) | 16 | 30 | 0.645833 | #_*_ coding: utf-8 _*_
def my_func(name):
print("hello", name)
my_func(input("이름을 입력하세요 : ")) | 19 | 0 | 23 |
372237291a19b6eeab6498fa1af01592ea37842b | 325 | py | Python | datatable/forms.py | polifa/csv_merge_and_reader | 4c6f95505ede6df3f19a7a6648dc68b77eb1d945 | [
"BSD-3-Clause"
] | null | null | null | datatable/forms.py | polifa/csv_merge_and_reader | 4c6f95505ede6df3f19a7a6648dc68b77eb1d945 | [
"BSD-3-Clause"
] | 5 | 2020-06-13T09:53:51.000Z | 2021-09-22T19:04:58.000Z | datatable/forms.py | polifa/csv_merge_and_reader | 4c6f95505ede6df3f19a7a6648dc68b77eb1d945 | [
"BSD-3-Clause"
] | 1 | 2020-05-26T20:58:33.000Z | 2020-05-26T20:58:33.000Z | from django import forms
from .models import Procurement
| 25 | 62 | 0.667692 | from django import forms
from .models import Procurement
class ProcurementForm(forms.ModelForm):
class Meta:
model = Procurement
fields = ['project']
def __init__(self, *args, **kwargs):
super(ProcurementForm, self).__init__(*args, **kwargs)
self.fields['project'].required = F... | 126 | 119 | 23 |
1ee928f69310d2d25524fd5ca0fbe92f9867e624 | 1,876 | py | Python | vulnerabilities/tests/test_debian.py | ziadhany/vulnerablecode | c94ed5701a70bc836a66484f6d54aacc81c4288f | [
"Apache-2.0"
] | null | null | null | vulnerabilities/tests/test_debian.py | ziadhany/vulnerablecode | c94ed5701a70bc836a66484f6d54aacc81c4288f | [
"Apache-2.0"
] | null | null | null | vulnerabilities/tests/test_debian.py | ziadhany/vulnerablecode | c94ed5701a70bc836a66484f6d54aacc81c4288f | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) nexB Inc. and others. All rights reserved.
# VulnerableCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/vulnerablecode for support or download.
# See https://aboutcode.org for mor... | 40.782609 | 80 | 0.764392 | #
# Copyright (c) nexB Inc. and others. All rights reserved.
# VulnerableCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/vulnerablecode for support or download.
# See https://aboutcode.org for mor... | 934 | 0 | 44 |
e29b9aab4105fbe1f2c1f91e623886072ccc6154 | 1,121 | py | Python | src/OCR-Mike/pyimagesearch/montaje.py | EquipoIA/image-recon | f53cef4073b49fc20be44d2555eb2e88c5154b2e | [
"MIT"
] | null | null | null | src/OCR-Mike/pyimagesearch/montaje.py | EquipoIA/image-recon | f53cef4073b49fc20be44d2555eb2e88c5154b2e | [
"MIT"
] | null | null | null | src/OCR-Mike/pyimagesearch/montaje.py | EquipoIA/image-recon | f53cef4073b49fc20be44d2555eb2e88c5154b2e | [
"MIT"
] | null | null | null | from tensorflow.keras.models import load_model
import numpy as np
import cv2
model = load_model('handwriting.model')
#imprimir una imagen con muestra
images = []
# seleccionar muestras aleatorias de los datos
for i in np.random.choice(np.arange(0, len(testY)), size=(64,)):
# hacer las predicciones
probs = model.pre... | 29.5 | 68 | 0.720785 | from tensorflow.keras.models import load_model
import numpy as np
import cv2
model = load_model('handwriting.model')
#imprimir una imagen con muestra
images = []
# seleccionar muestras aleatorias de los datos
for i in np.random.choice(np.arange(0, len(testY)), size=(64,)):
# hacer las predicciones
probs = model.pre... | 0 | 0 | 0 |
2b9a84747049cf7e632cbca8dcdc0e46f493b2c3 | 146 | py | Python | hitcount/apps.py | LinuxOSsk/Shakal-NG | c4091c7972cffd86f64aa9f9a058d2907a56e5eb | [
"MIT"
] | 10 | 2016-02-06T15:40:30.000Z | 2018-09-27T15:15:13.000Z | hitcount/apps.py | LinuxOSsk/Shakal-NG | c4091c7972cffd86f64aa9f9a058d2907a56e5eb | [
"MIT"
] | 94 | 2016-02-04T18:39:36.000Z | 2022-01-20T05:25:00.000Z | hitcount/apps.py | LinuxOSsk/Shakal-NG | c4091c7972cffd86f64aa9f9a058d2907a56e5eb | [
"MIT"
] | 8 | 2016-05-10T20:29:53.000Z | 2021-02-07T00:50:31.000Z | # -*- coding: utf-8 -*-
from django.apps import AppConfig
| 18.25 | 33 | 0.719178 | # -*- coding: utf-8 -*-
from django.apps import AppConfig
class HitcountConfig(AppConfig):
name = 'hitcount'
verbose_name = 'Počty zobrazení'
| 0 | 66 | 23 |
8f28215522084e13c809b25e51ca43dd0fa2dff0 | 2,431 | py | Python | accounts/accounts/config.py | SamanthaFeidFischer/arxiv-auth | 08df4e0196a04a06eac1d26477b3ad56ebf56f08 | [
"MIT"
] | 1 | 2018-12-11T05:02:22.000Z | 2018-12-11T05:02:22.000Z | accounts/accounts/config.py | SamanthaFeidFischer/arxiv-auth | 08df4e0196a04a06eac1d26477b3ad56ebf56f08 | [
"MIT"
] | 14 | 2019-06-20T13:36:13.000Z | 2021-06-25T15:19:59.000Z | accounts/accounts/config.py | SamanthaFeidFischer/arxiv-auth | 08df4e0196a04a06eac1d26477b3ad56ebf56f08 | [
"MIT"
] | null | null | null | """Flask configuration."""
import os
VERSION = '0.2'
SECRET_KEY = os.environ.get('SECRET_KEY', 'asdf1234')
SERVER_NAME = os.environ.get('ACCOUNTS_SERVER_NAME')
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', 'nope')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', 'nope')
AWS_REGION = os.envi... | 32.851351 | 89 | 0.749486 | """Flask configuration."""
import os
VERSION = '0.2'
SECRET_KEY = os.environ.get('SECRET_KEY', 'asdf1234')
SERVER_NAME = os.environ.get('ACCOUNTS_SERVER_NAME')
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', 'nope')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', 'nope')
AWS_REGION = os.envi... | 0 | 0 | 0 |
276504bff429f2abac16714640bce809be05f380 | 2,437 | py | Python | transcriptor/job.py | kjaymiller/transcriptor | fc2a4cbf82dce4bb79f828f8f2ed3599861971ee | [
"MIT"
] | 13 | 2019-02-28T00:36:38.000Z | 2020-12-13T02:40:54.000Z | transcriptor/job.py | kjaymiller/transcriptor | fc2a4cbf82dce4bb79f828f8f2ed3599861971ee | [
"MIT"
] | 10 | 2020-08-04T03:23:27.000Z | 2020-10-09T18:10:25.000Z | transcriptor/job.py | kjaymiller/transcriptor | fc2a4cbf82dce4bb79f828f8f2ed3599861971ee | [
"MIT"
] | 2 | 2020-05-09T04:56:50.000Z | 2020-09-18T22:16:50.000Z | from .alternatives import Alternative
from .tools import (
str_to_timedelta,
timedelta_from_str,
)
from .helpers import text_in_range
from .speakers import Speaker
from .markers import Marker
from .segments import Segment
from .speakers import Speaker
from pathlib import Path
from datetime import timedelta
imp... | 27.077778 | 148 | 0.597046 | from .alternatives import Alternative
from .tools import (
str_to_timedelta,
timedelta_from_str,
)
from .helpers import text_in_range
from .speakers import Speaker
from .markers import Marker
from .segments import Segment
from .speakers import Speaker
from pathlib import Path
from datetime import timedelta
imp... | 931 | 0 | 54 |
be3b0dfd1b11e7c0e9108f89bb01a309474f1e0c | 429 | py | Python | scudcloud/downloader.py | p-mongo/scudcloud | 2a9321e97f4cc3a35dda041edce59003c641768b | [
"MIT"
] | 1,480 | 2015-02-12T22:26:42.000Z | 2022-01-24T16:41:21.000Z | scudcloud/downloader.py | p-mongo/scudcloud | 2a9321e97f4cc3a35dda041edce59003c641768b | [
"MIT"
] | 506 | 2015-02-10T23:31:04.000Z | 2018-10-29T11:39:49.000Z | scudcloud/downloader.py | p-mongo/scudcloud | 2a9321e97f4cc3a35dda041edce59003c641768b | [
"MIT"
] | 156 | 2015-03-06T14:38:31.000Z | 2022-03-10T09:19:48.000Z | from urllib import request
from PyQt5.QtCore import QThread | 23.833333 | 74 | 0.608392 | from urllib import request
from PyQt5.QtCore import QThread
class Downloader(QThread):
def __init__(self, wrapper, icon, path):
QThread.__init__(self)
self.wrapper = wrapper
self.icon = icon
self.path = path
def run(self):
try:
file_name, headers = request... | 287 | 5 | 77 |
04c5bff6fcdd71fc56c4afa22a50e782eb405b01 | 2,399 | py | Python | io/swig/io/run.py | ljktest/siconos | 85b60e62beca46e6bf06bfbd65670089e86607c7 | [
"Apache-2.0"
] | 137 | 2015-06-16T15:55:28.000Z | 2022-03-26T06:01:59.000Z | io/swig/io/run.py | ljktest/siconos | 85b60e62beca46e6bf06bfbd65670089e86607c7 | [
"Apache-2.0"
] | 381 | 2015-09-22T15:31:08.000Z | 2022-02-14T09:05:23.000Z | io/swig/io/run.py | ljktest/siconos | 85b60e62beca46e6bf06bfbd65670089e86607c7 | [
"Apache-2.0"
] | 30 | 2015-08-06T22:57:51.000Z | 2022-03-02T20:30:20.000Z | #!/usr/bin/env @PYTHON_EXECUTABLE@
"""
Description: Run a pre-generated Siconos mechanics-IO HDF5 simulation file.
"""
# Lighter imports before command line parsing
from __future__ import print_function
import argparse
parser = argparse.ArgumentParser(
description = __doc__,
epilog = """This script only provi... | 43.618182 | 83 | 0.684452 | #!/usr/bin/env @PYTHON_EXECUTABLE@
"""
Description: Run a pre-generated Siconos mechanics-IO HDF5 simulation file.
"""
# Lighter imports before command line parsing
from __future__ import print_function
import argparse
parser = argparse.ArgumentParser(
description = __doc__,
epilog = """This script only provi... | 0 | 0 | 0 |
f4ad454c766f7bf6b052a7e0f5df6862dd752320 | 18,590 | py | Python | Final_Project/model.py | hansenbeast/2019-SYSU-DM | 39250fe21681ea445d38d521679fb4b9d6b0d345 | [
"MIT"
] | 2 | 2021-06-21T02:54:49.000Z | 2021-07-15T07:26:41.000Z | Final_Project/model.py | hansenbeast/2019-SYSU-DM | 39250fe21681ea445d38d521679fb4b9d6b0d345 | [
"MIT"
] | null | null | null | Final_Project/model.py | hansenbeast/2019-SYSU-DM | 39250fe21681ea445d38d521679fb4b9d6b0d345 | [
"MIT"
] | 1 | 2019-06-04T06:20:59.000Z | 2019-06-04T06:20:59.000Z | # Original Version: Taehoon Kim (http://carpedm20.github.io)
# + Source: https://github.com/carpedm20/DCGAN-tensorflow/blob/e30539fb5e20d5a0fed40935853da97e9e55eee8/model.py
# + License: MIT
from __future__ import division
import os
import time
from glob import glob
import tensorflow as tf
import pickle
from six.m... | 40.857143 | 121 | 0.557181 | # Original Version: Taehoon Kim (http://carpedm20.github.io)
# + Source: https://github.com/carpedm20/DCGAN-tensorflow/blob/e30539fb5e20d5a0fed40935853da97e9e55eee8/model.py
# + License: MIT
from __future__ import division
import os
import time
from glob import glob
import tensorflow as tf
import pickle
from six.m... | 15,994 | 2,163 | 23 |
07c741e4ee7583cf8bb4947c9a88d2da52327f36 | 2,392 | py | Python | src/grover.py | Amorteza1376/quantum-computing-search-algorithms | cffaa568cbebe31cf62eff0e3b71c097803a81f5 | [
"Apache-2.0"
] | 1 | 2022-02-28T00:06:31.000Z | 2022-02-28T00:06:31.000Z | src/grover.py | AMorteza/Quantum-Computing-Search-Algorithms | cffaa568cbebe31cf62eff0e3b71c097803a81f5 | [
"Apache-2.0"
] | null | null | null | src/grover.py | AMorteza/Quantum-Computing-Search-Algorithms | cffaa568cbebe31cf62eff0e3b71c097803a81f5 | [
"Apache-2.0"
] | null | null | null | import sys
import warnings
if not sys.warnoptions:
warnings.simplefilter("ignore")
import math
from absl import app
import numpy as np
import lib.helper as helper
import lib.ops as ops
import lib.state as state
def make_f(d: int = 3, r: int = 1):
"""Construct function that will return 1 for 'solutions' bits."""... | 28.47619 | 79 | 0.636706 | import sys
import warnings
if not sys.warnoptions:
warnings.simplefilter("ignore")
import math
from absl import app
import numpy as np
import lib.helper as helper
import lib.ops as ops
import lib.state as state
def make_f(d: int = 3, r: int = 1):
"""Construct function that will return 1 for 'solutions' bits."""... | 224 | 0 | 49 |
27c8defb8dc0920a73ae88e6dde482aa42bf098a | 147 | py | Python | NA_Project/NA_WebApp/apps.py | BounSweFerhatSal/swe573 | bd7e18f41a54c842db73176cf13c8e227b539be0 | [
"MIT"
] | 1 | 2020-06-23T12:14:50.000Z | 2020-06-23T12:14:50.000Z | NA_Project/NA_WebApp/apps.py | BounSweFerhatSal/NutrAssistant | bd7e18f41a54c842db73176cf13c8e227b539be0 | [
"MIT"
] | 36 | 2020-05-03T15:45:59.000Z | 2021-09-22T19:06:53.000Z | NA_Project/NA_WebApp/apps.py | BounSweFerhatSal/swe573 | bd7e18f41a54c842db73176cf13c8e227b539be0 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 16.333333 | 33 | 0.707483 | from django.apps import AppConfig
class NaWebappConfig(AppConfig):
name = 'NA_WebApp'
def ready(self):
import NA_WebApp.signals
| 28 | 61 | 23 |
e5ce4702df7e69c0e66d62077f16278bad6f765b | 1,062 | py | Python | mundo2/ex070.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | mundo2/ex070.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | mundo2/ex070.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | '''Crie um programa que leia o nome e o preco de varios produtos. O programa devera perguntar se o usuario vai continuar.
No final mostre:
a) Qual é o total gasto na compra
b) Quantos produtos custam mais de R$1000.
c) Qual é o nome do produto mais barato. '''
sair = 'N'
compras = 0
prdcaro = 0
nomepr... | 30.342857 | 121 | 0.606403 | '''Crie um programa que leia o nome e o preco de varios produtos. O programa devera perguntar se o usuario vai continuar.
No final mostre:
a) Qual é o total gasto na compra
b) Quantos produtos custam mais de R$1000.
c) Qual é o nome do produto mais barato. '''
sair = 'N'
compras = 0
prdcaro = 0
nomepr... | 0 | 0 | 0 |
9c51c1ac7ebb3cce0139dcd86ecdc00b1bfeba0a | 138 | py | Python | volume/app-django/apps/portfolio/urls.py | chriswmann/chriswmann.me | 55c0dac72c63b1c22c27123be8c60c93b27628eb | [
"MIT"
] | null | null | null | volume/app-django/apps/portfolio/urls.py | chriswmann/chriswmann.me | 55c0dac72c63b1c22c27123be8c60c93b27628eb | [
"MIT"
] | null | null | null | volume/app-django/apps/portfolio/urls.py | chriswmann/chriswmann.me | 55c0dac72c63b1c22c27123be8c60c93b27628eb | [
"MIT"
] | null | null | null | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'', views.HomeView.as_view(), name='home'),
]
| 17.25 | 56 | 0.615942 | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'', views.HomeView.as_view(), name='home'),
]
| 0 | 0 | 0 |
86cf78f3cc63954dbd9e5e693d8582de1f30f16f | 2,007 | py | Python | commerce/auctions/models.py | rakinplaban/e_commerce_project | 7e15f2231a5c965e87570d7841bb78a380835382 | [
"Apache-2.0"
] | null | null | null | commerce/auctions/models.py | rakinplaban/e_commerce_project | 7e15f2231a5c965e87570d7841bb78a380835382 | [
"Apache-2.0"
] | null | null | null | commerce/auctions/models.py | rakinplaban/e_commerce_project | 7e15f2231a5c965e87570d7841bb78a380835382 | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db import models
from django.db.models.deletion import CASCADE
from django.core.validators import MinValueValidator
from django.core.exceptions import ValidationError
| 36.490909 | 103 | 0.726956 | from django.contrib.auth.models import AbstractUser
from django.db import models
from django.db.models.deletion import CASCADE
from django.core.validators import MinValueValidator
from django.core.exceptions import ValidationError
class User(AbstractUser):
pass
class auction_listing(models.Model):
author = m... | 279 | 1,400 | 92 |
b8883f61b286cf4cf60d36e45c1448f49746e3dd | 6,169 | py | Python | pylitho_post2.py | larskaislaniemi/PyLitho | ad64642b63196448b0d93d0f44ed89fb1ffbefa6 | [
"BSD-3-Clause"
] | null | null | null | pylitho_post2.py | larskaislaniemi/PyLitho | ad64642b63196448b0d93d0f44ed89fb1ffbefa6 | [
"BSD-3-Clause"
] | null | null | null | pylitho_post2.py | larskaislaniemi/PyLitho | ad64642b63196448b0d93d0f44ed89fb1ffbefa6 | [
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
import csv
import pandas as pd
import sys
try:
import cPickle as pickle
except:
import pickle
import matplotlib.pyplot as plt
import progressbar as pb
import interpolate as ip
| 34.853107 | 186 | 0.5278 | import os
import numpy as np
import csv
import pandas as pd
import sys
try:
import cPickle as pickle
except:
import pickle
import matplotlib.pyplot as plt
import progressbar as pb
import interpolate as ip
def readData(path=None, outfilename=None, maxmodels=None, everytstep=1, exclcondition="False"):
DATA... | 5,907 | 0 | 46 |
efd50737439f7e376a3ee4d299357fe33822a578 | 640 | py | Python | 4.py | kwondohun0308/Beakjoon | 65e8c1015bcb3bb757d8056525034ee333ecb681 | [
"MIT"
] | null | null | null | 4.py | kwondohun0308/Beakjoon | 65e8c1015bcb3bb757d8056525034ee333ecb681 | [
"MIT"
] | null | null | null | 4.py | kwondohun0308/Beakjoon | 65e8c1015bcb3bb757d8056525034ee333ecb681 | [
"MIT"
] | null | null | null | try:
f = open("fruit.txt", "r")
a = int(f.readline())
o = int(f.readline())
g = int(f.readline())
f.close()
except:
a,o,g = 0,0,0
while True:
print("현재 재고는 사과",a,"개, 오렌지",o,"개, 포도",g,"개 입니다.")
S,t = input("변동할 재고와 갯수를 입력해주세요(저장하고 나갈때는 q 0 입력) : ").split()
t = int(t)
if S == ... | 21.333333 | 66 | 0.421875 | try:
f = open("fruit.txt", "r")
a = int(f.readline())
o = int(f.readline())
g = int(f.readline())
f.close()
except:
a,o,g = 0,0,0
while True:
print("현재 재고는 사과",a,"개, 오렌지",o,"개, 포도",g,"개 입니다.")
S,t = input("변동할 재고와 갯수를 입력해주세요(저장하고 나갈때는 q 0 입력) : ").split()
t = int(t)
if S == ... | 0 | 0 | 0 |
bc31ee97f9847865fe19612ed1d30ac5f92e43c2 | 1,468 | py | Python | Software/Sandbox/Integracion numérica/tuneo_parametros/int_prueba_max_step.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Sandbox/Integracion numérica/tuneo_parametros/int_prueba_max_step.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Sandbox/Integracion numérica/tuneo_parametros/int_prueba_max_step.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | """
Created on Sun Feb 2 13:28:48 2020
@author: matias
"""
import numpy as np
from matplotlib import pyplot as plt
from scipy.interpolate import interp1d
from scipy.constants import c as c_luz #metros/segundos
c_luz_norm = c_luz/1000
import sys
import os
from os.path import join as osjoin
from pc_path import defini... | 21.275362 | 72 | 0.684605 | """
Created on Sun Feb 2 13:28:48 2020
@author: matias
"""
import numpy as np
from matplotlib import pyplot as plt
from scipy.interpolate import interp1d
from scipy.constants import c as c_luz #metros/segundos
c_luz_norm = c_luz/1000
import sys
import os
from os.path import join as osjoin
from pc_path import defini... | 0 | 0 | 0 |
eb44d15ad19bfd0177557fa07f008e8d3ca115ed | 7,152 | py | Python | Diccionario.py | JSNavas/Dicionario-Python | 618d8c45229dc297d67f1f826f093dfc720c50a0 | [
"MIT"
] | null | null | null | Diccionario.py | JSNavas/Dicionario-Python | 618d8c45229dc297d67f1f826f093dfc720c50a0 | [
"MIT"
] | null | null | null | Diccionario.py | JSNavas/Dicionario-Python | 618d8c45229dc297d67f1f826f093dfc720c50a0 | [
"MIT"
] | null | null | null | import os
diccionario = []
crearArchivo()
cargarArchivo()
menu = True
while menu == True:
os.system("clear")
print "\t\t\t [DICCIONARIO]"
print "\t\t\t -------------\n"
print " 1. AGREGAR AL DICCIONARIO"
print " 2. MOSTRAR DICCIONARIO"
print " 3. BUSCAR EN EL DICCIO... | 25.726619 | 100 | 0.460011 | import os
diccionario = []
def crearArchivo():
archivo = open("Terminos.txt", "a")
archivo.close()
def cargarArchivo():
archivo = open("Terminos.txt", "r")
linea = archivo.readline()
if linea:
while linea:
if linea[-1] == '\n':
linea = linea[:-1]
... | 3,842 | 0 | 161 |
07c5ddc75388af17272a38766c84f4aeac4a9831 | 2,308 | py | Python | tests/test_sync.py | ehdgua01/blocksync | da0198dde87d284ea3c9472c10f51028e05014a0 | [
"MIT"
] | 5 | 2020-06-03T09:30:15.000Z | 2021-12-14T23:48:47.000Z | tests/test_sync.py | ehdgua01/blocksync | da0198dde87d284ea3c9472c10f51028e05014a0 | [
"MIT"
] | 2 | 2021-03-19T07:37:57.000Z | 2021-06-18T11:54:46.000Z | tests/test_sync.py | ehdgua01/blocksync | da0198dde87d284ea3c9472c10f51028e05014a0 | [
"MIT"
] | null | null | null | from unittest.mock import Mock
import paramiko
from blocksync.sync import (
_connect_ssh,
_do_create,
_get_block_size,
_get_blocks,
_get_range,
_get_remotedev_size,
_get_size,
_log,
)
| 27.807229 | 95 | 0.709272 | from unittest.mock import Mock
import paramiko
from blocksync.sync import (
_connect_ssh,
_do_create,
_get_block_size,
_get_blocks,
_get_range,
_get_remotedev_size,
_get_size,
_log,
)
def test_get_block_size():
assert _get_block_size(1) == 1
assert _get_block_size("1B") == 1
... | 1,898 | 0 | 184 |
2072751443062854040f695cd23e0d625db6c2eb | 3,349 | py | Python | surf_dist.py | ibesora/SurfaceDistanceCalculator | 840d0b27f879aa3ba6bd4ec8066df0aa524406b5 | [
"MIT"
] | 1 | 2021-03-15T10:12:18.000Z | 2021-03-15T10:12:18.000Z | surf_dist.py | ibesora/SurfaceDistanceCalculator | 840d0b27f879aa3ba6bd4ec8066df0aa524406b5 | [
"MIT"
] | null | null | null | surf_dist.py | ibesora/SurfaceDistanceCalculator | 840d0b27f879aa3ba6bd4ec8066df0aa524406b5 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
import numpy as np
from calculator import computeSurfaceDistance
DefaultPreFilePath = 'data/pre.data'
DefaultPostFilePath = 'data/post.data'
MetersPerPixel = 30
MetersPerHeightValue = 11
if __name__ == '__main__':
exit(main())
| 49.25 | 120 | 0.709167 | from argparse import ArgumentParser
import numpy as np
from calculator import computeSurfaceDistance
DefaultPreFilePath = 'data/pre.data'
DefaultPostFilePath = 'data/post.data'
MetersPerPixel = 30
MetersPerHeightValue = 11
def main() -> int:
parser = ArgumentParser('Surface distance calculator')
parser.add_ar... | 3,057 | 0 | 23 |
aa7d2c53faff7de89f0f1925e6ceaf202713feca | 14,540 | py | Python | user_systems/migrations/0001_initial.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 22 | 2015-01-16T01:36:32.000Z | 2020-06-08T00:46:18.000Z | user_systems/migrations/0001_initial.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 8 | 2015-12-28T18:56:19.000Z | 2019-04-01T17:33:48.000Z | user_systems/migrations/0001_initial.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 13 | 2015-01-13T20:56:22.000Z | 2022-02-23T06:01:17.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
| 68.262911 | 172 | 0.600825 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'UserOperatingSystem'
db.create_table('user_systems_useroperatingsystem', (
('id'... | 6,852 | 7,535 | 23 |
549e626f410981991a678bd5437641542844793b | 1,094 | py | Python | Example/feature-3.1.0/tools/bin/mygetsequence.py | MukundhMurthy/NucleicNet | fca09d38b9a70d2c402414df7cc06b9dd2824449 | [
"BSD-3-Clause"
] | 1 | 2021-01-30T18:41:53.000Z | 2021-01-30T18:41:53.000Z | Example/feature-3.1.0/tools/bin/mygetsequence.py | MukundhMurthy/NucleicNet | fca09d38b9a70d2c402414df7cc06b9dd2824449 | [
"BSD-3-Clause"
] | null | null | null | Example/feature-3.1.0/tools/bin/mygetsequence.py | MukundhMurthy/NucleicNet | fca09d38b9a70d2c402414df7cc06b9dd2824449 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
import sys,os
import time
from Bio import Fasta
DEFAULT_DICT_FILE = '/project1/structure/mliang/pdb/derived_data/pdb_seqres.idx'
DEFAULT_OUTFH = sys.stdout
dict_file = DEFAULT_DICT_FILE
outfh = DEFAULT_OUTFH
start_time = time.time()
fdict = Fasta.Dictionary(dict_file)
elapse_time = time.time(... | 25.44186 | 80 | 0.665448 | #! /usr/bin/env python
import sys,os
import time
from Bio import Fasta
DEFAULT_DICT_FILE = '/project1/structure/mliang/pdb/derived_data/pdb_seqres.idx'
DEFAULT_OUTFH = sys.stdout
dict_file = DEFAULT_DICT_FILE
outfh = DEFAULT_OUTFH
start_time = time.time()
fdict = Fasta.Dictionary(dict_file)
elapse_time = time.time(... | 0 | 0 | 0 |
bb4dabbb4ba6dc924b84d9a9d0643a666e34e4a3 | 288 | py | Python | zillowdb/__init__.py | MacHu-GWU/zillowdb-project | 020266257311fa667a3b5fcca15450eb00584aaf | [
"MIT"
] | null | null | null | zillowdb/__init__.py | MacHu-GWU/zillowdb-project | 020266257311fa667a3b5fcca15450eb00584aaf | [
"MIT"
] | null | null | null | zillowdb/__init__.py | MacHu-GWU/zillowdb-project | 020266257311fa667a3b5fcca15450eb00584aaf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
http://www.zillow.com/browse/homes/
Zillow有一个页面按照层级列出了所有房产的具体地址信息:
State -> County -> Zipcode -> Street -> Address
"""
__version__ = "0.0.1"
__author__ = "Sanhe Hu"
__license__ = "MIT"
__short_description__ = "Zillow Database Crawler" | 19.2 | 49 | 0.690972 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
http://www.zillow.com/browse/homes/
Zillow有一个页面按照层级列出了所有房产的具体地址信息:
State -> County -> Zipcode -> Street -> Address
"""
__version__ = "0.0.1"
__author__ = "Sanhe Hu"
__license__ = "MIT"
__short_description__ = "Zillow Database Crawler" | 0 | 0 | 0 |
d9e475f8437f69bff1a079c827e541ff173b19ed | 6,099 | py | Python | SqlMaster/migrations/0001_initial.py | lakesayriver/smartcom | 8e489b00a7c1429066a3051b9a1e53ca95a1bbb2 | [
"Apache-2.0"
] | null | null | null | SqlMaster/migrations/0001_initial.py | lakesayriver/smartcom | 8e489b00a7c1429066a3051b9a1e53ca95a1bbb2 | [
"Apache-2.0"
] | null | null | null | SqlMaster/migrations/0001_initial.py | lakesayriver/smartcom | 8e489b00a7c1429066a3051b9a1e53ca95a1bbb2 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2 on 2019-04-27 16:33
from django.db import migrations, models
import django.db.models.deletion
| 57.537736 | 168 | 0.603378 | # Generated by Django 2.2 on 2019-04-27 16:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Domain',
fields=[
... | 0 | 6,206 | 23 |
541de982602d6f7fa4f1d4748d86c549c85b7b73 | 60,894 | py | Python | tencentcloud/monitor/v20180724/monitor_client.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/monitor/v20180724/monitor_client.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/monitor/v20180724/monitor_client.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 42.112033 | 150 | 0.600404 | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 0 | 62,248 | 23 |
68c69de9d67320a2c62f8d5e26e5eeb254839f08 | 20,288 | py | Python | third_party/spider/baselines/seq2seq_attention_copy/seq2seq/models/attention_copying_seq2seq.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 69 | 2021-04-14T06:35:07.000Z | 2022-03-31T18:35:05.000Z | third_party/spider/baselines/seq2seq_attention_copy/seq2seq/models/attention_copying_seq2seq.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 19 | 2018-12-17T20:42:11.000Z | 2020-02-12T21:29:51.000Z | third_party/spider/baselines/seq2seq_attention_copy/seq2seq/models/attention_copying_seq2seq.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 22 | 2019-03-16T05:57:27.000Z | 2020-10-25T04:34:54.000Z | """
Sequence to Sequence models with attention-based copying of input
and/or schema.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from pydoc import locate
import tensorflow as tf
from tensorflow.python.ops imp... | 44.984479 | 82 | 0.651814 | """
Sequence to Sequence models with attention-based copying of input
and/or schema.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from pydoc import locate
import tensorflow as tf
from tensorflow.python.ops imp... | 11,213 | 0 | 404 |
0690f55fffb08b76515b5a14a83f7ce26cea7581 | 2,088 | py | Python | proma/config/models.py | erickgnavar/Proma | 159051f4247700166f063075b3819ae426f6d337 | [
"MIT"
] | 3 | 2018-01-22T08:50:38.000Z | 2021-07-16T04:08:28.000Z | proma/config/models.py | erickgnavar/Proma | 159051f4247700166f063075b3819ae426f6d337 | [
"MIT"
] | 13 | 2019-05-27T03:08:29.000Z | 2020-01-03T03:36:04.000Z | proma/config/models.py | erickgnavar/Proma | 159051f4247700166f063075b3819ae426f6d337 | [
"MIT"
] | 1 | 2019-10-03T17:52:29.000Z | 2019-10-03T17:52:29.000Z | import os
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils.models import TimeStampedModel
| 33.142857 | 88 | 0.656609 | import os
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils.models import TimeStampedModel
class Configuration(TimeStampedModel):
company_logo = models.ImageField(
_("Logo"),
upload_to="config/configuration/",
... | 450 | 1,437 | 23 |
8c99b2792282d5548ada76c9f6db887524af2b66 | 485 | py | Python | post/migrations/0003_post_parent.py | sh3b/social_app | 64aadd05570373ea75834b53b0b4abd2b16c8451 | [
"MIT"
] | null | null | null | post/migrations/0003_post_parent.py | sh3b/social_app | 64aadd05570373ea75834b53b0b4abd2b16c8451 | [
"MIT"
] | 4 | 2021-06-04T23:11:02.000Z | 2022-02-10T11:23:57.000Z | post/migrations/0003_post_parent.py | shuayb/social_app | 64aadd05570373ea75834b53b0b4abd2b16c8451 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-12-04 20:58
from django.db import migrations, models
import django.db.models.deletion
| 24.25 | 121 | 0.637113 | # Generated by Django 2.2.7 on 2019-12-04 20:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('post', '0002_remove_comment_liked'),
]
operations = [
migrations.AddField(
model_name='post',
... | 0 | 338 | 23 |
b3beb3f3fbcde569409595a1a7e2ad617fffe935 | 116,631 | py | Python | parser/team19/BDTytus/Gramatica/parsetab.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/team19/BDTytus/Gramatica/parsetab.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/team19/BDTytus/Gramatica/parsetab.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftpuntobipuntoleftcomarightigualleftcor1cor2leftmasmenosleftasteriscodivporcentajeleftpotrightumenosumasleftpar1par2leftt_orleftt_andleftdiferenteleftmayormenormayori... | 436.820225 | 82,344 | 0.683026 |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftpuntobipuntoleftcomarightigualleftcor1cor2leftmasmenosleftasteriscodivporcentajeleftpotrightumenosumasleftpar1par2leftt_orleftt_andleftdiferenteleftmayormenormayori... | 0 | 0 | 0 |
ac543ad81a323fd9a356d04eb02c2797929c1582 | 16,322 | py | Python | pyno/window.py | cgarjun/Pyno | fa2a5d57fb926564f5acc0e6c7310de255bab531 | [
"MIT"
] | 163 | 2015-12-29T02:28:04.000Z | 2022-02-02T02:18:28.000Z | pyno/window.py | cgarjun/Pyno | fa2a5d57fb926564f5acc0e6c7310de255bab531 | [
"MIT"
] | 42 | 2017-12-19T15:31:54.000Z | 2019-09-21T20:14:06.000Z | pyno/window.py | cgarjun/Pyno | fa2a5d57fb926564f5acc0e6c7310de255bab531 | [
"MIT"
] | 34 | 2017-09-23T09:08:56.000Z | 2021-09-16T23:49:24.000Z | import pkg_resources
import pyglet
import pyperclip
from pyglet.window import Window
from pyglet import gl
from . import draw, initialCode, menu
from .process import Process
from .node import Node
from .field import Field
from .sub import Sub
from .codeEditor import CodeEditor
from .element import color_inverse
from .... | 36.927602 | 97 | 0.493138 | import pkg_resources
import pyglet
import pyperclip
from pyglet.window import Window
from pyglet import gl
from . import draw, initialCode, menu
from .process import Process
from .node import Node
from .field import Field
from .sub import Sub
from .codeEditor import CodeEditor
from .element import color_inverse
from .... | 15,329 | 0 | 513 |
19fbdd2e1c1c42236f2864987e90cd49e299e014 | 1,237 | py | Python | example/dzh.py | tigersean/datafeed | 65853faeff8a8632d2431bea68214637bdfa27f2 | [
"Apache-2.0"
] | 75 | 2015-01-28T23:41:08.000Z | 2021-09-15T08:50:34.000Z | example/dzh.py | tigersean/datafeed | 65853faeff8a8632d2431bea68214637bdfa27f2 | [
"Apache-2.0"
] | 6 | 2015-05-26T02:46:23.000Z | 2020-05-27T13:36:19.000Z | example/dzh.py | tigersean/datafeed | 65853faeff8a8632d2431bea68214637bdfa27f2 | [
"Apache-2.0"
] | 48 | 2015-01-20T13:17:00.000Z | 2020-12-23T14:45:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 yinhm
import datetime
import os
import sys
import numpy as np
ROOT_PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '..')
sys.path[0:0] = [ROOT_PATH]
from cStringIO import StringIO
from datafeed.client import Client
from datafeed.datast... | 25.770833 | 75 | 0.692805 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 yinhm
import datetime
import os
import sys
import numpy as np
ROOT_PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '..')
sys.path[0:0] = [ROOT_PATH]
from cStringIO import StringIO
from datafeed.client import Client
from datafeed.datast... | 0 | 0 | 0 |
9abda5b7de992c6873a8fa538594962ec89940d3 | 345 | py | Python | jd/api/rest/YsdkMemberApplyJsfServiceQueryMemberStatusRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 5 | 2019-10-30T01:16:30.000Z | 2020-06-14T03:32:19.000Z | jd/api/rest/YsdkMemberApplyJsfServiceQueryMemberStatusRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 2 | 2020-10-12T07:12:48.000Z | 2021-06-02T03:15:47.000Z | jd/api/rest/YsdkMemberApplyJsfServiceQueryMemberStatusRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 3 | 2019-12-06T17:33:49.000Z | 2021-03-01T13:24:22.000Z | from jd.api.base import RestApi
| 20.294118 | 65 | 0.773913 | from jd.api.base import RestApi
class YsdkMemberApplyJsfServiceQueryMemberStatusRequest(RestApi):
def __init__(self,domain='gw.api.360buy.com',port=80):
RestApi.__init__(self,domain, port)
self.requestId = None
self.platformCode = None
def getapiname(self):
return 'jingdong.ysdk.MemberApplyJsfService.... | 191 | 44 | 72 |
46850c528900e712d9afd934788051d1684b206b | 634 | py | Python | src/qikfiller/schemas/lists/types.py | joshainglis/qikfiller | ae9ceb083db77e51b26a3f9e813683652bb18ab0 | [
"MIT"
] | null | null | null | src/qikfiller/schemas/lists/types.py | joshainglis/qikfiller | ae9ceb083db77e51b26a3f9e813683652bb18ab0 | [
"MIT"
] | null | null | null | src/qikfiller/schemas/lists/types.py | joshainglis/qikfiller | ae9ceb083db77e51b26a3f9e813683652bb18ab0 | [
"MIT"
] | null | null | null | from marshmallow import fields
from qikfiller.schemas.lists import (
BaseCollectionObject, BaseCollectionSchema, BaseSchema, register_class,
)
@register_class
| 22.642857 | 75 | 0.742902 | from marshmallow import fields
from qikfiller.schemas.lists import (
BaseCollectionObject, BaseCollectionSchema, BaseSchema, register_class,
)
class TypeSchema(BaseSchema):
LOAD_INTO = 'Type'
id = fields.Integer(required=True)
name = fields.String(required=True)
colour = fields.String(required=T... | 0 | 398 | 68 |
0b0303ec2bd67d558ec434a2c0b393d753caf994 | 1,714 | py | Python | incomewealth/app/tests/test_serializers.py | baranbartu/income-wealth-dj | 95ef806796b90e0f2034ca562a7ac2cb12f32a2b | [
"MIT"
] | 4 | 2017-10-26T06:45:48.000Z | 2017-10-26T10:57:03.000Z | incomewealth/app/tests/test_serializers.py | baranbartu/income-wealth-dj | 95ef806796b90e0f2034ca562a7ac2cb12f32a2b | [
"MIT"
] | null | null | null | incomewealth/app/tests/test_serializers.py | baranbartu/income-wealth-dj | 95ef806796b90e0f2034ca562a7ac2cb12f32a2b | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.core.exceptions import ValidationError
from incomewealth.app.serializers import (serialize_get_request,
serialize_saving_capacity_request)
| 38.954545 | 79 | 0.673862 | from django.test import TestCase
from django.core.exceptions import ValidationError
from incomewealth.app.serializers import (serialize_get_request,
serialize_saving_capacity_request)
class SerializerTest(TestCase):
def setUp(self):
self.correct_request = {'init... | 1,372 | 10 | 104 |
72321c81122ee738a2705d6e60dc83a15bda2c2c | 4,296 | py | Python | tests/unit/test_parse_stack.py | Matykocska/tracerface | d4e0de1518aa554c6e909a398baba7c2d2ed19fd | [
"Apache-2.0"
] | 1 | 2020-01-29T20:43:42.000Z | 2020-01-29T20:43:42.000Z | tests/unit/test_parse_stack.py | Matykocska/tracerface | d4e0de1518aa554c6e909a398baba7c2d2ed19fd | [
"Apache-2.0"
] | 3 | 2020-01-30T18:49:42.000Z | 2020-04-23T17:33:41.000Z | tests/unit/test_parse_stack.py | m-sch/tracerface | cc6f63b5c0a2816fb1ad37b4310b7db7c1fae288 | [
"Apache-2.0"
] | 1 | 2021-02-12T21:48:51.000Z | 2021-02-12T21:48:51.000Z | #!/usr/bin/env python3
from unittest import main, TestCase
from tracerface.parse_stack import parse_stack
if __name__ == '__main__':
main()
| 36.40678 | 94 | 0.542132 | #!/usr/bin/env python3
from unittest import main, TestCase
from tracerface.parse_stack import parse_stack
class TestParseStack(TestCase):
def test_parse_stack_returns_empty_graph_for_empty_stack(self):
result = parse_stack([])
self.assertDictEqual(result.nodes, {})
self.assertDictEqual(r... | 3,927 | 10 | 211 |
7232f53ddc98ac677e5e01a5228a39bae9bad1e3 | 310 | py | Python | onmt/__init__.py | demiguo/OpenNMT-py | 7516bdd82db3880e03dcc91ce094fb240f23f6c8 | [
"MIT"
] | 1 | 2018-03-28T20:51:39.000Z | 2018-03-28T20:51:39.000Z | onmt/__init__.py | demiguo/OpenNMT-py | 7516bdd82db3880e03dcc91ce094fb240f23f6c8 | [
"MIT"
] | null | null | null | onmt/__init__.py | demiguo/OpenNMT-py | 7516bdd82db3880e03dcc91ce094fb240f23f6c8 | [
"MIT"
] | null | null | null | import onmt.io
import onmt.translate
import onmt.Models
import onmt.ViModels
import onmt.Loss
from onmt.Trainer import Trainer, Statistics
from onmt.Optim import Optim
# For flake8 compatibility
__all__ = [onmt.Loss, onmt.Models, onmt.ViModels,
Trainer, Optim, Statistics, onmt.io, onmt.translate]
| 25.833333 | 63 | 0.777419 | import onmt.io
import onmt.translate
import onmt.Models
import onmt.ViModels
import onmt.Loss
from onmt.Trainer import Trainer, Statistics
from onmt.Optim import Optim
# For flake8 compatibility
__all__ = [onmt.Loss, onmt.Models, onmt.ViModels,
Trainer, Optim, Statistics, onmt.io, onmt.translate]
| 0 | 0 | 0 |
9b687d1d6e4e3cd72c771e4dd015890339954230 | 437 | py | Python | botticelli/trigger.py | indifferentalex/botticelli | 10895695649996899bb0ab31c2b9dca069e35dbf | [
"MIT"
] | 1 | 2018-06-10T16:34:44.000Z | 2018-06-10T16:34:44.000Z | botticelli/trigger.py | indifferentalex/botticelli | 10895695649996899bb0ab31c2b9dca069e35dbf | [
"MIT"
] | null | null | null | botticelli/trigger.py | indifferentalex/botticelli | 10895695649996899bb0ab31c2b9dca069e35dbf | [
"MIT"
] | null | null | null | class Trigger:
"""
A trigger is simply a scene/action pair that can be passed in to actions
(along with other triggers if required).
Attributes:
scene (botticelli.Scene): A scene that will trigger the accompanying
action.
action (botticelli.Action): An action that will be performed if the
accom... | 31.214286 | 74 | 0.71167 | class Trigger:
"""
A trigger is simply a scene/action pair that can be passed in to actions
(along with other triggers if required).
Attributes:
scene (botticelli.Scene): A scene that will trigger the accompanying
action.
action (botticelli.Action): An action that will be performed if the
accom... | 61 | 0 | 24 |
5624f3c0b3622285a79e81c45560b1e929823a40 | 626 | py | Python | scripts/set-executable.py | JeremyTsaii/HyperPlannerCourses | a77a84abcd5ceef7f065e2b6bb144c73a39417bc | [
"MIT"
] | 1 | 2020-12-09T03:50:58.000Z | 2020-12-09T03:50:58.000Z | scripts/set-executable.py | JeremyTsaii/HyperPlannerCourses | a77a84abcd5ceef7f065e2b6bb144c73a39417bc | [
"MIT"
] | null | null | null | scripts/set-executable.py | JeremyTsaii/HyperPlannerCourses | a77a84abcd5ceef7f065e2b6bb144c73a39417bc | [
"MIT"
] | null | null | null | # https://stackoverflow.com/questions/57964626/permissions-denied-when-trying-to-invoke-go-aws-lambda-function
import zipfile
import time
| 32.947368 | 111 | 0.730032 | # https://stackoverflow.com/questions/57964626/permissions-denied-when-trying-to-invoke-go-aws-lambda-function
import zipfile
import time
def make_info(filename):
info = zipfile.ZipInfo(filename)
info.date_time = time.localtime()
info.external_attr = 0x81ed0000
info.create_system = 3
retur... | 437 | 0 | 49 |
db797987eb77ca9bfb44325b1ccfa93f10640c7b | 160 | py | Python | backend/api/managers/user_profile.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 3 | 2020-03-25T03:06:20.000Z | 2021-01-20T23:36:03.000Z | backend/api/managers/user_profile.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 740 | 2019-12-16T15:53:39.000Z | 2022-03-26T08:25:10.000Z | backend/api/managers/user_profile.py | kuanfan99/zeva | 57b506a108fe57438506569d5503c90c52216b2f | [
"Apache-2.0"
] | 11 | 2019-11-28T20:39:15.000Z | 2022-01-31T17:53:31.000Z | from django.db import models
| 22.857143 | 43 | 0.7625 | from django.db import models
class UserProfileManager(models.Manager):
def get_by_natural_key(self, username):
return self.get(username=username)
| 61 | 20 | 49 |
0780df72f6086fe5ae8bfdfa3a2e0b0826a3415b | 5,467 | py | Python | scripts/prepare_phenotype_table.py | davidaknowles/leafcutter_conda | 0da89c167d75077f46635add5613e6bdf3992473 | [
"Apache-2.0"
] | null | null | null | scripts/prepare_phenotype_table.py | davidaknowles/leafcutter_conda | 0da89c167d75077f46635add5613e6bdf3992473 | [
"Apache-2.0"
] | null | null | null | scripts/prepare_phenotype_table.py | davidaknowles/leafcutter_conda | 0da89c167d75077f46635add5613e6bdf3992473 | [
"Apache-2.0"
] | null | null | null | import sys
import gzip
import numpy as np
import scipy as sc
import pickle
from optparse import OptionParser
from sklearn.decomposition import PCA
from sklearn import preprocessing
from sklearn import linear_model
from scipy.stats import rankdata
from scipy.stats import norm
if __name__ == "__main__":
pars... | 32.349112 | 207 | 0.53009 | import sys
import gzip
import numpy as np
import scipy as sc
import pickle
from optparse import OptionParser
from sklearn.decomposition import PCA
from sklearn import preprocessing
from sklearn import linear_model
from scipy.stats import rankdata
from scipy.stats import norm
def qqnorm(x):
n=len(x)
a=3.... | 4,642 | 0 | 69 |
039470bd602cb48ddba72f3262f9a89bfc4b6e64 | 10,586 | py | Python | python/pipeline/codex/exec/pipeline.py | eric-czech/codex | 23e880d483bf4c57809ebbd214640f6246c8fd37 | [
"Apache-2.0"
] | null | null | null | python/pipeline/codex/exec/pipeline.py | eric-czech/codex | 23e880d483bf4c57809ebbd214640f6246c8fd37 | [
"Apache-2.0"
] | null | null | null | python/pipeline/codex/exec/pipeline.py | eric-czech/codex | 23e880d483bf4c57809ebbd214640f6246c8fd37 | [
"Apache-2.0"
] | null | null | null | """CODEX preprocessing pipeline core logic
This is not intended to be run directly but rather used by mutliple external
interfaces to implement the core process that comprises CODEX processing.
"""
import os, logging, itertools, queue
import numpy as np
from os import path as osp
from threading import Thread
from time... | 38.919118 | 139 | 0.655111 | """CODEX preprocessing pipeline core logic
This is not intended to be run directly but rather used by mutliple external
interfaces to implement the core process that comprises CODEX processing.
"""
import os, logging, itertools, queue
import numpy as np
from os import path as osp
from threading import Thread
from time... | 8,832 | 782 | 161 |
829cf6135b77a1b187e819e046112f22a3e142c1 | 4,885 | py | Python | tests/test_cli.py | douglatornell/nemo_nowcast | 1b9181c29eee34a83e34869d13a0c0bf607882fa | [
"Apache-2.0"
] | 1 | 2020-02-06T01:10:27.000Z | 2020-02-06T01:10:27.000Z | tests/test_cli.py | douglatornell/nemo_nowcast | 1b9181c29eee34a83e34869d13a0c0bf607882fa | [
"Apache-2.0"
] | 3 | 2021-04-06T18:03:49.000Z | 2021-12-13T21:17:34.000Z | tests/test_cli.py | 43ravens/NEMO_Nowcast | 1b9181c29eee34a83e34869d13a0c0bf607882fa | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2021 Doug Latornell, 43ravens
# 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 t... | 33.006757 | 86 | 0.67042 | # Copyright 2016-2021 Doug Latornell, 43ravens
# 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 t... | 2,487 | 0 | 432 |
c45b95cbe547cf9cbd5631528c0fed6294c764c7 | 6,381 | py | Python | DSN/OLSRplots.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | DSN/OLSRplots.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | DSN/OLSRplots.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | import datetime
import logging
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib.ticker import FuncFormatter
from matplotlib.ticker import FormatStrFormatter
import numpy as np
import math
logger = logging.getLogger(__name__)
| 31.279412 | 108 | 0.589876 | import datetime
import logging
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib.ticker import FuncFormatter
from matplotlib.ticker import FormatStrFormatter
import numpy as np
import math
logger = logging.getLogger(__name__)
def plot(data):
# Convert to time offs... | 6,080 | 0 | 23 |
6c14f186e4484734e0a2a6b5985933064b5d7ee2 | 3,227 | py | Python | python/pex/wx/slider.py | JiveHelix/pex | d3cbe0e437e803fb4af6fe153de0cf3f61a3a6d6 | [
"MIT"
] | null | null | null | python/pex/wx/slider.py | JiveHelix/pex | d3cbe0e437e803fb4af6fe153de0cf3f61a3a6d6 | [
"MIT"
] | null | null | null | python/pex/wx/slider.py | JiveHelix/pex | d3cbe0e437e803fb4af6fe153de0cf3f61a3a6d6 | [
"MIT"
] | null | null | null | ##
# @file slider.py
#
# @brief A wx.Slider connected to a pex.RangeInterface node.
#
# @author Jive Helix (jivehelix@gmail.com)
# @date 06 Jun 2020
# @copyright Jive Helix
# Licensed under the MIT license. See LICENSE file.
from __future__ import annotations
from typing import Generic, Any, TypeVar
import wx
from ..... | 29.336364 | 77 | 0.629997 | ##
# @file slider.py
#
# @brief A wx.Slider connected to a pex.RangeInterface node.
#
# @author Jive Helix (jivehelix@gmail.com)
# @date 06 Jun 2020
# @copyright Jive Helix
# Licensed under the MIT license. See LICENSE file.
from __future__ import annotations
from typing import Generic, Any, TypeVar
import wx
from ..... | 1,224 | 1,472 | 46 |
9e54d5911d68fe0d9d93f7939f85d4b3588abf97 | 395 | py | Python | pyes/engine/queryset.py | zrlram/pyes | ea495a85167b5ab56d8fac906d3719d53f2587f8 | [
"BSD-3-Clause"
] | 1 | 2016-01-15T06:54:52.000Z | 2016-01-15T06:54:52.000Z | pyes/engine/queryset.py | zrlram/pyes | ea495a85167b5ab56d8fac906d3719d53f2587f8 | [
"BSD-3-Clause"
] | null | null | null | pyes/engine/queryset.py | zrlram/pyes | ea495a85167b5ab56d8fac906d3719d53f2587f8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'alberto'
# Delete rules
DO_NOTHING = 0
NULLIFY = 1
CASCADE = 2
DENY = 3
| 11.969697 | 41 | 0.698734 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'alberto'
# Delete rules
DO_NOTHING = 0
NULLIFY = 1
CASCADE = 2
DENY = 3
class DoesNotExist(Exception):
pass
class MultipleObjectsReturned(Exception):
pass
class InvalidQueryError(Exception):
pass
class OperationError(Exception):
pass
... | 0 | 119 | 138 |
0c85185d3ccba1053bbeb6ae9ed7e1c5a5862f41 | 1,523 | py | Python | ch46-机器学习-K近邻/1-kNN.py | makelove/OpenCV-Python-Tutorial | e428d648f7aa50d6a0fb4f4d0fb1bd1a600fef41 | [
"MIT"
] | 2,875 | 2016-10-21T01:33:22.000Z | 2022-03-30T12:15:28.000Z | ch46-机器学习-K近邻/1-kNN.py | makelove/OpenCV-Python-Tutorial | e428d648f7aa50d6a0fb4f4d0fb1bd1a600fef41 | [
"MIT"
] | 12 | 2017-07-18T14:24:27.000Z | 2021-07-04T10:32:25.000Z | ch46-机器学习-K近邻/1-kNN.py | makelove/OpenCV-Python-Tutorial | e428d648f7aa50d6a0fb4f4d0fb1bd1a600fef41 | [
"MIT"
] | 1,066 | 2017-03-11T01:43:28.000Z | 2022-03-29T14:52:41.000Z | # -*- coding: utf-8 -*-
# @Time : 2017/7/13 下午7:17
# @Author : play4fun
# @File : 1-kNN.py
# @Software: PyCharm
"""
1-kNN.py:
k 的取值最好为奇数
根据 k 个 最近邻居进行分类的方法 称为 kNN
权重
距离近的具有更高的权重, 距离远的权重更低
"""
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Feature set containing (x,y) values of 25 known/tra... | 25.813559 | 65 | 0.674984 | # -*- coding: utf-8 -*-
# @Time : 2017/7/13 下午7:17
# @Author : play4fun
# @File : 1-kNN.py
# @Software: PyCharm
"""
1-kNN.py:
k 的取值最好为奇数
根据 k 个 最近邻居进行分类的方法 称为 kNN
权重
距离近的具有更高的权重, 距离远的权重更低
"""
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Feature set containing (x,y) values of 25 known/tra... | 0 | 0 | 0 |
3d8d27db28e2589380c71874c2bdf3e970c593cf | 445 | py | Python | apps/schedule/tasks.py | ilyukevich/university-schedule | 305e568b00a847a8d2d10217568e7f87833fb5b3 | [
"MIT"
] | null | null | null | apps/schedule/tasks.py | ilyukevich/university-schedule | 305e568b00a847a8d2d10217568e7f87833fb5b3 | [
"MIT"
] | null | null | null | apps/schedule/tasks.py | ilyukevich/university-schedule | 305e568b00a847a8d2d10217568e7f87833fb5b3 | [
"MIT"
] | null | null | null | from config.celery import app
from django.core.mail import send_mail
@app.task
| 34.230769 | 132 | 0.739326 | from config.celery import app
from django.core.mail import send_mail
@app.task
def sent_schedule(username_, id_for_request, email, count_lessons, lessons, day):
subject = f'Your schedule for {day}'
message = f'Dear {username_}, id: {id_for_request}. Your schedule for {day}! Lessons today: {count_lessons}. Le... | 342 | 0 | 22 |
b32175425214865c9dd32c64af1f4cb916d3625b | 865 | py | Python | poco/drivers/unity3d/test/tutorial/buttons_and_labels.py | felixonmars/Poco | f44bf05501bb54561c15ef1b7ad5e5342ba96110 | [
"Apache-2.0"
] | 1 | 2019-12-19T14:06:04.000Z | 2019-12-19T14:06:04.000Z | poco/drivers/unity3d/test/tutorial/buttons_and_labels.py | felixonmars/Poco | f44bf05501bb54561c15ef1b7ad5e5342ba96110 | [
"Apache-2.0"
] | null | null | null | poco/drivers/unity3d/test/tutorial/buttons_and_labels.py | felixonmars/Poco | f44bf05501bb54561c15ef1b7ad5e5342ba96110 | [
"Apache-2.0"
] | 1 | 2022-02-06T10:27:41.000Z | 2022-02-06T10:27:41.000Z | # coding=utf-8
import time
from poco.drivers.unity3d.test.tutorial.case import TutorialCase
if __name__ == '__main__':
from airtest.core.api import connect_device
connect_device('Android:///')
import pocounit
pocounit.main()
| 27.903226 | 69 | 0.601156 | # coding=utf-8
import time
from poco.drivers.unity3d.test.tutorial.case import TutorialCase
class ButtonsAndLabelsTutorial(TutorialCase):
def runTest(self):
self.poco('btn_start').click()
self.poco(text='basic').click()
star = self.poco('star_single')
if star.exists():
... | 547 | 24 | 49 |