hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a30ef07f709ef7501475959ff5299b699d476732 | 563 | py | Python | fluidlab/objects/boards/PowerDAQ/try_digital.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | 4 | 2020-01-19T04:12:12.000Z | 2021-11-09T08:30:25.000Z | fluidlab/objects/boards/PowerDAQ/try_digital.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | fluidlab/objects/boards/PowerDAQ/try_digital.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | """
This script tests the library powerdaq (minimal API from python).
output 0 should be plugged in input 0.
"""
from __future__ import division, print_function
import numpy as np
import time
from fluidlab.powerdaq import PowerDAQBoard
from fluidlab.timer import Timer
from fluidlab.createfigs import CreateFigs
SA... | 17.060606 | 65 | 0.742451 | """
This script tests the library powerdaq (minimal API from python).
output 0 should be plugged in input 0.
"""
from __future__ import division, print_function
import numpy as np
import time
from fluidlab.powerdaq import PowerDAQBoard
from fluidlab.timer import Timer
from fluidlab.createfigs import CreateFigs
SA... | 0 | 0 | 0 |
864e7cb81aa91e4a44d61c93729cbf3ea7a7b3a5 | 3,534 | py | Python | project/urls.py | AristodamusAdairs/ATM-Software | ef3d8875a28bc611d9c3ba5c8e53e05e1306eac9 | [
"MIT"
] | null | null | null | project/urls.py | AristodamusAdairs/ATM-Software | ef3d8875a28bc611d9c3ba5c8e53e05e1306eac9 | [
"MIT"
] | null | null | null | project/urls.py | AristodamusAdairs/ATM-Software | ef3d8875a28bc611d9c3ba5c8e53e05e1306eac9 | [
"MIT"
] | null | null | null | from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from version1.api import *
from tastypie.api import Api
from django.contrib import admin
admin.autodiscover()
v1_api = Api(api_name='v1')
v1_api.register(CashWithdrawalResource())
v1_api.re... | 60.931034 | 118 | 0.749859 | from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from version1.api import *
from tastypie.api import Api
from django.contrib import admin
admin.autodiscover()
v1_api = Api(api_name='v1')
v1_api.register(CashWithdrawalResource())
v1_api.re... | 0 | 0 | 0 |
4c165848a2624b59b30d2d62a7335d0197fe80e2 | 294 | py | Python | contact/models.py | rbed/DjangoOne | dcd40ef0e24b6964d0cb2903f8d43d0939261107 | [
"MIT"
] | null | null | null | contact/models.py | rbed/DjangoOne | dcd40ef0e24b6964d0cb2903f8d43d0939261107 | [
"MIT"
] | null | null | null | contact/models.py | rbed/DjangoOne | dcd40ef0e24b6964d0cb2903f8d43d0939261107 | [
"MIT"
] | null | null | null | #coding: utf-8
from django.db import models
# Create your models here. | 24.5 | 59 | 0.697279 | #coding: utf-8
from django.db import models
# Create your models here.
class Message(models.Model):
name = models.CharField(max_length=250)
email = models.EmailField()
message = models.TextField()
def __str__(self):
return "message from {name}".format(name=self.name) | 57 | 143 | 23 |
8cd06fff1021d679aadedbb9cdf8b12aa472c8c5 | 1,145 | py | Python | benchmarks/benchmarks/ci/esmf_regridder.py | lbdreyer/iris-esmf-regrid | 2456f9b08c9a49cb6cd33555bc5938bdf0edb5be | [
"BSD-3-Clause"
] | null | null | null | benchmarks/benchmarks/ci/esmf_regridder.py | lbdreyer/iris-esmf-regrid | 2456f9b08c9a49cb6cd33555bc5938bdf0edb5be | [
"BSD-3-Clause"
] | null | null | null | benchmarks/benchmarks/ci/esmf_regridder.py | lbdreyer/iris-esmf-regrid | 2456f9b08c9a49cb6cd33555bc5938bdf0edb5be | [
"BSD-3-Clause"
] | null | null | null | """Quick running benchmarks for :mod:`esmf_regrid.esmf_regridder`."""
import numpy as np
from esmf_regrid.esmf_regridder import GridInfo
def _make_small_grid_args():
"""
Not importing the one in test_GridInfo - if that changes, these benchmarks
would 'invisibly' change too.
"""
small_x = 2
... | 28.625 | 90 | 0.667249 | """Quick running benchmarks for :mod:`esmf_regrid.esmf_regridder`."""
import numpy as np
from esmf_regrid.esmf_regridder import GridInfo
def _make_small_grid_args():
"""
Not importing the one in test_GridInfo - if that changes, these benchmarks
would 'invisibly' change too.
"""
small_x = 2
... | 125 | 256 | 23 |
9eeabd34fbfb4cf41cabddb89675c09df496a23e | 267 | py | Python | test2.py | rfyiamcool/redis_netlock | ac2f6c4639c3ceb89bd63ff0b1030aa3a4b569be | [
"MIT"
] | 29 | 2015-10-18T12:22:37.000Z | 2020-03-02T13:55:27.000Z | test2.py | zbing3/redis_netlock | d8932aa5beaa05a1b68d1d0ee866e44c4de5362b | [
"MIT"
] | 1 | 2019-01-03T03:16:11.000Z | 2019-01-03T03:16:11.000Z | test2.py | zbing3/redis_netlock | d8932aa5beaa05a1b68d1d0ee866e44c4de5362b | [
"MIT"
] | 15 | 2015-05-13T14:20:33.000Z | 2021-11-19T10:02:04.000Z | from __future__ import with_statement
import redis
import time
from redis_netlock import dist_lock
client = redis.Redis(connection_pool=redis.BlockingConnectionPool(max_connections=15, host='localhost', port=6379))
with dist_lock('test', client):
print 'hello'
| 26.7 | 115 | 0.808989 | from __future__ import with_statement
import redis
import time
from redis_netlock import dist_lock
client = redis.Redis(connection_pool=redis.BlockingConnectionPool(max_connections=15, host='localhost', port=6379))
with dist_lock('test', client):
print 'hello'
| 0 | 0 | 0 |
89423f6e7b5c2fdae0a1787d56ef99ae8477cfc3 | 161 | py | Python | arch_texture_utils/py2_utils.py | Fmstrat/FreeCAD-ArchTextures | e3af6198ea5e07848602a3b8ba01ebab2335d6b1 | [
"MIT"
] | 21 | 2018-11-16T05:56:31.000Z | 2021-11-09T13:21:53.000Z | arch_texture_utils/py2_utils.py | Fmstrat/FreeCAD-ArchTextures | e3af6198ea5e07848602a3b8ba01ebab2335d6b1 | [
"MIT"
] | 39 | 2018-10-02T18:16:18.000Z | 2022-02-11T13:45:50.000Z | arch_texture_utils/py2_utils.py | Fmstrat/FreeCAD-ArchTextures | e3af6198ea5e07848602a3b8ba01ebab2335d6b1 | [
"MIT"
] | 10 | 2019-07-15T16:34:51.000Z | 2022-01-25T23:57:03.000Z | import sys
IS_PY_2 = sys.version_info.major < 3 | 17.888889 | 45 | 0.658385 | import sys
IS_PY_2 = sys.version_info.major < 3
def textureFileString(path):
if IS_PY_2:
return path.encode('utf-8', 'strict')
return path | 90 | 0 | 23 |
d5b2732e7b57e793e967c300de1f28a27b6267a8 | 8,132 | py | Python | master/doctest.py | Keno/julia-buildbot | 9bbd4068797ae88d59d5dd2a7c41bdaed64110a9 | [
"MIT"
] | 1 | 2021-06-20T02:46:51.000Z | 2021-06-20T02:46:51.000Z | master/doctest.py | Keno/julia-buildbot | 9bbd4068797ae88d59d5dd2a7c41bdaed64110a9 | [
"MIT"
] | null | null | null | master/doctest.py | Keno/julia-buildbot | 9bbd4068797ae88d59d5dd2a7c41bdaed64110a9 | [
"MIT"
] | null | null | null | julia_doctest_factory = util.BuildFactory()
julia_doctest_factory.useProgress = True
julia_doctest_factory.addSteps([
# Fetch first (allowing failure if no existing clone is present)
steps.ShellCommand(
name="git fetch",
command=["git", "fetch", "--tags", "--all", "--force"],
flunkOnFail... | 40.457711 | 173 | 0.648549 | julia_doctest_factory = util.BuildFactory()
julia_doctest_factory.useProgress = True
julia_doctest_factory.addSteps([
# Fetch first (allowing failure if no existing clone is present)
steps.ShellCommand(
name="git fetch",
command=["git", "fetch", "--tags", "--all", "--force"],
flunkOnFail... | 0 | 0 | 0 |
22e071b1aa60e49ec11f5d32d383d7bb3e0ecba1 | 16,272 | py | Python | game_window.py | Speterius/pyhanabi | 9316fbe276d9d35d2ae70b866277eebcbb7d0f6f | [
"MIT"
] | null | null | null | game_window.py | Speterius/pyhanabi | 9316fbe276d9d35d2ae70b866277eebcbb7d0f6f | [
"MIT"
] | null | null | null | game_window.py | Speterius/pyhanabi | 9316fbe276d9d35d2ae70b866277eebcbb7d0f6f | [
"MIT"
] | null | null | null | import arcade
import time
from packets import GameStateUpdate, CardPlaced, CardBurned, CardPull, InfoUsed, NextTurn
from gui_elements import NameTab, TextButton, CardTab, CardTabList
from settings import *
| 38.835322 | 117 | 0.570489 | import arcade
import time
from packets import GameStateUpdate, CardPlaced, CardBurned, CardPull, InfoUsed, NextTurn
from gui_elements import NameTab, TextButton, CardTab, CardTabList
from settings import *
class GameWindow(arcade.Window):
def __init__(self, client):
super().__init__(width=SCREEN_WIDTH, he... | 12,789 | 3,253 | 23 |
d21fe161adb1584f062b9ff33b8e32468a40c8f9 | 5,077 | py | Python | abqPython_SvM_1_PostProc.py | jtipton2/abaqusSignedvM | 83f0577b6a3eab6d3c86a46ae110a94a7075981c | [
"BSD-3-Clause"
] | 2 | 2022-03-16T13:50:21.000Z | 2022-03-27T15:14:09.000Z | abqPython_SvM_1_PostProc.py | jtipton2/abaqusSignedvM | 83f0577b6a3eab6d3c86a46ae110a94a7075981c | [
"BSD-3-Clause"
] | null | null | null | abqPython_SvM_1_PostProc.py | jtipton2/abaqusSignedvM | 83f0577b6a3eab6d3c86a46ae110a94a7075981c | [
"BSD-3-Clause"
] | 2 | 2021-07-18T03:10:12.000Z | 2022-03-27T15:14:11.000Z | #==============================================================================
# IMPORT NECESSARY MODULES
#==============================================================================
# C:\temp>abaqus viewer -noGUI (this requires a CAE license)
# C:\temp>abaqus python (this does not require a license)
impo... | 38.462121 | 175 | 0.6169 | #==============================================================================
# IMPORT NECESSARY MODULES
#==============================================================================
# C:\temp>abaqus viewer -noGUI (this requires a CAE license)
# C:\temp>abaqus python (this does not require a license)
impo... | 0 | 0 | 0 |
6b43484f4107c9b2c312d45538930246a4869bde | 247 | py | Python | server/api/utilities/messages/audit.py | koiic/favorite-things | f34944dfbc78e454c6245b76f036f6dd24d018eb | [
"MIT"
] | null | null | null | server/api/utilities/messages/audit.py | koiic/favorite-things | f34944dfbc78e454c6245b76f036f6dd24d018eb | [
"MIT"
] | 5 | 2020-07-17T10:43:13.000Z | 2022-02-26T12:16:12.000Z | server/api/utilities/messages/audit.py | koiic/favorite-things | f34944dfbc78e454c6245b76f036f6dd24d018eb | [
"MIT"
] | null | null | null | """Module that holds success messages template"""
audit_messages = {
'created': 'created a new {} ',
'retrieved': 'retrieved {} successfully',
'updated': 'updated {} with id {} ',
'deleted': 'deleted favorite things with id {}'
}
| 27.444444 | 51 | 0.623482 | """Module that holds success messages template"""
audit_messages = {
'created': 'created a new {} ',
'retrieved': 'retrieved {} successfully',
'updated': 'updated {} with id {} ',
'deleted': 'deleted favorite things with id {}'
}
| 0 | 0 | 0 |
9158dd6c47bc544e8cb7098be66e347b55085742 | 4,561 | py | Python | misc/gen_tar_lists.py | ishine/audio-retrieval | f6df6c737b0c7a42f7053a1794b77bd94cdaf5e7 | [
"Apache-2.0"
] | 20 | 2021-07-23T10:10:16.000Z | 2022-03-21T06:51:52.000Z | misc/gen_tar_lists.py | ishine/audio-retrieval | f6df6c737b0c7a42f7053a1794b77bd94cdaf5e7 | [
"Apache-2.0"
] | 1 | 2021-07-26T01:27:53.000Z | 2021-07-26T10:21:15.000Z | misc/gen_tar_lists.py | ishine/audio-retrieval | f6df6c737b0c7a42f7053a1794b77bd94cdaf5e7 | [
"Apache-2.0"
] | 4 | 2021-08-05T03:19:25.000Z | 2021-11-15T01:38:52.000Z | """
ipy misc/gen_tar_lists.py -- --dataset YouCook2
"""
import copy
import json
import argparse
from typing import Dict, List, Tuple
from pathlib import Path
import tqdm
from beartype import beartype
from zsvision.zs_utils import load_json_config
from gen_readme import dataset_paths, model_specs2path
@beartype
if... | 41.844037 | 88 | 0.631879 | """
ipy misc/gen_tar_lists.py -- --dataset YouCook2
"""
import copy
import json
import argparse
from typing import Dict, List, Tuple
from pathlib import Path
import tqdm
from beartype import beartype
from zsvision.zs_utils import load_json_config
from gen_readme import dataset_paths, model_specs2path
@beartype
def g... | 4,160 | 0 | 45 |
a3451cc7ce60b39bb01f95200d4c931fde4669ba | 7,910 | py | Python | napari_j/_tests/bridge_unit_test.py | jaimergp/napari-J | 4aec56a33c843ac9d03181ba31d61eb0fdbb754d | [
"MIT"
] | null | null | null | napari_j/_tests/bridge_unit_test.py | jaimergp/napari-J | 4aec56a33c843ac9d03181ba31d61eb0fdbb754d | [
"MIT"
] | null | null | null | napari_j/_tests/bridge_unit_test.py | jaimergp/napari-J | 4aec56a33c843ac9d03181ba31d61eb0fdbb754d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 23 22:19:32 2022
@author: baecker
"""
import sys
sys.path.append('./napari_j/_tests/surrogate')
if __name__ == '__main__':
from surrogate.surrogate import surrogate
else:
from surrogate import surrogate
from unittest.mock import patch
from ... | 33.516949 | 82 | 0.688369 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 23 22:19:32 2022
@author: baecker
"""
import sys
sys.path.append('./napari_j/_tests/surrogate')
if __name__ == '__main__':
from surrogate.surrogate import surrogate
else:
from surrogate import surrogate
from unittest.mock import patch
from ... | 5,426 | 0 | 155 |
21d336d016f5523099c115bd8dd6121427aa947b | 2,612 | py | Python | tests/unit_of_work/test_nested_inline_event_processing.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | tests/unit_of_work/test_nested_inline_event_processing.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | tests/unit_of_work/test_nested_inline_event_processing.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from datetime import datetime
from uuid import uuid4
import pytest
from protean import (
BaseCommand,
BaseCommandHandler,
BaseEvent,
BaseEventHandler,
BaseEventSourcedAggregate,
apply,
handle,
)
from protean.fields import DateTime, Identifier, String, Te... | 24.185185 | 74 | 0.696018 | from __future__ import annotations
from datetime import datetime
from uuid import uuid4
import pytest
from protean import (
BaseCommand,
BaseCommandHandler,
BaseEvent,
BaseEventHandler,
BaseEventSourcedAggregate,
apply,
handle,
)
from protean.fields import DateTime, Identifier, String, Te... | 1,195 | 773 | 183 |
631d2d31c900d92e293cd385d4a89850b668cf87 | 60,579 | py | Python | kmip/tests/integration/services/test_integration.py | oleksiys/PyKMIP | c8f4c8c94d29ae9b16c28654f14e5530b4a32f0a | [
"Apache-2.0"
] | null | null | null | kmip/tests/integration/services/test_integration.py | oleksiys/PyKMIP | c8f4c8c94d29ae9b16c28654f14e5530b4a32f0a | [
"Apache-2.0"
] | null | null | null | kmip/tests/integration/services/test_integration.py | oleksiys/PyKMIP | c8f4c8c94d29ae9b16c28654f14e5530b4a32f0a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | 40.493984 | 105 | 0.629624 | # Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | 1,308 | 57,092 | 22 |
d0c8a977d311ba2352b4fd9aa70294f787119761 | 343 | py | Python | pandahub/api/internal/models.py | e2nIEE/pandahub | 4d4abb29f49d32d035120ebea99fb96ba3d44bfc | [
"BSD-3-Clause"
] | 4 | 2022-03-29T08:19:08.000Z | 2022-03-30T06:51:24.000Z | pandahub/api/internal/models.py | e2nIEE/pandahub | 4d4abb29f49d32d035120ebea99fb96ba3d44bfc | [
"BSD-3-Clause"
] | null | null | null | pandahub/api/internal/models.py | e2nIEE/pandahub | 4d4abb29f49d32d035120ebea99fb96ba3d44bfc | [
"BSD-3-Clause"
] | null | null | null | from fastapi_users import models
from fastapi_users.authentication.strategy.db import BaseAccessToken
| 14.913043 | 68 | 0.77551 | from fastapi_users import models
from fastapi_users.authentication.strategy.db import BaseAccessToken
class User(models.BaseUser):
pass
class UserCreate(models.BaseUserCreate):
pass
class UserUpdate(models.BaseUserUpdate):
pass
class UserDB(User, models.BaseUserDB):
pass
class AccessToken(Base... | 0 | 121 | 115 |
05ec6d7cd1458e92c92a31b2f49633413e51d7e9 | 932 | py | Python | imagededuplicator/tests/hash_test.py | ToxicFrazzles/Image-Deduplicator | e23e0ceac7e104fee8fe60a5a20ef6291af54dcb | [
"CC0-1.0"
] | null | null | null | imagededuplicator/tests/hash_test.py | ToxicFrazzles/Image-Deduplicator | e23e0ceac7e104fee8fe60a5a20ef6291af54dcb | [
"CC0-1.0"
] | null | null | null | imagededuplicator/tests/hash_test.py | ToxicFrazzles/Image-Deduplicator | e23e0ceac7e104fee8fe60a5a20ef6291af54dcb | [
"CC0-1.0"
] | null | null | null | import unittest
from ..hashes import Hash
import random
if __name__ == '__main__':
unittest.main()
| 28.242424 | 61 | 0.536481 | import unittest
from ..hashes import Hash
import random
class HashTestCase(unittest.TestCase):
def test_compute(self):
test_sizes = range(1, 20)
for i in test_sizes:
with self.subTest(size=i):
value = random.getrandbits(i*8)
h = Hash(value, length=i)
... | 733 | 17 | 76 |
577b561527fe81ada4ae3cb04d33bafe78ec303b | 4,466 | py | Python | tools/csv2eml/csv2eml.py | halueda/XstReader | 446269ebc5f9d20917f84144b2819db997ec5375 | [
"MS-PL"
] | null | null | null | tools/csv2eml/csv2eml.py | halueda/XstReader | 446269ebc5f9d20917f84144b2819db997ec5375 | [
"MS-PL"
] | null | null | null | tools/csv2eml/csv2eml.py | halueda/XstReader | 446269ebc5f9d20917f84144b2819db997ec5375 | [
"MS-PL"
] | 1 | 2019-12-03T06:11:43.000Z | 2019-12-03T06:11:43.000Z | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
# In[2]:
os.chdir('//172.17.129.234/d/gdrive/ueda-note/Outlookuファイル/recovered')
# In[3]:
#os.getcwd()
# In[26]:
import glob
targets = glob.glob('*.csv')
# In[5]:
#import pandas
#
#
## In[6]:
#
#
#import pandas as pd
#
#
## In[7]:
#
#
#file='01-... | 17.377432 | 213 | 0.576579 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
# In[2]:
os.chdir('//172.17.129.234/d/gdrive/ueda-note/Outlookuファイル/recovered')
# In[3]:
#os.getcwd()
# In[26]:
import glob
targets = glob.glob('*.csv')
# In[5]:
#import pandas
#
#
## In[6]:
#
#
#import pandas as pd
#
#
## In[7]:
#
#
#file='01-... | 1,180 | 0 | 45 |
fc665b5805488e0a7fc6c4575e0e17cb2957b16c | 19,193 | py | Python | fbpic/fields/numba_methods.py | kcdodd/fbpic | 267c812c6c99fcfbf3f0e3f1833d1338e22ceb54 | [
"BSD-3-Clause-LBNL"
] | null | null | null | fbpic/fields/numba_methods.py | kcdodd/fbpic | 267c812c6c99fcfbf3f0e3f1833d1338e22ceb54 | [
"BSD-3-Clause-LBNL"
] | null | null | null | fbpic/fields/numba_methods.py | kcdodd/fbpic | 267c812c6c99fcfbf3f0e3f1833d1338e22ceb54 | [
"BSD-3-Clause-LBNL"
] | null | null | null | # Copyright 2016, FBPIC contributors
# Authors: Remi Lehe, Manuel Kirchen
# License: 3-Clause-BSD-LBNL
"""
This file is part of the Fourier-Bessel Particle-In-Cell code (FB-PIC)
It defines the optimized fields methods that use numba on a CPU
"""
from scipy.constants import c, epsilon_0, mu_0
c2 = c**2
import numba
from... | 38.852227 | 86 | 0.515657 | # Copyright 2016, FBPIC contributors
# Authors: Remi Lehe, Manuel Kirchen
# License: 3-Clause-BSD-LBNL
"""
This file is part of the Fourier-Bessel Particle-In-Cell code (FB-PIC)
It defines the optimized fields methods that use numba on a CPU
"""
from scipy.constants import c, epsilon_0, mu_0
c2 = c**2
import numba
from... | 0 | 0 | 0 |
07776c7a939f6ce04edb67edefeb0d5144af0584 | 2,326 | py | Python | src/olympia/accounts/utils.py | dante381/addons-server | 9702860a19ecca1cb4e4998f37bc43c1b2dd3aa7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/accounts/utils.py | dante381/addons-server | 9702860a19ecca1cb4e4998f37bc43c1b2dd3aa7 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/accounts/utils.py | dante381/addons-server | 9702860a19ecca1cb4e4998f37bc43c1b2dd3aa7 | [
"BSD-3-Clause"
] | null | null | null | import binascii
import os
from base64 import urlsafe_b64encode
from urllib.parse import urlencode
from django.conf import settings
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.encoding import force_str
from olympia.amo.utils import is_safe_url, use_fake_fxa
| 30.207792 | 86 | 0.66595 | import binascii
import os
from base64 import urlsafe_b64encode
from urllib.parse import urlencode
from django.conf import settings
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.encoding import force_str
from olympia.amo.utils import is_safe_url, use_fake_fxa
def fxa... | 1,919 | 0 | 92 |
25cce0ebb2060b9f3cb21da2cf7d211f4f1238d8 | 160 | py | Python | submissions.py | ToiletCommander/hog_contest_2021_cookes | a307289e65d27fa2e60f4b5cdf41bfe4f48ce838 | [
"MIT"
] | null | null | null | submissions.py | ToiletCommander/hog_contest_2021_cookes | a307289e65d27fa2e60f4b5cdf41bfe4f48ce838 | [
"MIT"
] | null | null | null | submissions.py | ToiletCommander/hog_contest_2021_cookes | a307289e65d27fa2e60f4b5cdf41bfe4f48ce838 | [
"MIT"
] | null | null | null | STRATEGY_NAME = "ultimate2"
IS_SUBMIT = False
EPOCH_NUM = 1
SUBMIT_NAME = "🍪CookEs-" + STRATEGY_NAME + "(Version " + str(EPOCH_NUM) + ") github@ToiletCommander" | 40 | 100 | 0.725 | STRATEGY_NAME = "ultimate2"
IS_SUBMIT = False
EPOCH_NUM = 1
SUBMIT_NAME = "🍪CookEs-" + STRATEGY_NAME + "(Version " + str(EPOCH_NUM) + ") github@ToiletCommander" | 0 | 0 | 0 |
4e3e4a1c8233ac8ac7eb2559ee728c8de170eb70 | 1,723 | py | Python | BerryPick.py | caseypen/FRAIL-Bot_rl_env | 4f0260ac659fd9ba485772280a47b37c0fbe2acc | [
"MIT"
] | null | null | null | BerryPick.py | caseypen/FRAIL-Bot_rl_env | 4f0260ac659fd9ba485772280a47b37c0fbe2acc | [
"MIT"
] | null | null | null | BerryPick.py | caseypen/FRAIL-Bot_rl_env | 4f0260ac659fd9ba485772280a47b37c0fbe2acc | [
"MIT"
] | null | null | null | import numpy as np
# update m robots position: cur_position
# robot waiting at estimating running point
# robot running back to the center
# update position while pickers are picking
#update position of pickers while it is walking
# reset environment randomly
# execute one action
# render current state to... | 30.22807 | 93 | 0.730122 | import numpy as np
class Robot(object):
def __init__(self, m_robots, initial_assign, r_vel, initial_pos):
self.arrival = 1
self.m = m_robots
self.cur_pos = inital_pos # m*2
self.speed = r_vel
def run_to(target_pos, dt): # Manhattan distance
# update m robots position: cur_position
def load_wait():
# r... | 939 | 2 | 390 |
5c9326bc94d602ff15cabb46c1f5c8bff2f717d3 | 566 | py | Python | src/djanban/apps/boards/migrations/0053_auto_20170311_0158.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 33 | 2017-06-14T18:04:25.000Z | 2021-06-15T07:07:56.000Z | src/djanban/apps/boards/migrations/0053_auto_20170311_0158.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 1 | 2017-05-10T08:45:55.000Z | 2017-05-10T08:45:55.000Z | src/djanban/apps/boards/migrations/0053_auto_20170311_0158.py | diegojromerolopez/djanban | 6451688d49cf235d03c604b19a6a8480b33eed87 | [
"MIT"
] | 8 | 2017-08-27T11:14:25.000Z | 2021-03-03T12:11:16.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-11 00:58
from __future__ import unicode_literals
from django.db import migrations, models
| 26.952381 | 169 | 0.65371 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-11 00:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('boards', '0052_auto_20170303_2130'),
]
operations = [
migrations.AddField(
... | 0 | 389 | 23 |
4dcc933c76f3e6529fda4e8cedfe24dbdd881267 | 387 | py | Python | code/strats/selfAwareTitForTat.py | yasirroni/PrisonersDilemmaTournament | ce3de71ff2ccb647aa00129473ff60f985e16e17 | [
"MIT"
] | 23 | 2021-05-20T07:34:33.000Z | 2021-06-20T13:09:04.000Z | code/strats/selfAwareTitForTat.py | yasirroni/PrisonersDilemmaTournament | ce3de71ff2ccb647aa00129473ff60f985e16e17 | [
"MIT"
] | 19 | 2021-05-21T04:10:55.000Z | 2021-06-13T15:17:52.000Z | code/strats/selfAwareTitForTat.py | yasirroni/PrisonersDilemmaTournament | ce3de71ff2ccb647aa00129473ff60f985e16e17 | [
"MIT"
] | 43 | 2021-05-21T02:24:35.000Z | 2021-06-24T21:08:11.000Z | def strategy(history, memory):
"""
If opponent defected, respond with defection. *UNLESS* we defected the turn before.
"""
opponents_last_move = history[1, -1] if history.shape[1] >= 1 else 1
our_second_last_move = history[0, -2] if history.shape[1] >= 2 else 1
choice = 1 if (opponents_last_move... | 43 | 87 | 0.679587 | def strategy(history, memory):
"""
If opponent defected, respond with defection. *UNLESS* we defected the turn before.
"""
opponents_last_move = history[1, -1] if history.shape[1] >= 1 else 1
our_second_last_move = history[0, -2] if history.shape[1] >= 2 else 1
choice = 1 if (opponents_last_move... | 0 | 0 | 0 |
0dbd57a94566386d468858582f891aafb3945631 | 2,426 | py | Python | warrior_modules/warrior_selenium/warriorselenium/ClassUtils/WSelenium/verify_operations.py | warriorframework/warriorframework_py3 | fc268c610c429f5a60e5627c2405aa66036487dd | [
"Apache-2.0"
] | 6 | 2018-03-06T04:18:07.000Z | 2020-12-24T06:08:36.000Z | warrior_modules/warrior_selenium/warriorselenium/ClassUtils/WSelenium/verify_operations.py | warriorframework/warriorframework_py3 | fc268c610c429f5a60e5627c2405aa66036487dd | [
"Apache-2.0"
] | 51 | 2018-03-16T04:55:07.000Z | 2021-12-13T20:53:12.000Z | warrior_modules/warrior_selenium/warriorselenium/ClassUtils/WSelenium/verify_operations.py | warriorframework/warriorframework_py3 | fc268c610c429f5a60e5627c2405aa66036487dd | [
"Apache-2.0"
] | 7 | 2018-05-09T22:13:10.000Z | 2021-11-23T11:46:27.000Z | '''
Copyright 2017, Fujitsu Network Communications, 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 w... | 37.90625 | 112 | 0.617065 | '''
Copyright 2017, Fujitsu Network Communications, 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 w... | 0 | 0 | 0 |
e2483e87cf14ce5f86a4afa798786b09505470b0 | 1,143 | py | Python | apps/fhir/bluebutton/authentication.py | JFU-GIT/bluebutton-web-server | 2134e09bd81740f89ba1fd4987a9f310d54ed04b | [
"Apache-2.0"
] | null | null | null | apps/fhir/bluebutton/authentication.py | JFU-GIT/bluebutton-web-server | 2134e09bd81740f89ba1fd4987a9f310d54ed04b | [
"Apache-2.0"
] | null | null | null | apps/fhir/bluebutton/authentication.py | JFU-GIT/bluebutton-web-server | 2134e09bd81740f89ba1fd4987a9f310d54ed04b | [
"Apache-2.0"
] | null | null | null | from oauth2_provider.contrib.rest_framework import authentication
from django.utils import timezone
| 40.821429 | 126 | 0.694663 | from oauth2_provider.contrib.rest_framework import authentication
from django.utils import timezone
class OAuth2ResourceOwner(authentication.OAuth2Authentication):
def authenticate(self, request):
user_auth_tuple = super(OAuth2ResourceOwner, self).authenticate(request)
# fix until https://github.... | 951 | 42 | 49 |
00c755045901ea5cff139b0b7841307024736599 | 1,261 | py | Python | class_2/step4.py | goosemanjack/python_intro_class | ca4b2390f2b0bb037d94ed4516d98848b7cf97d6 | [
"MIT"
] | null | null | null | class_2/step4.py | goosemanjack/python_intro_class | ca4b2390f2b0bb037d94ed4516d98848b7cf97d6 | [
"MIT"
] | null | null | null | class_2/step4.py | goosemanjack/python_intro_class | ca4b2390f2b0bb037d94ed4516d98848b7cf97d6 | [
"MIT"
] | null | null | null |
begin() | 19.4 | 88 | 0.536875 |
def begin():
name = input("Hello person. What is your name? ")
print("You are very smart, " + name)
print("Now that we know each other, what pronoun should I use when referring to you? ")
# mapped arrays
opts = [[1,2,3], ["He", "She", "They"]]
#if elif
print("Pick a value for your pronoun")
for i in range(l... | 1,182 | 0 | 69 |
15a69467a8f1cf6228537cc36fee469a173af761 | 4,353 | py | Python | go/base/tests/test_base.py | lynnUg/vumi-go | 852f906c46d5d26940bd6699f11488b73bbc3742 | [
"BSD-3-Clause"
] | null | null | null | go/base/tests/test_base.py | lynnUg/vumi-go | 852f906c46d5d26940bd6699f11488b73bbc3742 | [
"BSD-3-Clause"
] | null | null | null | go/base/tests/test_base.py | lynnUg/vumi-go | 852f906c46d5d26940bd6699f11488b73bbc3742 | [
"BSD-3-Clause"
] | null | null | null | from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.core.paginator import Paginator
from go.base import utils
from go.base.tests.helpers import GoDjangoTestCase, DjangoVumiApiHelper
from go.vumitools.api import VumiAp... | 41.066038 | 79 | 0.684356 | from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.core.paginator import Paginator
from go.base import utils
from go.base.tests.helpers import GoDjangoTestCase, DjangoVumiApiHelper
from go.vumitools.api import VumiAp... | 2,588 | 992 | 284 |
5a781916e8e7f39c860885a9db62b960fd80ec97 | 10,177 | py | Python | rsa.py | aishee/RSAGui | 33444c38f6f27e2a15fa05e71f2b014cdc5597c1 | [
"MIT"
] | null | null | null | rsa.py | aishee/RSAGui | 33444c38f6f27e2a15fa05e71f2b014cdc5597c1 | [
"MIT"
] | null | null | null | rsa.py | aishee/RSAGui | 33444c38f6f27e2a15fa05e71f2b014cdc5597c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""RSA"""
import math
import random
from tkinter import *
from tkinter import ttk
#SPECIFICATION
"""Public key
P and Q are prime number
N = P * Q
M = ( P - 1) * (Q -1)
C = prime number of M, GCD(C,M) = 1
Public key = (N,C)
"""
"""
Private key
We have need U
C * U + M * V = 1
U is ]2,M[
2 < U ... | 31.122324 | 130 | 0.555861 | #!/usr/bin/env python3
"""RSA"""
import math
import random
from tkinter import *
from tkinter import ttk
#SPECIFICATION
"""Public key
P and Q are prime number
N = P * Q
M = ( P - 1) * (Q -1)
C = prime number of M, GCD(C,M) = 1
Public key = (N,C)
"""
"""
Private key
We have need U
C * U + M * V = 1
U is ]2,M[
2 < U ... | 8,136 | -19 | 926 |
c3335fafab746ab38a9edeb96e06df60608bf78a | 1,870 | py | Python | Helpers/Cube_Helper.py | brianr01/robot-api | 73e6f3da9287fcf22618a6244370105fee164c51 | [
"MIT"
] | null | null | null | Helpers/Cube_Helper.py | brianr01/robot-api | 73e6f3da9287fcf22618a6244370105fee164c51 | [
"MIT"
] | null | null | null | Helpers/Cube_Helper.py | brianr01/robot-api | 73e6f3da9287fcf22618a6244370105fee164c51 | [
"MIT"
] | null | null | null | from flask import Blueprint
from flask import request
import sys, random, time
sys.path.append(sys.path[0] + '/Helpers')
from Motors_Helper import Motors_Helper
from Virtual_Rubiks_Cube_Helper import Virtual_Rubiks_Cube_Helper
| 27.910448 | 65 | 0.654545 | from flask import Blueprint
from flask import request
import sys, random, time
sys.path.append(sys.path[0] + '/Helpers')
from Motors_Helper import Motors_Helper
from Virtual_Rubiks_Cube_Helper import Virtual_Rubiks_Cube_Helper
class Cube_Helper:
def __init__(self):
self.virtual_cube = Virtual_Rubiks_Cube_... | 1,321 | -3 | 324 |
c74cf2fe5d06dbb6468c60fc41018bcdeaa00671 | 1,987 | py | Python | venv/lib/python3.8/site-packages/allauth/account/migrations/0001_initial.py | DOY2021/whiskynote | cbee0e15fadfc382302670954b50399f83e5b28c | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/allauth/account/migrations/0001_initial.py | DOY2021/whiskynote | cbee0e15fadfc382302670954b50399f83e5b28c | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/allauth/account/migrations/0001_initial.py | DOY2021/whiskynote | cbee0e15fadfc382302670954b50399f83e5b28c | [
"MIT"
] | 1 | 2022-03-19T15:36:37.000Z | 2022-03-19T15:36:37.000Z | # Generated by Django 3.2.4 on 2021-06-02 11:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
| 42.276596 | 156 | 0.612481 | # Generated by Django 3.2.4 on 2021-06-02 11:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 0 | 1,778 | 23 |
7d3dce2d199ee60fd11f456bf0e6149265cba96a | 722 | py | Python | setup.py | TomoyaFujita2016/Python_Package_Sample | 855234e13df7f19054659ddb3849a8248bdb78ab | [
"MIT"
] | null | null | null | setup.py | TomoyaFujita2016/Python_Package_Sample | 855234e13df7f19054659ddb3849a8248bdb78ab | [
"MIT"
] | null | null | null | setup.py | TomoyaFujita2016/Python_Package_Sample | 855234e13df7f19054659ddb3849a8248bdb78ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from glob import glob
from os.path import basename
from os.path import splitext
from setuptools import setup
from setuptools import find_packages
setup(
name="",
use_scm_version=True,
license="",
description="",
author="",
url="",
packages=fi... | 23.290323 | 74 | 0.684211 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from glob import glob
from os.path import basename
from os.path import splitext
from setuptools import setup
from setuptools import find_packages
def _requires_from_file(filename):
return open(filename).read().splitlines()
setup(
name="",
use_scm_version=Tr... | 59 | 0 | 23 |
5a2a7a4fa4b433c9b56a3ac68bcb0559ed8fd4e3 | 1,059 | py | Python | rannsaka/locust_files/heat_suspend_resume.py | pcrews/rannsaka | 4bd86e86eb31c18e9ec0cbbc7926f8f3d4063e26 | [
"Apache-2.0"
] | 2 | 2015-11-11T16:14:17.000Z | 2019-01-13T05:02:51.000Z | rannsaka/locust_files/heat_suspend_resume.py | pcrews/rannsaka | 4bd86e86eb31c18e9ec0cbbc7926f8f3d4063e26 | [
"Apache-2.0"
] | null | null | null | rannsaka/locust_files/heat_suspend_resume.py | pcrews/rannsaka | 4bd86e86eb31c18e9ec0cbbc7926f8f3d4063e26 | [
"Apache-2.0"
] | null | null | null | import os
import random
import time
import json
from locust import HttpLocust, TaskSet, task
from task_sets.baseTaskSet import baseTaskSet
import task_funcs.keystone_v2_base as keystone_base
import task_funcs.heat_v1_base as heat_base
import task_funcs.heat_v1_utility as heat_util
import task_funcs.nova_v2_utility as... | 25.214286 | 64 | 0.704438 | import os
import random
import time
import json
from locust import HttpLocust, TaskSet, task
from task_sets.baseTaskSet import baseTaskSet
import task_funcs.keystone_v2_base as keystone_base
import task_funcs.heat_v1_base as heat_base
import task_funcs.heat_v1_utility as heat_util
import task_funcs.nova_v2_utility as... | 48 | 76 | 50 |
31ac0c5c4377ce2cb7b404c9150c6b0f438c9497 | 1,829 | py | Python | train_reco.py | mlabarrere/Webcam_recognition | d5c1ae1e44522a7fc6c6f41961b058acb877f904 | [
"Apache-2.0"
] | null | null | null | train_reco.py | mlabarrere/Webcam_recognition | d5c1ae1e44522a7fc6c6f41961b058acb877f904 | [
"Apache-2.0"
] | null | null | null | train_reco.py | mlabarrere/Webcam_recognition | d5c1ae1e44522a7fc6c6f41961b058acb877f904 | [
"Apache-2.0"
] | 2 | 2018-05-11T13:01:11.000Z | 2019-02-20T09:05:38.000Z | import cv2
import os
import numpy as np
import pickle
from src.lib import detect_face
github_readme = "https://github.com/mlabarrere/webcam-recognition/blob/master/README.md"
dictionary_people = dict()
dir_name = "data"
subject_folder_names = os.listdir(dir_name)
assert subject_folder_names, "You forgot to place a ... | 30.483333 | 155 | 0.691635 | import cv2
import os
import numpy as np
import pickle
from src.lib import detect_face
github_readme = "https://github.com/mlabarrere/webcam-recognition/blob/master/README.md"
dictionary_people = dict()
dir_name = "data"
subject_folder_names = os.listdir(dir_name)
assert subject_folder_names, "You forgot to place a ... | 890 | 0 | 23 |
b339437476ada4b91976d4dc3e7e06d58c6d95ae | 1,388 | py | Python | tests/base/job/test_wrapper.py | pmrv/pyiron | 3631053231761510a2fd4b1416a93adee44fd6f7 | [
"BSD-3-Clause"
] | null | null | null | tests/base/job/test_wrapper.py | pmrv/pyiron | 3631053231761510a2fd4b1416a93adee44fd6f7 | [
"BSD-3-Clause"
] | null | null | null | tests/base/job/test_wrapper.py | pmrv/pyiron | 3631053231761510a2fd4b1416a93adee44fd6f7 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import os
import unittest
from pyiron.base.project.generic import Project
from pyiron.base.job.wrapper import job_wrappe... | 36.526316 | 108 | 0.682277 | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import os
import unittest
from pyiron.base.project.generic import Project
from pyiron.base.job.wrapper import job_wrappe... | 892 | 141 | 23 |
d121b27fe1909e93190bd664369c01e785cf483f | 2,025 | py | Python | webtemplate_dbca/tests/views.py | parksandwildlife/webtemplate | 5a4acf86cbc696d81bc8fc00c67872665822ff95 | [
"Apache-2.0"
] | null | null | null | webtemplate_dbca/tests/views.py | parksandwildlife/webtemplate | 5a4acf86cbc696d81bc8fc00c67872665822ff95 | [
"Apache-2.0"
] | 1 | 2018-08-22T07:54:05.000Z | 2018-08-22T07:54:05.000Z | webtemplate_dbca/tests/views.py | parksandwildlife/webtemplate | 5a4acf86cbc696d81bc8fc00c67872665822ff95 | [
"Apache-2.0"
] | 1 | 2021-06-25T02:43:47.000Z | 2021-06-25T02:43:47.000Z | from django.views.generic import TemplateView
| 33.196721 | 74 | 0.683457 | from django.views.generic import TemplateView
class TestPage(TemplateView):
template_name = 'webtemplate_dbca/base.html'
def get_context_data(self, **kwargs):
context = super(TestPage, self).get_context_data(**kwargs)
context['page_title'] = 'Test page'
context['page_description'] = '... | 1,333 | 502 | 138 |
7cbcc878799f2c021216affaba11a3ee58089783 | 2,793 | py | Python | custom/icds_reports/utils/aggregation_helpers/distributed/daily_feeding_forms_child_health.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | custom/icds_reports/utils/aggregation_helpers/distributed/daily_feeding_forms_child_health.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | custom/icds_reports/utils/aggregation_helpers/distributed/daily_feeding_forms_child_health.py | MaciejChoromanski/commcare-hq | fd7f65362d56d73b75a2c20d2afeabbc70876867 | [
"BSD-3-Clause"
] | 5 | 2015-11-30T13:12:45.000Z | 2019-07-01T19:27:07.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
from dateutil.relativedelta import relativedelta
from custom.icds_reports.const import AGG_DAILY_FEEDING_TABLE
from custom.icds_reports.utils.aggregation_helpers import month_formatter
from custom.icds_reports.utils.aggregation_helpers.dist... | 42.318182 | 111 | 0.686001 | from __future__ import absolute_import
from __future__ import unicode_literals
from dateutil.relativedelta import relativedelta
from custom.icds_reports.const import AGG_DAILY_FEEDING_TABLE
from custom.icds_reports.utils.aggregation_helpers import month_formatter
from custom.icds_reports.utils.aggregation_helpers.dist... | 2,069 | 323 | 23 |
b1b5f2d7c0d7739ed0433df1648e9cf80e57151a | 725 | py | Python | lMechanize/test.py | jieshenboy/jeckstockpick | 39219722a78212fa39eba860b2e945e45df58bff | [
"MIT"
] | 1 | 2018-03-24T10:03:27.000Z | 2018-03-24T10:03:27.000Z | lMechanize/test.py | jieshenboy/jeckstockpick | 39219722a78212fa39eba860b2e945e45df58bff | [
"MIT"
] | null | null | null | lMechanize/test.py | jieshenboy/jeckstockpick | 39219722a78212fa39eba860b2e945e45df58bff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import mechanize
import sys
reload(sys)#python的str默认是ascii编码,和unicode编码冲突,这一部分可以载入utf8
sys.setdefaultencoding('utf8')
br = mechanize.Browser()
br.set_handle_equiv(True)
br.set_handle_redirect(True)
br.set_handle_referer(True)
br.set_handle_robots(False)
br.set_handle_gzip(... | 27.884615 | 153 | 0.753103 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import mechanize
import sys
reload(sys)#python的str默认是ascii编码,和unicode编码冲突,这一部分可以载入utf8
sys.setdefaultencoding('utf8')
br = mechanize.Browser()
br.set_handle_equiv(True)
br.set_handle_redirect(True)
br.set_handle_referer(True)
br.set_handle_robots(False)
br.set_handle_gzip(... | 0 | 0 | 0 |
09e74fcc9643648576e1cf2a49a961fbe03ce865 | 1,003 | py | Python | ui/views.py | WebCampZg/conference-web | 76ccae83924fdcd040d9280db5cf3a249d668606 | [
"BSD-3-Clause"
] | 4 | 2015-03-03T17:48:14.000Z | 2019-02-27T20:28:42.000Z | ui/views.py | WebCampZg/conference-web | 76ccae83924fdcd040d9280db5cf3a249d668606 | [
"BSD-3-Clause"
] | 104 | 2015-02-25T18:09:15.000Z | 2019-06-21T10:02:53.000Z | ui/views.py | WebCampZg/conference-web | 76ccae83924fdcd040d9280db5cf3a249d668606 | [
"BSD-3-Clause"
] | 9 | 2015-03-01T18:59:14.000Z | 2019-06-10T06:48:45.000Z | from django.shortcuts import render
from config.utils import get_active_event
| 21.804348 | 60 | 0.641077 | from django.shortcuts import render
from config.utils import get_active_event
def index(request):
event = get_active_event()
posts = event.posts.all()[:3]
talks = (event.talks
.prefetch_related('applicants__user', 'skill_level')
.filter(keynote=False)
.order_by('?')[:3])
wor... | 780 | 0 | 138 |
a4c6f2faa3b82bca571674d9c178128f27b7cfd1 | 1,070 | py | Python | cred_utils.py | Jonesywolf/You-Verify | a268dbc12c5ef60f640b2d76ad645b80fe6a2b24 | [
"MIT"
] | null | null | null | cred_utils.py | Jonesywolf/You-Verify | a268dbc12c5ef60f640b2d76ad645b80fe6a2b24 | [
"MIT"
] | null | null | null | cred_utils.py | Jonesywolf/You-Verify | a268dbc12c5ef60f640b2d76ad645b80fe6a2b24 | [
"MIT"
] | null | null | null | from selenium.webdriver.common.by import By
import time
from random import uniform | 27.435897 | 66 | 0.637383 | from selenium.webdriver.common.by import By
import time
from random import uniform
def fill_username(browser, user_creds):
if user_creds["user"]:
username_input = browser.find_element(By.ID, "username")
username_input.send_keys(user_creds["user"])
else:
print("Username not found")
def... | 895 | 0 | 92 |
8a9ddb5a2a393b08cde6c63f90c0857ea1709b7e | 1,163 | py | Python | models/penet/input.py | firmamentqj/bodyemotion | d1e83ee6043e1ff50a2e37b5d17c2dbccc4ca688 | [
"Apache-2.0"
] | null | null | null | models/penet/input.py | firmamentqj/bodyemotion | d1e83ee6043e1ff50a2e37b5d17c2dbccc4ca688 | [
"Apache-2.0"
] | null | null | null | models/penet/input.py | firmamentqj/bodyemotion | d1e83ee6043e1ff50a2e37b5d17c2dbccc4ca688 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import math | 29.820513 | 75 | 0.613929 | import numpy as np
import math
class Dataset(object):
def __init__(self, dataset):
self._dataset = dataset
self.n_samples = dataset.n_samples
self._train = dataset.train
self._index_in_epoch = 0
self._epochs_complete = 0
self._perm = np.arange(self.n_samples)
... | 987 | 123 | 23 |
92b39b54cb56de3785fff9ab9272d65bc188ecd0 | 2,618 | py | Python | setup.py | zhangzhen273/python-dubbo-rpc | 1f841e9954796c644f2b0dccdf09f00dd1e158af | [
"Apache-2.0"
] | 94 | 2019-06-03T05:11:52.000Z | 2022-01-28T13:31:46.000Z | setup.py | wuwen5/dubbo-python | d86ad6acd30592c2389c6aba4360e0b61b8396dc | [
"Apache-2.0"
] | 9 | 2019-07-23T03:38:05.000Z | 2021-12-08T05:22:03.000Z | setup.py | wuwen5/dubbo-python | d86ad6acd30592c2389c6aba4360e0b61b8396dc | [
"Apache-2.0"
] | 36 | 2015-06-08T07:14:30.000Z | 2022-02-28T11:21:55.000Z | #!/usr/bin/env python
# coding: utf-8
"""
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2... | 34 | 78 | 0.672269 | #!/usr/bin/env python
# coding: utf-8
"""
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2... | 0 | 0 | 0 |
6c90820bef1889414992a32de7819029f01de481 | 452 | py | Python | histoslide/urls.py | guoqingbao/Patholabelling | b70175ea2255bccd37e5af6649709e3e16fd6596 | [
"Apache-2.0"
] | 1 | 2021-02-25T16:20:50.000Z | 2021-02-25T16:20:50.000Z | histoslide/urls.py | guoqingbao/Patholabelling | b70175ea2255bccd37e5af6649709e3e16fd6596 | [
"Apache-2.0"
] | null | null | null | histoslide/urls.py | guoqingbao/Patholabelling | b70175ea2255bccd37e5af6649709e3e16fd6596 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^(?P<slide_id>\w+)/$', views.slide),
url(r'^(?P<slug>\w+).dzi$', views.dzi),
url(r'^(?P<slug>\w+).dzi.json$', views.properties),
url(r'^(?P<slug>\w+)_files/(?P<level>\d+)/(?P<col>\d+)_(?P<row>\d+)\.(?P<slideformat>jpeg|png)$', ... | 37.666667 | 116 | 0.566372 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^(?P<slide_id>\w+)/$', views.slide),
url(r'^(?P<slug>\w+).dzi$', views.dzi),
url(r'^(?P<slug>\w+).dzi.json$', views.properties),
url(r'^(?P<slug>\w+)_files/(?P<level>\d+)/(?P<col>\d+)_(?P<row>\d+)\.(?P<slideformat>jpeg|png)$', ... | 0 | 0 | 0 |
62fd07c259514ff947699f961b7af34edff2e8d0 | 1,878 | py | Python | run.py | DeweiFeng/FlappyBird_AI | e64ec8fd253b29b1be80f1d9a3e467d68339e358 | [
"MIT"
] | null | null | null | run.py | DeweiFeng/FlappyBird_AI | e64ec8fd253b29b1be80f1d9a3e467d68339e358 | [
"MIT"
] | null | null | null | run.py | DeweiFeng/FlappyBird_AI | e64ec8fd253b29b1be80f1d9a3e467d68339e358 | [
"MIT"
] | null | null | null | # pip3 install gym
# pip3 install neat-python
# for gym stuff:
# apt install xvfb ffmpeg xorg-dev libsdl2-dev swig cmake
# pip3 install gym[box2d]
import multiprocessing
import os
import pickle
import neat
import numpy as np
import bird
import pygame
clock = pygame.time.Clock()
runs_per_net = 2
# Use the NN n... | 22.902439 | 73 | 0.651757 | # pip3 install gym
# pip3 install neat-python
# for gym stuff:
# apt install xvfb ffmpeg xorg-dev libsdl2-dev swig cmake
# pip3 install gym[box2d]
import multiprocessing
import os
import pickle
import neat
import numpy as np
import bird
import pygame
clock = pygame.time.Clock()
runs_per_net = 2
# Use the NN n... | 1,389 | 0 | 68 |
0501439158c1314d99e1110b0fcdeb43f0049308 | 381 | py | Python | prime.py | dewhallez/python_bootcamp | f6743502c9424c88bc61f6e28c3fba3b454312bd | [
"MIT"
] | null | null | null | prime.py | dewhallez/python_bootcamp | f6743502c9424c88bc61f6e28c3fba3b454312bd | [
"MIT"
] | null | null | null | prime.py | dewhallez/python_bootcamp | f6743502c9424c88bc61f6e28c3fba3b454312bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Check if number is prime, return TRUE or FALSE
print(is_prime(5))
print(is_prime(12))
print(is_prime(15))
print(is_prime(21))
print(is_prime(32))
print(is_prime(51))
print(is_prime(101))
| 19.05 | 48 | 0.624672 | #!/usr/bin/env python3
# Check if number is prime, return TRUE or FALSE
def is_prime(num):
if num < 2:
return False
for i in range(2, int(num ** 0.5)+1):
if num % i == 0:
return False
return True
print(is_prime(5))
print(is_prime(12))
print(is_prime(15))
print(is_prime(21))
... | 144 | 0 | 23 |
15b8f66b97c4b84ffa2bed6f920d105a8d4624e2 | 449 | py | Python | conference/schedule/migrations/0004_slot_show_end_time.py | djangocon/2017.djangocon.eu | d811a9cd5b24f48f6e224d0dd4abe9173f7f97d7 | [
"BSD-3-Clause"
] | 7 | 2016-11-21T12:53:37.000Z | 2020-03-30T23:22:48.000Z | conference/schedule/migrations/0004_slot_show_end_time.py | djangocon/2017.djangocon.eu | d811a9cd5b24f48f6e224d0dd4abe9173f7f97d7 | [
"BSD-3-Clause"
] | 17 | 2016-11-17T19:25:48.000Z | 2017-04-06T08:43:46.000Z | conference/schedule/migrations/0004_slot_show_end_time.py | FuzzyBrains/DjangoConEurope2017 | d811a9cd5b24f48f6e224d0dd4abe9173f7f97d7 | [
"BSD-3-Clause"
] | 7 | 2016-11-05T11:18:40.000Z | 2016-11-09T17:14:52.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
| 22.45 | 95 | 0.625835 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('schedule', '0003_slot_sprint_days'),
]
operations = [
migrations.AddField(
model_name='slot',
name='... | 0 | 319 | 23 |
e8b3eef1c6622b7b70c026894bc8182281a737f6 | 1,479 | py | Python | old_ref/functions/sqlquery.py | matterholt/APP_CRUD-v1 | 6ed49d144d09881498e9b0689f98f83016fb1e8d | [
"MIT"
] | null | null | null | old_ref/functions/sqlquery.py | matterholt/APP_CRUD-v1 | 6ed49d144d09881498e9b0689f98f83016fb1e8d | [
"MIT"
] | null | null | null | old_ref/functions/sqlquery.py | matterholt/APP_CRUD-v1 | 6ed49d144d09881498e9b0689f98f83016fb1e8d | [
"MIT"
] | null | null | null | # import dependencies
import os
import sqlite3
import pandas as pd
# read the dataset in to panads
data_url = "https://github.com/matterholt/APP_CRUD-v1/blob/master/iris.csv"
headers = ["sepal_length", "sepal_width", "petal_length", "petal_width", "species"]
data_tabel = pd.read_csv(data_url, header=None, names=header... | 21.128571 | 87 | 0.647059 | # import dependencies
import os
import sqlite3
import pandas as pd
# read the dataset in to panads
data_url = "https://github.com/matterholt/APP_CRUD-v1/blob/master/iris.csv"
headers = ["sepal_length", "sepal_width", "petal_length", "petal_width", "species"]
data_tabel = pd.read_csv(data_url, header=None, names=header... | 328 | 0 | 88 |
786971a3decbefaec3429c70a397fb7626137033 | 265 | py | Python | 1_mundo_exercicios/ex014.py | GuilhermeLima182/CursoDePython | 7e72b117142794c38cbb14284d0fa6e1dbee5bf6 | [
"MIT"
] | null | null | null | 1_mundo_exercicios/ex014.py | GuilhermeLima182/CursoDePython | 7e72b117142794c38cbb14284d0fa6e1dbee5bf6 | [
"MIT"
] | null | null | null | 1_mundo_exercicios/ex014.py | GuilhermeLima182/CursoDePython | 7e72b117142794c38cbb14284d0fa6e1dbee5bf6 | [
"MIT"
] | null | null | null | #Faça um programa que leia uma temperatura em graus celsius e converta
#para fahrenheit.
celsius = float(input('Informe a temperatura em ºC: '))
fahrenheit = (celsius * 9/5) + 32
print('O valor convertido de {}ºC em fahrenheit é {}ºF'.format(celsius, fahrenheit))
| 37.857143 | 84 | 0.739623 | #Faça um programa que leia uma temperatura em graus celsius e converta
#para fahrenheit.
celsius = float(input('Informe a temperatura em ºC: '))
fahrenheit = (celsius * 9/5) + 32
print('O valor convertido de {}ºC em fahrenheit é {}ºF'.format(celsius, fahrenheit))
| 0 | 0 | 0 |
8ba8ccd49d26fe56bfd2819bcf66f3e6b713b1e1 | 30 | py | Python | dfd/data/players.py | zaxcie/dfd | fbc0e39ceaecbf23e55db0bd2ac13e648cc4b971 | [
"MIT"
] | null | null | null | dfd/data/players.py | zaxcie/dfd | fbc0e39ceaecbf23e55db0bd2ac13e648cc4b971 | [
"MIT"
] | 1 | 2018-05-05T04:05:03.000Z | 2018-05-05T04:05:03.000Z | dfd/data/players.py | zaxcie/dfd | fbc0e39ceaecbf23e55db0bd2ac13e648cc4b971 | [
"MIT"
] | null | null | null | import time
import mlbgame
| 5 | 14 | 0.766667 | import time
import mlbgame
| 0 | 0 | 0 |
aea76d6bf22601a70bd9c39cd8ce242499164997 | 5,584 | py | Python | src/grafanatools/api.py | callumstew/grafanatools | 5d929a4775127658ac40cf208112aabe10948e83 | [
"MIT"
] | null | null | null | src/grafanatools/api.py | callumstew/grafanatools | 5d929a4775127658ac40cf208112aabe10948e83 | [
"MIT"
] | null | null | null | src/grafanatools/api.py | callumstew/grafanatools | 5d929a4775127658ac40cf208112aabe10948e83 | [
"MIT"
] | 1 | 2019-03-14T11:23:51.000Z | 2019-03-14T11:23:51.000Z | """ Module for interacting with Grafana HTTP API
View https://docs.grafana.org/http_api/ for comprehensive
documentation
"""
from typing import Mapping, Optional, Any
from requests import Session, Response
from .generic import update
class BaseApi():
""" Base class for Grafana HTTP API
"""
| 34.68323 | 81 | 0.59957 | """ Module for interacting with Grafana HTTP API
View https://docs.grafana.org/http_api/ for comprehensive
documentation
"""
from typing import Mapping, Optional, Any
from requests import Session, Response
from .generic import update
class BaseApi():
""" Base class for Grafana HTTP API
"""
def __init__(se... | 3,540 | 814 | 926 |
905f1a5ab9b532100ec00e549d5085480090545a | 762 | py | Python | print_test.py | wolftype/pony | be5c09c5e21fb03ad8693e4cea68551690d90c83 | [
"BSD-2-Clause"
] | 1 | 2018-10-14T01:36:48.000Z | 2018-10-14T01:36:48.000Z | print_test.py | wolftype/pony | be5c09c5e21fb03ad8693e4cea68551690d90c83 | [
"BSD-2-Clause"
] | null | null | null | print_test.py | wolftype/pony | be5c09c5e21fb03ad8693e4cea68551690d90c83 | [
"BSD-2-Clause"
] | null | null | null | from pony import *
p = Print ()
filename = "-i hpgl/p2.hpgl"
num = 50
for i in range (1, num):
#[0,1)
scl = float(i)/float(num)
#reset
args = "-r -l "
#select pen
args += "-sp 8 "
#draw border
args += "-b "
#scale
args += "-sr " + str(scl) + " " + str(scl)+ " "
#line type... | 20.052632 | 52 | 0.408136 | from pony import *
p = Print ()
filename = "-i hpgl/p2.hpgl"
num = 50
for i in range (1, num):
#[0,1)
scl = float(i)/float(num)
#reset
args = "-r -l "
#select pen
args += "-sp 8 "
#draw border
args += "-b "
#scale
args += "-sr " + str(scl) + " " + str(scl)+ " "
#line type... | 0 | 0 | 0 |
066ea45248d245f3e0dd2806be6acfa41d32d8b9 | 274 | py | Python | pingparsing/_common.py | xNathan/pingparsing | e334c94336357f0284dbf5d21ceb9f342b48a107 | [
"MIT"
] | 64 | 2016-03-05T08:39:23.000Z | 2022-02-26T15:28:43.000Z | pingparsing/_common.py | xNathan/pingparsing | e334c94336357f0284dbf5d21ceb9f342b48a107 | [
"MIT"
] | 21 | 2016-06-14T03:56:58.000Z | 2021-06-06T03:42:10.000Z | pingparsing/_common.py | xNathan/pingparsing | e334c94336357f0284dbf5d21ceb9f342b48a107 | [
"MIT"
] | 11 | 2017-05-09T12:59:55.000Z | 2021-02-06T14:51:42.000Z | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from typing import Union, cast
| 21.076923 | 63 | 0.656934 | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from typing import Union, cast
def _to_unicode(text: Union[str, bytes]) -> str:
try:
return text.decode("ascii") # type: ignore
except AttributeError:
return cast(str, text)
| 146 | 0 | 23 |
76b850c3fae5c45c1967924d627d3d075a7422bd | 16,927 | py | Python | pysnmp-with-texts/CISCO-WPAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-WPAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-WPAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-WPAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WPAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:21:30 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 180.074468 | 1,461 | 0.799905 | #
# PySNMP MIB module CISCO-WPAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WPAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:21:30 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 0 | 0 | 0 |
62c31a025b936d85b8b363d3c5a90688da1041b3 | 400 | py | Python | rinzler/exceptions/invalid_input_exception.py | feliphebueno/Rinzler | e1fe0621dad80356eeb1224bb83da2ffa0c48baa | [
"MIT"
] | 6 | 2017-08-03T00:49:46.000Z | 2019-03-01T22:38:47.000Z | rinzler/exceptions/invalid_input_exception.py | feliphebueno/Rinzler | e1fe0621dad80356eeb1224bb83da2ffa0c48baa | [
"MIT"
] | 10 | 2018-07-17T18:14:03.000Z | 2022-02-10T06:47:27.000Z | rinzler/exceptions/invalid_input_exception.py | feliphebueno/Rinzler | e1fe0621dad80356eeb1224bb83da2ffa0c48baa | [
"MIT"
] | 1 | 2017-10-03T00:19:49.000Z | 2017-10-03T00:19:49.000Z | """
Exception raised when a body request can not be decode from JSON and/or it's content doesn't match the minimum
specified values by the app
"""
from rinzler.exceptions import RinzlerHttpException
__author__ = "Rinzler<github.com/feliphebueno>"
class InvalidInputException(RinzlerHttpException):
"""
Invalid... | 25 | 110 | 0.755 | """
Exception raised when a body request can not be decode from JSON and/or it's content doesn't match the minimum
specified values by the app
"""
from rinzler.exceptions import RinzlerHttpException
__author__ = "Rinzler<github.com/feliphebueno>"
class InvalidInputException(RinzlerHttpException):
"""
Invalid... | 0 | 0 | 0 |
4daef84d172a4c79d4657a7905aca6f3a8b02cc1 | 734 | py | Python | pvcnn/modules/functional/ball_query.py | paschalidoud/pvcnn | 4894ab8de72fee29df952d5a92a22b6211ec15f8 | [
"MIT"
] | null | null | null | pvcnn/modules/functional/ball_query.py | paschalidoud/pvcnn | 4894ab8de72fee29df952d5a92a22b6211ec15f8 | [
"MIT"
] | null | null | null | pvcnn/modules/functional/ball_query.py | paschalidoud/pvcnn | 4894ab8de72fee29df952d5a92a22b6211ec15f8 | [
"MIT"
] | null | null | null | from torch.autograd import Function
from .backend import _backend
__all__ = ['ball_query']
def ball_query(centers_coords, points_coords, radius, num_neighbors):
"""
:param centers_coords: coordinates of centers, FloatTensor[B, 3, M]
:param points_coords: coordinates of points, FloatTensor[B,... | 36.7 | 88 | 0.694823 | from torch.autograd import Function
from .backend import _backend
__all__ = ['ball_query']
def ball_query(centers_coords, points_coords, radius, num_neighbors):
"""
:param centers_coords: coordinates of centers, FloatTensor[B, 3, M]
:param points_coords: coordinates of points, FloatTensor[B,... | 0 | 0 | 0 |
756b8150c7e6908d271f7c2f288748ba946092c7 | 7,716 | py | Python | legacy/purityAndStability_METbins.py | jjacob/DailyPythonScripts | cd6c515c6242d1f3b44e97c8ad05946721b6a36a | [
"Apache-2.0"
] | null | null | null | legacy/purityAndStability_METbins.py | jjacob/DailyPythonScripts | cd6c515c6242d1f3b44e97c8ad05946721b6a36a | [
"Apache-2.0"
] | null | null | null | legacy/purityAndStability_METbins.py | jjacob/DailyPythonScripts | cd6c515c6242d1f3b44e97c8ad05946721b6a36a | [
"Apache-2.0"
] | null | null | null | '''
Created on Aug 1, 2012
@author: Lukasz Kreczko
Email: Lukasz.Kreczko@cern.ch
'''
import FILES
import tools.ROOTFileReader as FileReader
from ROOT import gROOT
import tools.FileUtilities as FileUtils
fileTemplate = 'data/correctionFactors/correctionFactors_%s_%s_JSON.txt'
samples = [
'TTJet',
'PO... | 38.58 | 129 | 0.631804 | '''
Created on Aug 1, 2012
@author: Lukasz Kreczko
Email: Lukasz.Kreczko@cern.ch
'''
import FILES
import tools.ROOTFileReader as FileReader
from ROOT import gROOT
import tools.FileUtilities as FileUtils
fileTemplate = 'data/correctionFactors/correctionFactors_%s_%s_JSON.txt'
samples = [
'TTJet',
'PO... | 3,722 | 0 | 69 |
432eaeb5474fead13d8e3d68f38ca05443e58f7d | 1,342 | py | Python | lino_xl/lib/clients/__init__.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | 1 | 2018-01-12T14:09:48.000Z | 2018-01-12T14:09:48.000Z | lino_xl/lib/clients/__init__.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | 1 | 2019-09-10T05:03:47.000Z | 2019-09-10T05:03:47.000Z | lino_xl/lib/clients/__init__.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | null | null | null | # Copyright 2014-2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""See :doc:`/specs/clients`.
.. autosummary::
:toctree:
desktop
"""
from lino.api import ad, _
| 26.84 | 66 | 0.650522 | # Copyright 2014-2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""See :doc:`/specs/clients`.
.. autosummary::
:toctree:
desktop
"""
from lino.api import ad, _
class Plugin(ad.Plugin):
verbose_name = _("Clients")
needs_plugins = ['lino_xl.lib.contacts']
client_model = 'co... | 662 | 457 | 23 |
268e362afe8f361265099cbbeb85a9f3f94f2e44 | 98,423 | py | Python | pysnmp-with-texts/AP553-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/AP553-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/AP553-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module AP553-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AP553-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:22:57 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23... | 156.475358 | 8,182 | 0.783425 | #
# PySNMP MIB module AP553-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AP553-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:22:57 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23... | 0 | 0 | 0 |
73517dec824979b17fe087714c5b223894c5cc8f | 26,475 | py | Python | applications/Adversarial-Misspellings/main.py | suryabulusu/neuspell | 82d1a098e841c0d66592a4780691d2a7e494c924 | [
"MIT"
] | 1 | 2021-05-21T09:39:50.000Z | 2021-05-21T09:39:50.000Z | applications/Adversarial-Misspellings/main.py | michael-conrad/neuspell | f1d1a8b4efa7c6aa6e0564ea17db152905f4c7dc | [
"MIT"
] | null | null | null | applications/Adversarial-Misspellings/main.py | michael-conrad/neuspell | f1d1a8b4efa7c6aa6e0564ea17db152905f4c7dc | [
"MIT"
] | null | null | null | # Usage: python3 main.py --mode dev --model bilstm \
# --load tmp/lstm_epochs=4 --num_examples 100
from collections import defaultdict
import time
import datetime
import biLstm_with_chars # word + char model biLSTM model
import biLstm_char_only # char only biLSTM model
import biLstm
#from biLstm_with_chars import BiLS... | 37.394068 | 284 | 0.621039 | # Usage: python3 main.py --mode dev --model bilstm \
# --load tmp/lstm_epochs=4 --num_examples 100
from collections import defaultdict
import time
import datetime
import biLstm_with_chars # word + char model biLSTM model
import biLstm_char_only # char only biLSTM model
import biLstm
#from biLstm_with_chars import BiLS... | 16,818 | 0 | 368 |
dbc50f46cfca53dd26c3efa906c66103735b0b0c | 3,708 | py | Python | mayan/apps/ocr/migrations/0009_auto_20210304_0950.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 4 | 2021-09-02T00:16:30.000Z | 2021-09-09T22:25:15.000Z | mayan/apps/ocr/migrations/0009_auto_20210304_0950.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 86 | 2021-09-01T23:53:02.000Z | 2021-09-20T02:25:10.000Z | mayan/apps/ocr/migrations/0009_auto_20210304_0950.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 70 | 2021-09-01T12:54:51.000Z | 2022-02-16T00:53:18.000Z | from django.db import migrations, models, reset_queries
import django.db.models.deletion
def code_remap_document_version_pages_ocr_content(apps, schema_editor):
"""
The document_page_id field is pointing to the document file page.
This migration will remap that to point it for the corresponding
docume... | 35.314286 | 118 | 0.598975 | from django.db import migrations, models, reset_queries
import django.db.models.deletion
def code_remap_document_version_pages_ocr_content(apps, schema_editor):
"""
The document_page_id field is pointing to the document file page.
This migration will remap that to point it for the corresponding
docume... | 0 | 1,519 | 23 |
aecc14bf780b6b4d013f71c465ca428201d2af6a | 12,393 | py | Python | prep/Behavior.py | orena1/SpineImagingALM | 372ae843e52c27f2298bc415ef267c18aed995cb | [
"MIT"
] | 2 | 2019-11-30T00:57:07.000Z | 2020-08-26T23:49:15.000Z | prep/Behavior.py | elifesciences-publications/SpineImagingALM | 5f40e5182f298c3beba4956c37d7312f5e8b52b3 | [
"MIT"
] | 10 | 2020-03-24T17:12:03.000Z | 2022-03-11T23:51:43.000Z | prep/Behavior.py | elifesciences-publications/SpineImagingALM | 5f40e5182f298c3beba4956c37d7312f5e8b52b3 | [
"MIT"
] | 2 | 2019-10-23T14:34:50.000Z | 2020-10-21T00:59:10.000Z | # Encoding: utf-8
""" Behavior module for loading data from RT linux behavior controller.
"""
from __future__ import print_function
import copy
import matplotlib.pyplot as plt
import logging
import numpy as np
import os
import sys
from prep.Embedding import getExampleVol
from prep.HeaderReader import... | 40.237013 | 117 | 0.618091 | # Encoding: utf-8
""" Behavior module for loading data from RT linux behavior controller.
"""
from __future__ import print_function
import copy
import matplotlib.pyplot as plt
import logging
import numpy as np
import os
import sys
from prep.Embedding import getExampleVol
from prep.HeaderReader import... | 2,751 | 0 | 25 |
7e74e88ed26d203551f062f492c80c411bf6ae10 | 475 | py | Python | setup.py | HDictus/pyminiCLI | ac4f2771010934a499636ceaffe8532e50cdf07a | [
"MIT"
] | 2 | 2021-01-12T10:17:41.000Z | 2021-12-24T15:45:12.000Z | setup.py | HDictus/pyminiCLI | ac4f2771010934a499636ceaffe8532e50cdf07a | [
"MIT"
] | 2 | 2021-12-16T12:20:35.000Z | 2021-12-24T15:38:33.000Z | setup.py | HDictus/pyminiCLI | ac4f2771010934a499636ceaffe8532e50cdf07a | [
"MIT"
] | null | null | null | from setuptools import setup
with open('README.md', encoding='utf-8') as f:
README = f.read()
setup(
name='pyminiCLI',
version='0.2.1',
packages=['minicli'],
license='MIT',
author='HDIctus',
tests_require=['pytest'],
author_email='h.t.dictus@gmail.com',
description='quick and easy ... | 25 | 57 | 0.673684 | from setuptools import setup
with open('README.md', encoding='utf-8') as f:
README = f.read()
setup(
name='pyminiCLI',
version='0.2.1',
packages=['minicli'],
license='MIT',
author='HDIctus',
tests_require=['pytest'],
author_email='h.t.dictus@gmail.com',
description='quick and easy ... | 0 | 0 | 0 |
5d7b60a50e0c14dd6a025ec76e4aa310d5014fd3 | 26,294 | py | Python | wa/utils/types.py | robF8/workload-automation | 84b5ea8a56fae2388beb861edea21064a2c5fafa | [
"Apache-2.0"
] | 159 | 2016-01-25T11:08:39.000Z | 2022-03-28T05:20:41.000Z | wa/utils/types.py | robF8/workload-automation | 84b5ea8a56fae2388beb861edea21064a2c5fafa | [
"Apache-2.0"
] | 656 | 2016-01-25T11:16:56.000Z | 2022-03-23T16:03:28.000Z | wa/utils/types.py | robF8/workload-automation | 84b5ea8a56fae2388beb861edea21064a2c5fafa | [
"Apache-2.0"
] | 127 | 2015-03-11T16:36:17.000Z | 2022-02-15T02:26:43.000Z | # Copyright 2014-2018 ARM Limited
#
# 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 w... | 30.292627 | 94 | 0.597589 | # Copyright 2014-2018 ARM Limited
#
# 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 w... | 12,304 | 1,151 | 1,890 |
35ee7183f76ba5a01fa8bd6c6ebc0576e2659d6b | 955 | py | Python | ewi/api/views.py | pankshok/c3 | d3f2d162fb3330db0226aec5ea987d0665cfde72 | [
"MIT"
] | null | null | null | ewi/api/views.py | pankshok/c3 | d3f2d162fb3330db0226aec5ea987d0665cfde72 | [
"MIT"
] | null | null | null | ewi/api/views.py | pankshok/c3 | d3f2d162fb3330db0226aec5ea987d0665cfde72 | [
"MIT"
] | null | null | null | import http
from functools import wraps
from flask import json, jsonify
from flask import render_template, flash, redirect, request
from ewi.api import app
from ewi.forms import LoginForm
from common.request import jsoned, send_request
@app.route("/")
@app.route("/index")
@app.route("/login", methods = ["GET", "... | 22.209302 | 59 | 0.619895 | import http
from functools import wraps
from flask import json, jsonify
from flask import render_template, flash, redirect, request
from ewi.api import app
from ewi.forms import LoginForm
from common.request import jsoned, send_request
class Templates:
index = "index.html"
login = "login.html"
@app.route(... | 464 | 45 | 89 |
af08e0ffe35443f4267e87d6151743d082ed0df2 | 168 | py | Python | relay/jobs/decorators.py | yiu31802/ave | e46fc357f9464d5beaf42568a74bb95e6b1b8037 | [
"BSD-3-Clause"
] | 17 | 2016-11-16T08:09:49.000Z | 2021-08-12T06:38:09.000Z | relay/jobs/decorators.py | yiu31802/ave | e46fc357f9464d5beaf42568a74bb95e6b1b8037 | [
"BSD-3-Clause"
] | null | null | null | relay/jobs/decorators.py | yiu31802/ave | e46fc357f9464d5beaf42568a74bb95e6b1b8037 | [
"BSD-3-Clause"
] | 12 | 2016-11-20T15:34:03.000Z | 2020-08-04T00:26:11.000Z | # Copyright (C) 2014 Sony Mobile Communications AB.
# All rights, including trade secret rights, reserved.
| 24 | 54 | 0.708333 | # Copyright (C) 2014 Sony Mobile Communications AB.
# All rights, including trade secret rights, reserved.
def smoke(fn):
setattr(fn, 'smoke', True)
return fn
| 38 | 0 | 23 |
2122d5aa57927aaed73b2d58ff36505c4b4ba9b0 | 1,015 | py | Python | pygita/exceptions.py | TheShubhendra/gita | 955bade9699eba52df4f8598b73965fd685f6a62 | [
"MIT"
] | 2 | 2020-09-08T09:38:18.000Z | 2020-09-08T14:02:20.000Z | pygita/exceptions.py | TheShubhendra/gita | 955bade9699eba52df4f8598b73965fd685f6a62 | [
"MIT"
] | 2 | 2020-09-10T13:44:58.000Z | 2021-02-14T13:21:04.000Z | pygita/exceptions.py | TheShubhendra/gita | 955bade9699eba52df4f8598b73965fd685f6a62 | [
"MIT"
] | 1 | 2020-09-08T14:11:36.000Z | 2020-09-08T14:11:36.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Module of execption classes."""
class PygitaException(Exception):
"""Base class for exceptions."""
pass
class ServerConnectionError(PygitaException):
"""Unable to connect with server."""
pass
class BadRequestError(PygitaException):
"""Bad Request... | 18.125 | 59 | 0.697537 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Module of execption classes."""
class PygitaException(Exception):
"""Base class for exceptions."""
pass
class ServerConnectionError(PygitaException):
"""Unable to connect with server."""
pass
class BadRequestError(PygitaException):
"""Bad Request... | 0 | 0 | 0 |
999c50952c81375eab6cf8a8eec2113e039cc3c8 | 16,240 | py | Python | legacy/builder/app.py | carlosb1/jina-hub | f298d0f136c8627dd720d7a4e3eb9031655f5ccb | [
"Apache-2.0"
] | 106 | 2020-04-28T10:24:08.000Z | 2022-03-15T02:30:27.000Z | legacy/builder/app.py | carlosb1/jina-hub | f298d0f136c8627dd720d7a4e3eb9031655f5ccb | [
"Apache-2.0"
] | 6,808 | 2020-05-01T04:13:43.000Z | 2021-06-23T08:04:02.000Z | legacy/builder/app.py | carlosb1/jina-hub | f298d0f136c8627dd720d7a4e3eb9031655f5ccb | [
"Apache-2.0"
] | 86 | 2020-04-29T09:50:29.000Z | 2022-01-25T05:42:44.000Z | import argparse
import json
import os
import pathlib
import re
import shutil
import subprocess
import unicodedata
from datetime import datetime
from pathlib import Path
from ruamel.yaml import YAML
yaml = YAML()
allowed = {'name', 'description', 'author', 'url', 'documentation', 'version', 'vendor', 'license', 'avata... | 36.008869 | 119 | 0.602094 | import argparse
import json
import os
import pathlib
import re
import shutil
import subprocess
import unicodedata
from datetime import datetime
from pathlib import Path
from ruamel.yaml import YAML
yaml = YAML()
allowed = {'name', 'description', 'author', 'url', 'documentation', 'version', 'vendor', 'license', 'avata... | 13,522 | 0 | 529 |
e8ccbbbcbf5cbf8f59c3f4071a13661ce56fb984 | 2,395 | py | Python | ForgeImporters/forgeimporters/trac/tests/functional/test_trac.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 113 | 2015-03-25T10:33:37.000Z | 2022-02-16T20:55:06.000Z | ForgeImporters/forgeimporters/trac/tests/functional/test_trac.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 4 | 2017-08-04T16:19:07.000Z | 2020-06-08T19:01:33.000Z | ForgeImporters/forgeimporters/trac/tests/functional/test_trac.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 36 | 2015-08-14T16:27:39.000Z | 2022-02-16T20:54:35.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 41.293103 | 122 | 0.653027 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 1,145 | 26 | 104 |
ba6d51edfc2d52f436a405e353afabcb94284ceb | 1,153 | py | Python | app/__init__.py | tahmidk/wn-customtrans | b1926d5a4239e5f3da95ba67958cae95d9b714af | [
"BSD-3-Clause"
] | 1 | 2020-07-29T22:55:18.000Z | 2020-07-29T22:55:18.000Z | app/__init__.py | tahmidk/wn-customtrans | b1926d5a4239e5f3da95ba67958cae95d9b714af | [
"BSD-3-Clause"
] | 1 | 2021-03-31T19:59:34.000Z | 2021-03-31T19:59:34.000Z | app/__init__.py | tahmidk/wn-customtrans | b1926d5a4239e5f3da95ba67958cae95d9b714af | [
"BSD-3-Clause"
] | null | null | null | #=======================================================================
# Copyright (c) 2020, Tahmid Khan
# All rights reserved.
#
# Licensed under the BSD 3-Clause license found in the LICENSE file
#=======================================================================
from flask import Flask
from flask_wtf.csrf... | 31.162162 | 72 | 0.673027 | #=======================================================================
# Copyright (c) 2020, Tahmid Khan
# All rights reserved.
#
# Licensed under the BSD 3-Clause license found in the LICENSE file
#=======================================================================
from flask import Flask
from flask_wtf.csrf... | 0 | 0 | 0 |
477ba15a71ce3ce39ce852ea35d95162791229c9 | 4,192 | py | Python | anuvaad-etl/anuvaad-extractor/document-processor/gv-document-digitization/config.py | srihari-nagaraj/anuvaad | b09b01a033a033e97db6e404c088e0e6332053e4 | [
"MIT"
] | null | null | null | anuvaad-etl/anuvaad-extractor/document-processor/gv-document-digitization/config.py | srihari-nagaraj/anuvaad | b09b01a033a033e97db6e404c088e0e6332053e4 | [
"MIT"
] | null | null | null | anuvaad-etl/anuvaad-extractor/document-processor/gv-document-digitization/config.py | srihari-nagaraj/anuvaad | b09b01a033a033e97db6e404c088e0e6332053e4 | [
"MIT"
] | null | null | null | #import logging
import os
import time
DEBUG = False
API_URL_PREFIX = "/anuvaad-etl/document-processor/gv-document-digitization"
HOST = '0.0.0.0'
PORT = 5001
BASE_DIR = 'upload'
#BASE_DIR = '/home/naresh/anuvaad/anuvaad-etl/anuvaad-extractor/document-processor/gv-document-digitization/upload'
download_folder ... | 35.226891 | 120 | 0.741889 | #import logging
import os
import time
DEBUG = False
API_URL_PREFIX = "/anuvaad-etl/document-processor/gv-document-digitization"
HOST = '0.0.0.0'
PORT = 5001
BASE_DIR = 'upload'
#BASE_DIR = '/home/naresh/anuvaad/anuvaad-etl/anuvaad-extractor/document-processor/gv-document-digitization/upload'
download_folder ... | 0 | 0 | 0 |
3cbf989769cd921a207cc56e8b8bab902cfa84ee | 1,354 | py | Python | plot_worldcat_eng.py | mccalluc/cs-classics | f9756199ff8ab4489c34dc941bf98ac172113ae2 | [
"MIT"
] | null | null | null | plot_worldcat_eng.py | mccalluc/cs-classics | f9756199ff8ab4489c34dc941bf98ac172113ae2 | [
"MIT"
] | null | null | null | plot_worldcat_eng.py | mccalluc/cs-classics | f9756199ff8ab4489c34dc941bf98ac172113ae2 | [
"MIT"
] | null | null | null | import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
import sys
import pandas
import re
from cycler import cycler
if __name__ == '__main__':
dfs = {}
files = sys.argv[1:]
for file in files:
df = pandas.read_csv(file, sep='\t').set_index(['file'])
... | 29.434783 | 76 | 0.574594 | import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
import sys
import pandas
import re
from cycler import cycler
if __name__ == '__main__':
dfs = {}
files = sys.argv[1:]
for file in files:
df = pandas.read_csv(file, sep='\t').set_index(['file'])
... | 0 | 0 | 0 |
3fb5d86c0329ed69ac96be3aa70700ad9bdefaaf | 25,007 | py | Python | api/tacticalrmm/agents/models.py | meyerje/tacticalrmm | 40a68bafb6ee85de586c23b9c3f7387553188eed | [
"MIT"
] | null | null | null | api/tacticalrmm/agents/models.py | meyerje/tacticalrmm | 40a68bafb6ee85de586c23b9c3f7387553188eed | [
"MIT"
] | null | null | null | api/tacticalrmm/agents/models.py | meyerje/tacticalrmm | 40a68bafb6ee85de586c23b9c3f7387553188eed | [
"MIT"
] | null | null | null | import requests
import datetime as dt
import time
import base64
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Hash import SHA3_384
from Crypto.Util.Padding import pad
import validators
import random
import re
import string
from collections import Counter
from loguru import logger
... | 34.731944 | 100 | 0.583277 | import requests
import datetime as dt
import time
import base64
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Hash import SHA3_384
from Crypto.Util.Padding import pad
import validators
import random
import re
import string
from collections import Counter
from loguru import logger
... | 19,219 | 4,949 | 92 |
fbfe85705a9ae51b9f14d0bbfd251e09b903a3bd | 1,784 | py | Python | src/gym-timer/gymtimer.py | coseguera/gym-timer | 6d98f8e25d3329b8ed9a2de0a8e432b9293aa746 | [
"MIT"
] | null | null | null | src/gym-timer/gymtimer.py | coseguera/gym-timer | 6d98f8e25d3329b8ed9a2de0a8e432b9293aa746 | [
"MIT"
] | null | null | null | src/gym-timer/gymtimer.py | coseguera/gym-timer | 6d98f8e25d3329b8ed9a2de0a8e432b9293aa746 | [
"MIT"
] | null | null | null | import time
from gyminput import check_input
from gymdisplay import set_display, set_display_individual
from gymbuzz import beep
# EMOM style
# Tabata style
| 27.875 | 78 | 0.607623 | import time
from gyminput import check_input
from gymdisplay import set_display, set_display_individual
from gymbuzz import beep
def up_timer(max_second, refresh_rate):
start = time.time()
while True:
if check_input():
return False
current = int(time.time() - start)
set_dis... | 1,511 | 0 | 113 |
6188ded3ffa857cd0f8368f3d04cd70d3a1933c2 | 6,410 | py | Python | tests/python/pants_test/backend/python/tasks/test_python_binary_create.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | tests/python/pants_test/backend/python/tasks/test_python_binary_create.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/python/tasks/test_python_binary_create.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import subprocess
from textwrap import dedent
from colors import blue
from pants.backend.python.tasks.gather_sources import GatherSources
from pants.backend.python.tasks.python... | 34.278075 | 98 | 0.584399 | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import subprocess
from textwrap import dedent
from colors import blue
from pants.backend.python.tasks.gather_sources import GatherSources
from pants.backend.python.tasks.python... | 5,472 | 277 | 23 |
3c873a8aad87f6ca72e20a3f861bc336c82499dc | 800 | py | Python | optipy/GetVersionsList.py | GoodDay360/OptiPy | d67c8cbe40dc85dc6a313804763b1db2a0b727fa | [
"MIT"
] | 4 | 2021-12-20T08:14:40.000Z | 2021-12-24T13:19:32.000Z | optipy/GetVersionsList.py | GoodDay360/Optifine-API | d67c8cbe40dc85dc6a313804763b1db2a0b727fa | [
"MIT"
] | null | null | null | optipy/GetVersionsList.py | GoodDay360/Optifine-API | d67c8cbe40dc85dc6a313804763b1db2a0b727fa | [
"MIT"
] | 1 | 2022-02-11T01:51:59.000Z | 2022-02-11T01:51:59.000Z | import requests,json,warnings
from distutils.version import LooseVersion
# This use to ignore sorting *LooseVersion.
# You can remove it if you want.
warnings.filterwarnings('ignore')
| 38.095238 | 90 | 0.6925 | import requests,json,warnings
from distutils.version import LooseVersion
# This use to ignore sorting *LooseVersion.
# You can remove it if you want.
warnings.filterwarnings('ignore')
def getversionlist():
url = "https://nitroxenon-minecraft-forge-v1.p.rapidapi.com/optifine/versionlist"
headers = {
'x... | 592 | 0 | 23 |
530c6862017458ecef21be038aa7d1801d12b9f9 | 259 | py | Python | org/tact/city.py | purnimasurya/python-personal-archive | d0198f1d35b5a62efb392f134a8341e8063c9df5 | [
"MIT"
] | null | null | null | org/tact/city.py | purnimasurya/python-personal-archive | d0198f1d35b5a62efb392f134a8341e8063c9df5 | [
"MIT"
] | null | null | null | org/tact/city.py | purnimasurya/python-personal-archive | d0198f1d35b5a62efb392f134a8341e8063c9df5 | [
"MIT"
] | null | null | null | import random as r
get_friendship_meter('sam', 'purnima') | 25.9 | 44 | 0.640927 | import random as r
def get_friendship_meter(name1, name2):
print('Your Name : ', name1)
print("Your friend Name : ", name2)
meter = r.randint(1, 100)
print("Your friendship meter : ", meter)
get_friendship_meter('sam', 'purnima') | 174 | 0 | 23 |
8ba59c942769832e081b922adf3072d237669628 | 14,852 | py | Python | tests/test_data_loader.py | lzamparo/SeqDemote | 3eaf18e88c9dc6a3d1a69444ecdba9f9b5d9682a | [
"MIT"
] | 1 | 2019-04-16T12:25:09.000Z | 2019-04-16T12:25:09.000Z | tests/test_data_loader.py | lzamparo/SeqDemote | 3eaf18e88c9dc6a3d1a69444ecdba9f9b5d9682a | [
"MIT"
] | null | null | null | tests/test_data_loader.py | lzamparo/SeqDemote | 3eaf18e88c9dc6a3d1a69444ecdba9f9b5d9682a | [
"MIT"
] | null | null | null | import load
from utils import dna_io
from nose.tools import eq_, ok_
from nose import SkipTest
import nose, functools
import os
import numpy as np
### Basset DNase data fixtures
path = os.path.expanduser("~/projects/SeqDemote/data/DNase/encode_roadmap_all.h5")
chunk_size = 4096
batch_size = 128
batch_train_shape = (... | 39.817694 | 112 | 0.701387 | import load
from utils import dna_io
from nose.tools import eq_, ok_
from nose import SkipTest
import nose, functools
import os
import numpy as np
def expected_failure(test):
@functools.wraps(test)
def inner(*args, **kwargs):
try:
test(*args, **kwargs)
except Exception:
... | 4,656 | 0 | 193 |
71b54a6000a48a4ba77c8b8a9d192cd697ecdb5a | 204 | py | Python | 21-Social_Clone_Project/simplesocial_Practice/groups/admin.py | andy2167565/Django-Bootcamp-Practice | f08d2866382db96060450d4dbd1ffaca7243f623 | [
"MIT"
] | null | null | null | 21-Social_Clone_Project/simplesocial_Practice/groups/admin.py | andy2167565/Django-Bootcamp-Practice | f08d2866382db96060450d4dbd1ffaca7243f623 | [
"MIT"
] | null | null | null | 21-Social_Clone_Project/simplesocial_Practice/groups/admin.py | andy2167565/Django-Bootcamp-Practice | f08d2866382db96060450d4dbd1ffaca7243f623 | [
"MIT"
] | null | null | null | from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Group)
| 22.666667 | 46 | 0.764706 | from django.contrib import admin
from . import models
# Register your models here.
class GroupMemberInline(admin.TabularInline):
model = models.GroupMember
admin.site.register(models.Group)
| 0 | 56 | 23 |
1697e5e0d59f2413269daa35cd57e6e3fdeec042 | 2,082 | py | Python | spotify.py | codybenlewis/Personal-Data-Server | c8d57cb490cf398e11ef173c62ae1f36755e01a2 | [
"Apache-2.0"
] | null | null | null | spotify.py | codybenlewis/Personal-Data-Server | c8d57cb490cf398e11ef173c62ae1f36755e01a2 | [
"Apache-2.0"
] | null | null | null | spotify.py | codybenlewis/Personal-Data-Server | c8d57cb490cf398e11ef173c62ae1f36755e01a2 | [
"Apache-2.0"
] | null | null | null | import sys
import spotipy
import spotipy.util as util
import time
import keys
| 31.074627 | 168 | 0.60951 | import sys
import spotipy
import spotipy.util as util
import time
import keys
def gettoken():
scope = keys.spotifyscope
token = util.prompt_for_user_token(keys.spotifyusername, scope, client_id=keys.spotifyclientid,client_secret=keys.spotifyclientsecret,redirect_uri=keys.redirecturl)
return token
def re... | 1,932 | 0 | 69 |
7a86d9e1c97956ef8278239ea99a6ef0b03f3a0a | 1,596 | py | Python | unittesting/helpers/temp_directory_test_case.py | evandroforks/UnitTesting | df202cd2d4d466a443e31944cf83c3a87c406f06 | [
"MIT"
] | 1 | 2018-12-08T21:44:48.000Z | 2018-12-08T21:44:48.000Z | unittesting/helpers/temp_directory_test_case.py | evandroforks/UnitTesting | df202cd2d4d466a443e31944cf83c3a87c406f06 | [
"MIT"
] | null | null | null | unittesting/helpers/temp_directory_test_case.py | evandroforks/UnitTesting | df202cd2d4d466a443e31944cf83c3a87c406f06 | [
"MIT"
] | null | null | null | import sublime
import os
import shutil
import tempfile
from .. import DeferrableTestCase
class TempDirectoryTestCase(DeferrableTestCase):
"""Create a temp directory and open it."""
_temp_dir = None
@classmethod
def setUpClass(cls):
"""Create a temp directory for testing."""
cls._temp... | 30.692308 | 85 | 0.614662 | import sublime
import os
import shutil
import tempfile
from .. import DeferrableTestCase
class TempDirectoryTestCase(DeferrableTestCase):
"""Create a temp directory and open it."""
_temp_dir = None
@classmethod
def setUpClass(cls):
"""Create a temp directory for testing."""
cls._temp... | 694 | 0 | 57 |
9f5aff912a044f0eef77ef282803cdb6d41baa45 | 1,574 | py | Python | manageritm/client/manageritm_client.py | dskard/mitmmanager | 623d5433ded06b44db0b4ab4b7f6318736ebbfb3 | [
"MIT"
] | null | null | null | manageritm/client/manageritm_client.py | dskard/mitmmanager | 623d5433ded06b44db0b4ab4b7f6318736ebbfb3 | [
"MIT"
] | null | null | null | manageritm/client/manageritm_client.py | dskard/mitmmanager | 623d5433ded06b44db0b4ab4b7f6318736ebbfb3 | [
"MIT"
] | null | null | null | import textwrap
import requests
| 27.614035 | 80 | 0.609276 | import textwrap
import requests
class ManagerITMClientException(Exception):
def __init__(self, response):
self.response = response
def __repr__(self):
return f"<{self.__class__.__name__} status={self.response.status_code}>"
def __str__(self):
req = self.response.request
r... | 1,202 | 24 | 314 |
6c4a500a16124687a0a6381a88ed920b1164fd36 | 3,163 | py | Python | tabint/performance.py | KienVu2368/taproc | 47752c367eefb42bf52876c30e9e9e6085029465 | [
"MIT"
] | 3 | 2019-02-07T14:37:08.000Z | 2020-01-23T12:54:46.000Z | tabint/performance.py | KienVu2368/taproc | 47752c367eefb42bf52876c30e9e9e6085029465 | [
"MIT"
] | 5 | 2020-07-25T09:33:19.000Z | 2020-07-25T09:39:15.000Z | tabint/performance.py | KienVu2368/taproc | 47752c367eefb42bf52876c30e9e9e6085029465 | [
"MIT"
] | 2 | 2019-09-16T07:43:10.000Z | 2019-10-31T08:46:38.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/11_performance.ipynb (unless otherwise specified).
__all__ = ['TBPerformace', 'actual_vs_predict', 'ReceiverOperatingCharacteristic', 'PrecisionRecall']
# Cell
import tabint
from .utils import *
from .dataset import *
from .visual import *
from .learner import *
from sk... | 34.758242 | 101 | 0.655074 | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/11_performance.ipynb (unless otherwise specified).
__all__ = ['TBPerformace', 'actual_vs_predict', 'ReceiverOperatingCharacteristic', 'PrecisionRecall']
# Cell
import tabint
from .utils import *
from .dataset import *
from .visual import *
from .learner import *
from sk... | 2,046 | 627 | 88 |
8bd423ec12c0a4ac2836dc674c9728521e422d11 | 1,187 | py | Python | tests/techniques/test_min_max.py | alphagamatoe/AlphaToe | a7cd0969aa46dfd151a22ed8b9aec1a894747b17 | [
"MIT"
] | 172 | 2016-09-27T12:23:10.000Z | 2022-01-19T09:52:11.000Z | tests/techniques/test_min_max.py | afcarl/AlphaToe | 1220f4f883dbbd7ac1d84092bdaf04ca18a4dbc2 | [
"MIT"
] | 13 | 2018-07-19T09:42:28.000Z | 2018-09-25T15:08:05.000Z | tests/techniques/test_min_max.py | afcarl/AlphaToe | 1220f4f883dbbd7ac1d84092bdaf04ca18a4dbc2 | [
"MIT"
] | 63 | 2016-09-27T13:00:51.000Z | 2021-04-04T04:34:37.000Z | from unittest import TestCase
from games.tic_tac_toe import TicTacToeGameSpec
from techniques.min_max import min_max_alpha_beta, min_max
| 35.969697 | 98 | 0.632687 | from unittest import TestCase
from games.tic_tac_toe import TicTacToeGameSpec
from techniques.min_max import min_max_alpha_beta, min_max
class TestMinMax(TestCase):
def setUp(self):
self._game_spec = TicTacToeGameSpec()
def test_basic_position(self):
# the best move is 2, 2 forcing a win wit... | 939 | 6 | 103 |
d5d9c6cf626be2abb1306ad10201ce04d163c3e1 | 967 | py | Python | python_script/smbv3_compress.py | mellven/CVE2020-0796 | c1899088d7c28842142c1cbf081f7640d0244f35 | [
"Apache-2.0"
] | 58 | 2020-03-11T17:00:29.000Z | 2021-01-03T15:58:37.000Z | python_script/smbv3_compress.py | mellven/CVE2020-0796 | c1899088d7c28842142c1cbf081f7640d0244f35 | [
"Apache-2.0"
] | 1 | 2020-04-21T14:19:50.000Z | 2020-04-21T14:19:50.000Z | python_script/smbv3_compress.py | mellven/CVE2020-0796 | c1899088d7c28842142c1cbf081f7640d0244f35 | [
"Apache-2.0"
] | 14 | 2020-03-11T23:45:07.000Z | 2020-12-14T10:44:27.000Z | import struct
import socket
import sys
if len(sys.argv) != 2:
print("Usage: %s IP" % (sys.argv[0]))
exit()
smb_payload ="000000b2fe534d4240000100000000000000210010000000000000000000000000000000fffe00000000000000000000000000000000000000000000000000000000000024000500010000007f000000aa9952d87063ea118a76005056b886b07... | 33.344828 | 343 | 0.752844 | import struct
import socket
import sys
if len(sys.argv) != 2:
print("Usage: %s IP" % (sys.argv[0]))
exit()
smb_payload ="000000b2fe534d4240000100000000000000210010000000000000000000000000000000fffe00000000000000000000000000000000000000000000000000000000000024000500010000007f000000aa9952d87063ea118a76005056b886b07... | 0 | 0 | 0 |
f3c239f6f5dbe93d680642c6c279fadb1109e178 | 4,853 | py | Python | GUI/apps/StatisticsApp/VisualizationWindow.py | IlyaKomutkov/SmartMed-1 | b6389cbf9240fa3ba909c0fe7eed6772d8b6b0df | [
"Apache-2.0"
] | 1 | 2021-04-16T18:52:11.000Z | 2021-04-16T18:52:11.000Z | GUI/apps/StatisticsApp/VisualizationWindow.py | IlyaKomutkov/SmartMed-1 | b6389cbf9240fa3ba909c0fe7eed6772d8b6b0df | [
"Apache-2.0"
] | null | null | null | GUI/apps/StatisticsApp/VisualizationWindow.py | IlyaKomutkov/SmartMed-1 | b6389cbf9240fa3ba909c0fe7eed6772d8b6b0df | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'VisualizationWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import ... | 59.182927 | 190 | 0.724088 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'VisualizationWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import ... | 4,764 | 13 | 76 |
c5ebb028c8df1a6d0a2c929b19e75bc2affaf98a | 312 | py | Python | Server/server.py | moreal/DMS-Backend | c0a3b28972739c58049a296570bb873f32c03eec | [
"MIT"
] | 27 | 2018-01-14T08:07:18.000Z | 2020-01-20T14:21:17.000Z | Server/server.py | moreal/DMS-Backend | c0a3b28972739c58049a296570bb873f32c03eec | [
"MIT"
] | 50 | 2018-02-12T12:51:33.000Z | 2018-08-28T00:48:31.000Z | Server/server.py | moreal/DMS-Backend | c0a3b28972739c58049a296570bb873f32c03eec | [
"MIT"
] | 10 | 2018-03-31T16:30:32.000Z | 2021-03-02T10:30:31.000Z | import os
from app import create_app
from config.production import ProductionConfig
if __name__ == '__main__':
app = create_app(ProductionConfig)
if 'SECRET_KEY' not in os.environ:
print('[WARN] SECRET KEY is not set in the environment variable !!')
app.run(**app.config['RUN_SETTING'])
| 22.285714 | 76 | 0.711538 | import os
from app import create_app
from config.production import ProductionConfig
if __name__ == '__main__':
app = create_app(ProductionConfig)
if 'SECRET_KEY' not in os.environ:
print('[WARN] SECRET KEY is not set in the environment variable !!')
app.run(**app.config['RUN_SETTING'])
| 0 | 0 | 0 |
c537c027d44eac0122e6c168897cab1dad9d6a1e | 17,375 | py | Python | espaloma/nn/readout/janossy.py | jeherr/espaloma | 1be88601f7d1307df283b6cd71714c3311e59f74 | [
"MIT"
] | 1 | 2020-02-13T01:26:36.000Z | 2020-02-13T01:26:36.000Z | espaloma/nn/readout/janossy.py | jeherr/espaloma | 1be88601f7d1307df283b6cd71714c3311e59f74 | [
"MIT"
] | 5 | 2020-02-17T23:38:58.000Z | 2020-03-04T23:01:06.000Z | espaloma/nn/readout/janossy.py | jeherr/espaloma | 1be88601f7d1307df283b6cd71714c3311e59f74 | [
"MIT"
] | null | null | null | # =============================================================================
# IMPORTS
# =============================================================================
import torch
import espaloma as esp
# =============================================================================
# MODULE CLASSES
# ============... | 31.590909 | 171 | 0.418417 | # =============================================================================
# IMPORTS
# =============================================================================
import torch
import espaloma as esp
# =============================================================================
# MODULE CLASSES
# ============... | 6,863 | 44 | 206 |
e3f4e8f929a2f7b097047a834218a942ce88b609 | 382 | py | Python | tests/parser/syntax/test_minmax.py | erdnaag/vyper | 22bef3a4b4161db18c7831041e20b917984cff83 | [
"Apache-2.0"
] | 1 | 2020-07-04T01:47:26.000Z | 2020-07-04T01:47:26.000Z | tests/parser/syntax/test_minmax.py | erdnaag/vyper | 22bef3a4b4161db18c7831041e20b917984cff83 | [
"Apache-2.0"
] | null | null | null | tests/parser/syntax/test_minmax.py | erdnaag/vyper | 22bef3a4b4161db18c7831041e20b917984cff83 | [
"Apache-2.0"
] | null | null | null | import pytest
from pytest import raises
from vyper import compiler
from vyper.exceptions import TypeMismatch
fail_list = [
"""
@public
def foo():
y: int128 = min(7, 0x1234567890123456789012345678901234567890)
"""
]
@pytest.mark.parametrize("bad_code", fail_list)
| 18.190476 | 66 | 0.73822 | import pytest
from pytest import raises
from vyper import compiler
from vyper.exceptions import TypeMismatch
fail_list = [
"""
@public
def foo():
y: int128 = min(7, 0x1234567890123456789012345678901234567890)
"""
]
@pytest.mark.parametrize("bad_code", fail_list)
def test_block_fail(bad_code):
with ... | 81 | 0 | 22 |
1c35cd9adb0c85b88590392345e600e9bf237706 | 9,577 | py | Python | implementations/srgan/srgan_pl.py | jsyoo61/PyTorch-GAN | 2d528c5f9818b0d1110c33808947643f81a75bbb | [
"MIT"
] | null | null | null | implementations/srgan/srgan_pl.py | jsyoo61/PyTorch-GAN | 2d528c5f9818b0d1110c33808947643f81a75bbb | [
"MIT"
] | null | null | null | implementations/srgan/srgan_pl.py | jsyoo61/PyTorch-GAN | 2d528c5f9818b0d1110c33808947643f81a75bbb | [
"MIT"
] | null | null | null | """
Super-resolution of CelebA using Generative Adversarial Networks.
The dataset can be downloaded from: https://www.dropbox.com/sh/8oqt9vytwxb3s4r/AADIKlz8PR9zr6Y20qbkunrba/Img/img_align_celeba.zip?dl=0
(if not available there see if options are listed at http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html)
Instrustion ... | 39.904167 | 173 | 0.677874 | """
Super-resolution of CelebA using Generative Adversarial Networks.
The dataset can be downloaded from: https://www.dropbox.com/sh/8oqt9vytwxb3s4r/AADIKlz8PR9zr6Y20qbkunrba/Img/img_align_celeba.zip?dl=0
(if not available there see if options are listed at http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html)
Instrustion ... | 0 | 0 | 0 |
2e00d0144d057bd2a8a8eb374588f42fa1ff99ec | 1,397 | py | Python | alice_images/cli.py | AlekseevAV/alice-images | 28021320d9e6d48e7ef1f878e039b70002382fbc | [
"MIT"
] | null | null | null | alice_images/cli.py | AlekseevAV/alice-images | 28021320d9e6d48e7ef1f878e039b70002382fbc | [
"MIT"
] | null | null | null | alice_images/cli.py | AlekseevAV/alice-images | 28021320d9e6d48e7ef1f878e039b70002382fbc | [
"MIT"
] | null | null | null | import click
from . import alice_images_api as api
@click.group()
@click.option('--skill-id', prompt='Skill id', required=True, help='Alice skill id')
@click.option('--oauth-token', prompt='OAuth token', required=True, help='Account OAuth token')
@click.pass_context
@cli.command('upload')
@click.argument('image_pa... | 25.4 | 118 | 0.695777 | import click
from . import alice_images_api as api
@click.group()
@click.option('--skill-id', prompt='Skill id', required=True, help='Alice skill id')
@click.option('--oauth-token', prompt='OAuth token', required=True, help='Account OAuth token')
@click.pass_context
def cli(ctx, skill_id, oauth_token):
ctx.ensur... | 692 | 0 | 110 |
f849feb76ecb6fc4caa7ea97459c3971ec3eb3fe | 626 | py | Python | FreeTAKServer/model/FTSModel/Checklist.py | logikal/FreeTakServer | c0916ce65781b5c60079d6440e52db8fc6ee0467 | [
"MIT"
] | 27 | 2020-05-01T01:45:59.000Z | 2020-07-03T00:17:13.000Z | FreeTAKServer/model/FTSModel/Checklist.py | logikal/FreeTakServer | c0916ce65781b5c60079d6440e52db8fc6ee0467 | [
"MIT"
] | 34 | 2020-04-26T11:25:52.000Z | 2020-07-03T21:06:34.000Z | FreeTAKServer/model/FTSModel/Checklist.py | logikal/FreeTakServer | c0916ce65781b5c60079d6440e52db8fc6ee0467 | [
"MIT"
] | 15 | 2020-05-01T01:46:07.000Z | 2020-07-03T12:14:04.000Z | from FreeTAKServer.model.FTSModel.fts_protocol_object import FTSProtocolObject
from FreeTAKServer.model.FTSModel.ChecklistColumns import ChecklistColumns
from FreeTAKServer.model.FTSModel.ChecklistDetails import ChecklistDetails
from FreeTAKServer.model.FTSModel.ChecklistTasks import ChecklistTasks | 48.153846 | 78 | 0.808307 | from FreeTAKServer.model.FTSModel.fts_protocol_object import FTSProtocolObject
from FreeTAKServer.model.FTSModel.ChecklistColumns import ChecklistColumns
from FreeTAKServer.model.FTSModel.ChecklistDetails import ChecklistDetails
from FreeTAKServer.model.FTSModel.ChecklistTasks import ChecklistTasks
class Checklist(FTS... | 246 | 58 | 23 |
964e8a35e49797201c71028bf40cb67484104661 | 724 | py | Python | Python/pixelTest.py | 4tronix/PiconPlus | 076c2afe6e5ec68cbff0e43423bdcd021afd761c | [
"MIT"
] | 1 | 2020-05-22T01:48:33.000Z | 2020-05-22T01:48:33.000Z | Python/pixelTest.py | 4tronix/PiconPlus | 076c2afe6e5ec68cbff0e43423bdcd021afd761c | [
"MIT"
] | null | null | null | Python/pixelTest.py | 4tronix/PiconPlus | 076c2afe6e5ec68cbff0e43423bdcd021afd761c | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# Picon Plus Fireled Test
# Flashes Fireleds attached to Fireled Output
# Press Ctrl-C to stop
from __future__ import print_function
from piconplus import PiconPlus
from time import sleep
pp = PiconPlus(0x24)
rev = pp.getRevision()
print ('Board:', rev[1], " Revision:", rev[0])
for i in rang... | 20.111111 | 47 | 0.621547 | #! /usr/bin/env python
# Picon Plus Fireled Test
# Flashes Fireleds attached to Fireled Output
# Press Ctrl-C to stop
from __future__ import print_function
from piconplus import PiconPlus
from time import sleep
pp = PiconPlus(0x24)
rev = pp.getRevision()
print ('Board:', rev[1], " Revision:", rev[0])
for i in rang... | 0 | 0 | 0 |
62fb30ff7a6fec2a361d6780e9e50a7cd3597e97 | 542 | py | Python | modulo_4/bloco_33/dia_2/excecoes.py | Gabriel-Goncalves/trybe-exercises | f652563499a540e2536276e97e94099b45def6c4 | [
"Xnet",
"X11"
] | null | null | null | modulo_4/bloco_33/dia_2/excecoes.py | Gabriel-Goncalves/trybe-exercises | f652563499a540e2536276e97e94099b45def6c4 | [
"Xnet",
"X11"
] | 3 | 2020-10-07T20:40:35.000Z | 2020-10-23T22:58:34.000Z | modulo_4/bloco_33/dia_2/excecoes.py | Gabriel-Goncalves/trybe-exercises | f652563499a540e2536276e97e94099b45def6c4 | [
"Xnet",
"X11"
] | null | null | null | while True:
try:
x = int(input("Please enter a number: "))
break
except ValueError:
print("Oops! That was no valid number. Try again...")
try:
arquivo = open("arquivo.txt", "r")
except OSError:
# será executado caso haja uma exceção
print("arquivo inexistente")
else:
... | 25.809524 | 63 | 0.656827 | while True:
try:
x = int(input("Please enter a number: "))
break
except ValueError:
print("Oops! That was no valid number. Try again...")
try:
arquivo = open("arquivo.txt", "r")
except OSError:
# será executado caso haja uma exceção
print("arquivo inexistente")
else:
... | 0 | 0 | 0 |
c18fedf84168ca2571938bd0aa8885432deaab24 | 773 | py | Python | languages/python/topics/regex/P010_ReModule_FindIter.py | lakshmikanth-tesla/DeveloperNotes2Myself | 9a5dad930ddbb99ace46d2d672109e8553aecbc2 | [
"MIT"
] | 2 | 2019-05-25T10:09:00.000Z | 2022-03-11T09:06:23.000Z | languages/python/topics/regex/P010_ReModule_FindIter.py | lakshmikanth-tesla/DeveloperNotes2Myself | 9a5dad930ddbb99ace46d2d672109e8553aecbc2 | [
"MIT"
] | 2 | 2020-03-31T04:30:17.000Z | 2020-10-30T07:54:28.000Z | languages/python/topics/regex/P010_ReModule_FindIter.py | lakshmikanth-tesla/DeveloperNotes2Myself | 9a5dad930ddbb99ace46d2d672109e8553aecbc2 | [
"MIT"
] | 4 | 2019-07-12T13:18:56.000Z | 2021-11-17T08:04:55.000Z | # Description: The re.findall Function
import re
"""
Note
1. The syntax: re.finditer(pattern, string, flags=0)
2. This function returns an iterator yielding MatchObject instances over all non-overlapping matches for the RE pattern
in the string. The string is scanned left-to-right, and matches are returned in the ... | 45.470588 | 119 | 0.72445 | # Description: The re.findall Function
import re
"""
Note
1. The syntax: re.finditer(pattern, string, flags=0)
2. This function returns an iterator yielding MatchObject instances over all non-overlapping matches for the RE pattern
in the string. The string is scanned left-to-right, and matches are returned in the ... | 0 | 0 | 0 |
abfdc84bb2de8d38cae9adfd44094e3625994fd6 | 1,042 | py | Python | Bugscan_exploits-master/exp_list/exp-1896.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-1896.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-1896.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #!/usr/bin/python
#-*- encoding:utf-8 -*-
#title:workyi_Talent system SQL injection
#author: xx00
#ref: http://www.wooyun.org/bugs/wooyun-2010-065810
if __name__ == '__main__':
from dummy import *
audit(assign('kxmail', 'http://mail.cdzk.org:8888/')[1]) | 40.076923 | 173 | 0.628599 | #!/usr/bin/python
#-*- encoding:utf-8 -*-
#title:workyi_Talent system SQL injection
#author: xx00
#ref: http://www.wooyun.org/bugs/wooyun-2010-065810
def assign(service, arg):
if service == "kxmail":
return True, arg
def audit(arg):
url = arg + 'prog/get_passwd.server.php'
postdata... | 714 | 0 | 50 |
41a483e6b6bb766d5649c6f2ec5359d4a3de847a | 1,684 | py | Python | emarkdown/markdown.py | kzmain/emarkdown | 21a0d711b0fa79a1c4a4311236d45b3ce9b01607 | [
"MIT"
] | 1 | 2021-03-24T05:27:48.000Z | 2021-03-24T05:27:48.000Z | emarkdown/markdown.py | kzmain/emarkdown | 21a0d711b0fa79a1c4a4311236d45b3ce9b01607 | [
"MIT"
] | null | null | null | emarkdown/markdown.py | kzmain/emarkdown | 21a0d711b0fa79a1c4a4311236d45b3ce9b01607 | [
"MIT"
] | null | null | null | import logging
from emarkdown.System.Tool import File
from emarkdown.Controller.ConverterController import ConverterController
from emarkdown.Controller.ExtractController import ExtractController
from emarkdown.System.Mode import Mode
from emarkdown.www.dark import Dark_HTML
| 41.073171 | 110 | 0.682898 | import logging
from emarkdown.System.Tool import File
from emarkdown.Controller.ConverterController import ConverterController
from emarkdown.Controller.ExtractController import ExtractController
from emarkdown.System.Mode import Mode
from emarkdown.www.dark import Dark_HTML
def process(argv_list):
mode_dict = M... | 1,383 | 0 | 23 |
81ab7d7a750e4d5fd91877601881aa572db7f80b | 9,514 | py | Python | twincons/twcParseAlnDatabase.py | sbliven/AlignmentScore | 2bdb143b34d79f0fdb710fd38f5d527a67bb0579 | [
"MIT"
] | null | null | null | twincons/twcParseAlnDatabase.py | sbliven/AlignmentScore | 2bdb143b34d79f0fdb710fd38f5d527a67bb0579 | [
"MIT"
] | null | null | null | twincons/twcParseAlnDatabase.py | sbliven/AlignmentScore | 2bdb143b34d79f0fdb710fd38f5d527a67bb0579 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Crete mafft combination commands from directory with alignments."""
import os, re, sys, argparse, itertools, glob
sys.path.append(os.path.dirname(os.path.abspath(__name__)))
def read_parse_doc_file(prosite_path):
'''
Reads the doc file from PROSITE and creates a dictionary of keys PDCs and ... | 41.008621 | 123 | 0.729767 | #!/usr/bin/env python3
"""Crete mafft combination commands from directory with alignments."""
import os, re, sys, argparse, itertools, glob
sys.path.append(os.path.dirname(os.path.abspath(__name__)))
def create_and_parse_argument_options(argument_list):
parser = argparse.ArgumentParser(description='Merge alignments f... | 2,426 | 0 | 92 |
ffd90d9edcc5e1ae73756b3e8e97057be8a38abe | 4,443 | py | Python | trimimagetopdf.py | zvezdochiot/python-trimimagetopdf | 829f494ac104578654131bccde9da1047b16092f | [
"Apache-2.0"
] | null | null | null | trimimagetopdf.py | zvezdochiot/python-trimimagetopdf | 829f494ac104578654131bccde9da1047b16092f | [
"Apache-2.0"
] | null | null | null | trimimagetopdf.py | zvezdochiot/python-trimimagetopdf | 829f494ac104578654131bccde9da1047b16092f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 29.039216 | 122 | 0.580464 | #!/usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 362 | 0 | 69 |
fd99b37960524d9a4e45c5e23424f658cd26e9c0 | 1,270 | py | Python | saude/imc.py | Lu939/caucular_imc | 69199f7b5ec855d8341becc6954a7c70e4ac0b9c | [
"MIT"
] | null | null | null | saude/imc.py | Lu939/caucular_imc | 69199f7b5ec855d8341becc6954a7c70e4ac0b9c | [
"MIT"
] | null | null | null | saude/imc.py | Lu939/caucular_imc | 69199f7b5ec855d8341becc6954a7c70e4ac0b9c | [
"MIT"
] | null | null | null | pessoa = dict()
numero_pessoas = abaixo_peso = normal = sobrepeso = obesidade = obesidade_grave = 0
while True:
pessoa['nome'] = str(input('Digite o nome:')).strip().upper()
numero_pessoas += 1
pessoa['peso'] = float(input('Digite o peso:'))
pessoa['altura'] = float(input('Digite a altura'))
pessoa[... | 42.333333 | 114 | 0.595276 | pessoa = dict()
numero_pessoas = abaixo_peso = normal = sobrepeso = obesidade = obesidade_grave = 0
while True:
pessoa['nome'] = str(input('Digite o nome:')).strip().upper()
numero_pessoas += 1
pessoa['peso'] = float(input('Digite o peso:'))
pessoa['altura'] = float(input('Digite a altura'))
pessoa[... | 0 | 0 | 0 |
de962c7fe36e35bcee6a95693224e340b8a9ae1d | 40 | py | Python | plugins/mcserver/mcserver.py | XiaoChuanIT/XiaoMingPythonPlugins | cb1e2f244f576810d2dfab75033d8fc93f893834 | [
"Apache-2.0"
] | null | null | null | plugins/mcserver/mcserver.py | XiaoChuanIT/XiaoMingPythonPlugins | cb1e2f244f576810d2dfab75033d8fc93f893834 | [
"Apache-2.0"
] | 2 | 2022-03-29T07:09:19.000Z | 2022-03-29T15:05:10.000Z | plugins/mcserver/mcserver.py | codethink-cn/XiaoMingPythonPlugins | 051269acb78ce3e2f9dceb8e999dbe711088383e | [
"Apache-2.0"
] | null | null | null | import httpx
import json
import asyncio
| 10 | 14 | 0.85 | import httpx
import json
import asyncio
| 0 | 0 | 0 |
9e166c465dc898d3817b46d9013e0aab960ca510 | 12,062 | py | Python | oldassyrian/search.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 2 | 2019-07-17T18:51:26.000Z | 2019-07-24T19:45:23.000Z | oldassyrian/search.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 3 | 2019-01-16T10:56:50.000Z | 2020-11-16T16:30:48.000Z | oldassyrian/search.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 2 | 2020-12-17T15:41:33.000Z | 2021-11-03T18:23:07.000Z | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# <img align="right" src="images/tf.png" width="128"/>... | 27.476082 | 114 | 0.693666 | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# <img align="right" src="images/tf.png" width="128"/>... | 0 | 0 | 0 |