hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 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 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
00c20d2a2019548224b0ea362815928c7f4e7bc3 | 1,084 | py | Python | graphgl_api.py | newtoncy/asyncio-graphql-demo | 9100cf3bf582e98ed0acd8ca4669182d3687cfe5 | [
"MIT"
] | null | null | null | graphgl_api.py | newtoncy/asyncio-graphql-demo | 9100cf3bf582e98ed0acd8ca4669182d3687cfe5 | [
"MIT"
] | null | null | null | graphgl_api.py | newtoncy/asyncio-graphql-demo | 9100cf3bf582e98ed0acd8ca4669182d3687cfe5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
@Author :
@File : graphgl_api.py
@Time : 2021/2/25 14:15
@Desc : graphglapi
"""
from graphene import Schema
schema = Schema(query=DemoViewSet)
print(schema)
| 19.709091 | 77 | 0.700185 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
@Author : 王超逸
@File : graphgl_api.py
@Time : 2021/2/25 14:15
@Desc : graphgl风格的api
"""
from model import *
from graphene_model_base import BaseCURD, GraphQLViewSet, GrapheneModelObject
from graphene import Int, String, Field, List, Schema
class Te... | 18 | 0 | 0 | 555 | 0 | 0 | 0 | 80 | 206 |
539c104885e4a957bd5db49fd7072aaa16c55501 | 30,073 | py | Python | qiskit_metal/qlibrary/core/qroute.py | ismirlia/qiskit-metal | d788f4391a65c191b04059e8dcf25da9a35b4597 | [
"Apache-2.0"
] | 167 | 2021-03-17T20:35:17.000Z | 2022-03-31T13:25:04.000Z | qiskit_metal/qlibrary/core/qroute.py | fgnyilmaz/qiskit-metal | 04c9e5c0b5573699564244127aa58b447cdf6f66 | [
"Apache-2.0"
] | 307 | 2021-03-17T14:07:43.000Z | 2022-03-23T14:22:20.000Z | qiskit_metal/qlibrary/core/qroute.py | fgnyilmaz/qiskit-metal | 04c9e5c0b5573699564244127aa58b447cdf6f66 | [
"Apache-2.0"
] | 122 | 2021-03-17T14:21:24.000Z | 2022-03-18T10:09:38.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 40.584345 | 125 | 0.572706 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 0 | 866 | 0 | 28,343 | 0 | 0 | 0 | 85 | 268 |
312989e96aa3afbadf1c5a1b5444926242166e7f | 750 | py | Python | example.py | ag14774/rph | c46bbac9ff90e781784d7b342047c7299c01e708 | [
"MIT"
] | 1 | 2020-06-25T08:49:16.000Z | 2020-06-25T08:49:16.000Z | example.py | ag14774/rph | c46bbac9ff90e781784d7b342047c7299c01e708 | [
"MIT"
] | null | null | null | example.py | ag14774/rph | c46bbac9ff90e781784d7b342047c7299c01e708 | [
"MIT"
] | null | null | null | import torch
from rph import RandomProjectionHashModule
if __name__ == '__main__':
s1 = "AAATGCGGATGT"
s2 = "TAATGCGGATGT"
d = {
"AA": 0,
"AC": 1,
"AT": 2,
"AG": 3,
"CA": 4,
"CC": 5,
"CT": 6,
"CG": 7,
"TA": 8,
"TC": 9,
... | 21.428571 | 61 | 0.424 | import torch
from rph import RandomProjectionHashModule
if __name__ == '__main__':
s1 = "AAATGCGGATGT"
s2 = "TAATGCGGATGT"
d = {
"AA": 0,
"AC": 1,
"AT": 2,
"AG": 3,
"CA": 4,
"CC": 5,
"CT": 6,
"CG": 7,
"TA": 8,
"TC": 9,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3903df6c675b459ae22ff986273c0eb1a3725c3e | 2,789 | py | Python | kombu/transport/__init__.py | abourget/kombu | ed67ff19660d43cb91274286b03254cc0160b6c3 | [
"BSD-3-Clause"
] | 2 | 2017-06-02T10:18:09.000Z | 2019-06-14T08:48:02.000Z | kombu/transport/__init__.py | abourget/kombu | ed67ff19660d43cb91274286b03254cc0160b6c3 | [
"BSD-3-Clause"
] | null | null | null | kombu/transport/__init__.py | abourget/kombu | ed67ff19660d43cb91274286b03254cc0160b6c3 | [
"BSD-3-Clause"
] | null | null | null | """
kombu.transport
===============
Built-in transports.
:copyright: (c) 2009 - 2010 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
DEFAULT_TRANSPORT = "kombu.transport.pyamqplib.Transport"
MISSING_LIB = """
The %(feature)s requires the %(lib)s module to be
installed; http://pypi.python.org... | 28.459184 | 77 | 0.69308 | """
kombu.transport
===============
Built-in transports.
:copyright: (c) 2009 - 2010 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
import sys
from kombu.utils import rpartition
DEFAULT_TRANSPORT = "kombu.transport.pyamqplib.Transport"
MISSING_LIB = """
The %(feature)s requires the %(lib)s mod... | 0 | 0 | 0 | 0 | 0 | 1,097 | 0 | 2 | 160 |
351900524321c5a20de80aba9529387be17878c1 | 402 | py | Python | Motor_Imagery/neuropype_recieve.py | OpenBCI/OpenBCI_Tutorials | 8db159b616c11849100f0444ea7071ff3ab02e72 | [
"MIT"
] | 11 | 2021-02-12T20:01:25.000Z | 2022-02-09T20:37:59.000Z | Motor_Imagery/neuropype_recieve.py | evaesteban/OpenBCI_Tutorials | 8db159b616c11849100f0444ea7071ff3ab02e72 | [
"MIT"
] | null | null | null | Motor_Imagery/neuropype_recieve.py | evaesteban/OpenBCI_Tutorials | 8db159b616c11849100f0444ea7071ff3ab02e72 | [
"MIT"
] | 2 | 2021-03-29T08:23:10.000Z | 2021-09-12T10:57:48.000Z | # Code written by Rakesh C Jakati for the Motor Imagery tutorial
from oscpy.server import OSCThreadServer
from time import sleep
osc = OSCThreadServer()
sock = osc.listen(address='127.0.0.1', port=9002, default=True)
sleep(100)
| 28.714286 | 80 | 0.753731 | # Code written by Rakesh C Jakati for the Motor Imagery tutorial
from oscpy.server import OSCThreadServer
from time import sleep
from oscpy.client import OSCClient
osc = OSCThreadServer()
sock = osc.listen(address='127.0.0.1', port=9002, default=True)
@osc.address(b'/neuropype')
def callback(left, right):
print("Le... | 0 | 114 | 0 | 0 | 0 | 0 | 0 | 13 | 44 |
a6431c09e9265cc6ed66c25a6cddd99959cbe072 | 8,971 | py | Python | pylxd/tests/models/test_network.py | kissiel/pylxd | a637209a67e7f32c17ecdbf774d8968794e03d25 | [
"Apache-2.0"
] | null | null | null | pylxd/tests/models/test_network.py | kissiel/pylxd | a637209a67e7f32c17ecdbf774d8968794e03d25 | [
"Apache-2.0"
] | null | null | null | pylxd/tests/models/test_network.py | kissiel/pylxd | a637209a67e7f32c17ecdbf774d8968794e03d25 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 31.25784 | 79 | 0.517334 | # Copyright (c) 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 0 | 0 | 0 | 8,127 | 0 | 0 | 0 | 40 | 138 |
0ea97349494743ec080348d3fe7c9e5b69acb902 | 562 | py | Python | src/python/run_sim.py | ibraaaa/news-credibility | cae1009d9def17c058342c3dee969f2babcd0c9e | [
"Apache-2.0"
] | null | null | null | src/python/run_sim.py | ibraaaa/news-credibility | cae1009d9def17c058342c3dee969f2babcd0c9e | [
"Apache-2.0"
] | null | null | null | src/python/run_sim.py | ibraaaa/news-credibility | cae1009d9def17c058342c3dee969f2babcd0c9e | [
"Apache-2.0"
] | null | null | null | import traceback
try:
import signals.sim_server as sim
import signals.sentiment as sentiment
import sys
server = sim.SimServer('/home/ibraaaa/servers/1mon_preprocess/')
result = server.query(sys.argv[1])
result = server.rank(result[0], result[1])
for r in result:
sentimen... | 37.466667 | 120 | 0.629893 | import traceback
try:
import signals.sim_server as sim
import signals.sentiment as sentiment
import sys
server = sim.SimServer('/home/ibraaaa/servers/1mon_preprocess/')
result = server.query(sys.argv[1])
result = server.rank(result[0], result[1])
for r in result:
sentimen... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
529a5f07b9e66640be524601d40f869f6cbfced5 | 87 | py | Python | ib_insync/version.py | toledy/ib_insync | 301431b2ff61b39af1be39476804df535d2419f9 | [
"BSD-2-Clause"
] | null | null | null | ib_insync/version.py | toledy/ib_insync | 301431b2ff61b39af1be39476804df535d2419f9 | [
"BSD-2-Clause"
] | null | null | null | ib_insync/version.py | toledy/ib_insync | 301431b2ff61b39af1be39476804df535d2419f9 | [
"BSD-2-Clause"
] | null | null | null | __version_info__ = (0, 9, 34)
__version__ = '.'.join(str(v) for v in __version_info__)
| 29 | 56 | 0.701149 | __version_info__ = (0, 9, 34)
__version__ = '.'.join(str(v) for v in __version_info__)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
192bb8607963af6b3ec3475a387a23da8f5fe9fe | 8,292 | py | Python | ProtoDeclare.py | colutto/X3DOM_database_Integration | 34860d00ff9851d66355fabc1697180cb961440c | [
"MIT"
] | null | null | null | ProtoDeclare.py | colutto/X3DOM_database_Integration | 34860d00ff9851d66355fabc1697180cb961440c | [
"MIT"
] | null | null | null | ProtoDeclare.py | colutto/X3DOM_database_Integration | 34860d00ff9851d66355fabc1697180cb961440c | [
"MIT"
] | null | null | null |
MAX_HEIGHT = 7 # maximum cupoid size in the diagram
# the protoDeclare class represents one whole protoDeclare tag in the html file
# the class saves the field nodes, appearance, form and the shape of the protoDeclare node.
# the class represents the field values in the protoDeclare class | 55.651007 | 106 | 0.649542 | import database
MAX_HEIGHT = 7 # maximum cupoid size in the diagram
# the protoDeclare class represents one whole protoDeclare tag in the html file
# the class saves the field nodes, appearance, form and the shape of the protoDeclare node.
class ProtoDeclare:
def __init__(self, interface, body, soup):
# i... | 0 | 0 | 0 | 7,939 | 0 | 0 | 0 | -6 | 66 |
cd8387f643d30a645f723ac742fcfa51c4d14cc6 | 5,601 | py | Python | train_eval.py | hsdong2012/PTL | 699d47b85813cc053ac03acaf4395d2b8f5922e7 | [
"MIT"
] | 24 | 2019-08-08T02:28:58.000Z | 2022-01-18T09:08:08.000Z | train_eval.py | xujinglin/PTL | 699d47b85813cc053ac03acaf4395d2b8f5922e7 | [
"MIT"
] | 2 | 2019-08-13T01:06:49.000Z | 2020-07-11T14:17:50.000Z | train_eval.py | xujinglin/PTL | 699d47b85813cc053ac03acaf4395d2b8f5922e7 | [
"MIT"
] | 7 | 2019-08-18T10:57:28.000Z | 2022-02-05T06:21:24.000Z | import torch
import os
from opt import opt
from data import Data
from mgn_ptl import MGN_PTL
from mgn import MGN
from loss import Loss
if __name__ == '__main__':
assert opt.project_name is not None
print(opt)
loader = Data()
if opt.arch == 'mgn_ptl':
model = usegpu(MGN_PTL())
elif opt.arch... | 36.848684 | 118 | 0.589002 | import numpy as np
from scipy.spatial.distance import cdist
import torch
import os
from torch.optim import Adam, lr_scheduler
from opt import opt
from data import Data
from mgn_ptl import MGN_PTL
from mgn import MGN
from loss import Loss
from functions import mean_ap, cmc, re_ranking
def usegpu(element):
if opt.us... | 0 | 644 | 0 | 3,426 | 0 | 81 | 0 | 62 | 134 |
1b4edb64c6cb9dec303be91cb78c4f39cb0218db | 4,885 | py | Python | ionyweb/administration/tests/website.py | makinacorpus/ionyweb | 2f18e3dc1fdc86c7e19bae3778e67e28a37567be | [
"BSD-3-Clause"
] | 4 | 2015-09-28T10:07:39.000Z | 2019-10-18T20:14:07.000Z | ionyweb/administration/tests/website.py | makinacorpus/ionyweb | 2f18e3dc1fdc86c7e19bae3778e67e28a37567be | [
"BSD-3-Clause"
] | 1 | 2021-03-19T21:41:33.000Z | 2021-03-19T21:41:33.000Z | ionyweb/administration/tests/website.py | makinacorpus/ionyweb | 2f18e3dc1fdc86c7e19bae3778e67e28a37567be | [
"BSD-3-Clause"
] | 1 | 2017-10-12T09:25:19.000Z | 2017-10-12T09:25:19.000Z | # -*- coding: utf-8 -*-
| 35.919118 | 75 | 0.63521 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.sites.models import Site
from ionyweb.administration.tests import test_reverse, AdministrationTests
from time import time
class WebsiteViewTests(AdministrationTests):
def test_domains_view(self):
url = test_reverse('wa-domains')... | 0 | 0 | 0 | 4,662 | 0 | 0 | 0 | 87 | 112 |
1084db5a025707a35090ae1d7b2a518096985145 | 79 | py | Python | tests/test_decorators.py | gregchagnon/orm.cloud | c783480eef38c032194eec29e4bb3b406f787cd6 | [
"Apache-2.0"
] | null | null | null | tests/test_decorators.py | gregchagnon/orm.cloud | c783480eef38c032194eec29e4bb3b406f787cd6 | [
"Apache-2.0"
] | 17 | 2019-06-04T02:15:52.000Z | 2019-06-20T01:03:10.000Z | tests/test_decorators.py | gregchagnon/orm.cloud | c783480eef38c032194eec29e4bb3b406f787cd6 | [
"Apache-2.0"
] | null | null | null | from tests.thing import Thing
thing = Thing()
a = thing.__dict__
thing.test()
| 13.166667 | 29 | 0.734177 | from tests.thing import Thing
thing = Thing()
a = thing.__dict__
thing.test()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
822b8dd349ae880d2ecafd28949138fd00db85b4 | 19,197 | py | Python | src/GaIA/pkgs/nmap/nmap-6.40/zenmap/zenmapGUI/NmapOutputProperties.py | uninth/UNItools | c8b1fbfd5d3753b5b14fa19033e39737dedefc00 | [
"BSD-3-Clause"
] | null | null | null | src/GaIA/pkgs/nmap/nmap-6.40/zenmap/zenmapGUI/NmapOutputProperties.py | uninth/UNItools | c8b1fbfd5d3753b5b14fa19033e39737dedefc00 | [
"BSD-3-Clause"
] | null | null | null | src/GaIA/pkgs/nmap/nmap-6.40/zenmap/zenmapGUI/NmapOutputProperties.py | uninth/UNItools | c8b1fbfd5d3753b5b14fa19033e39737dedefc00 | [
"BSD-3-Clause"
] | 1 | 2021-06-08T15:59:26.000Z | 2021-06-08T15:59:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ***********************IMPORTANT NMAP LICENSE TERMS************************
# * *
# * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is *
# * also a registered trademark of Inse... | 49.992188 | 97 | 0.598427 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ***********************IMPORTANT NMAP LICENSE TERMS************************
# * *
# * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is *
# * also a registered trademark of Inse... | 0 | 0 | 0 | 9,349 | 0 | 0 | 0 | 232 | 246 |
51993e54c622702bdc81472acb58d47809a411aa | 7,839 | py | Python | python/federatedml/protobuf/generated/hetero_kmeans_param_pb2.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 715 | 2019-01-24T10:52:03.000Z | 2019-10-31T12:19:22.000Z | python/federatedml/protobuf/generated/hetero_kmeans_param_pb2.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 270 | 2019-02-11T02:57:36.000Z | 2019-08-29T11:22:33.000Z | python/federatedml/protobuf/generated/hetero_kmeans_param_pb2.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 200 | 2019-01-26T14:21:35.000Z | 2019-11-01T01:14:36.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: hetero-kmeans-param.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from g... | 42.836066 | 708 | 0.713611 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: hetero-kmeans-param.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from g... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bc716f2fdcd1be701c5594a8b27d728a55a65896 | 1,160 | py | Python | 1_bell_dokumentation_(paper)/pretty_code/visualize_data.py | pitizzzle/paper-3d-computer-stereo-vision | 946e6f9d8d53e8e80baf3165e3c4f463b1ab1a45 | [
"MIT"
] | 1 | 2021-07-01T12:32:32.000Z | 2021-07-01T12:32:32.000Z | 1_bell_dokumentation_(paper)/pretty_code/visualize_data.py | pitizzzle/3d-computer-stereo-vision | 946e6f9d8d53e8e80baf3165e3c4f463b1ab1a45 | [
"MIT"
] | null | null | null | 1_bell_dokumentation_(paper)/pretty_code/visualize_data.py | pitizzzle/3d-computer-stereo-vision | 946e6f9d8d53e8e80baf3165e3c4f463b1ab1a45 | [
"MIT"
] | null | null | null | # --TASK-- visualize located objects based on datafile
import bpy, json
from calibration import get_calibration
from generate_mesh import generate_mesh
# load data
data_file = open('<source_datafile_path>', 'r')
data = json.loads(data_file.read())
data_file.close()
# iterate frames in data
for frame_coun... | 29 | 98 | 0.675862 | # --TASK-- visualize located objects based on datafile
import bpy, json
from calibration import get_calibration
from generate_mesh import generate_mesh
# load data
data_file = open('<source_datafile_path>', 'r')
data = json.loads(data_file.read())
data_file.close()
# iterate frames in data
for frame_coun... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c9b68acb36ca59601f303861980dd42bddb48193 | 2,693 | py | Python | Code/Cryptography/Vigenere Cipher.py | BambooFlower/Math-Scripts | ee89c4f8a1fe80f355e2daa0baa4f94374ee3ab5 | [
"MIT"
] | 3 | 2020-03-10T13:21:24.000Z | 2020-12-20T19:52:53.000Z | Code/Cryptography/Vigenere Cipher.py | BambooFlower/Math-Scripts | ee89c4f8a1fe80f355e2daa0baa4f94374ee3ab5 | [
"MIT"
] | 1 | 2020-07-25T14:25:08.000Z | 2020-07-25T14:28:07.000Z | Code/Cryptography/Vigenere Cipher.py | BambooFlower/Math-Scripts | ee89c4f8a1fe80f355e2daa0baa4f94374ee3ab5 | [
"MIT"
] | 3 | 2020-07-25T13:17:29.000Z | 2020-10-22T15:11:25.000Z | # This is a python implementation of the Vigenere Cipher, it employs a form of polyalphabetic substitution and remained unbreakable for three centuries
# Reference can be found at: https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher
# In this implementaion we will use the keyword: LEMON
# Examples:
# encryption(... | 31.682353 | 152 | 0.650576 | # This is a python implementation of the Vigenere Cipher, it employs a form of polyalphabetic substitution and remained unbreakable for three centuries
# Reference can be found at: https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher
# In this implementaion we will use the keyword: LEMON
import math
def encryption():... | 0 | 0 | 0 | 0 | 0 | 2,298 | 0 | -10 | 69 |
dfcd9a86d95b1e768792a1d8216a0c92f28c379d | 29,155 | py | Python | zrna/api.py | zrna-research/zrna-api | 16a4fa981e5e21202a0ad78a9b18ffa298ef17d0 | [
"Apache-2.0"
] | 31 | 2019-07-30T20:59:03.000Z | 2021-07-26T21:16:18.000Z | zrna/api.py | zrna-research/zrna-api | 16a4fa981e5e21202a0ad78a9b18ffa298ef17d0 | [
"Apache-2.0"
] | null | null | null | zrna/api.py | zrna-research/zrna-api | 16a4fa981e5e21202a0ad78a9b18ffa298ef17d0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Zrna Research LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 37.570876 | 145 | 0.610701 | # Copyright 2019 Zrna Research LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 0 | 2,090 | 0 | 25,664 | 0 | 0 | 0 | 261 | 471 |
6f33e81c4dd3d799b26ae21e5fef90625ac3a799 | 3,916 | py | Python | src/github3/repos/invitation.py | toddrme2178/github3.py | b69951883d26e03fea9af59dc525e1fdcd38ad0f | [
"BSD-3-Clause"
] | null | null | null | src/github3/repos/invitation.py | toddrme2178/github3.py | b69951883d26e03fea9af59dc525e1fdcd38ad0f | [
"BSD-3-Clause"
] | 1 | 2021-06-02T00:37:10.000Z | 2021-06-02T00:37:10.000Z | virtual/Lib/site-packages/github3/repos/invitation.py | owenabrams/bluemoonkampala | 8801df64e91683a2641f2cd4bcbe03ebc7f40828 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Invitation related logic."""
from __future__ import unicode_literals
from .. import models
from .. import users
| 30.356589 | 79 | 0.621297 | # -*- coding: utf-8 -*-
"""Invitation related logic."""
from __future__ import unicode_literals
from json import dumps
from .. import models
from .. import users
from ..decorators import requires_auth
class Invitation(models.GitHubCore):
"""Representation of an invitation to collaborate on a repository.
.... | 0 | 1,622 | 0 | 2,066 | 0 | 0 | 0 | 18 | 69 |
c9d69d4497bea09734e1164a508c9296e6ca71ab | 231 | py | Python | Exercicios mundo 1/ex067.py | prc3333/Exercicios--de-Phyton- | a4b54af45f6bb3a89a205b570e1cf1164e505e29 | [
"MIT"
] | null | null | null | Exercicios mundo 1/ex067.py | prc3333/Exercicios--de-Phyton- | a4b54af45f6bb3a89a205b570e1cf1164e505e29 | [
"MIT"
] | null | null | null | Exercicios mundo 1/ex067.py | prc3333/Exercicios--de-Phyton- | a4b54af45f6bb3a89a205b570e1cf1164e505e29 | [
"MIT"
] | null | null | null | while True:
t = int(input('Quer ver a tabuada de qual valor?'))
if t < 0:
break
print('-' * 32)
for c in range(1, 11):
print(f'{t} x {c:2} = {t*c}')
print('Programa Tabuada Encerrado.Volte Sempre!')
| 25.666667 | 55 | 0.545455 | while True:
t = int(input('Quer ver a tabuada de qual valor?'))
if t < 0:
break
print('-' * 32)
for c in range(1, 11):
print(f'{t} x {c:2} = {t*c}')
print('Programa Tabuada Encerrado.Volte Sempre!')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
df8f654e63bbd407dab2d8eb1d85aa9fc76bf43d | 4,811 | py | Python | flask_resources/views/collections.py | lnielsen/flask-resources | a8be12765883edb1b1f63b4d289416e892d2cb02 | [
"MIT"
] | null | null | null | flask_resources/views/collections.py | lnielsen/flask-resources | a8be12765883edb1b1f63b4d289416e892d2cb02 | [
"MIT"
] | null | null | null | flask_resources/views/collections.py | lnielsen/flask-resources | a8be12765883edb1b1f63b4d289416e892d2cb02 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# Flask-Resources is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Flask Resources module to create REST APIs."""
| 39.434426 | 88 | 0.67699 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# Flask-Resources is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Flask Resources module to create REST APIs."""
from werkzeug.exceptions import HTTPException
from ..args.pars... | 0 | 0 | 0 | 4,280 | 0 | 0 | 0 | 137 | 136 |
c0c7442fdb48cc4eab07cacb57211ca6161dc179 | 1,268 | py | Python | OpenRobertaParent/RobotNAO/src/test/resources/lists/nao_lists_sublist_test.py | WGraterol64/robertalab | 368c970c06008c6b56e59e3df19daf6e00022ad9 | [
"Apache-2.0"
] | 1 | 2019-06-04T05:01:35.000Z | 2019-06-04T05:01:35.000Z | OpenRobertaParent/RobotNAO/src/test/resources/lists/nao_lists_sublist_test.py | WGraterol64/robertalab | 368c970c06008c6b56e59e3df19daf6e00022ad9 | [
"Apache-2.0"
] | null | null | null | OpenRobertaParent/RobotNAO/src/test/resources/lists/nao_lists_sublist_test.py | WGraterol64/robertalab | 368c970c06008c6b56e59e3df19daf6e00022ad9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from roberta import Hal
from roberta import BlocklyMethods
h = Hal()
item = BlocklyMethods.createListWith(0, 0, 0)
item2 = BlocklyMethods.createListWith()
item3 = BlocklyMethods.createListWith()
item4 = BlocklyMethods.createListWith()
item5 = BlocklyMethods.createListWith()
if __name__ == "__main__... | 33.368421 | 82 | 0.694795 | #!/usr/bin/python
import math
import time
from roberta import Hal
from roberta import BlocklyMethods
h = Hal()
item = BlocklyMethods.createListWith(0, 0, 0)
item2 = BlocklyMethods.createListWith()
item3 = BlocklyMethods.createListWith()
item4 = BlocklyMethods.createListWith()
item5 = BlocklyMethods.createListWith()
... | 0 | 0 | 0 | 0 | 0 | 864 | 0 | -20 | 91 |
da6f6a601387c50a268bfd5ec8113829eaca65af | 5,892 | py | Python | Legend.py | ChrisCFTung/FIRESONG | e00c6ec7e00a6ccb4b993d891512ae1111f5111b | [
"BSD-3-Clause"
] | 10 | 2018-02-01T10:52:05.000Z | 2021-06-25T13:05:37.000Z | Legend.py | ChrisCFTung/FIRESONG | e00c6ec7e00a6ccb4b993d891512ae1111f5111b | [
"BSD-3-Clause"
] | 3 | 2018-03-10T09:34:56.000Z | 2020-09-30T15:34:02.000Z | Legend.py | ChrisCFTung/FIRESONG | e00c6ec7e00a6ccb4b993d891512ae1111f5111b | [
"BSD-3-Clause"
] | 5 | 2017-11-16T09:55:45.000Z | 2021-02-03T16:56:17.000Z | #!/usr/bin/python
# Authors: Chris Tung
# Ignacio Taboada
#
"""Example script that simulates a population of sources with a luminosity
distribution that is dependent on redshift"""
# General imports
# from __future__ import division
import argparse
# Numpy / Scipy
import numpy as np
# Firesong code
from ... | 38.509804 | 82 | 0.595214 | #!/usr/bin/python
# Authors: Chris Tung
# Ignacio Taboada
#
"""Example script that simulates a population of sources with a luminosity
distribution that is dependent on redshift"""
# General imports
# from __future__ import division
import argparse
# Numpy / Scipy
import numpy as np
# Firesong code
from ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0fc501d8919958ec96c1dcf057862e9117fad4f0 | 1,640 | py | Python | setup.py | decafjoe/clik-wtforms | 38708ee6ce1c8b426648e83371a7a0ce24982b3d | [
"BSD-3-Clause"
] | null | null | null | setup.py | decafjoe/clik-wtforms | 38708ee6ce1c8b426648e83371a7a0ce24982b3d | [
"BSD-3-Clause"
] | null | null | null | setup.py | decafjoe/clik-wtforms | 38708ee6ce1c8b426648e83371a7a0ce24982b3d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Package configuration for clik-wtforms.
:author: Joe Joyce <joe@decafjoe.com>
:copyright: Copyright (c) Joe Joyce and contributors, 2017-2019.
:license: BSD
"""
import os
from setuptools import find_packages, setup
name = 'clik-wtforms'
version = '0.90.2'
requires = (
'clik',
'w... | 27.333333 | 69 | 0.639024 | # -*- coding: utf-8 -*-
"""
Package configuration for clik-wtforms.
:author: Joe Joyce <joe@decafjoe.com>
:copyright: Copyright (c) Joe Joyce and contributors, 2017-2019.
:license: BSD
"""
import os
from setuptools import find_packages, setup
name = 'clik-wtforms'
version = '0.90.2'
requires = (
'clik',
'w... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b4d6f1dacadd766bfdf3d03e71a4d739eeeebc5 | 5,567 | py | Python | mathseq/seq.py | TheGreatestShoaib/MathSeq | 04134e8db030716c35beebbffabd719a353dfb2c | [
"MIT"
] | 1 | 2021-11-11T09:57:46.000Z | 2021-11-11T09:57:46.000Z | mathseq/seq.py | TheGreatestShoaib/MathSeq | 04134e8db030716c35beebbffabd719a353dfb2c | [
"MIT"
] | null | null | null | mathseq/seq.py | TheGreatestShoaib/MathSeq | 04134e8db030716c35beebbffabd719a353dfb2c | [
"MIT"
] | null | null | null | """
this is the doc string of this model
i'll just write it someday just yeah thats all
"""
| 19.953405 | 109 | 0.672175 | """
this is the doc string of this model
i'll just write it someday just yeah thats all
"""
import time
import random
def composite_numbers():
'''
-It generates composite numbers which are just opposite of prime numbers,,
it means real numbers that
aren't a prime number is a composite number
'''
n = 2
while ... | 0 | 0 | 0 | 0 | 5,156 | 0 | 0 | -18 | 321 |
ef5f28f7aecce1e45889f15945f0e1d0ff371954 | 542 | py | Python | Medium/Prime Time.py | edaaydinea/Coderbyte | 83d0fcde12c937b95e8b6f819df08b8b9e03ac55 | [
"MIT"
] | 6 | 2022-01-05T12:14:11.000Z | 2022-03-10T16:28:23.000Z | Medium/Prime Time.py | edaaydinea/Coderbyte | 83d0fcde12c937b95e8b6f819df08b8b9e03ac55 | [
"MIT"
] | null | null | null | Medium/Prime Time.py | edaaydinea/Coderbyte | 83d0fcde12c937b95e8b6f819df08b8b9e03ac55 | [
"MIT"
] | null | null | null | """
Prime Time
Have the function PrimeTime(num) take the num parameter being passed and
return the string true if the parameter is a prime number, otherwise return the string false.
The range will be between 1 and 2^16.
Examples
Input: 19
Output: true
Input: 110
Output: false
Author: Eda AYDIN
"""
# keep this fu... | 16.9375 | 93 | 0.643911 | """
Prime Time
Have the function PrimeTime(num) take the num parameter being passed and
return the string true if the parameter is a prime number, otherwise return the string false.
The range will be between 1 and 2^16.
Examples
Input: 19
Output: true
Input: 110
Output: false
Author: Eda AYDIN
"""
def PrimeTime(n... | 0 | 0 | 0 | 0 | 0 | 151 | 0 | 0 | 23 |
fc6a3c02328b829cd98097754690f67cffab23de | 19,680 | py | Python | spar_python/report_generation/ta1/ta1_schema.py | nathanawmk/SPARTA | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | [
"BSD-2-Clause"
] | 37 | 2017-06-09T13:55:23.000Z | 2022-01-28T12:51:17.000Z | spar_python/report_generation/ta1/ta1_schema.py | nathanawmk/SPARTA | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | [
"BSD-2-Clause"
] | null | null | null | spar_python/report_generation/ta1/ta1_schema.py | nathanawmk/SPARTA | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | [
"BSD-2-Clause"
] | 5 | 2017-06-09T13:55:26.000Z | 2021-11-11T03:51:56.000Z | # *****************************************************************
# Copyright 2013 MIT Lincoln Laboratory
# Project: SPAR
# Authors: SY
# Description: Constants for TA1 analytics.
#
#
# Modifications:
# Date Name Modification
# ---- ... | 35.142857 | 79 | 0.72749 | # *****************************************************************
# Copyright 2013 MIT Lincoln Laboratory
# Project: SPAR
# Authors: SY
# Description: Constants for TA1 analytics.
#
#
# Modifications:
# Date Name Modification
# ---- ... | 0 | 0 | 0 | 885 | 0 | 0 | 0 | 44 | 45 |
30131ecadd4cf71fffac3f92f54d5a9a49a201ca | 11,343 | py | Python | test/test.py | typo-ai/target-typo | 02a22033aad048b0b21445ba329dc1eed57d3e03 | [
"Apache-2.0"
] | null | null | null | test/test.py | typo-ai/target-typo | 02a22033aad048b0b21445ba329dc1eed57d3e03 | [
"Apache-2.0"
] | null | null | null | test/test.py | typo-ai/target-typo | 02a22033aad048b0b21445ba329dc1eed57d3e03 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2020 Typo. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 30.410188 | 111 | 0.532311 | # Copyright 2019-2020 Typo. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 0 | 8,566 | 0 | 1,488 | 0 | 207 | 0 | 16 | 135 |
48a3d2ec08b2712e57e02fb371f1828897ad3c5f | 2,759 | py | Python | radscirc.py | jmonrods/pyeis | e354691cd4d3a9a80c4e42e99129d6ee704f0f46 | [
"MIT"
] | null | null | null | radscirc.py | jmonrods/pyeis | e354691cd4d3a9a80c4e42e99129d6ee704f0f46 | [
"MIT"
] | 3 | 2021-11-02T22:42:33.000Z | 2021-11-02T22:54:49.000Z | radscirc.py | jmonrods/pyeis | e354691cd4d3a9a80c4e42e99129d6ee704f0f46 | [
"MIT"
] | null | null | null | #Menu for the circuit configurations (returns circuit string)
# ------------------------------------------------------
# Copyright (C) 2020 Gustavo Rodriguez Gutierrez
# Licensed under the MIT license, see LICENSE.
# ------------------------------------------------------
from PIL import ImageTk
loopc = Tk()
... | 34.4875 | 95 | 0.558173 | #Menu for the circuit configurations (returns circuit string)
# ------------------------------------------------------
# Copyright (C) 2020 Gustavo Rodriguez Gutierrez
# Licensed under the MIT license, see LICENSE.
# ------------------------------------------------------
from tkinter import *
from PIL import Im... | 0 | 0 | 0 | 0 | 0 | 2,013 | 0 | 6 | 49 |
6a3ef4fdaf9fc2ac365bbd9448b11bae9a903dc7 | 18,176 | py | Python | cogs/migratedb.py | Kammet07/miso-bot | 87036742fc49d6c78e6308a323cff0248fcec77d | [
"MIT"
] | null | null | null | cogs/migratedb.py | Kammet07/miso-bot | 87036742fc49d6c78e6308a323cff0248fcec77d | [
"MIT"
] | null | null | null | cogs/migratedb.py | Kammet07/miso-bot | 87036742fc49d6c78e6308a323cff0248fcec77d | [
"MIT"
] | null | null | null |
SQLDATABASE = "data/database.db"
| 32.631957 | 128 | 0.545224 | from discord.ext import commands
import arrow
import sqlite3
from libraries import emoji_literals
SQLDATABASE = "data/database.db"
def query(command, parameters=(), maketuple=False, database=SQLDATABASE):
connection = sqlite3.connect(database, timeout=10)
cursor = connection.cursor()
cursor.execute(comm... | 0 | 16,990 | 109 | 545 | 0 | 327 | 0 | 10 | 157 |
146721335dcc877f7d57359f010dd8cf80c09e0c | 27,968 | py | Python | sdk/python/pulumi_mongodbatlas/cloud_provider_snapshot.py | pulumi/pulumi-mongodbatlas | 0d5c085dcfd871b56fb4cf582620260b70caa07a | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2020-04-28T19:12:30.000Z | 2022-03-22T23:04:46.000Z | sdk/python/pulumi_mongodbatlas/cloud_provider_snapshot.py | pulumi/pulumi-mongodbatlas | 0d5c085dcfd871b56fb4cf582620260b70caa07a | [
"ECL-2.0",
"Apache-2.0"
] | 59 | 2020-06-12T12:12:52.000Z | 2022-03-28T18:14:50.000Z | sdk/python/pulumi_mongodbatlas/cloud_provider_snapshot.py | pulumi/pulumi-mongodbatlas | 0d5c085dcfd871b56fb4cf582620260b70caa07a | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-09-25T21:22:08.000Z | 2021-08-30T20:06:18.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
__all__ = ['CloudProviderSnapshotArgs', 'CloudProviderSnapshot']
| 44.606061 | 275 | 0.661756 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 0 | 24,154 | 0 | 3,345 | 0 | 0 | 0 | 44 | 158 |
c8ecc91ac600ea10173f3b256ce6fcdd2eb05b33 | 528 | py | Python | C07_enum.py | lleej/python | f4eff76819cec2c479ec19a4940141406079cb9a | [
"MIT"
] | null | null | null | C07_enum.py | lleej/python | f4eff76819cec2c479ec19a4940141406079cb9a | [
"MIT"
] | 2 | 2018-02-01T02:54:17.000Z | 2018-06-14T03:18:51.000Z | C07_enum.py | lleej/python | f4eff76819cec2c479ec19a4940141406079cb9a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
''
__author__ = 'Jacklee'
#
#import types
#
JAN = 1
FEB = 2
MAR = 3
#
from enum import Enum
##
##
WeekDay = Enum('WeekDay', ('Mon', 'Tue', 'Wed', 'Tru', 'Fri', 'Sat', 'Sun'))
## JAN ...
print('Month: ', dir(Month))
m = Month(0)
print(m.name, m.value)
print('... | 12.571429 | 76 | 0.600379 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'枚举类的练习'
__author__ = 'Jacklee'
# 导入模块
#import types
# 月份常量
JAN = 1
FEB = 2
MAR = 3
# 枚举类
from enum import Enum, unique
## 第一种定义方式
@unique
class Month(Enum):
JAN = 0
FEB = 1
MAR = 2
## 第二种定义方式
WeekDay = Enum('WeekDay', ('Mon', 'Tue', 'Wed', 'Tru', 'Fri', 'Sat', '... | 159 | 32 | 0 | 0 | 0 | 0 | 0 | 8 | 22 |
33dc23591462f9d8e97e54522d82496300c198a0 | 2,807 | py | Python | bot-pipelines.py | jonativia/gitlab_utils | dea6d0a6b553b71b8b472f65f34dafa7afa463f3 | [
"Apache-2.0"
] | 1 | 2020-02-05T14:52:45.000Z | 2020-02-05T14:52:45.000Z | bot-pipelines.py | jonazpiazu/gitlab_utils | 3a2394fe7c7ce88f686096dee2fed0c80823be58 | [
"Apache-2.0"
] | 1 | 2021-03-01T21:19:47.000Z | 2021-03-01T21:19:47.000Z | bot-pipelines.py | jonativia/gitlab_utils | dea6d0a6b553b71b8b472f65f34dafa7afa463f3 | [
"Apache-2.0"
] | 1 | 2021-03-01T16:29:55.000Z | 2021-03-01T16:29:55.000Z | #!/usr/bin/env python
# Copyright 2019 Jon Azpiazu
#
# 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 a... | 35.987179 | 87 | 0.689704 | #!/usr/bin/env python
# Copyright 2019 Jon Azpiazu
#
# 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 a... | 0 | 2,000 | 0 | 0 | 0 | 0 | 0 | -25 | 156 |
6138d347fce46ef1d91da96ac0a880b15add23b2 | 842 | py | Python | scripts/satlib.py | simonkrogmann/satexplorer | 4904d7828a5746a1e19bffb82573447fbf648207 | [
"MIT"
] | null | null | null | scripts/satlib.py | simonkrogmann/satexplorer | 4904d7828a5746a1e19bffb82573447fbf648207 | [
"MIT"
] | null | null | null | scripts/satlib.py | simonkrogmann/satexplorer | 4904d7828a5746a1e19bffb82573447fbf648207 | [
"MIT"
] | null | null | null | '''
Helper classes for handling SAT Formulas
''' | 38.272727 | 102 | 0.648456 | '''
Helper classes for handling SAT Formulas
'''
class Clause:
def __init__(self, literals):
self.positive_literals = []
self.negative_literals = []
for literal in literals:
if literal < 0:
self.negative_literals.append(literal)
else:
... | 0 | 0 | 0 | 771 | 0 | 0 | 0 | 0 | 23 |
74db45933ac3bbb67695886bfc5f7976c0580c6c | 640 | py | Python | insrunner/arch/x86.py | MatejKastak/insrunner | 6c99b7c4c6768003ea5822d03b916f2f17ee5900 | [
"MIT"
] | null | null | null | insrunner/arch/x86.py | MatejKastak/insrunner | 6c99b7c4c6768003ea5822d03b916f2f17ee5900 | [
"MIT"
] | null | null | null | insrunner/arch/x86.py | MatejKastak/insrunner | 6c99b7c4c6768003ea5822d03b916f2f17ee5900 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# X86 architectures
# Author: Matej Kastak
| 25.6 | 68 | 0.671875 | #!/usr/bin/env python
# X86 architectures
# Author: Matej Kastak
from . import Architecture
class ArchitectureX86(Architecture):
def __init__(self):
self.arch_name = 'x86'
self.pc_reg = 'eip'
self.ignored_regs = {'eip'} # TODO: check implementation
self.retdec_translator = 'Caps... | 0 | 0 | 0 | 499 | 0 | 0 | 0 | 5 | 69 |
f11e5f8409dabccd94700586da503ba0f40f3a11 | 286 | py | Python | hacker-rank/implementation/cut_the_sticks.py | denisrmp/hacker-rank | db490b1b2d41ed6913b4cacee1b4bb40e15186b7 | [
"MIT"
] | null | null | null | hacker-rank/implementation/cut_the_sticks.py | denisrmp/hacker-rank | db490b1b2d41ed6913b4cacee1b4bb40e15186b7 | [
"MIT"
] | null | null | null | hacker-rank/implementation/cut_the_sticks.py | denisrmp/hacker-rank | db490b1b2d41ed6913b4cacee1b4bb40e15186b7 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/cut-the-sticks
n = int(input().strip())
arr = list(map(int, input().strip().split(' ')))
while len(arr) > 0:
arr2 = []
for e in arr:
e -= min(arr)
if e > 0:
arr2.append(e)
print(len(arr))
arr = arr2
| 19.066667 | 54 | 0.524476 | # https://www.hackerrank.com/challenges/cut-the-sticks
n = int(input().strip())
arr = list(map(int, input().strip().split(' ')))
while len(arr) > 0:
arr2 = []
for e in arr:
e -= min(arr)
if e > 0:
arr2.append(e)
print(len(arr))
arr = arr2
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3fbe487600ef59b063f0193d9ba43167a6f30310 | 1,191 | py | Python | urls.py | abezpalov/project | 9dbfacf0cc6a55dd4ded436c57f82768aa8d2f30 | [
"MIT"
] | null | null | null | urls.py | abezpalov/project | 9dbfacf0cc6a55dd4ded436c57f82768aa8d2f30 | [
"MIT"
] | 8 | 2015-08-11T15:40:04.000Z | 2016-10-01T06:18:34.000Z | urls.py | abezpalov/project | 9dbfacf0cc6a55dd4ded436c57f82768aa8d2f30 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
import project.views
admin.autodiscover()
urlpatterns = [
url(r'^$', project.views.home),
url(r'^catalog/', include('catalog.urls')),
url(r'^tenders/', include('tenders.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^article... | 32.189189 | 86 | 0.723762 | from django.conf.urls import include, url
from django.contrib import admin
import project.views
admin.autodiscover()
urlpatterns = [
url(r'^$', project.views.home),
url(r'^catalog/', include('catalog.urls')),
url(r'^tenders/', include('tenders.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^article... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf617ba31bedea9fc1cc81640af965872e60285b | 2,526 | py | Python | pub_data_visualization/outages/plot/subplot/incremental_programs.py | l-leo/pub-data-visualization | 68eea00491424581b057495a7f0f69cf74e16e7d | [
"MIT"
] | 1 | 2021-01-22T16:47:20.000Z | 2021-01-22T16:47:20.000Z | pub_data_visualization/outages/plot/subplot/incremental_programs.py | l-leo/pub-data-visualization | 68eea00491424581b057495a7f0f69cf74e16e7d | [
"MIT"
] | null | null | null | pub_data_visualization/outages/plot/subplot/incremental_programs.py | l-leo/pub-data-visualization | 68eea00491424581b057495a7f0f69cf74e16e7d | [
"MIT"
] | null | null | null |
import itertools
#
from .... import global_tools, global_var
def incremental_programs(ax,
df_programs,
diff_init = False,
smoother = None,
):
"""
Draws in a subplot the expected availability programs
... | 36.608696 | 114 | 0.454078 |
import itertools
#
from .... import global_tools, global_var
def incremental_programs(ax,
df_programs,
diff_init = False,
smoother = None,
):
"""
Draws in a subplot the expected availability programs
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
49f1c65723bc2a06051cb9d111adc0415c671f9e | 591 | py | Python | {{cookiecutter.project_name}}/{{cookiecutter.project_name}}/tests/test_{{cookiecutter.project_name}}.py | mlf4aiur/cookiecutter-daemon | 510b39c38d11f9b556185b24c9a1eca79665db5c | [
"BSD-3-Clause"
] | 1 | 2015-11-23T05:21:37.000Z | 2015-11-23T05:21:37.000Z | {{cookiecutter.project_name}}/{{cookiecutter.project_name}}/tests/test_{{cookiecutter.project_name}}.py | mlf4aiur/cookiecutter-daemon | 510b39c38d11f9b556185b24c9a1eca79665db5c | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_name}}/{{cookiecutter.project_name}}/tests/test_{{cookiecutter.project_name}}.py | mlf4aiur/cookiecutter-daemon | 510b39c38d11f9b556185b24c9a1eca79665db5c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from {{cookiecutter.project_name}} import skeleton
if __name__ == "__main__":
from unittest import TestLoader, TextTestRunner
suite = TestLoader().loadTestsFromTestCase(SkeletonTestCase)
TextTestRunner(verbosity=2).run(... | 23.64 | 70 | 0.71066 | #!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from {{cookiecutter.project_name}} import skeleton
class SkeletonTestCase(unittest.TestCase):
def setUp(self):
self.skeleton = skeleton.Skeleton("conf/main.cfg")
def tearDown(self):
pass
def test_attribu... | 0 | 0 | 0 | 241 | 0 | 0 | 0 | 0 | 23 |
0c6332aed828b3c45f70354cbd6dbc6cec4f9032 | 4,462 | py | Python | raycasting.py | FelipeEd/PygameRaycaster | 56291c89612d51163bcb2f81367fcfe0256ec717 | [
"MIT"
] | 1 | 2021-04-15T22:25:54.000Z | 2021-04-15T22:25:54.000Z | raycasting.py | FelipeEd/PygameRaycaster | 56291c89612d51163bcb2f81367fcfe0256ec717 | [
"MIT"
] | null | null | null | raycasting.py | FelipeEd/PygameRaycaster | 56291c89612d51163bcb2f81367fcfe0256ec717 | [
"MIT"
] | null | null | null |
'''
pygame.draw.line(screen, RED, player.pos, (player.x + RENDER_DIST * math.cos(player.angle)
, player.y + RENDER_DIST * math.sin(player.angle)))
pygame.draw.line(screen, PURPLE, player.pos, (player.x + RENDER_DIST * math.cos(player.angle + FOV/2)
... | 35.133858 | 110 | 0.504706 | import pygame
from settings import *
from player import Player
from map import world_map
def rgrid(x):
return x // TILE * TILE
def Raycasting(screen,player):
# mock
world_size = 20
for ray_n in range(N_RAYS):
ray_angle = player.angle + ray_n * D_ANGLE - FOV/2
x0 = play... | 0 | 0 | 0 | 0 | 0 | 2,256 | 0 | 1 | 134 |
e06f7d5e71cf23adfb913d7716c5d363ef4c7a49 | 2,457 | py | Python | models/experimental/show_and_tell/show_and_tell_tpu_test.py | gogasca/tpu | e8801a42e2e2217c464d6a7870e40f19f0ae936b | [
"Apache-2.0"
] | 53 | 2019-10-02T22:00:54.000Z | 2021-11-16T13:50:02.000Z | models/experimental/show_and_tell/show_and_tell_tpu_test.py | gogasca/tpu | e8801a42e2e2217c464d6a7870e40f19f0ae936b | [
"Apache-2.0"
] | 3 | 2021-03-31T20:15:40.000Z | 2022-02-09T23:50:46.000Z | models/experimental/show_and_tell/show_and_tell_tpu_test.py | gogasca/tpu | e8801a42e2e2217c464d6a7870e40f19f0ae936b | [
"Apache-2.0"
] | 7 | 2019-10-02T14:24:37.000Z | 2020-05-06T08:19:59.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.657534 | 80 | 0.690273 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 0 | 78 | 0 | 1,239 | 0 | 0 | 0 | -3 | 136 |
bcbba369065c49092bbc64cc30d289a774884ad8 | 9,866 | py | Python | gym_carla/envs/route_planner.py | amirx96/gym-carla | 55900c961b3fafa60e3bece7d4da0445a402e801 | [
"MIT"
] | null | null | null | gym_carla/envs/route_planner.py | amirx96/gym-carla | 55900c961b3fafa60e3bece7d4da0445a402e801 | [
"MIT"
] | null | null | null | gym_carla/envs/route_planner.py | amirx96/gym-carla | 55900c961b3fafa60e3bece7d4da0445a402e801 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2019: Jianyu Chen (jianyuchen@berkeley.edu).
#
# This file is modified from <https://github.com/carla-simulator/carla>:
# Copyright (c) 2018 Intel Labs.
# authors: German Ros (german.ros@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <ht... | 34.862191 | 119 | 0.708798 | #!/usr/bin/env python
# Copyright (c) 2019: Jianyu Chen (jianyuchen@berkeley.edu).
#
# This file is modified from <https://github.com/carla-simulator/carla>:
# Copyright (c) 2018 Intel Labs.
# authors: German Ros (german.ros@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <ht... | 0 | 0 | 0 | 7,636 | 0 | 0 | 0 | 66 | 180 |
d27150502f9977d9345e16461b49b102885cbf33 | 9,904 | py | Python | encoders/nlp/TransformerTorchEncoder/__init__.py | Harshdeep1996/jina-hub | 880ff719715b89969860c70219d26a931a031d10 | [
"Apache-2.0"
] | null | null | null | encoders/nlp/TransformerTorchEncoder/__init__.py | Harshdeep1996/jina-hub | 880ff719715b89969860c70219d26a931a031d10 | [
"Apache-2.0"
] | 5,414 | 2021-04-06T09:04:26.000Z | 2022-03-30T13:12:40.000Z | encoders/nlp/TransformerTorchEncoder/__init__.py | rutujasurve94/jina-hub | 582bca03c85c421dfda980a624131f1db200857c | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
if False:
HTTP_SERVICE_UNAVAILABLE = 503
| 41.095436 | 124 | 0.61874 | __copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import time
from typing import Optional, Dict
import numpy as np
from jina.executors.decorators import batching, as_ndarray
from jina.executors.devices import TorchDevice
from jina.executors.encoders import BaseEnc... | 0 | 1,551 | 0 | 7,944 | 0 | 0 | 0 | 78 | 185 |
68bfe88b6aba2e556194770846796acc594986e4 | 24 | py | Python | variables/prodeu/handisaggeu_spot.py | rohithasrk-bidgely/cloudformation-config-generation | d72d362c77b220169b3ccdd0b4a921910f7172ff | [
"MIT"
] | null | null | null | variables/prodeu/handisaggeu_spot.py | rohithasrk-bidgely/cloudformation-config-generation | d72d362c77b220169b3ccdd0b4a921910f7172ff | [
"MIT"
] | 9 | 2018-07-09T08:46:12.000Z | 2018-07-18T09:13:03.000Z | variables/uat/handisaggna_spot.py | rohithasrk-bidgely/cloudformation-config-generation | d72d362c77b220169b3ccdd0b4a921910f7172ff | [
"MIT"
] | null | null | null | tagcomponent = "disagg"
| 12 | 23 | 0.75 | tagcomponent = "disagg"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
92f81deeca05af9aba907e26041e2fa998bf98de | 10,647 | py | Python | packages/syft/src/syft/core/node/common/action/function_or_constructor_action.py | BearerPipelineTest/PySyft | 5d4abfbc53c8d3a48f85606d43f7fd9b05a16b3d | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/action/function_or_constructor_action.py | BearerPipelineTest/PySyft | 5d4abfbc53c8d3a48f85606d43f7fd9b05a16b3d | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/action/function_or_constructor_action.py | BearerPipelineTest/PySyft | 5d4abfbc53c8d3a48f85606d43f7fd9b05a16b3d | [
"Apache-2.0"
] | null | null | null | # stdlib
# third party
# syft absolute
# relative
from ..... import lib
| 38.857664 | 108 | 0.639053 | # stdlib
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
from typing import Union
# third party
from google.protobuf.reflection import GeneratedProtocolMessageType
from nacl.signing import VerifyKey
# syft absolute
import syft as sy
# relati... | 0 | 9,580 | 0 | 0 | 0 | 0 | 0 | 462 | 529 |
cad03eca82c8be6e3378e1003ea67a4f38e2324e | 14,254 | py | Python | inputFiles/largeur_longueur.py | dimtion/jml | dba4db760280cc5ed8c384e36e41d6c7a310fb4f | [
"MIT"
] | 1 | 2015-10-07T19:18:55.000Z | 2015-10-07T19:18:55.000Z | inputFiles/largeur_longueur.py | dimtion/jml | dba4db760280cc5ed8c384e36e41d6c7a310fb4f | [
"MIT"
] | 1 | 2015-10-07T19:28:25.000Z | 2015-10-08T19:01:47.000Z | inputFiles/largeur_longueur.py | dimtion/jml | dba4db760280cc5ed8c384e36e41d6c7a310fb4f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################################################################################################################################################
############################################... | 60.91453 | 228 | 0.341378 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################################################################################################################################################
############################################... | 0 | 0 | 0 | 201 | 0 | 1,263 | 0 | -32 | 273 |
462f9d0c6d85bf21de29f9ad930fdb5a0454bc16 | 920 | py | Python | config.py | mt32net/cmm_notifier | 4d52a32c5074b1a1f584e1d1ddfa1c3566abd476 | [
"MIT"
] | null | null | null | config.py | mt32net/cmm_notifier | 4d52a32c5074b1a1f584e1d1ddfa1c3566abd476 | [
"MIT"
] | null | null | null | config.py | mt32net/cmm_notifier | 4d52a32c5074b1a1f584e1d1ddfa1c3566abd476 | [
"MIT"
] | null | null | null | import os
config = {
"secret": "",
"uuid": "",
"endpointURL": ""
}
def is_file_empty(file_path):
""" Check if file is empty by confirming if its size is 0 bytes"""
# Check if file exist and it is empty
return os.path.exists(file_path) and os.stat(file_path).st_size == 0 and os.path.getsize... | 20.909091 | 108 | 0.601087 | import os
import json
config = {
"secret": "",
"uuid": "",
"endpointURL": ""
}
def getDeviceSecret():
return config["secret"]
def getDeviceUUID():
return config["uuid"]
def getServerAddress():
addr = config["endpointURL"]
if addr.endswith("/"):
addr = addr[:-1]
return addr... | 0 | 0 | 0 | 0 | 0 | 455 | 0 | -10 | 137 |
5a5a368b715d4c39ada8f4382251fe387fb6060e | 9,691 | py | Python | legocollector/utils/ldraw_studcount_parser.py | ericziethen/legocollector | 06aa984a5998979e7aa9c59e94a38633d653de55 | [
"MIT"
] | 1 | 2020-12-21T22:23:09.000Z | 2020-12-21T22:23:09.000Z | legocollector/utils/ldraw_studcount_parser.py | ericziethen/legocollector | 06aa984a5998979e7aa9c59e94a38633d653de55 | [
"MIT"
] | 150 | 2019-08-28T20:20:01.000Z | 2020-07-12T07:09:05.000Z | legocollector/utils/ldraw_studcount_parser.py | ericziethen/legocollector | 06aa984a5998979e7aa9c59e94a38633d653de55 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
create_json_for_parts('ldraw_studcount.json')
| 34.610714 | 113 | 0.664947 | import datetime
import enum
import json
import os
from pathlib import Path, PureWindowsPath
class SubfileMissingError(Exception):
"""Subfile is Missing Exception."""
@enum.unique
class LineType(enum.Enum):
# pylint: disable=invalid-name
UNKNOWN = 'Unknown'
COMMENT = 'Comments'
PART = 'Parts'
... | 0 | 448 | 0 | 2,219 | 0 | 6,516 | 0 | -18 | 433 |
ab2e980d063fadd423ad05029f6ef28ce4c04c33 | 918 | py | Python | exchange_rates/cbr_ru_parse.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | null | null | null | exchange_rates/cbr_ru_parse.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | null | null | null | exchange_rates/cbr_ru_parse.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
""" ."""
if __name__ == '__main__':
from datetime import date
date_req = date.today().strftime('%d.%m.%Y')
url = 'https://www.cbr.ru/currency_base/daily.aspx?date_req=' + date_req
# pip install robobrowser
from ro... | 27.818182 | 94 | 0.627451 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
"""Парсер курса доллара и евро за текущую дату от сайта центробанка России."""
if __name__ == '__main__':
from datetime import date
date_req = date.today().strftime('%d.%m.%Y')
url = 'https://www.cbr.ru/currency_base/daily.aspx?date... | 120 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b9c02aafcf9306ad0a58a74e54efbdd70e3772e4 | 7,030 | py | Python | tests/rackdiag/test_latex.py | tk0miya/sphinxcontrib-nwdiag | 14c31c07e643d0402ba048bfb0bd445f07775abd | [
"BSD-2-Clause"
] | 4 | 2018-03-12T18:59:41.000Z | 2020-03-06T02:37:54.000Z | tests/rackdiag/test_latex.py | tk0miya/sphinxcontrib-nwdiag | 14c31c07e643d0402ba048bfb0bd445f07775abd | [
"BSD-2-Clause"
] | 4 | 2018-02-14T21:22:43.000Z | 2019-12-10T17:03:10.000Z | tests/rackdiag/test_latex.py | tk0miya/sphinxcontrib-nwdiag | 14c31c07e643d0402ba048bfb0bd445f07775abd | [
"BSD-2-Clause"
] | 3 | 2017-05-26T05:45:30.000Z | 2019-08-21T05:53:32.000Z | # -*- coding: utf-8 -*-
from sphinx_testing import with_app
CR = '\r?\n'
rackdiag_fontpath = '/usr/share/fonts/truetype/ipafont/ipagp.ttf'
with_png_app = with_app(srcdir='tests/docs/rackdiag',
buildername='latex',
write_docstring=True,
confoverri... | 33.798077 | 105 | 0.503841 | # -*- coding: utf-8 -*-
import os
import re
from sphinx_testing import with_app
import unittest
CR = '\r?\n'
rackdiag_fontpath = '/usr/share/fonts/truetype/ipafont/ipagp.ttf'
with_png_app = with_app(srcdir='tests/docs/rackdiag',
buildername='latex',
write_docstring=Tr... | 0 | 5,261 | 0 | 35 | 0 | 0 | 0 | -30 | 414 |
de2cd8bb23534894e920c8019c253623de843d7d | 7,864 | py | Python | tools/RNN/rnn_quantizer/tensorflow/tf_nndct/graph/op_def.py | hito0512/Vitis-AI | 996459fb96cb077ed2f7e789d515893b1cccbc95 | [
"Apache-2.0"
] | 1 | 2022-02-17T22:13:23.000Z | 2022-02-17T22:13:23.000Z | tools/RNN/rnn_quantizer/tensorflow/tf_nndct/graph/op_def.py | hito0512/Vitis-AI | 996459fb96cb077ed2f7e789d515893b1cccbc95 | [
"Apache-2.0"
] | null | null | null | tools/RNN/rnn_quantizer/tensorflow/tf_nndct/graph/op_def.py | hito0512/Vitis-AI | 996459fb96cb077ed2f7e789d515893b1cccbc95 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 24.196923 | 79 | 0.675865 | # Copyright 2019 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 0 | 2,654 | 0 | 3,980 | 0 | 0 | 0 | 61 | 433 |
1a59477b39e10e1a0a4e33a5c9745ef9b0cb9cdd | 12,063 | py | Python | huntsman_dust/utils.py | lspitler/huntsman-dust | 523d439937ef45856df023451e8dfae8088211de | [
"MIT"
] | null | null | null | huntsman_dust/utils.py | lspitler/huntsman-dust | 523d439937ef45856df023451e8dfae8088211de | [
"MIT"
] | 4 | 2018-07-28T17:37:57.000Z | 2018-07-28T22:59:35.000Z | huntsman_dust/utils.py | lspitler/huntsman-dust | 523d439937ef45856df023451e8dfae8088211de | [
"MIT"
] | 1 | 2019-07-06T10:27:51.000Z | 2019-07-06T10:27:51.000Z | import os
import numpy as np
from scipy import fftpack
import matplotlib.pyplot as plt
from astropy.io import fits
from astropy.wcs import WCS
from astropy.stats import SigmaClip
from astropy.stats import gaussian_fwhm_to_sigma
from astropy.convolution import Gaussian2DKernel
from astropy.coordinates import SkyCoord
fr... | 35.06686 | 79 | 0.569842 | import os
import numpy as np
from scipy import fftpack
import matplotlib.pyplot as plt
from astropy.io import fits
from astropy.wcs import WCS
from astropy.stats import SigmaClip
from astropy.stats import gaussian_fwhm_to_sigma
from astropy.convolution import Gaussian2DKernel
from astropy.coordinates import SkyCoord
fr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
61fcb32f380abdc8521d7acfae33943791a5d3f0 | 1,629 | py | Python | src/commands/command.py | an-dyy/lefi-bot | 07f1b97d009dcc3fb8ec52eb14d4503861ac8a74 | [
"MIT"
] | 3 | 2021-07-26T03:28:40.000Z | 2021-07-29T08:16:02.000Z | src/commands/command.py | an-dyy/lefi-bot | 07f1b97d009dcc3fb8ec52eb14d4503861ac8a74 | [
"MIT"
] | null | null | null | src/commands/command.py | an-dyy/lefi-bot | 07f1b97d009dcc3fb8ec52eb14d4503861ac8a74 | [
"MIT"
] | 1 | 2021-07-29T07:50:12.000Z | 2021-07-29T07:50:12.000Z | from __future__ import annotations
import typing as t
if t.TYPE_CHECKING:
__all__ = ("Command",)
| 28.578947 | 88 | 0.603438 | from __future__ import annotations
import typing as t
if t.TYPE_CHECKING:
from .context import Context
from ..utils import maybe_coro
__all__ = ("Command",)
class Command:
def __init__(self, *args, **kwargs):
self.callback: t.Callable[..., t.Coroutine] = kwargs.pop("callback")
self._name: ... | 0 | 41 | 273 | 571 | 0 | 531 | 0 | 16 | 95 |
baa4372c438f3d6d2e4fafac88336e8b69c43e51 | 1,991 | py | Python | recognition/arcface_paddle/dynamic/utils/data_parallel.py | qaz734913414/insightface | 4101fe608ca1d38604a23d53f32314ce8a28fe79 | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | recognition/arcface_paddle/dynamic/utils/data_parallel.py | qaz734913414/insightface | 4101fe608ca1d38604a23d53f32314ce8a28fe79 | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | recognition/arcface_paddle/dynamic/utils/data_parallel.py | qaz734913414/insightface | 4101fe608ca1d38604a23d53f32314ce8a28fe79 | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.929825 | 80 | 0.683074 | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 0 | 1,318 | 0 | 0 | 0 | 0 | 0 | -8 | 69 |
b839e91cbc1b50e7916c464f7be1a596a4a43767 | 5,332 | py | Python | data_transformer.py | dozsam13/LHYP | af7115c115fdff51399b83cd1a515bf2c6f7879d | [
"MIT"
] | null | null | null | data_transformer.py | dozsam13/LHYP | af7115c115fdff51399b83cd1a515bf2c6f7879d | [
"MIT"
] | null | null | null | data_transformer.py | dozsam13/LHYP | af7115c115fdff51399b83cd1a515bf2c6f7879d | [
"MIT"
] | null | null | null | from utils import get_logger
import os
import sys
logger = get_logger(__name__)
in_dir = sys.argv[1]
out_dir = sys.argv[2]
if not os.path.isdir(in_dir):
logger.error("Invalid input directory: {}".format(in_dir))
else:
patient_folders = sorted(os.listdir(in_dir))
for patient_folder in patient_folders:
... | 41.015385 | 131 | 0.722243 | from con_reader import CONreaderVM
from dicom_reader import DCMreaderVM
from utils import get_logger
from domain.patient_data import PatientData
import numpy as np
import pickle
import os
import sys
import cv2 as cv
logger = get_logger(__name__)
def create_path_for_file(pickle_file_path):
os.makedirs(os.path.dirn... | 0 | 0 | 0 | 0 | 0 | 4,584 | 0 | 34 | 316 |
2df13fe1d28bde75632e035392de59d9ff455bad | 1,726 | py | Python | week_data.py | vv31415926/lesson_15_Pro | f792b42c1b9f550bd1323d01c0587cd5c91ea2f7 | [
"MIT"
] | null | null | null | week_data.py | vv31415926/lesson_15_Pro | f792b42c1b9f550bd1323d01c0587cd5c91ea2f7 | [
"MIT"
] | null | null | null | week_data.py | vv31415926/lesson_15_Pro | f792b42c1b9f550bd1323d01c0587cd5c91ea2f7 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
wd = WeekData()
print( wd.get_plan_day( 0 ) )
print( wd.get_plan_day( 1 ) )
print( wd.get_plan_day( 2 ) )
print( wd.get_plan_day( 3 ) )
print( wd.get_plan_day( 4 ) )
print( wd.get_plan_day( 5 ) )
print( wd.get_plan_day( 6 ) ) | 33.843137 | 71 | 0.579374 | from day_data import DayData
import datetime
class WeekData:
def __init__(self):
today = datetime.datetime.today()
self.selected_day = today.strftime("%w")
self.to_week = {'1': DayData(), '2': DayData(), '3': DayData(),
'4': DayData(), '5': DayData(), '6': DayData()... | 104 | 0 | 0 | 1,320 | 0 | 0 | 0 | 1 | 67 |
8fca43ede734b63205929aa9b18ba8e68b3bb003 | 4,259 | py | Python | tool/draw_box.py | YujieLu10/tslam | 1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd | [
"Apache-2.0"
] | null | null | null | tool/draw_box.py | YujieLu10/tslam | 1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd | [
"Apache-2.0"
] | null | null | null | tool/draw_box.py | YujieLu10/tslam | 1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import math
import os
np.set_printoptions(threshold=np.inf)
# prepare some coordinates
# [3, 4, 13, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 154, 155, 156, 157, 158]
# 2 2 2
# /home/jianrenw/prox/tslam/data/local/agent/20210506/resetnormal/gtsample/voxel... | 37.690265 | 280 | 0.667528 | import matplotlib.pyplot as plt
import numpy as np
import math
import os
np.set_printoptions(threshold=np.inf)
# prepare some coordinates
# [3, 4, 13, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 154, 155, 156, 157, 158]
# 2 2 2
# /home/jianrenw/prox/tslam/data/local/agent/20210506/resetnormal/gtsample/voxel... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1fb06c917bb3ee4d9acd325afe9667ea4c2437e1 | 1,030 | py | Python | char blackness.py | UnsignedByte/Ascii-Art-Generator | 76b5c40692580d0e65b9667037c81c182d0a202a | [
"MIT"
] | null | null | null | char blackness.py | UnsignedByte/Ascii-Art-Generator | 76b5c40692580d0e65b9667037c81c182d0a202a | [
"MIT"
] | null | null | null | char blackness.py | UnsignedByte/Ascii-Art-Generator | 76b5c40692580d0e65b9667037c81c182d0a202a | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw, ImageFont
import os
grayscale=[]
unicodeblocks = [(32,126),(174,846),(910,1366),(1421,1479),(5761,5788),(6656,6678),(7680,7957),(8448,8587),(9312,9472),(9696,10495),(10854,10956),(12032,12245),(11200,11208)]
for block in unicodeblocks:
for i in range(block[0],block[1]+1):
... | 38.148148 | 174 | 0.635922 | from PIL import Image,ImageDraw,ImageFont
import os
grayscale=[]
unicodeblocks = [(32,126),(174,846),(910,1366),(1421,1479),(5761,5788),(6656,6678),(7680,7957),(8448,8587),(9312,9472),(9696,10495),(10854,10956),(12032,12245),(11200,11208)]
for block in unicodeblocks:
for i in range(block[0],block[1]+1):
to... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 0 |
0fbdd277db2c9e011fc459817c0381adbcdfb892 | 2,867 | py | Python | tests/transformation/test_infer_datatypes.py | fpjentzsch/finn-base | 7cd7e00ba6709a85073ba22beeb5827e684fe085 | [
"BSD-3-Clause"
] | 23 | 2020-10-15T13:23:39.000Z | 2022-03-09T16:36:58.000Z | tests/transformation/test_infer_datatypes.py | fpjentzsch/finn-base | 7cd7e00ba6709a85073ba22beeb5827e684fe085 | [
"BSD-3-Clause"
] | 23 | 2020-10-15T13:32:29.000Z | 2022-02-21T15:51:19.000Z | tests/transformation/test_infer_datatypes.py | fpjentzsch/finn-base | 7cd7e00ba6709a85073ba22beeb5827e684fe085 | [
"BSD-3-Clause"
] | 14 | 2020-10-15T13:27:54.000Z | 2021-12-27T04:52:25.000Z | # Copyright (c) 2020, Xilinx
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the follow... | 51.196429 | 84 | 0.779909 | # Copyright (c) 2020, Xilinx
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the follow... | 0 | 0 | 0 | 0 | 0 | 941 | 0 | 229 | 179 |
8e0fe7f0809c8c710373ef72b05422507b0c1188 | 3,258 | py | Python | List-1.py | HermanSanghera18/CodingBatPy | fe30edf8c2b5dfb4bac771a875e78edac074d1f6 | [
"MIT"
] | null | null | null | List-1.py | HermanSanghera18/CodingBatPy | fe30edf8c2b5dfb4bac771a875e78edac074d1f6 | [
"MIT"
] | null | null | null | List-1.py | HermanSanghera18/CodingBatPy | fe30edf8c2b5dfb4bac771a875e78edac074d1f6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Herman Sanghera
November 2, 2019
CodingBat Solutions (Python)
This is a python file containing my own solutions to the
different Python List-1 exercises on codingbat.com
"""
"""
List-1 > first_last6:
Given an array of ints, return True if 6 appears as
either the first or las... | 23.106383 | 69 | 0.635973 | # -*- coding: utf-8 -*-
"""
Herman Sanghera
November 2, 2019
CodingBat Solutions (Python)
This is a python file containing my own solutions to the
different Python List-1 exercises on codingbat.com
"""
"""
List-1 > first_last6:
Given an array of ints, return True if 6 appears as
either the first or las... | 0 | 0 | 0 | 0 | 0 | 840 | 0 | 0 | 276 |
f4143c5584db391ca9e4d9ea7c3406a15b065e22 | 209 | py | Python | chocolatepy/__init__.py | chinapandaman/chocolatepy | 9dc53f41ad877606601620cc45852d9c931947d9 | [
"MIT"
] | null | null | null | chocolatepy/__init__.py | chinapandaman/chocolatepy | 9dc53f41ad877606601620cc45852d9c931947d9 | [
"MIT"
] | 4 | 2020-09-23T23:26:50.000Z | 2020-09-26T23:41:32.000Z | chocolatepy/__init__.py | chinapandaman/chocolatepy | 9dc53f41ad877606601620cc45852d9c931947d9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 34.833333 | 70 | 0.760766 | # -*- coding: utf-8 -*-
from app import (ChocolateApp, DatabaseNotEnabledError,
InvalidAuthSettingsError, InvalidPyDALParameterError)
from server import ChocolateServer, NonChocolateAppError
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 45 |
32a11c5b7c864780f2fb04dbe1e89129696e4682 | 752 | py | Python | src/lambda_functions/bot_tester/run_conversation_test.py | aws-samples/aws-lex-v2-bot-analytics | e91eab683bc539dbea8e35904c5d43e99975636c | [
"MIT-0",
"BSD-3-Clause"
] | 6 | 2021-08-28T01:36:32.000Z | 2022-02-14T00:37:16.000Z | src/lambda_functions/bot_tester/run_conversation_test.py | aws-samples/aws-lex-v2-bot-analytics | e91eab683bc539dbea8e35904c5d43e99975636c | [
"MIT-0",
"BSD-3-Clause"
] | null | null | null | src/lambda_functions/bot_tester/run_conversation_test.py | aws-samples/aws-lex-v2-bot-analytics | e91eab683bc539dbea8e35904c5d43e99975636c | [
"MIT-0",
"BSD-3-Clause"
] | 1 | 2022-01-24T18:53:40.000Z | 2022-01-24T18:53:40.000Z | #!/usr/bin/env python3.8
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
"""Lex Bot Conversation Runner"""
import boto3
from botocore.config import Config as BotoCoreConfig
CLIENT_CONFIG = BotoCoreConfig(
retries={"mode": "adaptive", "max_attempts": 5},
)
CLIEN... | 32.695652 | 88 | 0.726064 | #!/usr/bin/env python3.8
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
"""Lex Bot Conversation Runner"""
import boto3
from botocore.config import Config as BotoCoreConfig
CLIENT_CONFIG = BotoCoreConfig(
retries={"mode": "adaptive", "max_attempts": 5},
)
CLIEN... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d224735ac679c349fb3a7a3afe16fe37810ddc75 | 14,564 | py | Python | d2/rest.py | wofmanaf/ResT | 508e30b28036e2cb882a03d24268dc70eb0c82a3 | [
"Apache-2.0"
] | 178 | 2021-05-31T01:26:17.000Z | 2022-03-30T09:28:01.000Z | d2/rest.py | wofmanaf/ResT | 508e30b28036e2cb882a03d24268dc70eb0c82a3 | [
"Apache-2.0"
] | 20 | 2021-05-31T09:40:56.000Z | 2022-03-07T09:24:51.000Z | d2/rest.py | wofmanaf/ResT | 508e30b28036e2cb882a03d24268dc70eb0c82a3 | [
"Apache-2.0"
] | 20 | 2021-05-31T03:35:02.000Z | 2022-03-15T11:25:29.000Z | import torch.nn as nn
__all__ = [
"ResT",
"build_rest_backbone",
"build_rest_fpn_backbone",
"build_retinanet_rest_fpn_backbone"]
| 37.536082 | 119 | 0.595235 | import torch
import torch.nn as nn
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
from detectron2.modeling.backbone import Backbone
from detectron2.modeling.backbone.build import BACKBONE_REGISTRY
from detectron2.modeling.backbone.fpn import FPN, LastLevelP6P7, LastLevelMaxPool
from detectron2.layer... | 0 | 2,562 | 0 | 11,299 | 0 | 0 | 0 | 184 | 363 |
8d29172c1c5d24d623d0c21dff8ad1a1b5dfd9dd | 1,612 | py | Python | support/runtests.py | EDRN/PublicPortal | c78cdd97a1061ad6c84fac5413df9d1022b38a1c | [
"Apache-2.0"
] | null | null | null | support/runtests.py | EDRN/PublicPortal | c78cdd97a1061ad6c84fac5413df9d1022b38a1c | [
"Apache-2.0"
] | null | null | null | support/runtests.py | EDRN/PublicPortal | c78cdd97a1061ad6c84fac5413df9d1022b38a1c | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# Copyright 2009 California Institute of Technology. ALL RIGHTS
# RESERVED. U.S. Government Sponsorship acknowledged.
#
# Run EDRN Public Portal tests
import subprocess, os, os.path, sys, ConfigParser
_executable = os.path.join('bin', 'instance-debug')
_logDir = os.path.join('var', 'testlogs')
def ... | 30.415094 | 86 | 0.602978 | # encoding: utf-8
# Copyright 2009 California Institute of Technology. ALL RIGHTS
# RESERVED. U.S. Government Sponsorship acknowledged.
#
# Run EDRN Public Portal tests
import subprocess, os, os.path, sys, ConfigParser
_executable = os.path.join('bin', 'instance-debug')
_logDir = os.path.join('var', 'testlogs')
def ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ce7d0120d0cbc128983d7d15fdb26919e66fd359 | 7,182 | py | Python | yue/core/settings.py | nsetzer/YueMusicPlayer | feaf6fe5c046b1a7f6b7774d4e86a2fbb1e431cf | [
"MIT"
] | null | null | null | yue/core/settings.py | nsetzer/YueMusicPlayer | feaf6fe5c046b1a7f6b7774d4e86a2fbb1e431cf | [
"MIT"
] | null | null | null | yue/core/settings.py | nsetzer/YueMusicPlayer | feaf6fe5c046b1a7f6b7774d4e86a2fbb1e431cf | [
"MIT"
] | 1 | 2019-03-06T14:29:27.000Z | 2019-03-06T14:29:27.000Z |
K_STR=1 # a single string value
K_INT=2 # a numeric field
K_CSV=3 #
| 31.778761 | 95 | 0.524088 |
from .sqlstore import SQLTable, SQLView
K_STR=1 # a single string value
K_INT=2 # a numeric field
K_CSV=3 #
class Settings(object):
"""Application Settings backed by a database
provides a basic key/value store for Strings, Integers, and List-Of-Strings
"""
__instance = None
def __init__(self, ... | 0 | 116 | 0 | 6,932 | 0 | 0 | 0 | 18 | 46 |
1cedfc9b6812105e0cddd73ad57c955adc3a5c8a | 4,358 | py | Python | 02_Python/DBSCAN.py | milaan9/Clustering_Algorithms_from_Scratch | b03cc6b302036653465d6e897352697f2e817b8c | [
"MIT"
] | 126 | 2021-12-02T13:32:46.000Z | 2022-03-14T13:43:35.000Z | 02_Python/DBSCAN.py | Lexie778/Clustering_Algorithms_from_Scratch | ec119a2522dc1dc7b097ecb269912f8d44387dbb | [
"MIT"
] | null | null | null | 02_Python/DBSCAN.py | Lexie778/Clustering_Algorithms_from_Scratch | ec119a2522dc1dc7b097ecb269912f8d44387dbb | [
"MIT"
] | 124 | 2021-12-02T13:32:48.000Z | 2022-03-06T17:04:02.000Z | # ================================================================================================================
# ----------------------------------------------------------------------------------------------------------------
# DBSCAN
# -----------------------------------------------------------... | 34.046875 | 123 | 0.47843 | # ================================================================================================================
# ----------------------------------------------------------------------------------------------------------------
# DBSCAN
# -----------------------------------------------------------... | 0 | 0 | 0 | 3,197 | 0 | 385 | 0 | 44 | 201 |
dbbebec78fc7013d0845a17fe8b66e49e3b41e98 | 544 | py | Python | plugins/pelican-page-order/page_order.py | chalkless/tdwg-website | b0be535fcd5acd48205da1982412a263ec3d7f01 | [
"CC-BY-4.0"
] | 12 | 2017-10-03T13:35:54.000Z | 2022-03-18T13:23:34.000Z | plugins/pelican-page-order/page_order.py | chalkless/tdwg-website | b0be535fcd5acd48205da1982412a263ec3d7f01 | [
"CC-BY-4.0"
] | 110 | 2017-08-11T12:54:00.000Z | 2022-03-20T22:04:20.000Z | plugins/pelican-page-order/page_order.py | chalkless/tdwg-website | b0be535fcd5acd48205da1982412a263ec3d7f01 | [
"CC-BY-4.0"
] | 59 | 2017-11-07T05:04:42.000Z | 2022-03-22T19:39:23.000Z | """
Page Order
==========
Adds a `page_order` attribute to all pages if one is not defined.
"""
| 24.727273 | 79 | 0.639706 | """
Page Order
==========
Adds a `page_order` attribute to all pages if one is not defined.
"""
from pelican import signals
def set_page_order(generator):
for page in generator.pages:
try:
page.page_order = int(page.page_order)
except:
if 'DEFAULT_PAGE_ORDER' in generator.... | 0 | 0 | 0 | 0 | 0 | 372 | 0 | 6 | 69 |
2830bd49dafb22b495bb8c269fb5b1baae22792c | 5,615 | py | Python | sidekick-experimental/sidekick/experimental/queue.py | fabiommendes/sidekick | 993ae7b8496347ad9720d3ff11e10ab946c3a800 | [
"MIT"
] | 32 | 2017-08-10T09:42:51.000Z | 2022-03-18T17:21:26.000Z | sidekick-experimental/sidekick/experimental/queue.py | fabiommendes/sidekick | 993ae7b8496347ad9720d3ff11e10ab946c3a800 | [
"MIT"
] | 1 | 2019-04-10T13:07:45.000Z | 2019-04-18T02:27:47.000Z | sidekick-experimental/sidekick/experimental/queue.py | fabiommendes/sidekick | 993ae7b8496347ad9720d3ff11e10ab946c3a800 | [
"MIT"
] | 5 | 2017-10-10T13:43:23.000Z | 2019-06-18T00:09:15.000Z |
def on_parts(func):
"""
Distribute methods on left and right parts.
"""
return method
def as_list(func):
"""
Apply method as if queue was a list and return queue with only the right
side.
"""
return method
| 28.647959 | 80 | 0.593054 | import collections.abc
import functools
from ..properties import lazy
from .linkedlist import List, Nil
def on_parts(func):
"""
Distribute methods on left and right parts.
"""
@functools.wraps(func)
def method(self, *args):
left = func(self._left, *args)
right = func(self._right,... | 0 | 302 | 0 | 4,882 | 0 | 0 | 0 | 16 | 166 |
f2d06cad6e38b1dbf12f2aa912a526d96ced214d | 5,775 | py | Python | litesession.py | bobuk/tcplanz | 80564d77e095d77347843c8a36c98f275e24c088 | [
"BSD-3-Clause"
] | 71 | 2015-11-15T07:15:57.000Z | 2022-03-19T02:12:09.000Z | litesession.py | bobuk/tcplanz | 80564d77e095d77347843c8a36c98f275e24c088 | [
"BSD-3-Clause"
] | 2 | 2018-07-27T10:15:16.000Z | 2020-10-02T08:56:01.000Z | litesession.py | bobuk/tcplanz | 80564d77e095d77347843c8a36c98f275e24c088 | [
"BSD-3-Clause"
] | 14 | 2016-12-05T07:53:41.000Z | 2022-01-12T06:43:26.000Z | #!/usr/bin/env pypy
| 29.464286 | 140 | 0.574026 | #!/usr/bin/env pypy
import dpkt
import gzip
import zlib
import struct
import sys
from collections import defaultdict
from cStringIO import StringIO
from tcpsession import TCPSession, tcp_flags
class LiteSession:
def __init__(self, num=0):
self.num=num
self.packed_content=list()
self.star... | 0 | 0 | 0 | 2,727 | 1,983 | 798 | 0 | -3 | 247 |
e2c9f620dd36af2ae12ae14166f285bc0c4b5cc6 | 10,642 | py | Python | discopy/argument_extract.py | mahmuduzzaman/discopy | 5bb0986d4f841aed6739fca5063ddfe6073920fa | [
"MIT"
] | null | null | null | discopy/argument_extract.py | mahmuduzzaman/discopy | 5bb0986d4f841aed6739fca5063ddfe6073920fa | [
"MIT"
] | null | null | null | discopy/argument_extract.py | mahmuduzzaman/discopy | 5bb0986d4f841aed6739fca5063ddfe6073920fa | [
"MIT"
] | null | null | null |
import nltk
def extract_ps_arguments(clauses, conn_head, indices, ptree, arg2):
"""
If Arg1 is in the previous sentence relative to Arg2, a majority classifier in Lin et al. gave the full previous
sentence as Arg1, which already gives good results in argument extraction
"""
feature_set = ... | 37.471831 | 120 | 0.609002 | import os
import pickle
import nltk
from discopy.confusion_matrix import *
from discopy.conn_head_mapper import *
from discopy.utils import discourse_adverbial, coordinating_connective, subordinating_connective
def rootpath(clause):
path = ''
while clause.parent():
clause = clause.parent()
p... | 0 | 0 | 0 | 2,101 | 0 | 6,107 | 0 | 89 | 364 |
678660d95d5b76de0bb3535315dcb21ee5888802 | 7,276 | py | Python | main.py | XJay18/ResourceScheduling | 1139070f7469a0660cce4da1327fa6277eeec661 | [
"MIT"
] | null | null | null | main.py | XJay18/ResourceScheduling | 1139070f7469a0660cce4da1327fa6277eeec661 | [
"MIT"
] | null | null | null | main.py | XJay18/ResourceScheduling | 1139070f7469a0660cce4da1327fa6277eeec661 | [
"MIT"
] | null | null | null |
INPUT_DIRECTORY = "input"
OUTPUT_DIRECTORY = "output"
if __name__ == '__main__':
arg = arg_parser()
if arg.method == "NMC":
if "task1" in arg.input_name:
run_new_task1_sample(arg.input_name, "naiveMC", 1)
elif "task2" in arg.input_name:
run_new_task2_sample(arg.in... | 43.831325 | 102 | 0.629054 | from object.job import Job as Job1
from object.scheduler import Scheduler as Scheduler1
import os
import copy
import pickle
import argparse
INPUT_DIRECTORY = "input"
OUTPUT_DIRECTORY = "output"
def arg_parser():
parser = argparse.ArgumentParser(description="Resource scheduling problem in Hadoop.\n"
... | 0 | 0 | 0 | 0 | 0 | 5,501 | 0 | 8 | 247 |
58f2ac53e2095f1a18cecdc635e501a6c10052ea | 598 | py | Python | dnslambda_server.py | EmperorIrritant/dnslambda | 017941f56fecad539c0bfb2afff071944809f425 | [
"MIT"
] | null | null | null | dnslambda_server.py | EmperorIrritant/dnslambda | 017941f56fecad539c0bfb2afff071944809f425 | [
"MIT"
] | null | null | null | dnslambda_server.py | EmperorIrritant/dnslambda | 017941f56fecad539c0bfb2afff071944809f425 | [
"MIT"
] | null | null | null | from random import choice
import dns.message
import dns.query
dohservers = ['https://dns.google/dns-query', 'https://cloudflare-dns.com/dns-query', 'https://doh.appliedprivacy.net/query']
server = choice(dohservers)
| 33.222222 | 125 | 0.705686 | import requests
from random import choice
import dns.message
import dns.query
import dns.rdatatype
dohservers = ['https://dns.google/dns-query', 'https://cloudflare-dns.com/dns-query', 'https://doh.appliedprivacy.net/query']
server = choice(dohservers)
def lambda_handler(event, context):
qname = event["query"]["... | 0 | 0 | 0 | 0 | 0 | 320 | 0 | -7 | 67 |
3178dd15c40abdef210f245f4def820b1e53e95f | 184 | py | Python | problemsets/Codeforces/Python/M883.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | problemsets/Codeforces/Python/M883.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | problemsets/Codeforces/Python/M883.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | """
*
* Author: Juarez Paulino(coderemite)
* Email: juarez.paulino@gmail.com
*
"""
I=lambda:map(int,input().split())
a,b=I()
c,d=I()
print((max(1,abs(a-c))+max(1,abs(b-d))<<1)+4) | 18.4 | 45 | 0.592391 | """
*
* Author: Juarez Paulino(coderemite)
* Email: juarez.paulino@gmail.com
*
"""
I=lambda:map(int,input().split())
a,b=I()
c,d=I()
print((max(1,abs(a-c))+max(1,abs(b-d))<<1)+4) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
171c579b875af90c8a1a2947774aaf9fab2561d0 | 1,687 | py | Python | project.py | lispcoc/pciutils.efi | 0292c9548edc91312322e9c0a201ab7f1e252429 | [
"BSD-3-Clause"
] | null | null | null | project.py | lispcoc/pciutils.efi | 0292c9548edc91312322e9c0a201ab7f1e252429 | [
"BSD-3-Clause"
] | null | null | null | project.py | lispcoc/pciutils.efi | 0292c9548edc91312322e9c0a201ab7f1e252429 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name, line-too-long
#
# (c) 2019-2020 Timothy Lin <timothy.gh.lin@gmail.com>, BSD 3-Clause License.
#
"""
This is the project configuration file as well the starter script for iPug.
"""
import os
# These UDK tag source trees have been build-t... | 30.672727 | 99 | 0.554831 | #!/usr/bin/env python
#
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name, line-too-long
#
# (c) 2019-2020 Timothy Lin <timothy.gh.lin@gmail.com>, BSD 3-Clause License.
#
"""
This is the project configuration file as well the starter script for iPug.
"""
import os
# These UDK tag source trees have been build-t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
17d57503d909619aeef345f4aa00a016a2481518 | 1,920 | py | Python | extractfail.py | ihaveamac/FAIL | 4dda02803e8d851c3d6eca036a2007b34d975da7 | [
"Xnet",
"X11",
"CC-BY-4.0"
] | 3 | 2016-04-05T01:00:02.000Z | 2017-07-01T08:54:57.000Z | extractfail.py | ihaveamac/FAIL | 4dda02803e8d851c3d6eca036a2007b34d975da7 | [
"Xnet",
"X11",
"CC-BY-4.0"
] | null | null | null | extractfail.py | ihaveamac/FAIL | 4dda02803e8d851c3d6eca036a2007b34d975da7 | [
"Xnet",
"X11",
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python2
import argparse, sys, os, binascii
if len(sys.argv) != 3:
print 'pick a file to extract and a directory to put all the files in'
print ' extractfail.py myarchive.fail directory'
sys.exit()
if not os.path.isfile(sys.argv[1]):
print sys.argv[1] + ' doesn\'t exist'
sys.exit()
... | 28.656716 | 74 | 0.680208 | #!/usr/bin/env python2
import argparse, sys, os, binascii
if len(sys.argv) != 3:
print 'pick a file to extract and a directory to put all the files in'
print ' extractfail.py myarchive.fail directory'
sys.exit()
if not os.path.isfile(sys.argv[1]):
print sys.argv[1] + ' doesn\'t exist'
sys.exit()
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5cb5044c3cf87647f883457a721d248700767b86 | 419 | py | Python | example/pwm_example.py | amaork/raspi-io | aaea4532569010a64f3c54036b9db7eb81515d1a | [
"MIT"
] | 8 | 2018-02-28T16:02:36.000Z | 2021-08-06T12:57:39.000Z | example/pwm_example.py | amaork/raspi-io | aaea4532569010a64f3c54036b9db7eb81515d1a | [
"MIT"
] | null | null | null | example/pwm_example.py | amaork/raspi-io | aaea4532569010a64f3c54036b9db7eb81515d1a | [
"MIT"
] | 1 | 2019-05-08T06:50:33.000Z | 2019-05-08T06:50:33.000Z | #!/usr/bin/env python3.5
import raspi_io.utility as utility
from raspi_io import SoftPWM, GPIO
if __name__ == '__main__':
address = utility.scan_server()[0]
pwm20 = SoftPWM(address, GPIO.BCM, 20, 500)
pwm21 = SoftPWM(address, GPIO.BCM, 21, 1000)
pwm21.start(100)
pwm21.start(50)
pwm21.start(10... | 19.952381 | 48 | 0.656325 | #!/usr/bin/env python3.5
import raspi_io.utility as utility
from raspi_io import SoftPWM, GPIO
if __name__ == '__main__':
address = utility.scan_server()[0]
pwm20 = SoftPWM(address, GPIO.BCM, 20, 500)
pwm21 = SoftPWM(address, GPIO.BCM, 21, 1000)
pwm21.start(100)
pwm21.start(50)
pwm21.start(10... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0d436b8301dd7f3a492edd9ad87b09c10a37ced7 | 15,627 | py | Python | fpga/lib/pcie/tb/test_pcie_us_axil_master_256.py | totuwei/corundum | e983ad519fb4523d0ffca32f5e436195bcfc945c | [
"BSD-2-Clause-FreeBSD"
] | 544 | 2019-08-12T03:45:32.000Z | 2022-03-19T14:17:20.000Z | fpga/lib/pcie/tb/test_pcie_us_axil_master_256.py | akira2009999/corundum | cdc14769c33186c6d45fcd79b95c70889febff2b | [
"BSD-2-Clause-FreeBSD"
] | 78 | 2020-08-20T20:06:33.000Z | 2022-03-30T23:44:37.000Z | fpga/lib/pcie/tb/test_pcie_us_axil_master_256.py | akira2009999/corundum | cdc14769c33186c6d45fcd79b95c70889febff2b | [
"BSD-2-Clause-FreeBSD"
] | 142 | 2019-07-15T04:23:23.000Z | 2022-03-29T01:25:33.000Z | #!/usr/bin/env python
"""
Copyright (c) 2018 Alex Forencich
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, modify, merg... | 29.264045 | 117 | 0.621744 | #!/usr/bin/env python
"""
Copyright (c) 2018 Alex Forencich
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, modify, merg... | 0 | 8,759 | 0 | 0 | 0 | 5,375 | 0 | -31 | 136 |
13e60e46afd1997c82e669b8c2ad230ee34ef949 | 2,132 | py | Python | data.py | VUIIS/vxhr | 094785c97fbdcb17b34c821d5998a62d0f4c6c64 | [
"MIT"
] | 2 | 2015-06-21T03:50:41.000Z | 2016-03-06T05:11:18.000Z | data.py | VUIIS/vxhr | 094785c97fbdcb17b34c821d5998a62d0f4c6c64 | [
"MIT"
] | null | null | null | data.py | VUIIS/vxhr | 094785c97fbdcb17b34c821d5998a62d0f4c6c64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" data.py
Functions for grabbing/manipulating/reporting on data
"""
__author__ = 'Scott Burns <scott.s.burns@vanderbilt.edu>'
__copyright__ = 'Copyright 2014 Vanderbilt University. All Rights Reserved'
def get_raw():
"""Top-level function.Use to get a DataFrame fro... | 28.052632 | 77 | 0.680582 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" data.py
Functions for grabbing/manipulating/reporting on data
"""
__author__ = 'Scott Burns <scott.s.burns@vanderbilt.edu>'
__copyright__ = 'Copyright 2014 Vanderbilt University. All Rights Reserved'
import os
import pandas as pd
from redcap import Project
def get_... | 0 | 0 | 0 | 0 | 0 | 1,176 | 0 | -9 | 206 |
305bbf6706f23c17a6772494f9cfc745556e4ea5 | 3,162 | py | Python | tonegen/tonegen.py | abx393/doppler-demo | 257588f3f157643c6174eaae6f2535fa74b1a2ca | [
"MIT"
] | null | null | null | tonegen/tonegen.py | abx393/doppler-demo | 257588f3f157643c6174eaae6f2535fa74b1a2ca | [
"MIT"
] | null | null | null | tonegen/tonegen.py | abx393/doppler-demo | 257588f3f157643c6174eaae6f2535fa74b1a2ca | [
"MIT"
] | null | null | null |
import numpy as np
import scipy.signal as ss
if __name__ == '__main__':
fs = 48000 # sampling rate (Hz)
# duration = 20 # seconds
# N = int(duration * fs)
# n = np.arange(N)
# t = n / fs
# f = 21e3 # Hz
# samples = np.sin(2 * np.pi * f * t)
# savestereo('./audio/sine21k.wav', sample... | 27.495652 | 94 | 0.585705 | import wave, struct
import numpy as np
import scipy.signal as ss
import matplotlib.pyplot as plt
from tqdm import tqdm
def savemono(fname, samples, fs):
obj = wave.open(fname,'w')
obj.setnchannels(1) # mono
obj.setsampwidth(2)
obj.setframerate(fs)
samples *= 32767 / np.max(np.abs(samples))
fo... | 0 | 0 | 0 | 0 | 0 | 688 | 0 | 8 | 112 |
fabf7e00f1249b6bf20128ff9f585e469a59f706 | 392 | py | Python | tests/test_live_card.py | quapka/javus | 577e0c2dabfaea39d7ffacd42100d8a5f4cd738c | [
"MIT"
] | 1 | 2020-09-22T01:38:21.000Z | 2020-09-22T01:38:21.000Z | tests/test_live_card.py | petrs/javus | 6927c824d5e6b574a6a323c87bd5aa117eca5b00 | [
"MIT"
] | null | null | null | tests/test_live_card.py | petrs/javus | 6927c824d5e6b574a6a323c87bd5aa117eca5b00 | [
"MIT"
] | 1 | 2020-07-26T07:20:47.000Z | 2020-07-26T07:20:47.000Z |
# FIXME finish live testing
# due to the complexity of the JavaCard world we'll test the framework using a fixed and
# only example attack
LIVE_ATR = [59, 123, 24, 0, 0, 0, 49, 192, 100, 119, 227, 3, 0, 130, 144, 0]
| 19.6 | 88 | 0.696429 | import pytest
# FIXME finish live testing
# due to the complexity of the JavaCard world we'll test the framework using a fixed and
# only example attack
LIVE_ATR = [59, 123, 24, 0, 0, 0, 49, 192, 100, 119, 227, 3, 0, 130, 144, 0]
@pytest.mark.live
def test_using_correct_live_card():
pass
@pytest.mark.live
cl... | 0 | 111 | 0 | 0 | 0 | 0 | 0 | -8 | 68 |
08b2ce20ccddc41e40e1c3f62a0a1249a6e5167e | 1,800 | py | Python | authy/models.py | kelvin-daniel/instagram | 2ede5319266f4312a9440d4985d098bc7545c2ae | [
"MIT"
] | null | null | null | authy/models.py | kelvin-daniel/instagram | 2ede5319266f4312a9440d4985d098bc7545c2ae | [
"MIT"
] | null | null | null | authy/models.py | kelvin-daniel/instagram | 2ede5319266f4312a9440d4985d098bc7545c2ae | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.db.models.signals import post_save
# Create your models here.
post_save.connect(create_user_profile, sender=User)
post_save.connect(save_user_profile, sender=User) | 35.294118 | 76 | 0.748889 | from django.db import models
from django.contrib.auth.models import User
from post.models import Post
from cloudinary.models import CloudinaryField
from django.db.models.signals import post_save
from PIL import Image
from django.conf import settings
import os
def user_directory_path(instance, filename):
... | 0 | 0 | 0 | 813 | 0 | 486 | 0 | 37 | 236 |
5c8215a52877a5bf096ae2ada1c1484be3b385af | 1,250 | py | Python | pyvizio/api/remote.py | jezzab/pyvizio | 8086f9e5aac49d1d99ade02684ca35c05e03a7eb | [
"MIT"
] | 72 | 2017-08-08T19:32:12.000Z | 2022-03-18T03:18:41.000Z | pyvizio/api/remote.py | raman325/pyvizio | 9cf45fcc9b409caf223a38d8f79c775742ab4127 | [
"MIT"
] | 48 | 2017-09-16T16:37:54.000Z | 2022-01-23T20:43:42.000Z | pyvizio/api/remote.py | ConnectionMaster/pyvizio | 0fe4558557917509d3da3bb24f9221f15ba901ce | [
"MIT"
] | 42 | 2017-09-04T22:59:21.000Z | 2022-03-18T03:18:30.000Z | """Vizio SmartCast API command and class for emulating remote key presses."""
| 32.051282 | 86 | 0.6712 | """Vizio SmartCast API command and class for emulating remote key presses."""
from typing import List, Tuple
from pyvizio.api._protocol import ENDPOINT, KEY_ACTION
from pyvizio.api.base import CommandBase
class KeyPressEvent(object):
"""Emulated remote key press."""
def __init__(
self, key_code: Tu... | 0 | 0 | 0 | 995 | 0 | 0 | 0 | 61 | 114 |
baf6017ed1da47d5e192edc45a88b8f260f3a0ae | 1,269 | py | Python | logd_predictor.py | PatWalters/sfi | 01b5f6d80f30ecd3fda4c34f9502f01932103e34 | [
"MIT"
] | 7 | 2021-10-06T00:36:54.000Z | 2022-02-09T17:51:09.000Z | logd_predictor.py | PatWalters/sfi | 01b5f6d80f30ecd3fda4c34f9502f01932103e34 | [
"MIT"
] | null | null | null | logd_predictor.py | PatWalters/sfi | 01b5f6d80f30ecd3fda4c34f9502f01932103e34 | [
"MIT"
] | 4 | 2021-10-06T00:38:44.000Z | 2022-03-28T07:54:04.000Z | #!/usr/bin/env python
if __name__ == "__main__":
main()
| 27 | 89 | 0.621749 | #!/usr/bin/env python
import sys
import os
import lightgbm as lgbm
from rdkit import Chem
from rdkit.Chem import Descriptors
class LogDPredictor:
def __init__(self, model_file_name):
if not os.path.exists(model_file_name):
print(f"Error: Could not find model file {model_file_name}", file=sys.... | 0 | 0 | 0 | 708 | 0 | 347 | 0 | -7 | 157 |
03635a7a026a38875482b9eeeed9abd2cb7404a1 | 921 | py | Python | libsrc/mount_sd.py | t-ikegami/WioTerminal-CircuitPython | efbdc2e13ad969fe009d88f7ec4b836ca61ae973 | [
"MIT"
] | null | null | null | libsrc/mount_sd.py | t-ikegami/WioTerminal-CircuitPython | efbdc2e13ad969fe009d88f7ec4b836ca61ae973 | [
"MIT"
] | 1 | 2022-01-19T00:16:02.000Z | 2022-01-26T03:43:34.000Z | libsrc/mount_sd.py | t-ikegami/WioTerminal-CircuitPython | efbdc2e13ad969fe009d88f7ec4b836ca61ae973 | [
"MIT"
] | null | null | null | import board
import digitalio
spi = None
sd = None
vfs = None
path = "/sd"
det = digitalio.DigitalInOut(board.SD_DET)
det.switch_to_input(pull = digitalio.Pull.UP) # det.value == False if sd card is inserted.
mount()
| 20.021739 | 90 | 0.659066 | import board
import busio
import sdcardio
import storage
import digitalio
spi = None
sd = None
vfs = None
path = "/sd"
det = digitalio.DigitalInOut(board.SD_DET)
det.switch_to_input(pull = digitalio.Pull.UP) # det.value == False if sd card is inserted.
def mount() :
global spi, sd, vfs
if det.value is True... | 0 | 0 | 0 | 0 | 0 | 586 | 0 | -22 | 135 |
b669c2aaabe55678a168ec101a8038d60511878a | 190 | py | Python | store/admin.py | JuanFariasGit/crm | 5ab322644cb988a916bf6b5e8ee79322a40f2601 | [
"MIT"
] | null | null | null | store/admin.py | JuanFariasGit/crm | 5ab322644cb988a916bf6b5e8ee79322a40f2601 | [
"MIT"
] | null | null | null | store/admin.py | JuanFariasGit/crm | 5ab322644cb988a916bf6b5e8ee79322a40f2601 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Store
admin.site.register(Store, StoreAdmin)
| 19 | 51 | 0.752632 | from django.contrib import admin
from .models import Store
class StoreAdmin(admin.ModelAdmin):
list_display = ['store', 'created', 'modified']
admin.site.register(Store, StoreAdmin)
| 0 | 0 | 0 | 66 | 0 | 0 | 0 | 0 | 23 |
cee5e0f1bb4fe4c6b094e3d9cca4e9ef89355979 | 1,471 | py | Python | pywps/inout/formats/lists.py | ricardogsilva/PyWPS | 9ce51df7d81f9cd4bca47c026ec335490e5995e6 | [
"MIT"
] | null | null | null | pywps/inout/formats/lists.py | ricardogsilva/PyWPS | 9ce51df7d81f9cd4bca47c026ec335490e5995e6 | [
"MIT"
] | null | null | null | pywps/inout/formats/lists.py | ricardogsilva/PyWPS | 9ce51df7d81f9cd4bca47c026ec335490e5995e6 | [
"MIT"
] | null | null | null | """List of supported formats
"""
from collections import namedtuple
_FORMAT = namedtuple('FormatDefinition', 'mime_type,'
'extension, schema')
_FORMATS = namedtuple('FORMATS', 'GEOJSON, JSON, SHP, GML, GEOTIFF, WCS,'
'WCS100, WCS110, WCS20, WFS, WFS100,'
... | 47.451613 | 73 | 0.598232 | """List of supported formats
"""
from collections import namedtuple
_FORMAT = namedtuple('FormatDefinition', 'mime_type,'
'extension, schema')
_FORMATS = namedtuple('FORMATS', 'GEOJSON, JSON, SHP, GML, GEOTIFF, WCS,'
'WCS100, WCS110, WCS20, WFS, WFS100,'
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
22d8415dfd3f850520286bd77b038b8db02a97c1 | 898 | py | Python | src/bitcaster/dispatchers/handlers/system_email.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 4 | 2018-03-01T10:22:30.000Z | 2020-04-04T16:31:11.000Z | src/bitcaster/dispatchers/handlers/system_email.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 60 | 2018-05-20T04:42:32.000Z | 2022-02-10T17:03:37.000Z | src/bitcaster/dispatchers/handlers/system_email.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 1 | 2018-08-04T05:06:45.000Z | 2018-08-04T05:06:45.000Z | from logging import getLogger
logger = getLogger(__name__)
| 26.411765 | 62 | 0.648107 | from logging import getLogger
from constance import config
from django.conf import settings
from ..base import DispatcherOptions
from ..registry import dispatcher_registry
from .email import Email
logger = getLogger(__name__)
class EmailOptions(DispatcherOptions):
pass
@dispatcher_registry.register
class Sys... | 0 | 595 | 0 | 26 | 0 | 0 | 0 | 57 | 158 |
28eb4d932c793f92c5b6135259ddd373c9a0a9ab | 27,092 | py | Python | Scripts/simulation/display_snippet_tuning.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/display_snippet_tuning.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/display_snippet_tuning.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\display_snippet_tuning.py
# Compiled at: 2020-01-29 22:49:46
# Size of source mod 2**32: 20461 bytes... | 61.853881 | 601 | 0.574893 | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\display_snippet_tuning.py
# Compiled at: 2020-01-29 22:49:46
# Size of source mod 2**32: 20461 bytes... | 0 | 1,508 | 0 | 9,986 | 0 | 857 | 0 | 0 | 215 |
49309599b9c07af56f2756fe6d215c459c49f71d | 5,496 | py | Python | networks/Lawhern1to30Hz_2sec/config.py | msseibel/Biomag21 | 1b47cc3cb7b8bb3ff5adff5564947c187d658a22 | [
"MIT"
] | null | null | null | networks/Lawhern1to30Hz_2sec/config.py | msseibel/Biomag21 | 1b47cc3cb7b8bb3ff5adff5564947c187d658a22 | [
"MIT"
] | null | null | null | networks/Lawhern1to30Hz_2sec/config.py | msseibel/Biomag21 | 1b47cc3cb7b8bb3ff5adff5564947c187d658a22 | [
"MIT"
] | null | null | null |
import matplotlib
from libs import GeneratorCNN
matplotlib.interactive(False)
from importlib import reload
import gc
from libs import model_zoo
reload(model_zoo)
import numpy as np
from importlib import reload
from libs import utils
from libs import Multi_Class_Metrics as mcm
from tensorflow.keras import callbacks
rel... | 37.643836 | 246 | 0.632096 |
import matplotlib
from libs import GeneratorCNN
matplotlib.interactive(False)
from importlib import reload
import gc
from libs import model_zoo
reload(model_zoo)
import BaseLineModel as approach
import numpy as np
from importlib import reload
from libs import utils
from libs.utils import Bunch
from libs import Multi_C... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 44 |
b9ed433c4c63f5fb61a236b2bd2368b00d3a173a | 223 | py | Python | wolframclient/__init__.py | hilbin/MmaClientForPython | c3534908698a386c64175575a30acfd96266e3b8 | [
"MIT"
] | 1 | 2020-02-25T08:20:42.000Z | 2020-02-25T08:20:42.000Z | wolframclient/__init__.py | hilbin/MmaClientForPython | c3534908698a386c64175575a30acfd96266e3b8 | [
"MIT"
] | null | null | null | wolframclient/__init__.py | hilbin/MmaClientForPython | c3534908698a386c64175575a30acfd96266e3b8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from wolframclient.about import __author__, __name__, __version__
__all__ = ("__version__", "__name__", "__author__")
| 31.857143 | 73 | 0.753363 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from wolframclient.about import __author__, __name__, __version__
__all__ = ("__version__", "__name__", "__author__")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b5d37c81dc2a477db567197e4327e9960bb5fe35 | 2,138 | py | Python | src/FYP/fixture/views.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | src/FYP/fixture/views.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | src/FYP/fixture/views.py | MustafaAbbas110/FinalProject | 30d371f06a8a1875285cfd4a8940ca3610ec1274 | [
"BSD-3-Clause"
] | null | null | null | from fixture.models import schedule
#time = ctime()[11:16] == "01:00"
if(True):
rows = schedule.objects.all()
for row in rows:
row.delete()
| 19.089286 | 69 | 0.636109 | from django.shortcuts import render
import datetime
from time import ctime
from fixture import models
from fixture.models import schedule
#time = ctime()[11:16] == "01:00"
if(True):
rows = schedule.objects.all()
for row in rows:
row.delete()
from fixture import fixtureScraping
def DataLoadPrevRecord():
if(Fal... | 0 | 0 | 0 | 0 | 0 | 1,781 | 0 | 28 | 180 |
4af7511b4cb7c284cbb12741e046ddbf71bd7d13 | 2,077 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/galaxy/token.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-22T01:04:39.000Z | 2020-03-22T01:04:39.000Z | ansible/ansible/galaxy/token.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/galaxy/token.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-03-22T01:04:48.000Z | 2020-03-22T01:04:48.000Z | ########################################################################
#
# (C) 2015, Chris Houseknecht <chouse@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fo... | 32.453125 | 72 | 0.622532 | ########################################################################
#
# (C) 2015, Chris Houseknecht <chouse@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fo... | 0 | 0 | 0 | 988 | 0 | 0 | 0 | -10 | 91 |
a29747552d9ef1bab75b72f71405246191bff146 | 648 | py | Python | telegram/telegram/doctype/telebot_settings/telebot_settings.py | brownharryb/telegram | e1c88d89e8a50b812d7fc12889a594f4c35c5f26 | [
"MIT"
] | null | null | null | telegram/telegram/doctype/telebot_settings/telebot_settings.py | brownharryb/telegram | e1c88d89e8a50b812d7fc12889a594f4c35c5f26 | [
"MIT"
] | null | null | null | telegram/telegram/doctype/telebot_settings/telebot_settings.py | brownharryb/telegram | e1c88d89e8a50b812d7fc12889a594f4c35c5f26 | [
"MIT"
] | 1 | 2021-06-02T18:24:38.000Z | 2021-06-02T18:24:38.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Manqala Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
| 22.344828 | 79 | 0.736111 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Manqala Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils import get_url
import requests
class TelebotSettings(Document):
def valid... | 0 | 0 | 0 | 347 | 0 | 0 | 0 | 18 | 111 |
115b269e632dcd11ebc56f5722761cecd5212627 | 1,810 | py | Python | chppl/chppl_data.py | nocotan/chppL | 86cfc7a4185c2a8b36de2477229ea7b66bc276af | [
"MIT"
] | 5 | 2016-06-06T09:42:48.000Z | 2021-06-15T12:18:07.000Z | chppl/chppl_data.py | nocotan/chppL | 86cfc7a4185c2a8b36de2477229ea7b66bc276af | [
"MIT"
] | 9 | 2016-06-06T09:43:14.000Z | 2021-06-01T21:53:21.000Z | chppl/chppl_data.py | nocotan/chppL | 86cfc7a4185c2a8b36de2477229ea7b66bc276af | [
"MIT"
] | null | null | null | """chppL.
C/C++ package management system.
created by @nocotan
"""
| 21.547619 | 43 | 0.540331 | """chppL.
C/C++ package management system.
created by @nocotan
"""
class ChpplData:
"""main data"""
def __init__(self):
"""initialize
@param: __url
@param: __name
@param: __description
@param: __creator
@param: __package
@param: __confilm
"""
... | 0 | 0 | 0 | 1,719 | 0 | 0 | 0 | 0 | 23 |
700bff8cf43999cc1fa59baf91957eb9a4cd72a1 | 5,498 | py | Python | src/tests/ftest/util/daos_perf_utils.py | Junkrat-boommm/daos | 5d234a934010047af64bfa087f49c52c1acb1c3a | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/util/daos_perf_utils.py | Junkrat-boommm/daos | 5d234a934010047af64bfa087f49c52c1acb1c3a | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/util/daos_perf_utils.py | Junkrat-boommm/daos | 5d234a934010047af64bfa087f49c52c1acb1c3a | [
"BSD-2-Clause-Patent"
] | null | null | null | #!/usr/bin/python
"""
(C) Copyright 2019-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
| 39.271429 | 80 | 0.583121 | #!/usr/bin/python
"""
(C) Copyright 2019-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
from command_utils_base import FormattedParameter
from command_utils import ExecutableCommand
class DaosPerfCommand(ExecutableCommand):
"""Defines a object representing the daos_perf command.
... | 0 | 0 | 0 | 5,261 | 0 | 0 | 0 | 50 | 67 |
07a5ea60c9d898f7c06c33e61df12fe583effccd | 13,518 | py | Python | Project_main.py | boflops/checkers-ai | a36a10327d45c58832bc7cba49ade4a98b8a5402 | [
"MIT"
] | null | null | null | Project_main.py | boflops/checkers-ai | a36a10327d45c58832bc7cba49ade4a98b8a5402 | [
"MIT"
] | null | null | null | Project_main.py | boflops/checkers-ai | a36a10327d45c58832bc7cba49ade4a98b8a5402 | [
"MIT"
] | null | null | null | import sys
import Project_GameState
# What each module does
# sys - This will set the recursion limit so that algorithms won't run on forever.
# settings - This will import the settings file in the current directory.
# Importing the GameState which will be used purely as the GUI for the application. As it
# As it sta... | 53.856574 | 155 | 0.643216 | import sys
import pygame as pg
import logging
import Project_GameState
from settings import *
# What each module does
# sys - This will set the recursion limit so that algorithms won't run on forever.
# settings - This will import the settings file in the current directory.
# Importing the GameState which will be use... | 0 | 0 | 0 | 12,148 | 0 | 0 | 0 | 92 | 154 |
49b536ede1c8ba7d3d56fa1271ddd11df5f86a35 | 310 | py | Python | multiplesof3_5.py | dewaledr/python-scripts | 90e1c6ff44deaf65abd09e23d24b35bb799a4e29 | [
"Apache-2.0"
] | null | null | null | multiplesof3_5.py | dewaledr/python-scripts | 90e1c6ff44deaf65abd09e23d24b35bb799a4e29 | [
"Apache-2.0"
] | null | null | null | multiplesof3_5.py | dewaledr/python-scripts | 90e1c6ff44deaf65abd09e23d24b35bb799a4e29 | [
"Apache-2.0"
] | 1 | 2018-09-12T11:10:50.000Z | 2018-09-12T11:10:50.000Z | # Francis Adepoju, 2018-02-16
#Project Euler problem #1
summ = 0
i = 1
while i < 1000:
# For all integers either divisible by 3 or by 5, sum them up into variable called summ
if i % 3 == 0 or i % 5 == 0:
summ += i
i += 1
print("Sum of divisible of 3 or 5 les than 1000 equals: ", summ)
| 22.142857 | 91 | 0.612903 | # Francis Adepoju, 2018-02-16
#Project Euler problem #1
summ = 0
i = 1
while i < 1000:
# For all integers either divisible by 3 or by 5, sum them up into variable called summ
if i % 3 == 0 or i % 5 == 0:
summ += i
i += 1
print("Sum of divisible of 3 or 5 les than 1000 equals: ", summ)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9da413a8d5481a0c83444d0ab54b5716f0a5543 | 1,880 | py | Python | appengine/standard/ndb/queries/guestbook_test.py | ammumaddy/sample | 3be22b92919af3d08584ee0cb849a356f63e602b | [
"Apache-2.0"
] | 1 | 2018-09-24T04:54:26.000Z | 2018-09-24T04:54:26.000Z | appengine/standard/ndb/queries/guestbook_test.py | DalavanCloud/python-docs-samples | 439ca4c552940284743f5f22a590cc4b6dae1bef | [
"Apache-2.0"
] | 2 | 2021-06-10T23:54:32.000Z | 2021-06-10T23:54:33.000Z | appengine/standard/ndb/queries/guestbook_test.py | DalavanCloud/python-docs-samples | 439ca4c552940284743f5f22a590cc4b6dae1bef | [
"Apache-2.0"
] | 1 | 2018-09-24T04:53:12.000Z | 2018-09-24T04:53:12.000Z | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 28.059701 | 74 | 0.698404 | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 0 | 54 | 0 | 0 | 0 | 1,063 | 0 | -17 | 181 |
c1db5a35d7a49327dbd7e25d1e33e70f69e3078f | 1,086 | py | Python | examples/src/dbnd_examples/tests/tutorial_syntax/test_tutorial_syntax_t23_py3.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | examples/src/dbnd_examples/tests/tutorial_syntax/test_tutorial_syntax_t23_py3.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | examples/src/dbnd_examples/tests/tutorial_syntax/test_tutorial_syntax_t23_py3.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | import logging
import pytest
import six
if six.PY2:
pytestmark = pytest.mark.skip("Python 2 non compatible code") # py2 styling
else:
logger = logging.getLogger(__name__)
| 31.028571 | 87 | 0.767035 | import logging
import pytest
import six
if six.PY2:
pytestmark = pytest.mark.skip("Python 2 non compatible code") # py2 styling
else:
from dbnd_examples.tutorial_syntax import T23_task_with_mutliple_outputs_py3 as T23
logger = logging.getLogger(__name__)
class TestTutorialSyntax(object):
def test_t23... | 0 | 0 | 0 | 794 | 0 | 0 | 0 | 62 | 49 |
2c21b71fe0f3a32c1ae8317efa855419d82c9199 | 861 | py | Python | docx_restore.py | teodor-cotet/DiacriticsRestoration | e7b41d75b84ab2131694f16b9bd93448e83069e1 | [
"Apache-2.0"
] | 1 | 2020-12-05T15:45:48.000Z | 2020-12-05T15:45:48.000Z | docx_restore.py | teodor-cotet/DiacriticsRestoration | e7b41d75b84ab2131694f16b9bd93448e83069e1 | [
"Apache-2.0"
] | 2 | 2021-03-18T07:37:28.000Z | 2021-07-27T14:45:14.000Z | docx_restore.py | teodor-cotet/DiacriticsRestoration | e7b41d75b84ab2131694f16b9bd93448e83069e1 | [
"Apache-2.0"
] | null | null | null | import docx
import subprocess
if __name__ == "__main__":
filee = 'test_restore/Informare Sisteme noi - sindicat i angajai_v1 (1).docx'
tmp_file = "test_restore/tmp.txt"
tmp_res = 'test_restore/tmp_res.txt'
#print(get_docx_text(filee))
doc = docx.Document(filee)
#output = open("output_"+cur_date... | 35.875 | 137 | 0.60511 | import docx
import subprocess
if __name__ == "__main__":
filee = 'test_restore/Informare Sisteme noi - sindicat și angajați_v1 (1).docx'
tmp_file = "test_restore/tmp.txt"
tmp_res = 'test_restore/tmp_res.txt'
#print(get_docx_text(filee))
doc = docx.Document(filee)
#output = open("output_"+cur_da... | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
08946f2eaa6ffb971e830600721812a52066f12e | 96 | py | Python | exts/__init__.py | rawmeat898/Quote-Finder | 9bc45e9bed820481817e8f7b237dde3fe4dda95e | [
"MIT"
] | null | null | null | exts/__init__.py | rawmeat898/Quote-Finder | 9bc45e9bed820481817e8f7b237dde3fe4dda95e | [
"MIT"
] | null | null | null | exts/__init__.py | rawmeat898/Quote-Finder | 9bc45e9bed820481817e8f7b237dde3fe4dda95e | [
"MIT"
] | null | null | null | from configparser import ConfigParser
config = ConfigParser()
config.read('data/channels.ini')
| 19.2 | 37 | 0.802083 | from configparser import ConfigParser
config = ConfigParser()
config.read('data/channels.ini')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |