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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b2aaa6515bcb932dbc07057cb9192a90b18de559 | 32 | py | Python | hello.py | OmalleyTomas98/graphTheoryProject | ec68b39b5984764cce8d1ff14ab770f29d957dea | [
"MIT"
] | null | null | null | hello.py | OmalleyTomas98/graphTheoryProject | ec68b39b5984764cce8d1ff14ab770f29d957dea | [
"MIT"
] | null | null | null | hello.py | OmalleyTomas98/graphTheoryProject | ec68b39b5984764cce8d1ff14ab770f29d957dea | [
"MIT"
] | null | null | null | print("Hello world from my VM")
| 16 | 31 | 0.71875 | print("Hello world from my VM")
| 0 | 0 | 0 |
b1623d3f56fc0fa6bbaddb4f58484a547d21715c | 255 | py | Python | mundo1/parte3/ex019.py | fcdennis/CursoPython | 485ef7e706af74eae9ee336714ddd8b493bd8e5d | [
"MIT"
] | null | null | null | mundo1/parte3/ex019.py | fcdennis/CursoPython | 485ef7e706af74eae9ee336714ddd8b493bd8e5d | [
"MIT"
] | null | null | null | mundo1/parte3/ex019.py | fcdennis/CursoPython | 485ef7e706af74eae9ee336714ddd8b493bd8e5d | [
"MIT"
] | null | null | null | from random import choice
aluno1 = input("Primeiro aluno: ")
aluno2 = input("Segundo aluno: ")
aluno3 = input("Terceiro aluno: ")
aluno4 = input("Quarto aluno: ")
alunos = [aluno1, aluno2, aluno3, aluno4]
print(f"O aluno escolhido foi {choice(alunos)}.")
| 31.875 | 49 | 0.709804 | from random import choice
aluno1 = input("Primeiro aluno: ")
aluno2 = input("Segundo aluno: ")
aluno3 = input("Terceiro aluno: ")
aluno4 = input("Quarto aluno: ")
alunos = [aluno1, aluno2, aluno3, aluno4]
print(f"O aluno escolhido foi {choice(alunos)}.")
| 0 | 0 | 0 |
d220f289cd513f31406914ccd9394bc9d4ab089d | 15,328 | py | Python | pvn3d/lib/utils/pvn3d_eval_utils.py | Jialn/PVN3D | 076c6f2e112cb310d9b14adfb19fab4aa444b7f1 | [
"MIT"
] | null | null | null | pvn3d/lib/utils/pvn3d_eval_utils.py | Jialn/PVN3D | 076c6f2e112cb310d9b14adfb19fab4aa444b7f1 | [
"MIT"
] | null | null | null | pvn3d/lib/utils/pvn3d_eval_utils.py | Jialn/PVN3D | 076c6f2e112cb310d9b14adfb19fab4aa444b7f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import time
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
from torch.nn.modules.loss import _Loss
from torch.autograd import Variable
import concurrent.futures
import numpy as np
import pickle as pkl
from common import Config
from lib.u... | 36.669856 | 86 | 0.591336 | #!/usr/bin/env python3
import os
import time
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
from torch.nn.modules.loss import _Loss
from torch.autograd import Variable
import concurrent.futures
import numpy as np
import pickle as pkl
from common import Config
from lib.u... | 14,258 | 120 | 319 |
4f484fda998fc2aa847e19bbc6cf5feda8c464ba | 49 | py | Python | enthought/util/tree.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/util/tree.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/util/tree.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from codetools.util.tree import *
| 16.333333 | 33 | 0.77551 | # proxy module
from codetools.util.tree import *
| 0 | 0 | 0 |
9f3c7a09553fabff8cb8a75a68011d2f21504bde | 2,432 | py | Python | modules/polling_client.py | qbalsdon/horai | 4188dc1ec2a0bf69475fa6216ec773e6f3a26c5b | [
"MIT"
] | null | null | null | modules/polling_client.py | qbalsdon/horai | 4188dc1ec2a0bf69475fa6216ec773e6f3a26c5b | [
"MIT"
] | null | null | null | modules/polling_client.py | qbalsdon/horai | 4188dc1ec2a0bf69475fa6216ec773e6f3a26c5b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import queue
import threading
import time
from modules import device_tray as DC
class PollingClient:
"""
Launch the main part of the GUI and the worker thread. periodicCall and
endApplication could reside in the GUI part, but putting them here
means that you have all the thread ... | 35.246377 | 121 | 0.634457 | #!/usr/bin/env python3
import queue
import threading
import time
from modules import device_tray as DC
class PollingClient:
"""
Launch the main part of the GUI and the worker thread. periodicCall and
endApplication could reside in the GUI part, but putting them here
means that you have all the thread ... | 59 | 0 | 27 |
90dc25c8a18dd125b4ddeb26e11e4d4e4cf0fdd1 | 1,238 | py | Python | scripts/addons/animation_nodes/sockets/mesh.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2020-04-16T22:12:40.000Z | 2022-01-22T17:18:45.000Z | scripts/addons/animation_nodes/sockets/mesh.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | null | null | null | scripts/addons/animation_nodes/sockets/mesh.py | Tilapiatsu/blender-custom_conf | 05592fedf74e4b7075a6228b8448a5cda10f7753 | [
"MIT"
] | 2 | 2019-05-16T04:01:09.000Z | 2020-08-25T11:42:26.000Z | import bpy
from .. data_structures import Mesh
from .. base_types import AnimationNodeSocket, PythonListSocket
| 26.340426 | 67 | 0.650242 | import bpy
from .. data_structures import Mesh
from .. base_types import AnimationNodeSocket, PythonListSocket
class MeshSocket(bpy.types.NodeSocket, AnimationNodeSocket):
bl_idname = "an_MeshSocket"
bl_label = "Mesh Socket"
dataType = "Mesh"
drawColor = (0.2, 0.7, 1, 1)
storable = True
compara... | 419 | 661 | 46 |
1ded913682c8d8c0349a8dc8dde23f91d30eca9e | 1,601 | py | Python | photon/common/logging_common.py | nytimes/photon-common-demo | 0fe382477a70010e2e9929f413afd1b6784a5e98 | [
"Apache-2.0"
] | null | null | null | photon/common/logging_common.py | nytimes/photon-common-demo | 0fe382477a70010e2e9929f413afd1b6784a5e98 | [
"Apache-2.0"
] | null | null | null | photon/common/logging_common.py | nytimes/photon-common-demo | 0fe382477a70010e2e9929f413afd1b6784a5e98 | [
"Apache-2.0"
] | null | null | null | import pathlib
import logging
from logging import Logger
from logging.handlers import RotatingFileHandler
from photon.common.config_context_common import ConfigContextCommon
class LoggingCommon:
"""
Helper class for logging.
"""
def __init__(self, config: ConfigContextCommon) -> None:
"""
... | 28.589286 | 88 | 0.64772 | import pathlib
import logging
from logging import Logger
from logging.handlers import RotatingFileHandler
from photon.common.config_context_common import ConfigContextCommon
class LoggingCommon:
"""
Helper class for logging.
"""
def __init__(self, config: ConfigContextCommon) -> None:
"""
... | 576 | 0 | 54 |
a8cdd4a51587b1b2bec2e1fa6eb7a361fe019d8d | 2,670 | py | Python | Hand_gesture_final.py | sourav9064/python-hand-recognition | 24a193ba3342afe6b56c44bd85d8ff41f897ad72 | [
"MIT"
] | null | null | null | Hand_gesture_final.py | sourav9064/python-hand-recognition | 24a193ba3342afe6b56c44bd85d8ff41f897ad72 | [
"MIT"
] | null | null | null | Hand_gesture_final.py | sourav9064/python-hand-recognition | 24a193ba3342afe6b56c44bd85d8ff41f897ad72 | [
"MIT"
] | null | null | null | # IMPORTING LIBRARIES
import numpy as np
import cv2
import math
#LOADING HAND CASCADE
hand_cascade = cv2.CascadeClassifier('Hand_haar_cascade.xml')
# VIDEO CAPTURE
cap = cv2.VideoCapture(0)
while True:
ret, img = cap.read()
blur = cv2.GaussianBlur(img,(5,5),0) # BLURRING IMAGE TO SMOOTHEN EDGES
gray = cv2.cvtColo... | 37.605634 | 104 | 0.670787 | # IMPORTING LIBRARIES
import numpy as np
import cv2
import math
#LOADING HAND CASCADE
hand_cascade = cv2.CascadeClassifier('Hand_haar_cascade.xml')
# VIDEO CAPTURE
cap = cv2.VideoCapture(0)
while True:
ret, img = cap.read()
blur = cv2.GaussianBlur(img,(5,5),0) # BLURRING IMAGE TO SMOOTHEN EDGES
gray = cv2.cvtColo... | 0 | 0 | 0 |
f75caa520876078c57de5bdf0097e2c7210892ce | 37,224 | py | Python | zmk/nyokaserver/nyokaUtilities.py | center3d/MLW | 192cc991df61bd8991a51702a53df6a09448d4f7 | [
"Apache-2.0"
] | 1 | 2020-02-29T12:18:39.000Z | 2020-02-29T12:18:39.000Z | zmk/nyokaserver/nyokaUtilities.py | MfalhiTechnology/MLW | 192cc991df61bd8991a51702a53df6a09448d4f7 | [
"Apache-2.0"
] | null | null | null | zmk/nyokaserver/nyokaUtilities.py | MfalhiTechnology/MLW | 192cc991df61bd8991a51702a53df6a09448d4f7 | [
"Apache-2.0"
] | 1 | 2020-02-29T12:18:28.000Z | 2020-02-29T12:18:28.000Z | # nyokaUtilities.py
import numpy as np
from random import choice
from string import ascii_uppercase
import copy,json
import ast,pathlib
import traceback
from nyoka import PMML43Ext as ny
global MEMORY_DICT_ARCHITECTURE,MEMORY_OF_LAYERS
settingFilePath='./settingFiles/'
savedModels='./SavedModels/'
MEMORY_OF_LAYERS={}
... | 46.763819 | 247 | 0.570653 | # nyokaUtilities.py
import numpy as np
from random import choice
from string import ascii_uppercase
import copy,json
import ast,pathlib
import traceback
from nyoka import PMML43Ext as ny
global MEMORY_DICT_ARCHITECTURE,MEMORY_OF_LAYERS
settingFilePath='./settingFiles/'
savedModels='./SavedModels/'
MEMORY_OF_LAYERS={}
... | 35,282 | 0 | 1,162 |
2baa7b89737d8491f36306787fe02ae8273664e3 | 246 | py | Python | djangobench/benchmarks/query_update/benchmark.py | Bouke/djangobench | 94fc28d99f95c65d26d0fad8af44e46c49282220 | [
"BSD-3-Clause"
] | 3 | 2016-11-27T22:25:34.000Z | 2018-12-12T20:06:40.000Z | djangobench/benchmarks/query_update/benchmark.py | Bouke/djangobench | 94fc28d99f95c65d26d0fad8af44e46c49282220 | [
"BSD-3-Clause"
] | null | null | null | djangobench/benchmarks/query_update/benchmark.py | Bouke/djangobench | 94fc28d99f95c65d26d0fad8af44e46c49282220 | [
"BSD-3-Clause"
] | null | null | null | from djangobench.utils import run_benchmark
from query_update.models import Book
run_benchmark(
benchmark,
meta = {
'description': 'A simple QuerySet.update().',
}
)
| 18.923077 | 53 | 0.678862 | from djangobench.utils import run_benchmark
from query_update.models import Book
def benchmark():
Book.objects.all().update(title='z')
run_benchmark(
benchmark,
meta = {
'description': 'A simple QuerySet.update().',
}
)
| 36 | 0 | 23 |
bf63d6b3f884140597fd481021eebe9d27449cb2 | 10,386 | py | Python | tasks.py | streamengineer/cellpy | 59a83065297ce0ba370fc11181085c98f587101e | [
"MIT"
] | 38 | 2016-08-16T10:54:56.000Z | 2022-03-03T04:43:20.000Z | tasks.py | streamengineer/cellpy | 59a83065297ce0ba370fc11181085c98f587101e | [
"MIT"
] | 88 | 2016-08-16T13:10:27.000Z | 2022-03-29T10:36:39.000Z | tasks.py | streamengineer/cellpy | 59a83065297ce0ba370fc11181085c98f587101e | [
"MIT"
] | 13 | 2019-01-02T03:57:52.000Z | 2022-01-19T08:06:49.000Z | import sys
import io
import re
import os
from pathlib import Path
from contextlib import contextmanager
from invoke import task
import requests
"""Tasks for cellpy development.
You need to have invoke installed in your
python environment for this to work.
Examples:
# build and upload to pypi:
> invoke bui... | 28.61157 | 86 | 0.606297 | import sys
import io
import re
import os
from pathlib import Path
from contextlib import contextmanager
from invoke import task
import requests
"""Tasks for cellpy development.
You need to have invoke installed in your
python environment for this to work.
Examples:
# build and upload to pypi:
> invoke bui... | 3,754 | 0 | 112 |
8e1e65f2add69583316cef2dcba580af72b9582b | 52,666 | py | Python | discordrpg/discordrpg.py | ThePheonixGuy/DiscordRPG | 5100fcc864692fa7f1dac42b145fdf4751b23c24 | [
"MIT"
] | null | null | null | discordrpg/discordrpg.py | ThePheonixGuy/DiscordRPG | 5100fcc864692fa7f1dac42b145fdf4751b23c24 | [
"MIT"
] | null | null | null | discordrpg/discordrpg.py | ThePheonixGuy/DiscordRPG | 5100fcc864692fa7f1dac42b145fdf4751b23c24 | [
"MIT"
] | null | null | null | # Discord
import discord
from discord.ext import commands
from cogs.utils.dataIO import dataIO
from .utils import checks
from __main__ import send_cmd_help
# Others
import os
from copy import deepcopy, copy
import datetime
import time
import math
import random
try:
import validators
validatorsAvail = True
excep... | 41.998405 | 214 | 0.579824 | # Discord
import discord
from discord.ext import commands
from cogs.utils.dataIO import dataIO
from .utils import checks
from __main__ import send_cmd_help
# Others
import os
from copy import deepcopy, copy
import datetime
import time
import math
import random
try:
import validators
validatorsAvail = True
excep... | 41,498 | 1,377 | 1,105 |
5cf5fbec585953a762b664389d280dac6ad671b1 | 432 | py | Python | src/classify/edge.py | JUSTINGBB/tianditu-python | 3565bafae910844928313b0822f199b9dd9bd083 | [
"Apache-2.0"
] | 1 | 2021-11-25T10:23:47.000Z | 2021-11-25T10:23:47.000Z | src/classify/edge.py | wangjiyuan007/tianditu-python | 360eed6f444673d1db58cdf964f063b41a9ab282 | [
"Apache-2.0"
] | null | null | null | src/classify/edge.py | wangjiyuan007/tianditu-python | 360eed6f444673d1db58cdf964f063b41a9ab282 | [
"Apache-2.0"
] | 1 | 2020-03-14T09:22:50.000Z | 2020-03-14T09:22:50.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# __file__: edge
# 图像边缘检测
import numpy as np
import cv2
if __name__ == '__main__':
path = './res/river_color_bg.png'
edge(pic_path=path)
| 18 | 43 | 0.550926 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# __file__: edge
# 图像边缘检测
import numpy as np
import cv2
def edge(pic_path):
image = cv2.imread(pic_path)
kernel = np.array([
[-1, -1, -1],
[-1, 8, -1],
[-1, -1, -1],
])
edges = cv2.filter2D(image, -1, kernel)
cv2.imwrite("./re... | 214 | 0 | 23 |
3c4e0e23484b5f0a02ce6423826655d5c60cdb05 | 2,330 | py | Python | HDDcost.py | space-physics/histutils | f2add29c73be5c62d8675139cc58250ece92f477 | [
"MIT"
] | null | null | null | HDDcost.py | space-physics/histutils | f2add29c73be5c62d8675139cc58250ece92f477 | [
"MIT"
] | 3 | 2015-05-27T15:20:23.000Z | 2015-12-14T07:55:18.000Z | HDDcost.py | space-physics/histutils | f2add29c73be5c62d8675139cc58250ece92f477 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
computes cost of storing camera data
"""
from __future__ import division
# %%
print("quantities are for full data rate")
Zyla = Cam(2560 * 2160, 100, 4, 1500)
print("\n--------------------------")
print("Zyla")
print(f"MB/sec: {Zyla.bytesec/1e6:.1f} GB/hour: {Zyla.bytehour/1e9:.0f}")
pr... | 33.768116 | 90 | 0.61073 | #!/usr/bin/env python
"""
computes cost of storing camera data
"""
from __future__ import division
class Cam:
def __init__(self, npix, fps, hddTB, cost, nbit=16, goodfrac=0.05):
self.goodfrac = goodfrac
hoursrecday = 8 # avg hours per night cameras on
self.monthsseason = 8 # months of ye... | 756 | -11 | 49 |
b3c1974126c90a2411a8867c49943ba8ca401093 | 4,021 | py | Python | lifetracker/tracker/migrations/0001_initial.py | KenN7/LifeTracker | 6efbe974ddfd5486ad662ed51a69c6d63d4a6379 | [
"Apache-2.0"
] | null | null | null | lifetracker/tracker/migrations/0001_initial.py | KenN7/LifeTracker | 6efbe974ddfd5486ad662ed51a69c6d63d4a6379 | [
"Apache-2.0"
] | null | null | null | lifetracker/tracker/migrations/0001_initial.py | KenN7/LifeTracker | 6efbe974ddfd5486ad662ed51a69c6d63d4a6379 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| 32.427419 | 114 | 0.495897 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Events',
fields=[
... | 0 | 3,891 | 23 |
449ef113c35324b9c41c01b08e20a64524134ae8 | 1,218 | py | Python | volume.py | charradighassen/Jarvis | 67d31ed73bc52e8edff6534297128ed8ed0d0450 | [
"MIT"
] | null | null | null | volume.py | charradighassen/Jarvis | 67d31ed73bc52e8edff6534297128ed8ed0d0450 | [
"MIT"
] | null | null | null | volume.py | charradighassen/Jarvis | 67d31ed73bc52e8edff6534297128ed8ed0d0450 | [
"MIT"
] | null | null | null | import alsaaudio
import sys
m = alsaaudio.Mixer()
vol = m.getvolume()
if len(sys.argv) == 1 or sys.argv[1] == "g":
print "Current volume is " + str(getVolume()) + " percent"
if len(sys.argv)>=3:
if sys.argv[1] == "i":
try:
i = int(sys.argv[2])
increase(i)
except ValueError:
print "Pleas... | 21.75 | 67 | 0.599343 | import alsaaudio
import sys
m = alsaaudio.Mixer()
vol = m.getvolume()
def getVolume():
global vol
return vol[0]
def increase(n):
global vol
if (vol[0] + n)>100:
vol[0]= 100 - n
m.setvolume(vol[0] + n)
vol = m.getvolume()
print "Volume increased to " + str(vol[0]) + " percent"
def decrease... | 437 | 0 | 100 |
a7508a40a819238a793b403d52c96ed1cd19c382 | 3,819 | py | Python | vistrails/vistrails_server.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/vistrails_server.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/vistrails_server.py | remram44/VisTrails-mybinder | ee7477b471920d738f3ac430932f01901b56ed44 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | #!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is par... | 40.2 | 83 | 0.658549 | #!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is par... | 745 | 0 | 23 |
20b1d4b4caa09b867ca3f4d3798679c3d61bcea2 | 475 | py | Python | cah/game/routing.py | alkelaun/cah | 9063bf1ece6b0dec359fc26980935b0b10ae9c36 | [
"MIT"
] | null | null | null | cah/game/routing.py | alkelaun/cah | 9063bf1ece6b0dec359fc26980935b0b10ae9c36 | [
"MIT"
] | null | null | null | cah/game/routing.py | alkelaun/cah | 9063bf1ece6b0dec359fc26980935b0b10ae9c36 | [
"MIT"
] | null | null | null | from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from django.urls import re_path
from . import consumers
websocket_urlpatterns = [
re_path(r'ws/game/(?P<room_name>\w+)/$', consumers.ChatConsumer),
]
application = ProtocolTypeRouter({
# Empty for now (ht... | 22.619048 | 69 | 0.705263 | from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from django.urls import re_path
from . import consumers
websocket_urlpatterns = [
re_path(r'ws/game/(?P<room_name>\w+)/$', consumers.ChatConsumer),
]
application = ProtocolTypeRouter({
# Empty for now (ht... | 0 | 0 | 0 |
6e054504f0a2b2cda67af60ecb451b8401a99b07 | 704 | py | Python | nltk_api/tests/tag/test_sentence.py | mdgh26/nltk-api | d8269370ecc7e5bdc8803bf95883a625ad3c3074 | [
"MIT"
] | 4 | 2017-05-01T20:03:49.000Z | 2021-12-24T07:42:14.000Z | nltk_api/tests/tag/test_sentence.py | mdgh26/nltk-api | d8269370ecc7e5bdc8803bf95883a625ad3c3074 | [
"MIT"
] | 1 | 2017-08-28T16:04:13.000Z | 2017-08-28T16:04:13.000Z | nltk_api/tests/tag/test_sentence.py | mdgh26/nltk-api | d8269370ecc7e5bdc8803bf95883a625ad3c3074 | [
"MIT"
] | 3 | 2017-07-09T12:04:57.000Z | 2021-02-21T13:34:04.000Z | import unittest
from nltk_api.tag.sentence import tag_sentences
| 39.111111 | 84 | 0.681818 | import unittest
from nltk_api.tag.sentence import tag_sentences
class SentenceTaggerTestCase(unittest.TestCase):
def testTagWithSymbols(self):
test_sentences = ['I walk over him', 'I like to watch']
actual = tag_sentences(test_sentences, True)
self.assertTupleEqual(('I', 'PRP'), actual[0]... | 535 | 27 | 76 |
008e072ff6d89b1025169cdfa400c36770746268 | 2,324 | py | Python | DjangoTraining/IPLcricket/matches/management/commands/load_data.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | null | null | null | DjangoTraining/IPLcricket/matches/management/commands/load_data.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | 27 | 2020-06-05T23:26:44.000Z | 2022-02-10T11:21:31.000Z | DjangoTraining/IPLcricket/matches/management/commands/load_data.py | udhayprakash/Django_Projects | 5c5257944d36a552428f8b8a926110d64055fc12 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""
Purpose:
"""
from django.core.management.base import BaseCommand
import os
import csv
from IPLcricket import settings
from matches.models import MatchesPlayed, Deliveries
from datetime import datetime
from django.db.utils import DataError
import pandas as pd
| 32.732394 | 112 | 0.635972 | #!/usr/bin/python
"""
Purpose:
"""
from django.core.management.base import BaseCommand
import os
import csv
from IPLcricket import settings
from matches.models import MatchesPlayed, Deliveries
from datetime import datetime
from django.db.utils import DataError
import pandas as pd
def load_matches(file_name):
file... | 1,878 | 93 | 69 |
0a6fcb880da10a3b5d30d4c0a55aecbedcb4ce85 | 3,058 | py | Python | solumclient/tests/common/test_base.py | rackerlabs/arborlabs_client | bafae3fd164cb0536efcd0b082a8a11714e97163 | [
"Apache-2.0"
] | null | null | null | solumclient/tests/common/test_base.py | rackerlabs/arborlabs_client | bafae3fd164cb0536efcd0b082a8a11714e97163 | [
"Apache-2.0"
] | null | null | null | solumclient/tests/common/test_base.py | rackerlabs/arborlabs_client | bafae3fd164cb0536efcd0b082a8a11714e97163 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 - Noorul Islam K M
#
# 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... | 26.136752 | 75 | 0.628842 | # Copyright 2013 - Noorul Islam K M
#
# 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... | 995 | 290 | 200 |
b504d106a44165bf42202480f7bd66da720a362e | 2,532 | py | Python | models/lib/positional_encoding.py | Maxi-0902/DRAN | c3dbfcbc018446544150dc4e151442d6a9fcd4d9 | [
"MIT"
] | null | null | null | models/lib/positional_encoding.py | Maxi-0902/DRAN | c3dbfcbc018446544150dc4e151442d6a9fcd4d9 | [
"MIT"
] | null | null | null | models/lib/positional_encoding.py | Maxi-0902/DRAN | c3dbfcbc018446544150dc4e151442d6a9fcd4d9 | [
"MIT"
] | null | null | null | import torch
def BoxRelationalEmbedding(f_g, dim_g=64, wave_len=1000, trignometric_embedding=True):
"""
Given a tensor with bbox coordinates for detected objects on each batch image,
this function computes a matrix for each image
with entry (i,j) given by a vector representation of the
displaceme... | 41.508197 | 116 | 0.662717 | import torch
def BoxRelationalEmbedding(f_g, dim_g=64, wave_len=1000, trignometric_embedding=True):
"""
Given a tensor with bbox coordinates for detected objects on each batch image,
this function computes a matrix for each image
with entry (i,j) given by a vector representation of the
displaceme... | 0 | 0 | 0 |
df3f47d175b122c0b7bdf9b060ee806d63b3e489 | 355 | py | Python | src/main/python/utils/logging.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-03-01T17:42:44.000Z | 2020-03-09T06:13:34.000Z | src/main/python/utils/logging.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-04-01T16:48:06.000Z | 2020-04-04T11:04:10.000Z | src/main/python/utils/logging.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | null | null | null | import yaml
import logging
import logging.config
from utils.executable import get_destination
| 23.666667 | 56 | 0.757746 | import yaml
import logging
import logging.config
from utils.executable import get_destination
def init_logger(name='__main__'):
config_path = 'config/logging.yaml'
with open(get_destination(config_path)) as file:
config = yaml.load(file, Loader=yaml.FullLoader)
logging.config.dictConfig(config)
... | 236 | 0 | 23 |
60f34830065311493487a436bb967817a75d6ce5 | 24 | py | Python | emailusernames/__init__.py | hansg60/django-email-as-username | f2eb6aee4711287c041cdeedc04c63fda47ea827 | [
"Unlicense"
] | null | null | null | emailusernames/__init__.py | hansg60/django-email-as-username | f2eb6aee4711287c041cdeedc04c63fda47ea827 | [
"Unlicense"
] | null | null | null | emailusernames/__init__.py | hansg60/django-email-as-username | f2eb6aee4711287c041cdeedc04c63fda47ea827 | [
"Unlicense"
] | 1 | 2021-08-31T20:58:46.000Z | 2021-08-31T20:58:46.000Z | __version__ = '1.7.1.2'
| 12 | 23 | 0.625 | __version__ = '1.7.1.2'
| 0 | 0 | 0 |
29323dee51c3196a2ff45b480f287b18705c4183 | 3,131 | py | Python | Fig6_replay/replay_nodndinh/plot_spike_2comp_nopos.py | TatsuyaHaga/preplaymodel_codes | 548df9ef5f85358fb03ed5f7f4cdc9e03a04bbf3 | [
"MIT"
] | 1 | 2019-02-26T04:15:16.000Z | 2019-02-26T04:15:16.000Z | Fig6_replay/replay_nodndinh/plot_spike_2comp_nopos.py | TatsuyaHaga/preplaymodel_codes | 548df9ef5f85358fb03ed5f7f4cdc9e03a04bbf3 | [
"MIT"
] | null | null | null | Fig6_replay/replay_nodndinh/plot_spike_2comp_nopos.py | TatsuyaHaga/preplaymodel_codes | 548df9ef5f85358fb03ed5f7f4cdc9e03a04bbf3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import numpy
#import matplotlib
#matplotlib.use("SVG")
import pylab
pylab.rcParams["font.size"]=8
pylab.rcParams["legend.fontsize"]=8
#pylab.rcParams["lines.linewidth"]=1
#pylab.rcParams["axes.linewidth"]=2
#pylab.rcParams["axes.labelsize"]="large"
#pylab.rcParams["axes.labelweight"]... | 34.788889 | 230 | 0.687001 | #!/usr/bin/env python3
import sys
import numpy
#import matplotlib
#matplotlib.use("SVG")
import pylab
pylab.rcParams["font.size"]=8
pylab.rcParams["legend.fontsize"]=8
#pylab.rcParams["lines.linewidth"]=1
#pylab.rcParams["axes.linewidth"]=2
#pylab.rcParams["axes.labelsize"]="large"
#pylab.rcParams["axes.labelweight"]... | 0 | 0 | 0 |
ef01352693ca865bbc445a10090d3af46ba13137 | 158 | py | Python | 04/01/instance_method/replace.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | null | null | null | 04/01/instance_method/replace.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | 32 | 2017-09-01T00:52:17.000Z | 2017-10-01T00:30:02.000Z | 04/01/instance_method/replace.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | null | null | null | import datetime
now = datetime.datetime.now()
print(now)
print(now.replace(1999, 12, 31))
print(now)
# インスタンスの操作ではなく、新しいインスタンスを返すらしい。インスタンスメソッドなのに。これはわかりづらい。
| 22.571429 | 56 | 0.791139 | import datetime
now = datetime.datetime.now()
print(now)
print(now.replace(1999, 12, 31))
print(now)
# インスタンスの操作ではなく、新しいインスタンスを返すらしい。インスタンスメソッドなのに。これはわかりづらい。
| 0 | 0 | 0 |
a59c1ec4875830401a38c2564d02d4e60051d5da | 2,211 | py | Python | Stanford/03_DivideAndConquerModel/3B_StrassensSubcubicMatrixMultiplication/strassens_algorithm.py | jeffvswanson/DataStructuresAndAlgorithms | 82605a1dea4e52480f006956645e812fe2cb02dc | [
"MIT"
] | 4 | 2019-07-10T21:51:03.000Z | 2020-04-01T01:52:53.000Z | Stanford/03_DivideAndConquerModel/3B_StrassensSubcubicMatrixMultiplication/strassens_algorithm.py | jeffvswanson/DataStructuresAndAlgorithms | 82605a1dea4e52480f006956645e812fe2cb02dc | [
"MIT"
] | null | null | null | Stanford/03_DivideAndConquerModel/3B_StrassensSubcubicMatrixMultiplication/strassens_algorithm.py | jeffvswanson/DataStructuresAndAlgorithms | 82605a1dea4e52480f006956645e812fe2cb02dc | [
"MIT"
] | null | null | null | # strassens_algorithm.py
# A demonstration of Strassen's subcubic runtime matrix multiplication
# algorithm on square matrices using the divide and conquer model.
import numpy as np
if __name__ == "__main__":
main() | 33 | 78 | 0.584803 | # strassens_algorithm.py
# A demonstration of Strassen's subcubic runtime matrix multiplication
# algorithm on square matrices using the divide and conquer model.
import numpy as np
def main():
m1 = np.array([[1,2],[3,4]])
m2 = np.array([[5,6],[7,8]])
print("The first square matrix is: ")
... | 1,930 | 0 | 50 |
72a02a8fd07d6c0e1acbb4c91959a9aa9aab7811 | 4,487 | py | Python | webserver/webserver.py | JonasTrampe/hucon | 9cf9fa995292649a097ca8b3d09c4bed9568ae0d | [
"BSD-3-Clause"
] | null | null | null | webserver/webserver.py | JonasTrampe/hucon | 9cf9fa995292649a097ca8b3d09c4bed9568ae0d | [
"BSD-3-Clause"
] | 2 | 2021-08-18T16:21:08.000Z | 2021-10-05T16:36:33.000Z | webserver/webserver.py | JonasTrampe/hucon | 9cf9fa995292649a097ca8b3d09c4bed9568ae0d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
""" webserver.py - Flask based web server to handle all legal requests.
Copyright (C) 2019 Basler AG
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import http
def set_led(red... | 26.394118 | 101 | 0.628037 | #!/usr/bin/python
""" webserver.py - Flask based web server to handle all legal requests.
Copyright (C) 2019 Basler AG
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import http
def set_led(red... | 0 | 0 | 0 |
5e8a6de69ef5a7c05a1abbab887105db3084040b | 2,434 | py | Python | cellxgene_gateway/env.py | fidelram/cellxgene-gateway | 11bbc1aba8509b02865c145be78b021b70e22fda | [
"Apache-2.0"
] | null | null | null | cellxgene_gateway/env.py | fidelram/cellxgene-gateway | 11bbc1aba8509b02865c145be78b021b70e22fda | [
"Apache-2.0"
] | null | null | null | cellxgene_gateway/env.py | fidelram/cellxgene-gateway | 11bbc1aba8509b02865c145be78b021b70e22fda | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Novartis Institutes for BioMedical Research 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... | 39.901639 | 108 | 0.733361 | # Copyright 2019 Novartis Institutes for BioMedical Research 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... | 662 | 0 | 23 |
7e46c6fbe1c4893ffaf4d0a700a444ef316e8539 | 11,024 | py | Python | hikyuu/flat/Spot.py | scanfyu/hikyuu | 55265de4d8d4773391f2dcd1211acec9fe901f53 | [
"MIT"
] | null | null | null | hikyuu/flat/Spot.py | scanfyu/hikyuu | 55265de4d8d4773391f2dcd1211acec9fe901f53 | [
"MIT"
] | null | null | null | hikyuu/flat/Spot.py | scanfyu/hikyuu | 55265de4d8d4773391f2dcd1211acec9fe901f53 | [
"MIT"
] | null | null | null | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: flat
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
| 29.319149 | 99 | 0.661466 | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: flat
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Spot(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsSpot(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuf... | 8,753 | 1,283 | 782 |
4e97ea72605e36622f8478966b97d91ba2f46471 | 7,178 | py | Python | app.py | mbeckem/blabber | 2c149f9e92ad3aee861c5d54a630606a860fb402 | [
"MIT"
] | null | null | null | app.py | mbeckem/blabber | 2c149f9e92ad3aee861c5d54a630606a860fb402 | [
"MIT"
] | null | null | null | app.py | mbeckem/blabber | 2c149f9e92ad3aee861c5d54a630606a860fb402 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import aiohttp
import asyncio
import concurrent
import datetime
import jinja2
import logging
import os
# This is our native database module
import blabber_database
from aiohttp import web
logger = logging.getLogger(__name__)
DEV = True
ROOT_DIRECTORY = os.path.dirname(os.path.realpath(__file... | 34.344498 | 107 | 0.624547 | #!/usr/bin/env python3
import aiohttp
import asyncio
import concurrent
import datetime
import jinja2
import logging
import os
# This is our native database module
import blabber_database
from aiohttp import web
logger = logging.getLogger(__name__)
DEV = True
ROOT_DIRECTORY = os.path.dirname(os.path.realpath(__file... | 5,559 | 1 | 463 |
6118e584cc90198222e3b048eb0bb3e2154ebfc6 | 26,107 | py | Python | Pyscripts/GoogleEE/GEE02_LandsatMovie.py | ArdenB/fireflies | cff2d6292c30fc49f0d1564b135c5c4abd75fdc8 | [
"MIT"
] | null | null | null | Pyscripts/GoogleEE/GEE02_LandsatMovie.py | ArdenB/fireflies | cff2d6292c30fc49f0d1564b135c5c4abd75fdc8 | [
"MIT"
] | null | null | null | Pyscripts/GoogleEE/GEE02_LandsatMovie.py | ArdenB/fireflies | cff2d6292c30fc49f0d1564b135c5c4abd75fdc8 | [
"MIT"
] | null | null | null | """
Script goal,
Test out the google earth engine to see what i can do
- find a landsat collection for a single point
"""
#==============================================================================
__title__ = "GEE Movie Maker"
__author__ = "Arden Burrell"
__version__ = "v1.0(04.04.2019)"
__email__ = "arden.b... | 32.63375 | 140 | 0.616693 | """
Script goal,
Test out the google earth engine to see what i can do
- find a landsat collection for a single point
"""
#==============================================================================
__title__ = "GEE Movie Maker"
__author__ = "Arden Burrell"
__version__ = "v1.0(04.04.2019)"
__email__ = "arden.b... | 7,527 | 0 | 288 |
d5f438f5a8a117efddb81ecb880531e3fe605b07 | 418 | py | Python | Easy/UsingLoopToDrawPyramid.py | revanthsenthil/dCoder_select | 20662123f1d3e1f9c7e8225eea7732be3a19ae57 | [
"MIT"
] | 1 | 2021-08-03T21:23:08.000Z | 2021-08-03T21:23:08.000Z | Easy/UsingLoopToDrawPyramid.py | revanthsenthil/dCoder-Solved | 20662123f1d3e1f9c7e8225eea7732be3a19ae57 | [
"MIT"
] | null | null | null | Easy/UsingLoopToDrawPyramid.py | revanthsenthil/dCoder-Solved | 20662123f1d3e1f9c7e8225eea7732be3a19ae57 | [
"MIT"
] | 1 | 2021-04-22T09:20:12.000Z | 2021-04-22T09:20:12.000Z | """
Problem Description:
Draw the pattern specified using loops.
Input:
Output:
The pattern as shown in sample output.
First line contain 4 space and 1 star, next line contains 3 space and 3 stars and so on..
Constraints:
Try not to hardcode the output.
Sample Input:
Sample Output:
*
***
*****
*******
**... | 15.481481 | 89 | 0.598086 | """
Problem Description:
Draw the pattern specified using loops.
Input:
Output:
The pattern as shown in sample output.
First line contain 4 space and 1 star, next line contains 3 space and 3 stars and so on..
Constraints:
Try not to hardcode the output.
Sample Input:
Sample Output:
*
***
*****
*******
**... | 0 | 0 | 0 |
b5cf395a897c345e2301d7e7c6f8c1bf4d9ef696 | 1,451 | py | Python | pizzer/common/migrations/0001_initial.py | milashensky/pizzer | 4aa5f38a8422282a34fbff9e2e2a9d01f11ce44e | [
"MIT"
] | null | null | null | pizzer/common/migrations/0001_initial.py | milashensky/pizzer | 4aa5f38a8422282a34fbff9e2e2a9d01f11ce44e | [
"MIT"
] | null | null | null | pizzer/common/migrations/0001_initial.py | milashensky/pizzer | 4aa5f38a8422282a34fbff9e2e2a9d01f11ce44e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-01-20 14:15
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 39.216216 | 150 | 0.62991 | # Generated by Django 3.0.2 on 2020-01-20 14:15
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('catalogue', '0001_initial'),
migrations.swappable_dependency(se... | 0 | 1,271 | 23 |
d9ad1a8e096b873e8f64207d062cf68b2bccafef | 54,745 | py | Python | cinder/tests/test_hplefthand.py | oodrive/cinder | 40b43d6698128ab26b056586e0a5c5e818e21c11 | [
"Apache-2.0"
] | 1 | 2015-11-25T10:18:28.000Z | 2015-11-25T10:18:28.000Z | cinder/tests/test_hplefthand.py | NeCTAR-RC/cinder | e01da23febc530de218ed8eed6737add150c1587 | [
"Apache-2.0"
] | null | null | null | cinder/tests/test_hplefthand.py | NeCTAR-RC/cinder | e01da23febc530de218ed8eed6737add150c1587 | [
"Apache-2.0"
] | null | null | null | # (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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... | 38.579986 | 79 | 0.590574 | # (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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... | 38,448 | 15,080 | 69 |
529ca778f839b2faf431dfcfc9f175e45f67cf11 | 5,304 | py | Python | src/generative_models/CRFClassifier.py | anirban-code-to-live/NamedEntityRecognizer | f37070367685686044f00a2d5775df6af140afa6 | [
"MIT"
] | null | null | null | src/generative_models/CRFClassifier.py | anirban-code-to-live/NamedEntityRecognizer | f37070367685686044f00a2d5775df6af140afa6 | [
"MIT"
] | null | null | null | src/generative_models/CRFClassifier.py | anirban-code-to-live/NamedEntityRecognizer | f37070367685686044f00a2d5775df6af140afa6 | [
"MIT"
] | null | null | null | from collections import Counter
# import matplotlib.pyplot as plt
import os
import scipy.stats
from sklearn.metrics import make_scorer
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import RandomizedSearchCV
from sklearn_crfsuite import CRF
from sklearn_crfsuite import scorers
from skl... | 42.095238 | 127 | 0.647247 | from collections import Counter
# import matplotlib.pyplot as plt
import os
import scipy.stats
from sklearn.metrics import make_scorer
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import RandomizedSearchCV
from sklearn_crfsuite import CRF
from sklearn_crfsuite import scorers
from skl... | 3,739 | 1,193 | 23 |
875bbdd061319c2630a549029aa0765602086df5 | 1,202 | py | Python | parallel_translation/parallel_translation_requests.py | ChameleonTartu/neurotolge | 2b610508f86d8f42c5ebe22691598bc302290dbf | [
"MIT"
] | null | null | null | parallel_translation/parallel_translation_requests.py | ChameleonTartu/neurotolge | 2b610508f86d8f42c5ebe22691598bc302290dbf | [
"MIT"
] | 9 | 2018-10-25T18:59:55.000Z | 2019-04-19T11:19:44.000Z | parallel_translation/parallel_translation_requests.py | ChameleonTartu/neurotolge | 2b610508f86d8f42c5ebe22691598bc302290dbf | [
"MIT"
] | 1 | 2017-07-07T19:04:31.000Z | 2017-07-07T19:04:31.000Z | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import Queue
import threading
from translators.google import Google
from translators.ut import UT
from translators.tilde import Tilde
| 28.619048 | 112 | 0.732113 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import Queue
import threading
from translators.google import Google
from translators.ut import UT
from translators.tilde import Tilde
def start_thread(object):
if "translate" in dir(object):
thread = threading.Thread(target=object.translate)
thread.da... | 973 | 0 | 46 |
45cbf9ca250833104afe87db468b39d33a4b0c86 | 3,573 | py | Python | src/specializer/specializer_spec.py | rrthomas/m | d4b4a2a6f16ebb6e27ba01d3be26f1dc50c051e9 | [
"MIT"
] | 5 | 2019-05-13T00:40:40.000Z | 2022-03-05T23:16:56.000Z | src/specializer/specializer_spec.py | rrthomas/m | d4b4a2a6f16ebb6e27ba01d3be26f1dc50c051e9 | [
"MIT"
] | 164 | 2019-05-07T16:47:50.000Z | 2021-02-27T23:37:16.000Z | src/specializer/specializer_spec.py | rrthomas/smite | d4b4a2a6f16ebb6e27ba01d3be26f1dc50c051e9 | [
"MIT"
] | 1 | 2021-02-08T09:51:19.000Z | 2021-02-08T09:51:19.000Z | '''
Specialized Instructions.
Copyright (c) 2019-2020 Mit authors
The package is distributed under the MIT/X11 License.
THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER’S
RISK.
'''
from dataclasses import dataclass
from code_util import Code
from action import Action, ActionEnum
from spec impor... | 29.286885 | 86 | 0.652953 | '''
Specialized Instructions.
Copyright (c) 2019-2020 Mit authors
The package is distributed under the MIT/X11 License.
THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER’S
RISK.
'''
from dataclasses import dataclass
from code_util import Code
from action import Action, ActionEnum
from spec impor... | 1,375 | 0 | 100 |
2a210493cc41c55355ae04eaa379ebdd85657040 | 773 | py | Python | tests/agave_mock_server/agave_mock_server/apps_endpoints.py | vdjserver/agave-cli | 4ad0826779cd760eb8a102978c456fee214ce8a3 | [
"BSD-3-Clause"
] | null | null | null | tests/agave_mock_server/agave_mock_server/apps_endpoints.py | vdjserver/agave-cli | 4ad0826779cd760eb8a102978c456fee214ce8a3 | [
"BSD-3-Clause"
] | 1 | 2019-06-11T21:48:12.000Z | 2019-06-11T22:11:35.000Z | tests/agave_mock_server/agave_mock_server/apps_endpoints.py | vdjserver/agave-cli | 4ad0826779cd760eb8a102978c456fee214ce8a3 | [
"BSD-3-Clause"
] | null | null | null | """
apps_endpoints.py
CLI integration tests for "apps-*" cli commands.
"""
import json
import os
from flask import jsonify, request
from flask_restful import Resource
from .response_templates import response_template_to_json
# Sample response for "apps-list" cli command.
apps_list_response = response_template_to... | 24.935484 | 92 | 0.689521 | """
apps_endpoints.py
CLI integration tests for "apps-*" cli commands.
"""
import json
import os
from flask import jsonify, request
from flask_restful import Resource
from .response_templates import response_template_to_json
# Sample response for "apps-list" cli command.
apps_list_response = response_template_to... | 0 | 0 | 0 |
6213176376cdddb03d9071f6e1e1eb584eaf70f9 | 39 | py | Python | dl85/supervised/classifiers/__init__.py | BynaryCobweb/dl8.5 | 566fd61ecb94fa5a02cf67a901ba889da3c54fe2 | [
"MIT"
] | 1 | 2022-03-16T10:30:52.000Z | 2022-03-16T10:30:52.000Z | dl85/supervised/classifiers/__init__.py | ubc-systopia/pydl8.5-lbguess | 23a3b84bc632c04b5d5093909ea046f0b7902b48 | [
"MIT"
] | null | null | null | dl85/supervised/classifiers/__init__.py | ubc-systopia/pydl8.5-lbguess | 23a3b84bc632c04b5d5093909ea046f0b7902b48 | [
"MIT"
] | 1 | 2022-01-18T21:12:33.000Z | 2022-01-18T21:12:33.000Z | from .classifier import DL85Classifier
| 19.5 | 38 | 0.871795 | from .classifier import DL85Classifier
| 0 | 0 | 0 |
d64562eff04b88655662feae48bb4cf358b7ec1d | 52,311 | py | Python | prism/modellink/_modellink.py | vishalbelsare/PRISM | 9565508df8f7f7bba4119f4f523fc4635455a4db | [
"BSD-3-Clause"
] | 43 | 2019-01-28T05:40:43.000Z | 2022-03-29T20:46:57.000Z | prism/modellink/_modellink.py | vishalbelsare/PRISM | 9565508df8f7f7bba4119f4f523fc4635455a4db | [
"BSD-3-Clause"
] | 30 | 2019-01-28T10:55:27.000Z | 2021-02-01T04:06:55.000Z | prism/modellink/_modellink.py | vishalbelsare/PRISM | 9565508df8f7f7bba4119f4f523fc4635455a4db | [
"BSD-3-Clause"
] | 7 | 2020-01-10T15:54:55.000Z | 2021-02-01T04:46:17.000Z | # -*- coding: utf-8 -*-
"""
ModelLink
=========
Provides the definition of the :class:`~ModelLink` abstract base class.
"""
# %% IMPORTS
# Built-in imports
import abc
from glob import glob
from os import path
from tempfile import mktemp
import warnings
# Package imports
import e13tools as e13
import h5py
import hi... | 38.099782 | 79 | 0.605437 | # -*- coding: utf-8 -*-
"""
ModelLink
=========
Provides the definition of the :class:`~ModelLink` abstract base class.
"""
# %% IMPORTS
# Built-in imports
import abc
from glob import glob
from os import path
from tempfile import mktemp
import warnings
# Package imports
import e13tools as e13
import h5py
import hi... | 3,875 | 0 | 104 |
4681fbef1b8fcab07c0091fcd2c08fb6ff7a6db8 | 738 | py | Python | tests/hagan_2002_normal_sabr/test_normal_fit.py | v-tsepelev/pysabr | be22436625f4c0b605f362444b7aafeecda15959 | [
"MIT"
] | 2 | 2017-12-11T04:07:15.000Z | 2018-02-12T03:32:43.000Z | tests/hagan_2002_normal_sabr/test_normal_fit.py | v-tsepelev/pysabr | be22436625f4c0b605f362444b7aafeecda15959 | [
"MIT"
] | 4 | 2017-07-07T20:21:12.000Z | 2017-07-07T20:30:27.000Z | tests/hagan_2002_normal_sabr/test_normal_fit.py | v-tsepelev/pysabr | be22436625f4c0b605f362444b7aafeecda15959 | [
"MIT"
] | null | null | null | import numpy as np
from pysabr import Hagan2002NormalSABR
import logging
| 41 | 104 | 0.616531 | import numpy as np
from pysabr import Hagan2002NormalSABR
import logging
def test_normal_calibration_beta_05():
k = np.array([0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08, 0.085, 0.09, 0.095, 0.10])
v = np.array([116.63, 111.66, 109.96, 113.97, 124.7, 140.04, 157.3, 175.07, 192.78, 210.26, 227.42])
[t, f, ... | 641 | 0 | 23 |
ff233f1aef994ec9fe93ccee4df8ac416b2a6937 | 972 | py | Python | newsapi/commands/search.py | aziezahmed/newsapi-cli | 2a7329a3b954d900eec001fe5b968259f0391789 | [
"MIT"
] | 4 | 2017-11-15T19:21:00.000Z | 2021-06-15T18:42:15.000Z | newsapi/commands/search.py | aziezahmed/newsapi-cli | 2a7329a3b954d900eec001fe5b968259f0391789 | [
"MIT"
] | 1 | 2019-02-24T09:08:27.000Z | 2019-03-13T14:21:31.000Z | newsapi/commands/search.py | aziezahmed/newsapi-cli | 2a7329a3b954d900eec001fe5b968259f0391789 | [
"MIT"
] | 2 | 2019-02-26T09:18:59.000Z | 2020-07-09T16:41:49.000Z | """The search command."""
import requests, json
from termcolor import colored
from unidecode import unidecode
from newsapi.user_settings import UserSettings
from .base import Base
| 28.588235 | 88 | 0.576132 | """The search command."""
import requests, json
from termcolor import colored
from unidecode import unidecode
from newsapi.user_settings import UserSettings
from .base import Base
class Search(Base):
def run(self):
user_settings = UserSettings()
api_key = user_settings.get_api_key()
... | 731 | -2 | 50 |
d7f2167b4c2fe2a7ed7759e3272af2d352bef88c | 8,561 | py | Python | metatron/tests.py | harel/metatron | e8d82aa3e000c0682d215396112900ede54a96d6 | [
"MIT"
] | 4 | 2018-02-16T10:54:45.000Z | 2021-07-12T20:41:48.000Z | metatron/tests.py | harel/metatron | e8d82aa3e000c0682d215396112900ede54a96d6 | [
"MIT"
] | 1 | 2020-10-03T15:23:37.000Z | 2020-10-03T15:23:37.000Z | metatron/tests.py | harel/metatron | e8d82aa3e000c0682d215396112900ede54a96d6 | [
"MIT"
] | null | null | null | import unittest
from metatron import Metatron, add_schema_spec
from metatron.schemas import SCHEMAS
if __name__ == '__main__':
unittest.main()
| 54.183544 | 301 | 0.604836 | import unittest
from metatron import Metatron, add_schema_spec
from metatron.schemas import SCHEMAS
class TestMetatron(unittest.TestCase):
def test_opengraph_nested(self):
"""
{
'image': {
'value': 'http://example.com/ogp.jpg',
'secure_url: 'https://secu... | 2,732 | 5,655 | 23 |
bb6c8afb94c38786af03057da5d02ef747b2d9c8 | 963 | py | Python | taskloaf/profile.py | tbenthompson/taskloaf | 7c7e2fd2dee7fcaecb3f36629c0b7226f39f2a73 | [
"MIT"
] | 19 | 2015-10-10T05:21:22.000Z | 2019-08-31T02:11:59.000Z | taskloaf/profile.py | tbenthompson/taskloaf | 7c7e2fd2dee7fcaecb3f36629c0b7226f39f2a73 | [
"MIT"
] | null | null | null | taskloaf/profile.py | tbenthompson/taskloaf | 7c7e2fd2dee7fcaecb3f36629c0b7226f39f2a73 | [
"MIT"
] | 1 | 2019-02-04T14:38:02.000Z | 2019-02-04T14:38:02.000Z | import taskloaf as tsk
import logging
logger = logging.getLogger(__name__)
# An example of a taskloaf "daemon"? Could be cool!
| 22.395349 | 78 | 0.65109 | import taskloaf as tsk
import logging
logger = logging.getLogger(__name__)
# An example of a taskloaf "daemon"? Could be cool!
def start_profiler():
import pyinstrument
profiler = pyinstrument.Profiler()
profiler.start()
return profiler
def stop_profiler(profiler):
profiler.stop()
logger... | 633 | -6 | 203 |
9ed7edcd91c14fbdcad99ab876cfc66bcccc12bf | 22,225 | py | Python | pysnmp/BIANCA-BRICK-CAPI-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/BIANCA-BRICK-CAPI-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/BIANCA-BRICK-CAPI-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 BIANCA-BRICK-CAPI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BIANCA-BRICK-CAPI-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:21:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (def... | 133.083832 | 2,798 | 0.732238 | #
# PySNMP MIB module BIANCA-BRICK-CAPI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BIANCA-BRICK-CAPI-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:21:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (def... | 0 | 14 | 22 |
0753229d4d006d5001701b18157bb61db483ec60 | 11,843 | py | Python | networkx/algorithms/centrality/current_flow_betweenness.py | SultanOrazbayev/networkx | 5be9755636fa4da71da2e28f8467336d3c0164a7 | [
"BSD-3-Clause"
] | 2 | 2020-02-25T14:07:05.000Z | 2020-11-21T20:29:37.000Z | networkx/algorithms/centrality/current_flow_betweenness.py | SultanOrazbayev/networkx | 5be9755636fa4da71da2e28f8467336d3c0164a7 | [
"BSD-3-Clause"
] | 2 | 2020-10-16T04:18:16.000Z | 2021-11-19T20:00:15.000Z | networkx/algorithms/centrality/current_flow_betweenness.py | SultanOrazbayev/networkx | 5be9755636fa4da71da2e28f8467336d3c0164a7 | [
"BSD-3-Clause"
] | 1 | 2022-02-03T09:38:16.000Z | 2022-02-03T09:38:16.000Z | """Current-flow betweenness centrality measures."""
import networkx as nx
from networkx.algorithms.centrality.flow_matrix import (
CGInverseLaplacian,
flow_matrix_row,
FullInverseLaplacian,
SuperLUInverseLaplacian,
)
from networkx.utils import (
not_implemented_for,
reverse_cuthill_mckee_orderin... | 34.527697 | 86 | 0.647809 | """Current-flow betweenness centrality measures."""
import networkx as nx
from networkx.algorithms.centrality.flow_matrix import (
CGInverseLaplacian,
flow_matrix_row,
FullInverseLaplacian,
SuperLUInverseLaplacian,
)
from networkx.utils import (
not_implemented_for,
reverse_cuthill_mckee_orderin... | 0 | 0 | 0 |
bab1f660b94b8340f9fec39c7e740e1715a2a8a7 | 760 | py | Python | read.py | AnnyKong/Web-Crawler | 17c32723df52ed0f3ba19754fdd65e719ab94d25 | [
"MIT"
] | 2 | 2018-12-05T06:29:42.000Z | 2019-01-10T01:09:00.000Z | read.py | AnnyKong/Web-Crawler | 17c32723df52ed0f3ba19754fdd65e719ab94d25 | [
"MIT"
] | null | null | null | read.py | AnnyKong/Web-Crawler | 17c32723df52ed0f3ba19754fdd65e719ab94d25 | [
"MIT"
] | null | null | null | # from requests_html import HTMLSession
# import re
# from multiprocessing import Pool, Manager, Process
# import pandas as pd
# from functools import partial
import json
import sys
# records = {} # index -> data
# count = 0
if __name__ == '__main__':
if len(sys.argv) != 2:
print("python3 read.py <... | 23.030303 | 52 | 0.556579 | # from requests_html import HTMLSession
# import re
# from multiprocessing import Pool, Manager, Process
# import pandas as pd
# from functools import partial
import json
import sys
# records = {} # index -> data
# count = 0
def read(file):
dict = {}
# with open(argv[1] + 'json', "w") as f:
# json.d... | 295 | 0 | 23 |
83c2efcebb422a77c2dfbc06940aedc96140b02f | 9,968 | py | Python | Jwalk/build/lib/Jwalk/SurfaceTools.py | Topf-Lab/Jwalk | 72fac517b57b3724bb24101679afa8407c98666f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | Jwalk/build/lib/Jwalk/SurfaceTools.py | Topf-Lab/Jwalk | 72fac517b57b3724bb24101679afa8407c98666f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-10-04T20:21:39.000Z | 2021-10-04T20:21:39.000Z | Jwalk/src/Jwalk/SurfaceTools.py | Topf-Lab/Jwalk | 72fac517b57b3724bb24101679afa8407c98666f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-01-04T11:19:07.000Z | 2021-01-04T11:19:07.000Z | #===============================================================================
# This file is part of Jwalk.
#
# Jwalk - A tool to calculate the solvent accessible surface distance (SASD)
# between crosslinked residues.
#
# Copyright 2016 Jwalk Inventor and Birkbeck College University of Lo... | 34.491349 | 141 | 0.501705 | #===============================================================================
# This file is part of Jwalk.
#
# Jwalk - A tool to calculate the solvent accessible surface distance (SASD)
# between crosslinked residues.
#
# Copyright 2016 Jwalk Inventor and Birkbeck College University of Lo... | 2,537 | 0 | 27 |
a58b8a635f84880b1282425d692f30cff3a142ff | 45,162 | py | Python | riemann/tx/tx.py | sturmianseq/riemann | 9e6dbaaf1b339594c0c0d55b2db6e96d7e3f12c4 | [
"Apache-2.0",
"MIT"
] | 118 | 2018-05-07T18:49:15.000Z | 2022-01-15T17:32:43.000Z | riemann/tx/tx.py | sturmianseq/riemann | 9e6dbaaf1b339594c0c0d55b2db6e96d7e3f12c4 | [
"Apache-2.0",
"MIT"
] | 46 | 2018-05-03T21:53:11.000Z | 2020-03-18T22:55:11.000Z | riemann/tx/tx.py | sturmianseq/riemann | 9e6dbaaf1b339594c0c0d55b2db6e96d7e3f12c4 | [
"Apache-2.0",
"MIT"
] | 19 | 2018-05-06T23:05:43.000Z | 2021-11-24T14:27:45.000Z | import riemann
from riemann import utils
from riemann.tx import shared
from riemann.script import serialization
from riemann.tx.shared import ByteData, VarInt
from typing import List, Optional, overload, Sequence, Tuple
class Outpoint(ByteData):
'''
An outpoint. A pointer to the previous output being consume... | 39 | 138 | 0.605332 | import riemann
from riemann import utils
from riemann.tx import shared
from riemann.script import serialization
from riemann.tx.shared import ByteData, VarInt
from typing import List, Optional, overload, Sequence, Tuple
class Outpoint(ByteData):
'''
An outpoint. A pointer to the previous output being consume... | 7,445 | 0 | 423 |
183e9f48dd4707f5c170ec7b0d584f7689c30cff | 15,229 | py | Python | openhab_gw.py | HalliHalloSchatz/comfoconnect_openhab_gw | 71d7f5155a6387dfab16ed9965da7c646e483545 | [
"MIT"
] | null | null | null | openhab_gw.py | HalliHalloSchatz/comfoconnect_openhab_gw | 71d7f5155a6387dfab16ed9965da7c646e483545 | [
"MIT"
] | null | null | null | openhab_gw.py | HalliHalloSchatz/comfoconnect_openhab_gw | 71d7f5155a6387dfab16ed9965da7c646e483545 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import argparse
import paho.mqtt.client as mqtt
import datetime
from time import sleep
from binascii import unhexlify
from random import randint
from pycomfoconnect import *
import getopt
## Configuration ###############################################################################################... | 43.387464 | 202 | 0.624795 | #!/usr/bin/python3
import argparse
import paho.mqtt.client as mqtt
import datetime
from time import sleep
from binascii import unhexlify
from random import randint
from pycomfoconnect import *
import getopt
## Configuration ###############################################################################################... | 12,681 | 0 | 204 |
c67563654c2bde4026564fdf88c498ee31796fe5 | 1,089 | py | Python | src/telliot_core/utils/timestamp.py | QuintusTheFifth/telliot-core | e22bc3b98d368fa91528f4a273ef26eddfefacaf | [
"MIT"
] | 9 | 2021-12-15T07:03:34.000Z | 2022-03-30T20:16:45.000Z | src/telliot_core/utils/timestamp.py | QuintusTheFifth/telliot-core | e22bc3b98d368fa91528f4a273ef26eddfefacaf | [
"MIT"
] | 77 | 2021-09-03T04:01:20.000Z | 2021-11-09T14:45:52.000Z | src/telliot_core/utils/timestamp.py | QuintusTheFifth/telliot-core | e22bc3b98d368fa91528f4a273ef26eddfefacaf | [
"MIT"
] | 7 | 2021-12-17T03:39:23.000Z | 2022-03-29T08:53:43.000Z | from datetime import datetime
from datetime import timedelta
from datetime import timezone
from typing import Union
def now() -> datetime:
"""Return now as a UTC timestamp"""
return datetime.now(timezone.utc)
class TimeStamp:
"""Representation of a timestamp with an integer number of seconds"""
# A... | 25.325581 | 73 | 0.646465 | from datetime import datetime
from datetime import timedelta
from datetime import timezone
from typing import Union
def now() -> datetime:
"""Return now as a UTC timestamp"""
return datetime.now(timezone.utc)
class TimeStamp:
"""Representation of a timestamp with an integer number of seconds"""
# A... | 289 | 0 | 106 |
50e6f3ced2cb90c17a2cdc4cf78126f568074c3a | 28,904 | py | Python | troposphere_mate/opsworks.py | tsuttsu305/troposphere_mate-project | 15ee94cc913efb32bc991979efcad943c992074c | [
"MIT"
] | null | null | null | troposphere_mate/opsworks.py | tsuttsu305/troposphere_mate-project | 15ee94cc913efb32bc991979efcad943c992074c | [
"MIT"
] | null | null | null | troposphere_mate/opsworks.py | tsuttsu305/troposphere_mate-project | 15ee94cc913efb32bc991979efcad943c992074c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This code is auto generated from troposphere_mate.code_generator.__init__.py scripts.
"""
import sys
if sys.version_info.major >= 3 and sys.version_info.minor >= 5: # pragma: no cover
from typing import Union, List, Any
import troposphere.opsworks
from troposphere.opsworks import (
... | 41.056818 | 95 | 0.59279 | # -*- coding: utf-8 -*-
"""
This code is auto generated from troposphere_mate.code_generator.__init__.py scripts.
"""
import sys
if sys.version_info.major >= 3 and sys.version_info.minor >= 5: # pragma: no cover
from typing import Union, List, Any
import troposphere.opsworks
from troposphere.opsworks import (
... | 25,169 | 1,140 | 1,274 |
de7a71dc5c7c3bd09cbf3c294b1c4845e7ee26ca | 967 | py | Python | telegram_notifier/__main__.py | dpint/py-telegram-notifier | 780eee0453559eb9212bef03eeb5569a55ddbcc7 | [
"MIT"
] | 17 | 2021-01-08T07:26:26.000Z | 2021-07-31T07:56:37.000Z | telegram_notifier/__main__.py | dpint/py-telegram-notifier | 780eee0453559eb9212bef03eeb5569a55ddbcc7 | [
"MIT"
] | null | null | null | telegram_notifier/__main__.py | dpint/py-telegram-notifier | 780eee0453559eb9212bef03eeb5569a55ddbcc7 | [
"MIT"
] | 1 | 2021-09-25T16:43:24.000Z | 2021-09-25T16:43:24.000Z | #!/usr/bin/python
import argparse
from . import *
if __name__ == "__main__":
arg_parser = argparse.ArgumentParser(
description="A simple usage of the Telegram Bot API.", allow_abbrev=True
)
arg_parser.add_argument("--chat_id", type=str, help="sets the chat_id in settings")
arg_parser.add_argum... | 35.814815 | 96 | 0.66908 | #!/usr/bin/python
import argparse
from . import *
if __name__ == "__main__":
arg_parser = argparse.ArgumentParser(
description="A simple usage of the Telegram Bot API.", allow_abbrev=True
)
arg_parser.add_argument("--chat_id", type=str, help="sets the chat_id in settings")
arg_parser.add_argum... | 0 | 0 | 0 |
b4dc2cf29030f1b8f45c9bf57928e1e8896ac401 | 5,599 | py | Python | karborclient/common/utils.py | thuylt2/karborclient | 884d685c3cd1c1075e895791d7027b56c30dd328 | [
"Apache-2.0"
] | null | null | null | karborclient/common/utils.py | thuylt2/karborclient | 884d685c3cd1c1075e895791d7027b56c30dd328 | [
"Apache-2.0"
] | null | null | null | karborclient/common/utils.py | thuylt2/karborclient | 884d685c3cd1c1075e895791d7027b56c30dd328 | [
"Apache-2.0"
] | null | null | null | # 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
# d... | 31.632768 | 78 | 0.606001 | # 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
# d... | 1,049 | 0 | 68 |
d54f82981520d2f5c67a7b99944807f127f13803 | 5,178 | py | Python | datasets/cuhk_sysu.py | ZhengPeng7/PSxMVN | a8787946bdb2c97643041d24f7be53ae128f8494 | [
"MIT"
] | null | null | null | datasets/cuhk_sysu.py | ZhengPeng7/PSxMVN | a8787946bdb2c97643041d24f7be53ae128f8494 | [
"MIT"
] | null | null | null | datasets/cuhk_sysu.py | ZhengPeng7/PSxMVN | a8787946bdb2c97643041d24f7be53ae128f8494 | [
"MIT"
] | null | null | null | import os.path as osp
import numpy as np
from scipy.io import loadmat
from .base import BaseDataset
| 42.793388 | 97 | 0.523368 | import os.path as osp
import numpy as np
from scipy.io import loadmat
from .base import BaseDataset
class CUHKSYSU(BaseDataset):
def __init__(self, root, transforms, split):
self.name = "CUHK-SYSU"
self.img_prefix = osp.join(root, "Image", "SSM")
super(CUHKSYSU, self).__init_... | 4,120 | 924 | 24 |
1327aebdfe208122c6fd75e1adde7135c6eff61f | 783 | py | Python | test_DeckofCards.py | mrkruoff/BlackJack | 6326b9e4025d996b9e53df890ea659f45614a732 | [
"MIT"
] | null | null | null | test_DeckofCards.py | mrkruoff/BlackJack | 6326b9e4025d996b9e53df890ea659f45614a732 | [
"MIT"
] | null | null | null | test_DeckofCards.py | mrkruoff/BlackJack | 6326b9e4025d996b9e53df890ea659f45614a732 | [
"MIT"
] | null | null | null | from unittest import TestCase
from DeckofCards import Deck
| 34.043478 | 59 | 0.670498 | from unittest import TestCase
from DeckofCards import Deck
class TestDeck(TestCase):
def test_create_deck(self):
testing_deck = Deck(1)
self.assertEqual(testing_deck.cards_left(), 52)
testing_deck = Deck(2)
self.assertEqual(testing_deck.cards_left(), 52 * 2)
testing_deck = ... | 643 | 4 | 76 |
69611b7416b1f66583db22f14a89377fd60cc1de | 2,836 | py | Python | src/zope/app/renderer/stx.py | zopefoundation/zope.app.renderer | 2238c5821229b67bbe3242c11c483ea12446fb83 | [
"ZPL-2.1"
] | null | null | null | src/zope/app/renderer/stx.py | zopefoundation/zope.app.renderer | 2238c5821229b67bbe3242c11c483ea12446fb83 | [
"ZPL-2.1"
] | 2 | 2017-05-17T08:44:00.000Z | 2017-05-25T11:21:58.000Z | src/zope/app/renderer/stx.py | zopefoundation/zope.app.renderer | 2238c5821229b67bbe3242c11c483ea12446fb83 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 32.597701 | 78 | 0.663258 | ##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 0 | 0 | 0 |
039abc2574b6382d06a028cc387789922bc48e1d | 3,436 | py | Python | ML Model/src/serializer_test.py | jimdowling/Names-To-Nationality-Predicter | 4ab6570d65232d15c6eadf3fe4842e8ef2e888f4 | [
"MIT"
] | 5 | 2021-01-20T11:15:17.000Z | 2022-03-26T06:16:37.000Z | ML Model/src/serializer_test.py | EKarton/Names-To-Nationality-Predictor | 49715aa267d48d92358f11401632e0ab22bc5f97 | [
"MIT"
] | null | null | null | ML Model/src/serializer_test.py | EKarton/Names-To-Nationality-Predictor | 49715aa267d48d92358f11401632e0ab22bc5f97 | [
"MIT"
] | 1 | 2021-03-17T22:17:33.000Z | 2021-03-17T22:17:33.000Z | import unittest
import math
import numpy as np
from serializer import Serializer
if __name__ == '__main__':
unittest.main() | 49.085714 | 103 | 0.73312 | import unittest
import math
import numpy as np
from serializer import Serializer
class SerializerTest(unittest.TestCase):
def test_serialize_example_given_name_should_return_correct_val_1(self):
self.check_serialized_name("Bob Smith", [2, 15, 2, 0, 19, 13, 9, 20, 8])
def test_serialize_example_given_n... | 2,856 | 19 | 435 |
61e7dde5a425068da9b7519f19c2a9bf5b6d509f | 449 | py | Python | pytest_tornado/test/test_async_await.py | mikebohdan/pytest-tornado | 20898c29aa6ee23244e3f705ccf21555c78a61a1 | [
"Apache-2.0"
] | 3 | 2018-03-16T01:17:18.000Z | 2019-02-07T04:15:33.000Z | pytest_tornado/test/test_async_await.py | mikebohdan/pytest-tornado | 20898c29aa6ee23244e3f705ccf21555c78a61a1 | [
"Apache-2.0"
] | null | null | null | pytest_tornado/test/test_async_await.py | mikebohdan/pytest-tornado | 20898c29aa6ee23244e3f705ccf21555c78a61a1 | [
"Apache-2.0"
] | 1 | 2018-03-16T01:26:48.000Z | 2018-03-16T01:26:48.000Z | import pytest
from tornado import gen
@pytest.mark.gen_test
@pytest.mark.gen_test(run_sync=False)
| 23.631579 | 56 | 0.799555 | import pytest
from tornado import gen
async def dummy_native_coroutine(io_loop):
await gen.Task(io_loop.add_callback)
return True
@pytest.mark.gen_test
async def test_native_coroutine_gen_test(io_loop):
result = await dummy_native_coroutine(io_loop)
assert result
@pytest.mark.gen_test(run_sync=Fals... | 280 | 0 | 67 |
b48e89514d78f616a92e0a8ea8fab4c75b079caf | 1,117 | py | Python | otwstest/tree_of_life/node_info/__init__.py | OpenTreeOfLife/test-ot-ws | eee0eeb4150e942bea32e9131d20c01ad9666757 | [
"BSD-2-Clause"
] | null | null | null | otwstest/tree_of_life/node_info/__init__.py | OpenTreeOfLife/test-ot-ws | eee0eeb4150e942bea32e9131d20c01ad9666757 | [
"BSD-2-Clause"
] | 4 | 2019-04-10T19:44:00.000Z | 2020-04-21T19:50:29.000Z | otwstest/tree_of_life/node_info/__init__.py | OpenTreeOfLife/test-ot-ws | eee0eeb4150e942bea32e9131d20c01ad9666757 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from otwstest.schema.tree_of_life.node_info import validate
from otwstest import all_api_versions, not_v2_version
@all_api_versions
@all_api_versions
@not_v2_version
| 29.394737 | 65 | 0.666965 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from otwstest.schema.tree_of_life.node_info import validate
from otwstest import all_api_versions, not_v2_version
@all_api_versions
def test_simple(outcome):
o = 396446
if outcome.api_version == 'v2':
url = outcome.make_url('graph/node_info')
d = ... | 832 | 0 | 66 |
1459df657b26343d4e5b81ebd3d18c6e44cf2786 | 1,135 | py | Python | config.py | Zappaman/GPT2Ro | c1b0843c4e22d7b27cb0538dc2a8d5b81851fff3 | [
"MIT"
] | 1 | 2021-05-19T13:33:54.000Z | 2021-05-19T13:33:54.000Z | config.py | Zappaman/GPT2Ro | c1b0843c4e22d7b27cb0538dc2a8d5b81851fff3 | [
"MIT"
] | null | null | null | config.py | Zappaman/GPT2Ro | c1b0843c4e22d7b27cb0538dc2a8d5b81851fff3 | [
"MIT"
] | 1 | 2021-05-19T13:33:55.000Z | 2021-05-19T13:33:55.000Z | """
Defaults for config object which is used as a singleton object in project
"""
from yacs.config import CfgNode as CN
_C = CN()
_C.EXPERIMENT = CN()
_C.EXPERIMENT.OUTPUT_FOLDER = "./outputs"
_C.EXPERIMENT.TENSORBOARD_FOLDER = "./runs"
_C.EXPERIMENT.RESUME_TRAINING_ON_RESTART = True
_C.EXPERIMENT.NUM_DATALOADER_WOR... | 27.02381 | 73 | 0.772687 | """
Defaults for config object which is used as a singleton object in project
"""
from yacs.config import CfgNode as CN
_C = CN()
_C.EXPERIMENT = CN()
_C.EXPERIMENT.OUTPUT_FOLDER = "./outputs"
_C.EXPERIMENT.TENSORBOARD_FOLDER = "./runs"
_C.EXPERIMENT.RESUME_TRAINING_ON_RESTART = True
_C.EXPERIMENT.NUM_DATALOADER_WOR... | 0 | 0 | 0 |
085932cf674cd32537e1fa97004cc1c2b4bbc5e0 | 14,894 | py | Python | seafilefuse.py | dongsupark/seafile-fuse-client | 202108d476e53a9d2962e5a97229cc71455731cd | [
"Apache-2.0"
] | 5 | 2017-11-04T14:14:20.000Z | 2021-02-15T22:03:26.000Z | seafilefuse.py | dongsupark/seafile-fuse-client | 202108d476e53a9d2962e5a97229cc71455731cd | [
"Apache-2.0"
] | null | null | null | seafilefuse.py | dongsupark/seafile-fuse-client | 202108d476e53a9d2962e5a97229cc71455731cd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
FUSE-based client for Seafile
- written by Dongsu Park <dpark@posteo.net>
(inspired by copy-fuse <https://github.com/copy-app/copy-fuse>)
A simple client for seafile.com, implemented via FUSE.
This tool allows a Linux/MacOSX client to mount a seafile cloud drive on a
local files... | 31.488372 | 108 | 0.612931 | #!/usr/bin/env python
"""
FUSE-based client for Seafile
- written by Dongsu Park <dpark@posteo.net>
(inspired by copy-fuse <https://github.com/copy-app/copy-fuse>)
A simple client for seafile.com, implemented via FUSE.
This tool allows a Linux/MacOSX client to mount a seafile cloud drive on a
local files... | 11,382 | 0 | 711 |
4cd6418c9ad0f4ee4345c53eb1d24afd4b6d0579 | 2,885 | py | Python | pwncat/modules/linux/enumerate/creds/private_key.py | Mitul16/pwncat | b8d7876a9779c2c7796a9a29110d3f1cda721dff | [
"MIT"
] | 1,454 | 2020-05-07T02:20:52.000Z | 2022-03-31T21:32:22.000Z | pwncat/modules/linux/enumerate/creds/private_key.py | akr3ch/pwncat | d67865bdaac60dd0761d0698062e7b443a62c6db | [
"MIT"
] | 187 | 2020-05-08T06:26:01.000Z | 2022-03-07T21:15:29.000Z | pwncat/modules/linux/enumerate/creds/private_key.py | akr3ch/pwncat | d67865bdaac60dd0761d0698062e7b443a62c6db | [
"MIT"
] | 184 | 2020-05-07T02:31:58.000Z | 2022-03-31T09:11:59.000Z | #!/usr/bin/env python3
import rich.markup
from Crypto.PublicKey import RSA
import pwncat
from pwncat.facts import PrivateKey
from pwncat.modules import Status
from pwncat.platform.linux import Linux
from pwncat.modules.enumerate import Schedule, EnumerateModule
class Module(EnumerateModule):
"""
Search the ... | 37.960526 | 130 | 0.569151 | #!/usr/bin/env python3
import rich.markup
from Crypto.PublicKey import RSA
import pwncat
from pwncat.facts import PrivateKey
from pwncat.modules import Status
from pwncat.platform.linux import Linux
from pwncat.modules.enumerate import Schedule, EnumerateModule
class Module(EnumerateModule):
"""
Search the ... | 2,251 | 0 | 27 |
5172445aab46af96b17068466590ef3c930c6060 | 2,462 | py | Python | base/views/data.py | amitava-bhattacharyya/CeNDR | e5300b249c5cbce000637951bdbc8a802cf93ee3 | [
"MIT"
] | null | null | null | base/views/data.py | amitava-bhattacharyya/CeNDR | e5300b249c5cbce000637951bdbc8a802cf93ee3 | [
"MIT"
] | null | null | null | base/views/data.py | amitava-bhattacharyya/CeNDR | e5300b249c5cbce000637951bdbc8a802cf93ee3 | [
"MIT"
] | null | null | null | import requests
from flask import make_response
from flask import render_template
from flask import Blueprint
from base.views.api.api_strain import get_isotypes, query_strains
from base.constants import DATASET_RELEASE, RELEASES
from base.models2 import strain_m
from base.utils.gcloud import list_release_files
from log... | 32.394737 | 161 | 0.69537 | import requests
from flask import make_response
from flask import render_template
from flask import Blueprint
from base.views.api.api_strain import get_isotypes, query_strains
from base.constants import DATASET_RELEASE, RELEASES
from base.models2 import strain_m
from base.utils.gcloud import list_release_files
from log... | 577 | 0 | 44 |
cc23a331da631b7d85fe1eea4f49e5f810cdd495 | 678 | py | Python | __init__.py | kant/qgis-earthengine-plugin | 561dd98855c9c0dc3bd29a34fa07b60b63908c94 | [
"MIT"
] | 1 | 2020-05-27T15:01:53.000Z | 2020-05-27T15:01:53.000Z | __init__.py | kevinmel2000/qgis-earthengine-plugin | 65196d9b8462a161e7e7741c2bcf9cb8d9684a5f | [
"MIT"
] | null | null | null | __init__.py | kevinmel2000/qgis-earthengine-plugin | 65196d9b8462a161e7e7741c2bcf9cb8d9684a5f | [
"MIT"
] | 1 | 2020-05-27T15:02:11.000Z | 2020-05-27T15:02:11.000Z | # -*- coding: utf-8 -*-
import os
import platform
import site
if platform.system() == "Windows":
extlib_path = 'extlibs_windows'
if platform.system() == "Darwin":
extlib_path = 'extlibs_darwin'
if platform.system() == "Linux":
extlib_path = 'extlibs_linux'
site.addsitedir(os.path.abspath(os.path.join(os.p... | 24.214286 | 86 | 0.713864 | # -*- coding: utf-8 -*-
import os
import platform
import site
if platform.system() == "Windows":
extlib_path = 'extlibs_windows'
if platform.system() == "Darwin":
extlib_path = 'extlibs_darwin'
if platform.system() == "Linux":
extlib_path = 'extlibs_linux'
site.addsitedir(os.path.abspath(os.path.join(os.p... | 0 | 0 | 0 |
cf9adae50f4f81f3f9b305981e2e7f275ecf5aa9 | 6,109 | py | Python | intro-guestshell/mission01/mission.py | cobeam/DevNetRepo | d824bb6ad7d21bcae03485b571e97fc2b6b61df9 | [
"MIT"
] | 90 | 2018-04-07T00:39:23.000Z | 2020-06-09T02:44:02.000Z | intro-guestshell/mission01/mission.py | cobeam/DevNetRepo | d824bb6ad7d21bcae03485b571e97fc2b6b61df9 | [
"MIT"
] | 38 | 2018-04-06T18:11:36.000Z | 2020-05-11T23:36:24.000Z | intro-guestshell/mission01/mission.py | cobeam/DevNetRepo | d824bb6ad7d21bcae03485b571e97fc2b6b61df9 | [
"MIT"
] | 143 | 2018-04-20T00:17:24.000Z | 2020-06-12T15:07:42.000Z | #!/usr/bin/env python
"""Sends configuration difference to Webex Teams, formerly Spark.
Compares the current running configuration and the saved running
configuration, creates diff and sends it to a Webex Teams room.
Should be invoked after every configuration change by EEM.
Copyright (c) 2018 Cisco and/or its affil... | 31.328205 | 78 | 0.688001 | #!/usr/bin/env python
"""Sends configuration difference to Webex Teams, formerly Spark.
Compares the current running configuration and the saved running
configuration, creates diff and sends it to a Webex Teams room.
Should be invoked after every configuration change by EEM.
Copyright (c) 2018 Cisco and/or its affil... | 1,422 | 0 | 23 |
01380fb380b4f05e69966a565e3fd073e54d18c3 | 2,061 | py | Python | tests/utils.py | Ouranosinc/intake-esm | c39ba18acfb35e7fad1dcf5c0c9807b50800a1c0 | [
"Apache-2.0"
] | 20 | 2019-03-03T22:05:19.000Z | 2020-04-20T23:47:13.000Z | tests/utils.py | Ouranosinc/intake-esm | c39ba18acfb35e7fad1dcf5c0c9807b50800a1c0 | [
"Apache-2.0"
] | 145 | 2019-02-15T04:07:49.000Z | 2020-06-25T19:03:18.000Z | tests/utils.py | Ouranosinc/intake-esm | c39ba18acfb35e7fad1dcf5c0c9807b50800a1c0 | [
"Apache-2.0"
] | 18 | 2019-03-10T15:25:59.000Z | 2020-06-08T09:56:03.000Z | import os
import pandas as pd
here = os.path.abspath(os.path.dirname(__file__))
zarr_cat_pangeo_cmip6 = 'https://storage.googleapis.com/cmip6/pangeo-cmip6.json'
cdf_cat_sample_cmip6 = os.path.join(here, 'sample-catalogs/cmip6-netcdf.json')
multi_variable_cat = os.path.join(here, 'sample-catalogs/multi-variable-catalo... | 32.714286 | 99 | 0.604561 | import os
import pandas as pd
here = os.path.abspath(os.path.dirname(__file__))
zarr_cat_pangeo_cmip6 = 'https://storage.googleapis.com/cmip6/pangeo-cmip6.json'
cdf_cat_sample_cmip6 = os.path.join(here, 'sample-catalogs/cmip6-netcdf.json')
multi_variable_cat = os.path.join(here, 'sample-catalogs/multi-variable-catalo... | 0 | 0 | 0 |
9c8d73a16d474beccfcd4957adb9d6ffb14b93ca | 4,388 | py | Python | segment trees/Tree33_update(add lr)_query(weighted sum)_v2.py | DreamShaded/flykiller.github.io | 37b7abc44544613f56ec994452ddd8d2a4ac8df2 | [
"MIT"
] | 5 | 2021-08-10T18:07:39.000Z | 2022-03-26T08:16:24.000Z | segment trees/Tree33_update(add lr)_query(weighted sum)_v2.py | DreamShaded/flykiller.github.io | 37b7abc44544613f56ec994452ddd8d2a4ac8df2 | [
"MIT"
] | null | null | null | segment trees/Tree33_update(add lr)_query(weighted sum)_v2.py | DreamShaded/flykiller.github.io | 37b7abc44544613f56ec994452ddd8d2a4ac8df2 | [
"MIT"
] | 2 | 2021-03-31T18:14:06.000Z | 2021-08-23T04:15:30.000Z | # we can use Segment Tree 24 and Segment Tree 31 and combine them.
if __name__ == '__main__':
n, m = [int(i) for i in input().split()]
STree1 = SegmentTree1(n)
STree2 = SegmentTree2(n, lambda a, b, x: a + b*x, lambda a, b: a+b, 0)
arr = [int(i) for i in input().split()]
for i in range(n):
... | 34.551181 | 103 | 0.459435 | # we can use Segment Tree 24 and Segment Tree 31 and combine them.
class SegmentTree1: # add arithmetic progressions
def __init__(self, n):
self.size = 1
while self.size < n:
self.size *= 2
self.NO_OPERATION = (0, 0) # it should be neutral with respect to op_modify
... | 3,072 | 65 | 368 |
b76e4afd6eed35fdb3ca6b28fb4c67bf8d83a2ae | 129,561 | py | Python | Workspace/validate_be_tryp/etc/ligand_dict.py | alexjli/addcov19 | 839b6a5fdb117d6dbfedd3e2a2aaf722a722f7c8 | [
"MIT"
] | 1 | 2020-04-25T01:33:40.000Z | 2020-04-25T01:33:40.000Z | validate_be_tryp/etc/ligand_dict.py | alexjli/addcov19 | 839b6a5fdb117d6dbfedd3e2a2aaf722a722f7c8 | [
"MIT"
] | null | null | null | validate_be_tryp/etc/ligand_dict.py | alexjli/addcov19 | 839b6a5fdb117d6dbfedd3e2a2aaf722a722f7c8 | [
"MIT"
] | null | null | null | summary = d = {}
d['lig0'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds':3,
'zero_charge' : [],
}
d['lig10'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds':3,
'zero_charge' : [],
}
d['lig11'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds'... | 26.473437 | 75 | 0.404782 | summary = d = {}
d['lig0'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds':3,
'zero_charge' : [],
}
d['lig10'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds':3,
'zero_charge' : [],
}
d['lig11'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds'... | 0 | 0 | 0 |
1af54bd777743457a3a910bddbca3266b129a68d | 12,643 | py | Python | action-s710-lights.py | patrickjane/snipslightsha | 3d5c43d2952271761769fac8d368d9dd6a1dd059 | [
"MIT"
] | 3 | 2019-10-18T08:19:29.000Z | 2019-12-13T16:15:27.000Z | action-s710-lights.py | patrickjane/snipslightsha | 3d5c43d2952271761769fac8d368d9dd6a1dd059 | [
"MIT"
] | null | null | null | action-s710-lights.py | patrickjane/snipslightsha | 3d5c43d2952271761769fac8d368d9dd6a1dd059 | [
"MIT"
] | 1 | 2019-08-30T22:29:14.000Z | 2019-08-30T22:29:14.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Snips Lights + Homeassistant
# -----------------------------------------------------------------------------
# Copyright 2019 Patrick Fial
# -------------------------------------------------... | 43.596552 | 140 | 0.572886 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Snips Lights + Homeassistant
# -----------------------------------------------------------------------------
# Copyright 2019 Patrick Fial
# -------------------------------------------------... | 9,150 | -3 | 185 |
e3e4619c71c41ed705e6c33c24d3ddc3ba9f77b8 | 381 | py | Python | comps/migrations/0010_auto_20200421_2132.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | comps/migrations/0010_auto_20200421_2132.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | 87 | 2020-04-15T22:29:03.000Z | 2022-01-02T02:21:28.000Z | comps/migrations/0010_auto_20200421_2132.py | dlanghorne0428/dancesport-tracker-projec | e55d91a4f03c26d6ee8c28846a809064adfdb158 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-21 21:32
from django.db import migrations
| 20.052632 | 48 | 0.60105 | # Generated by Django 3.0.4 on 2020-04-21 21:32
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('rankings', '0006_auto_20200414_0150'),
('comps', '0009_heatresult_heat'),
]
operations = [
migrations.RenameModel(
old_name='Hea... | 0 | 275 | 23 |
2ab163caa20d2100932f8fe234668ec04b2677bc | 237 | py | Python | uva_answers/621/main.py | andriisoldatenko/fan | e7ed6ea0f39bd71af4e286af8d81ebc137ae8ff4 | [
"MIT"
] | 6 | 2018-11-18T15:00:02.000Z | 2022-03-23T21:32:24.000Z | uva_answers/621/main.py | andriisoldatenko/leetcode | 8fef4da00234f8acbea9b71ee730b2267b70395f | [
"MIT"
] | null | null | null | uva_answers/621/main.py | andriisoldatenko/leetcode | 8fef4da00234f8acbea9b71ee730b2267b70395f | [
"MIT"
] | null | null | null | for _ in range(int(input())):
n = input()
if n in {'1', '4', '78'}:
print('+')
elif n.endswith('35'):
print('-')
elif n.startswith('9') and n.endswith('4'):
print('*')
else:
print('?')
| 21.545455 | 47 | 0.43038 | for _ in range(int(input())):
n = input()
if n in {'1', '4', '78'}:
print('+')
elif n.endswith('35'):
print('-')
elif n.startswith('9') and n.endswith('4'):
print('*')
else:
print('?')
| 0 | 0 | 0 |
e64a627de0a225ac92258cde53753862d013f234 | 2,679 | py | Python | tests/test_extract_oxoq.py | MarcSaric/variant-filtration-tool | e4492e2225e87ce904e49401d8919e7f84f9de87 | [
"Apache-2.0"
] | null | null | null | tests/test_extract_oxoq.py | MarcSaric/variant-filtration-tool | e4492e2225e87ce904e49401d8919e7f84f9de87 | [
"Apache-2.0"
] | 2 | 2020-07-08T13:51:37.000Z | 2020-07-09T19:31:00.000Z | tests/test_extract_oxoq.py | MarcSaric/variant-filtration-tool | e4492e2225e87ce904e49401d8919e7f84f9de87 | [
"Apache-2.0"
] | 2 | 2020-08-14T08:51:08.000Z | 2021-04-28T15:37:16.000Z | """Tests the ``gdc_filtration_tools.tools.extract_oxoq`` module.
"""
import sqlite3
import tempfile
import unittest
import attr
from gdc_filtration_tools.tools.extract_oxoq import extract_oxoq_from_sqlite, get_oxoq
from tests.utils import captured_output, cleanup_files
@attr.s
def build_test_schema(conn):
"""... | 29.119565 | 86 | 0.609929 | """Tests the ``gdc_filtration_tools.tools.extract_oxoq`` module.
"""
import sqlite3
import tempfile
import unittest
import attr
from gdc_filtration_tools.tools.extract_oxoq import extract_oxoq_from_sqlite, get_oxoq
from tests.utils import captured_output, cleanup_files
@attr.s
class OxoqRecord(object):
total_ba... | 1,525 | 341 | 98 |
614991bd10ea6f2b61d54371b58a5608f9dc395c | 1,946 | py | Python | src/ui.py | zixia/python-facenet | d86e0c49a9ce413bef6e58a19a9f723aadcef968 | [
"MIT"
] | 4 | 2018-06-11T03:02:49.000Z | 2018-07-11T07:18:52.000Z | src/ui.py | zixia/python-facenet | d86e0c49a9ce413bef6e58a19a9f723aadcef968 | [
"MIT"
] | null | null | null | src/ui.py | zixia/python-facenet | d86e0c49a9ce413bef6e58a19a9f723aadcef968 | [
"MIT"
] | 2 | 2017-08-31T05:35:36.000Z | 2018-10-11T16:42:15.000Z | """
dialog module
"""
from time import sleep
from typing import Tuple
import matplotlib.pyplot as plt
# from matplotlib.image import AxesImage
from matplotlib.patches import Rectangle
import numpy as np
Point = Tuple[int, int]
i = 3 # type: int
i = '3'
class Ui(object):
"""
dialog
"""
def show_... | 20.270833 | 60 | 0.472765 | """
dialog module
"""
from time import sleep
from typing import Tuple
import matplotlib.pyplot as plt
# from matplotlib.image import AxesImage
from matplotlib.patches import Rectangle
import numpy as np
Point = Tuple[int, int]
i = 3 # type: int
i = '3'
class Ui(object):
"""
dialog
"""
def __ini... | 136 | 0 | 27 |
b2b18c1c03a360aec6e2bb058e46a4132de691f9 | 12,713 | py | Python | src/plots_reaction.py | andrewtarzia/enzyme_screen | c7f9291e5e29b51dd28193f46e1a2ac377dafa9e | [
"MIT"
] | 1 | 2020-09-11T15:29:18.000Z | 2020-09-11T15:29:18.000Z | src/plots_reaction.py | andrewtarzia/enzyme_screen | c7f9291e5e29b51dd28193f46e1a2ac377dafa9e | [
"MIT"
] | null | null | null | src/plots_reaction.py | andrewtarzia/enzyme_screen | c7f9291e5e29b51dd28193f46e1a2ac377dafa9e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Distributed under the terms of the MIT License.
"""
Module for plotting reaction-based functions.
Author: Andrew Tarzia
Date Created: 15 Sep 2018
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from matplotlib.ticker import ... | 24.589942 | 71 | 0.503736 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Distributed under the terms of the MIT License.
"""
Module for plotting reaction-based functions.
Author: Andrew Tarzia
Date Created: 15 Sep 2018
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from matplotlib.ticker import ... | 0 | 0 | 0 |
45b65903538778fcabe1da9b327d085a00bf388a | 296 | py | Python | Pyo_module/documentation_practice/soundfiles/read_from_disk.py | sebcampos/music | b508654f9524127bd2681628a9ec4b88dc607c8d | [
"MIT"
] | null | null | null | Pyo_module/documentation_practice/soundfiles/read_from_disk.py | sebcampos/music | b508654f9524127bd2681628a9ec4b88dc607c8d | [
"MIT"
] | null | null | null | Pyo_module/documentation_practice/soundfiles/read_from_disk.py | sebcampos/music | b508654f9524127bd2681628a9ec4b88dc607c8d | [
"MIT"
] | null | null | null | #!/usr/local/Caskroom/miniconda/base/envs/music_venv/bin/pythonw
from pyo import *
s = Server().boot()
path = SNDS_PATH + "/transparent.aif"
# stereo playback with a slight shift between the two channels.
sf = SfPlayer(path, speed = [1, 0.995], loop = True, mul = 0.4).out()
s.gui(locals())
| 22.769231 | 69 | 0.692568 | #!/usr/local/Caskroom/miniconda/base/envs/music_venv/bin/pythonw
from pyo import *
s = Server().boot()
path = SNDS_PATH + "/transparent.aif"
# stereo playback with a slight shift between the two channels.
sf = SfPlayer(path, speed = [1, 0.995], loop = True, mul = 0.4).out()
s.gui(locals())
| 0 | 0 | 0 |
a725eb547405de5f74291f1b2d3d9454b51e7b4f | 1,040 | py | Python | HW/4-1/data/mark.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/4-1/data/mark.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/4-1/data/mark.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | 1 | 2022-01-16T03:40:34.000Z | 2022-01-16T03:40:34.000Z |
import re
from termcolor import colored
# c = 'Objective: We investigated whether implantation of polylactic acid and epsilon-caprolactone copolymer (PLAC) cubes with or without basic fibroblast growth factor (b-FGF) released slowly from gelatin microspheres was able to induce fibrous tissue in the dead space remain... | 41.6 | 325 | 0.728846 |
import re
from termcolor import colored
def mark(title=None, content=None, sentence=None):
# title = colored(title, 'blue')
title = "\33[44m" + title + '\33[0m'
for s in sentence:
content = content.replace(s, "\33[33m" + s + "\33[0m")
pass
print(title)
print(content)
print("... | 274 | 0 | 23 |
11d2c2a073fa640934b4e572f12441d307fd4616 | 46 | py | Python | env/lib/python3.8/site-packages/IPython/utils/_sysinfo.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | null | null | null | env/lib/python3.8/site-packages/IPython/utils/_sysinfo.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | null | null | null | env/lib/python3.8/site-packages/IPython/utils/_sysinfo.py | mohnjahoney/website_source | edc86a869b90ae604f32e736d9d5ecd918088e6a | [
"MIT"
] | 1 | 2020-01-25T20:08:59.000Z | 2020-01-25T20:08:59.000Z | # GENERATED BY setup.py
commit = u"e508b6e4d"
| 15.333333 | 23 | 0.73913 | # GENERATED BY setup.py
commit = u"e508b6e4d"
| 0 | 0 | 0 |
afc39b63f51ff4eac5da936b6df311213eed6371 | 15,150 | py | Python | addresslib/parser.py | EncircleInc/addresslib | 00db37272f6d962ce4de6f26df46c1336057c789 | [
"Apache-2.0"
] | 1 | 2018-05-14T03:50:32.000Z | 2018-05-14T03:50:32.000Z | addresslib/parser.py | EncircleInc/addresslib | 00db37272f6d962ce4de6f26df46c1336057c789 | [
"Apache-2.0"
] | null | null | null | addresslib/parser.py | EncircleInc/addresslib | 00db37272f6d962ce4de6f26df46c1336057c789 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
"""
_AddressParser is an implementation of a recursive descent parser for email
addresses and urls. While _AddressParser can be used directly it is not
recommended, use the the parse() method which is provided in the address
module for convenience.
The grammar supported by the parser (as well as other ... | 32.721382 | 82 | 0.600528 | # coding:utf-8
"""
_AddressParser is an implementation of a recursive descent parser for email
addresses and urls. While _AddressParser can be used directly it is not
recommended, use the the parse() method which is provided in the address
module for convenience.
The grammar supported by the parser (as well as other ... | 151 | 0 | 80 |
349cd8224fa1f9ee9b2e9dfb2aabe387ba192b91 | 375 | py | Python | set_pathparameters.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null | set_pathparameters.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null | set_pathparameters.py | tgquintela/Firms_locations | 476680cbc3eb1308811633d24810049e215101a0 | [
"MIT"
] | null | null | null |
"""
Path parameters
---------------
Parameters to set the precomputations in order to facilitate the computation
model tasks
"""
pathdata_in = '/home/antonio/Desktop/MSc Thesis/code/Data/raw_data/Testing'
pathdata = '/home/antonio/Desktop/MSc Thesis/code/Data/Data/Cleaned/FirmsData'
pathfolder = '/home/antonio/Deskt... | 26.785714 | 78 | 0.746667 |
"""
Path parameters
---------------
Parameters to set the precomputations in order to facilitate the computation
model tasks
"""
pathdata_in = '/home/antonio/Desktop/MSc Thesis/code/Data/raw_data/Testing'
pathdata = '/home/antonio/Desktop/MSc Thesis/code/Data/Data/Cleaned/FirmsData'
pathfolder = '/home/antonio/Deskt... | 0 | 0 | 0 |
3bb00424786be9192a7ff4a675cf41b76a72a38a | 85 | py | Python | config.py | Victoria1807/Telegram-Bot-Translator | 92d6919c31cb0b59b312e8d5554a7a90d084c776 | [
"MIT"
] | null | null | null | config.py | Victoria1807/Telegram-Bot-Translator | 92d6919c31cb0b59b312e8d5554a7a90d084c776 | [
"MIT"
] | 1 | 2021-06-01T22:14:29.000Z | 2021-06-01T22:14:29.000Z | config.py | Victoria1807/Telegram-Bot-Translator | 92d6919c31cb0b59b312e8d5554a7a90d084c776 | [
"MIT"
] | 2 | 2020-11-21T11:51:23.000Z | 2020-12-02T16:13:07.000Z | telegram_token = # your telegram token
yandex_token = # your yandex-translator token
| 28.333333 | 45 | 0.8 | telegram_token = # your telegram token
yandex_token = # your yandex-translator token
| 0 | 0 | 0 |
ed2b3a9088cb881cec24c1ec819b0f293b01a487 | 6,867 | py | Python | hess/utils.py | g-benton/hessian-eff-dim | ed2431bc30d3233258bb7147b1c8fdc85c7bf1f0 | [
"Apache-2.0"
] | 34 | 2020-03-05T01:43:29.000Z | 2022-03-20T04:23:00.000Z | hess/utils.py | g-benton/hessian-eff-dim | ed2431bc30d3233258bb7147b1c8fdc85c7bf1f0 | [
"Apache-2.0"
] | 3 | 2020-05-19T16:28:34.000Z | 2022-01-13T14:17:02.000Z | hess/utils.py | g-benton/hessian-eff-dim | ed2431bc30d3233258bb7147b1c8fdc85c7bf1f0 | [
"Apache-2.0"
] | 5 | 2020-03-10T03:15:30.000Z | 2021-09-30T17:57:56.000Z | import torch
import time
import numpy as np
import hess
from torch import nn
import torch.nn.functional as F
from torch.autograd import Variable
from gpytorch.utils.lanczos import lanczos_tridiag, lanczos_tridiag_to_diag
################################################################################
# ... | 37.52459 | 87 | 0.555556 | import torch
import time
import numpy as np
import hess
from torch import nn
import torch.nn.functional as F
from torch.autograd import Variable
from gpytorch.utils.lanczos import lanczos_tridiag, lanczos_tridiag_to_diag
def unflatten_like(vector, likeTensorList):
# Takes a flat torch.tensor and unflattens it to ... | 3,336 | 0 | 92 |
db4db323175f6d5515e0d69ac5731e2c14ea3405 | 548 | py | Python | languages/python/src/concepts/P008_ControlConstruct_Switch_Simulated.py | vikash-india/DeveloperNotes2Myself | fe277a3c52f73884863f2f72b237365b27a8c882 | [
"MIT"
] | 2 | 2019-05-25T10:09:00.000Z | 2022-03-11T09:06:23.000Z | languages/python/src/concepts/P008_ControlConstruct_Switch_Simulated.py | vikash-india/DeveloperNotes2Myself | fe277a3c52f73884863f2f72b237365b27a8c882 | [
"MIT"
] | 2 | 2020-03-31T04:30:17.000Z | 2020-10-30T07:54:28.000Z | languages/python/src/concepts/P008_ControlConstruct_Switch_Simulated.py | vikash-india/DeveloperNotes2Myself | fe277a3c52f73884863f2f72b237365b27a8c882 | [
"MIT"
] | 4 | 2019-07-12T13:18:56.000Z | 2021-11-17T08:04:55.000Z | # Description: Switch Case (SIMULATED in Python)
# Note
# 1. There is NO switch statement in python.
# 2. A dictionary can be used to simulate switch case in python.
# 3. This style is also called loop-and-a-half.
print(switch('b'))
| 28.842105 | 110 | 0.684307 | # Description: Switch Case (SIMULATED in Python)
# Note
# 1. There is NO switch statement in python.
# 2. A dictionary can be used to simulate switch case in python.
# 3. This style is also called loop-and-a-half.
def switch(argument):
case = {
'a': 1,
'b': 2,
}
# The get() method of dict... | 290 | 0 | 23 |
89003675f027e82bbb6818df8a0c08a1fc544370 | 7,201 | py | Python | mytexaspower/mytexaspower.py | krisfield/MyTexasPower | 9d314fb1aac2335aae572da444d0e40148944d1b | [
"MIT"
] | 1 | 2017-09-06T16:33:38.000Z | 2017-09-06T16:33:38.000Z | mytexaspower/mytexaspower.py | krisfield/MyTexasPower | 9d314fb1aac2335aae572da444d0e40148944d1b | [
"MIT"
] | 3 | 2020-03-28T14:34:13.000Z | 2020-03-28T14:34:21.000Z | mytexaspower/mytexaspower.py | MyTexasPower/MyTexasPower | 9d314fb1aac2335aae572da444d0e40148944d1b | [
"MIT"
] | null | null | null | import csv
import json
import operator
import os
import sqlite3
import urllib.request
from raven import Client
from flask import Flask, request, session, g, redirect, make_response, url_for, abort, escape, render_template, flash, send_from_directory
from passwords import SENTRY_DSN
client = Client(SENTRY_DSN) #add de... | 33.337963 | 166 | 0.643661 | import csv
import json
import operator
import os
import sqlite3
import urllib.request
from raven import Client
from flask import Flask, request, session, g, redirect, make_response, url_for, abort, escape, render_template, flash, send_from_directory
from passwords import SENTRY_DSN
client = Client(SENTRY_DSN) #add de... | 2,530 | 0 | 221 |
05f412458d46155f6e15b0e8f99e4f992fcf7c28 | 2,416 | py | Python | pipeline_tools/tests/shared/submission/test_create_analysis_file.py | HumanCellAtlas/pipeline-tools | d9e22df56089a6b163901656e5ce9fa7d6420b48 | [
"BSD-3-Clause"
] | 5 | 2017-11-17T18:40:37.000Z | 2021-01-20T04:06:47.000Z | pipeline_tools/tests/shared/submission/test_create_analysis_file.py | HumanCellAtlas/pipeline-tools | d9e22df56089a6b163901656e5ce9fa7d6420b48 | [
"BSD-3-Clause"
] | 113 | 2017-12-08T18:18:06.000Z | 2021-10-12T15:10:07.000Z | pipeline_tools/tests/shared/submission/test_create_analysis_file.py | HumanCellAtlas/pipeline-tools | d9e22df56089a6b163901656e5ce9fa7d6420b48 | [
"BSD-3-Clause"
] | 3 | 2020-07-29T17:31:00.000Z | 2021-01-18T08:18:48.000Z | import os
import json
import pytest
import pipeline_tools.shared.submission.create_analysis_file as caf
from pathlib import Path
@pytest.fixture(scope='module')
@pytest.fixture
| 36.059701 | 143 | 0.715646 | import os
import json
import pytest
import pipeline_tools.shared.submission.create_analysis_file as caf
from pathlib import Path
@pytest.fixture(scope='module')
def test_data():
class Data:
project_level_input_uuid = "project=16ed4ad8-7319-46b2-8859-6fe1c1d73a82;library=10X 3 v2 sequencing;species=Homo s... | 2,046 | 44 | 142 |
3c1a44b627984e13c8bf7e7f387b40885b041c18 | 2,239 | py | Python | pipenv/patched/notpip/_internal/utils/egg_link.py | sthagen/pipenv | 0924f75fd1004c848ea67d4272315eda4210b352 | [
"MIT"
] | 23 | 2017-01-20T01:18:31.000Z | 2017-01-20T17:25:11.000Z | pipenv/patched/notpip/_internal/utils/egg_link.py | sthagen/pipenv | 0924f75fd1004c848ea67d4272315eda4210b352 | [
"MIT"
] | 1 | 2017-01-20T05:13:58.000Z | 2017-01-20T05:13:58.000Z | pipenv/patched/notpip/_internal/utils/egg_link.py | sthagen/pipenv | 0924f75fd1004c848ea67d4272315eda4210b352 | [
"MIT"
] | null | null | null | # The following comment should be removed at some point in the future.
# mypy: strict-optional=False
import os
import re
import sys
from typing import Optional
from pipenv.patched.notpip._internal.locations import site_packages, user_site
from pipenv.patched.notpip._internal.utils.virtualenv import (
running_unde... | 29.460526 | 78 | 0.684234 | # The following comment should be removed at some point in the future.
# mypy: strict-optional=False
import os
import re
import sys
from typing import Optional
from pipenv.patched.notpip._internal.locations import site_packages, user_site
from pipenv.patched.notpip._internal.utils.virtualenv import (
running_unde... | 0 | 0 | 0 |
05e0dc5b7fe387eb5658d5587af1257bbd60429c | 3,548 | py | Python | auction/users/views.py | Gliger13/auction_site | 0358dbdee1a41da1d68cb158bccadf54aad465dd | [
"MIT"
] | 1 | 2020-06-16T20:02:55.000Z | 2020-06-16T20:02:55.000Z | auction/users/views.py | Gliger13/auction_site | 0358dbdee1a41da1d68cb158bccadf54aad465dd | [
"MIT"
] | null | null | null | auction/users/views.py | Gliger13/auction_site | 0358dbdee1a41da1d68cb158bccadf54aad465dd | [
"MIT"
] | 2 | 2020-06-03T13:12:26.000Z | 2020-06-25T21:56:05.000Z | from django.contrib.auth import login, logout
from django.contrib.auth.decorators import login_required
from django.core.exceptions import NON_FIELD_ERRORS
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render, redirect
from users.forms import RegistrationForm, LoginForm, SettingsFo... | 31.678571 | 92 | 0.584273 | from django.contrib.auth import login, logout
from django.contrib.auth.decorators import login_required
from django.core.exceptions import NON_FIELD_ERRORS
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render, redirect
from users.forms import RegistrationForm, LoginForm, SettingsFo... | 3,003 | 0 | 135 |
2ae5374cea035f10ba91f826ce5f2f19ebfe491b | 95 | py | Python | true_house/activities/apps.py | gAmadorH/true-house-be | ffa95ffa1767f0eb8e024dd5e70ae7fe63ccdd4b | [
"MIT"
] | null | null | null | true_house/activities/apps.py | gAmadorH/true-house-be | ffa95ffa1767f0eb8e024dd5e70ae7fe63ccdd4b | [
"MIT"
] | null | null | null | true_house/activities/apps.py | gAmadorH/true-house-be | ffa95ffa1767f0eb8e024dd5e70ae7fe63ccdd4b | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 15.833333 | 34 | 0.768421 | from django.apps import AppConfig
class ActivitiesConfig(AppConfig):
name = "activities"
| 0 | 37 | 23 |
81c92f7d2a70f7835fadef57226db4fb1a6e902e | 11,793 | py | Python | diver/reviewer/evaluate_binary_classifiers.py | ClearScore/diver | ee3640af338a64ffbad9ad4b1b1c87063b4e4e63 | [
"MIT"
] | 1 | 2020-01-03T17:08:42.000Z | 2020-01-03T17:08:42.000Z | diver/reviewer/evaluate_binary_classifiers.py | DataScienceUnbound/diver | ee3640af338a64ffbad9ad4b1b1c87063b4e4e63 | [
"MIT"
] | null | null | null | diver/reviewer/evaluate_binary_classifiers.py | DataScienceUnbound/diver | ee3640af338a64ffbad9ad4b1b1c87063b4e4e63 | [
"MIT"
] | 1 | 2020-10-26T15:42:35.000Z | 2020-10-26T15:42:35.000Z | ####################
# Import libraries #
####################
# standard numerical libraries
import numpy as np
import pandas as pd
# Plotting libraries
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
# Sklearn model evaluation
from sklearn.metrics import accuracy_... | 34.787611 | 206 | 0.651827 | ####################
# Import libraries #
####################
# standard numerical libraries
import numpy as np
import pandas as pd
# Plotting libraries
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
# Sklearn model evaluation
from sklearn.metrics import accuracy_... | 0 | 0 | 0 |
738af6df11840f0140881d5dad6589ed10adce25 | 1,028 | py | Python | update.py | marcus-grant/binder | 394f7b9de7f50bbc2fd9d3626365407c1566be20 | [
"MIT"
] | null | null | null | update.py | marcus-grant/binder | 394f7b9de7f50bbc2fd9d3626365407c1566be20 | [
"MIT"
] | null | null | null | update.py | marcus-grant/binder | 394f7b9de7f50bbc2fd9d3626365407c1566be20 | [
"MIT"
] | null | null | null | #!/bin/env python
# used to update all local and remote references into this bin folder
import subprocess
GITHUB_SSH_BASE_URL = 'git@github.com:'
GITHUB_HTTPS_BASE_URL = 'https://github.com/'
if __name__ == "__main__":
UPDATE_QUEUE = [
intro_msg,
clone_go_buffer_repo,
]
for update_acti... | 27.052632 | 79 | 0.679961 | #!/bin/env python
# used to update all local and remote references into this bin folder
import subprocess
GITHUB_SSH_BASE_URL = 'git@github.com:'
GITHUB_HTTPS_BASE_URL = 'https://github.com/'
def intro_msg():
msg = "For the binder to work..."
msg += "\nexternal and internal repos need to be linked to.\n"
... | 562 | 0 | 69 |
ce47359382dcb779c3de1650e35c093edd3d2b23 | 3,720 | py | Python | onmt/translate/penalties.py | kanghj/OpenNMT-py | 759d5b5a663ee8de3da781ba57f19b3873024753 | [
"MIT"
] | null | null | null | onmt/translate/penalties.py | kanghj/OpenNMT-py | 759d5b5a663ee8de3da781ba57f19b3873024753 | [
"MIT"
] | null | null | null | onmt/translate/penalties.py | kanghj/OpenNMT-py | 759d5b5a663ee8de3da781ba57f19b3873024753 | [
"MIT"
] | null | null | null | from __future__ import division
import torch
class PenaltyBuilder(object):
"""Returns the Length and Coverage Penalty function for Beam Search.
Args:
length_pen (str): option name of length pen
cov_pen (str): option name of cov pen
Attributes:
has_cov_pen (bool): Whether coverage... | 36.116505 | 78 | 0.614516 | from __future__ import division
import torch
class PenaltyBuilder(object):
"""Returns the Length and Coverage Penalty function for Beam Search.
Args:
length_pen (str): option name of length pen
cov_pen (str): option name of cov pen
Attributes:
has_cov_pen (bool): Whether coverage... | 1,013 | 0 | 107 |
3f8288e09a35e04cacbea328128047688348e978 | 1,120 | py | Python | lib/spack/spack/cmd/undevelop.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-03-05T10:54:32.000Z | 2021-03-05T14:14:52.000Z | lib/spack/spack/cmd/undevelop.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 32 | 2020-12-15T17:29:20.000Z | 2022-03-21T15:08:31.000Z | lib/spack/spack/cmd/undevelop.py | padamson/spack | d3f67a48552691b4846ccc4a10f76740b154090c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-07-19T20:31:27.000Z | 2021-07-19T21:14:14.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.environment as e... | 28 | 73 | 0.666071 | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.environment as e... | 660 | 0 | 46 |
474fcf280dbf03b56feb3415571b83327f69f782 | 726,435 | py | Python | SDK/bindings/webservice/python/lib/VirtualBox_wrappers.py | dgomez10/xanon | 540bdf0229f53652591e593cf057a0c9e04e2dc8 | [
"Apache-2.0"
] | null | null | null | SDK/bindings/webservice/python/lib/VirtualBox_wrappers.py | dgomez10/xanon | 540bdf0229f53652591e593cf057a0c9e04e2dc8 | [
"Apache-2.0"
] | null | null | null | SDK/bindings/webservice/python/lib/VirtualBox_wrappers.py | dgomez10/xanon | 540bdf0229f53652591e593cf057a0c9e04e2dc8 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2008-2011 Oracle Corporation
#
# This file is part of a free software library; you can redistribute
# it and/or modify it under the terms of the GNU Lesser General
# Public License version 2.1 as published by the Free Software
# Foundation and shipped in the "COPYING.LIB" file with this library.
# The l... | 30.914759 | 1,797 | 0.648848 | # Copyright (C) 2008-2011 Oracle Corporation
#
# This file is part of a free software library; you can redistribute
# it and/or modify it under the terms of the GNU Lesser General
# Public License version 2.1 as published by the Free Software
# Foundation and shipped in the "COPYING.LIB" file with this library.
# The l... | 558,662 | 154,473 | 12,171 |
7f4193f4a4b777b443dfcde644be10002291cc29 | 2,602 | py | Python | member/migrations/0002_auto_20161225_2216.py | kaqfa/supervise_backend | 0d3e57648f96c943e6f5f2da1276386acdc95b3f | [
"Apache-2.0"
] | null | null | null | member/migrations/0002_auto_20161225_2216.py | kaqfa/supervise_backend | 0d3e57648f96c943e6f5f2da1276386acdc95b3f | [
"Apache-2.0"
] | null | null | null | member/migrations/0002_auto_20161225_2216.py | kaqfa/supervise_backend | 0d3e57648f96c943e6f5f2da1276386acdc95b3f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-25 15:16
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 36.647887 | 144 | 0.578401 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-25 15:16
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('member', '0001_initial'),
]
operations = [
... | 0 | 2,390 | 23 |
81549e03d091f7c52002d88965685cd29b30b2d6 | 3,884 | py | Python | alerta/common/mail.py | MailOnline/alerta | 225da305485c43c49d6803f740d36cbf1bfb42be | [
"Apache-2.0"
] | null | null | null | alerta/common/mail.py | MailOnline/alerta | 225da305485c43c49d6803f740d36cbf1bfb42be | [
"Apache-2.0"
] | null | null | null | alerta/common/mail.py | MailOnline/alerta | 225da305485c43c49d6803f740d36cbf1bfb42be | [
"Apache-2.0"
] | null | null | null |
import os
import sys
import smtplib
import socket
import urllib2
import datetime
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from alerta.common import log as logging
from alerta.common import config
LOG = logging.getLogger(__name__)
CONF... | 32.915254 | 120 | 0.567199 |
import os
import sys
import smtplib
import socket
import urllib2
import datetime
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from alerta.common import log as logging
from alerta.common import config
LOG = logging.getLogger(__name__)
CONF... | 3,296 | 226 | 23 |
bb0cf19e041e8f340d5b5f83af9ff437756dc102 | 1,906 | py | Python | Chinese-Handbook/Sec01-Elasticity/example-01-plate-unixial-tensile/example-01-plate-unixial-tensile.py | polossk/Peridynamics-Example-Using-HMSolver | cc13a96db0257f9db19ec32131cc72ff43bda3b8 | [
"MIT"
] | 2 | 2021-05-10T05:57:59.000Z | 2021-05-10T09:50:06.000Z | Chinese-Handbook/Sec01-Elasticity/example-01-plate-unixial-tensile/example-01-plate-unixial-tensile.py | polossk/Peridynamics-Example-Using-HMSolver | cc13a96db0257f9db19ec32131cc72ff43bda3b8 | [
"MIT"
] | null | null | null | Chinese-Handbook/Sec01-Elasticity/example-01-plate-unixial-tensile/example-01-plate-unixial-tensile.py | polossk/Peridynamics-Example-Using-HMSolver | cc13a96db0257f9db19ec32131cc72ff43bda3b8 | [
"MIT"
] | null | null | null | import numpy as np
import time
from hmsolver.meshgrid import Zone2d
from hmsolver.meshgrid import Mesh2d
from hmsolver.material import Material2d
from hmsolver.femcore import point_criteria
from hmsolver.femcore import segment_criteria
from hmsolver.femcore import boundary_cond2d as _bc_ # abbreviation
from hmsolver.... | 34.654545 | 70 | 0.71511 | import numpy as np
import time
from hmsolver.meshgrid import Zone2d
from hmsolver.meshgrid import Mesh2d
from hmsolver.material import Material2d
from hmsolver.femcore import point_criteria
from hmsolver.femcore import segment_criteria
from hmsolver.femcore import boundary_cond2d as _bc_ # abbreviation
from hmsolver.... | 0 | 0 | 0 |
349da6effb28af25ebc223f09810153ec14e1cd7 | 97,080 | py | Python | pysnmp-with-texts/RUCKUS-ZD-WLAN-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/RUCKUS-ZD-WLAN-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/RUCKUS-ZD-WLAN-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 RUCKUS-ZD-WLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RUCKUS-ZD-WLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:59:17 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 125.914397 | 13,859 | 0.792707 | #
# PySNMP MIB module RUCKUS-ZD-WLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RUCKUS-ZD-WLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:59:17 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 0 | 0 | 0 |
99756af1d67067b357efba2fbb42c19e774d8cbd | 1,115 | py | Python | lcutil/util_db.py | lcordier/lcutil | 65f9d31d9e4c52411b42e39f987eecfa8a67c571 | [
"MIT"
] | null | null | null | lcutil/util_db.py | lcordier/lcutil | 65f9d31d9e4c52411b42e39f987eecfa8a67c571 | [
"MIT"
] | null | null | null | lcutil/util_db.py | lcordier/lcutil | 65f9d31d9e4c52411b42e39f987eecfa8a67c571 | [
"MIT"
] | null | null | null | """ General database functions.
Should work with DB API 2.0 cursors, tested with psycopg2.
https://www.python.org/dev/peps/pep-0249/
"""
def as_dicts(cursor):
""" Return a list of dictionaries from a result-set.
"""
fields = [k[0] for k in cursor.description]
result = []
rows = cursor.fet... | 26.547619 | 70 | 0.623318 | """ General database functions.
Should work with DB API 2.0 cursors, tested with psycopg2.
https://www.python.org/dev/peps/pep-0249/
"""
def as_dicts(cursor):
""" Return a list of dictionaries from a result-set.
"""
fields = [k[0] for k in cursor.description]
result = []
rows = cursor.fet... | 0 | 0 | 0 |
c48d259de39d6732fbcdafc30f98a066cc31010e | 5,772 | py | Python | example.py | ktanushree/sdk-python | e11c4f84c68ce2c30ad9fa5feac76696eaf7dfaa | [
"MIT"
] | 24 | 2017-12-20T18:46:09.000Z | 2021-07-01T07:37:10.000Z | example.py | ktanushree/sdk-python | e11c4f84c68ce2c30ad9fa5feac76696eaf7dfaa | [
"MIT"
] | 7 | 2018-02-09T23:26:43.000Z | 2021-11-02T01:27:09.000Z | example.py | ktanushree/sdk-python | e11c4f84c68ce2c30ad9fa5feac76696eaf7dfaa | [
"MIT"
] | 8 | 2020-10-13T01:41:44.000Z | 2022-01-24T22:14:50.000Z | #!/usr/bin/env python
"""
CGNX API -> list sites, example proof of concept.
**Author:** CloudGenix
**Copyright:** (c) 2017-2021 CloudGenix, Inc
**License:** MIT
"""
__author__ = "CloudGenix Developer Support <developers@cloudgenix.com>"
__email__ = "developers@cloudgenix.com"
__copyright__ = "Copyright (c) 2017-2021... | 39 | 116 | 0.636694 | #!/usr/bin/env python
"""
CGNX API -> list sites, example proof of concept.
**Author:** CloudGenix
**Copyright:** (c) 2017-2021 CloudGenix, Inc
**License:** MIT
"""
__author__ = "CloudGenix Developer Support <developers@cloudgenix.com>"
__email__ = "developers@cloudgenix.com"
__copyright__ = "Copyright (c) 2017-2021... | 0 | 0 | 0 |