hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
574d913190a685e09ec510612cf6538d5b689ad0 | 2,203 | py | Python | Dilation.py | gmagannaDevelop/MorphoImg | 751985a430f3ab9f8ded7a18fdeb2eb41cb112e5 | [
"MIT"
] | 1 | 2019-11-18T14:54:11.000Z | 2019-11-18T14:54:11.000Z | Dilation.py | gmagannaDevelop/MorphoImg | 751985a430f3ab9f8ded7a18fdeb2eb41cb112e5 | [
"MIT"
] | 7 | 2020-03-24T17:49:09.000Z | 2022-01-13T01:51:33.000Z | Dilation.py | gmagannaDevelop/MorphoImg | 751985a430f3ab9f8ded7a18fdeb2eb41cb112e5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[31]:
from functools import reduce
import matplotlib.pyplot as plt
import matplotlib.image as img
import numpy as np
import cv2 as cv
# In[2]:
# User-defined functions, utils module found in the same directory as Erosion.ipynb
from utils import binarise, side_by_side
... | 12.517045 | 121 | 0.639128 | #!/usr/bin/env python
# coding: utf-8
# In[31]:
from typing import Optional, Callable, Tuple, List, NoReturn
from functools import partial, reduce
import matplotlib.pyplot as plt
import matplotlib.image as img
import numpy as np
import cv2 as cv
import PIL as pil
# In[2]:
# User-defined functions, utils module... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 45 |
3ece990d3b54f8ff05c83892af36a81d65bbf73f | 11,159 | py | Python | python3/knapsack/greedyNdKnapsack.py | CostaBru/knapsack | cdd95de759c20b0cdeef4064fbbed10df1ab76d0 | [
"MIT"
] | 1 | 2021-03-06T16:38:28.000Z | 2021-03-06T16:38:28.000Z | python3/knapsack/greedyNdKnapsack.py | CostaBru/knapsack | cdd95de759c20b0cdeef4064fbbed10df1ab76d0 | [
"MIT"
] | null | null | null | python3/knapsack/greedyNdKnapsack.py | CostaBru/knapsack | cdd95de759c20b0cdeef4064fbbed10df1ab76d0 | [
"MIT"
] | null | null | null | """
Copyright Jun 2021 Konstantin Briukhnov (kooltew at gmail.com) (@CostaBru). San-Francisco Bay Area.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limit... | 42.919231 | 268 | 0.605879 | """
Copyright Jun 2021 Konstantin Briukhnov (kooltew at gmail.com) (@CostaBru). San-Francisco Bay Area.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limit... | 0 | 0 | 0 | 9,631 | 0 | 0 | 0 | 104 | 292 |
9b8ecd42d65fa34b19512883a8983cf4b50cb5cb | 6,962 | py | Python | S13/deployment/ETESR/model.py | pankaj90382/TSAI-2 | af4b3543dfb206fb1cc2bd166ed31e9ea7bd3778 | [
"MIT"
] | null | null | null | S13/deployment/ETESR/model.py | pankaj90382/TSAI-2 | af4b3543dfb206fb1cc2bd166ed31e9ea7bd3778 | [
"MIT"
] | 9 | 2021-06-08T22:18:08.000Z | 2022-03-12T00:46:43.000Z | S13/deployment/ETESR/model.py | pankaj90382/TSAI-2 | af4b3543dfb206fb1cc2bd166ed31e9ea7bd3778 | [
"MIT"
] | 1 | 2020-10-12T17:13:35.000Z | 2020-10-12T17:13:35.000Z | import torch.nn as nn
import torch.utils.data as data
import torch.optim as optim
text_transform = TextTransform()
| 33.471154 | 125 | 0.586326 | import torch
import torch.nn as nn
import torch.utils.data as data
import torch.optim as optim
import torch.nn.functional as F
import torchaudio
class TextTransform:
"""Maps characters to integers and vice versa"""
def __init__(self):
char_map_str = """
' 0
<SPACE> 1
... | 0 | 0 | 0 | 4,947 | 0 | 1,590 | 0 | -3 | 300 |
2965a0c80b2671a72e657104596c8c9acf7af8ce | 87,018 | py | Python | androguard/core/resources/public.py | tantran1999/Android-Malware-Detection | e89e4752cd4ded2d71c27af34d4b36946dbd6e0f | [
"MIT"
] | 2 | 2020-12-01T19:13:23.000Z | 2021-03-17T08:54:10.000Z | androguard/core/resources/public.py | tantran1999/Android-Malware-Detection | e89e4752cd4ded2d71c27af34d4b36946dbd6e0f | [
"MIT"
] | null | null | null | androguard/core/resources/public.py | tantran1999/Android-Malware-Detection | e89e4752cd4ded2d71c27af34d4b36946dbd6e0f | [
"MIT"
] | null | null | null | resources = {
'style': {
'Animation' : 16973824,
'Animation.Activity' : 16973825,
'Animation.Dialog' : 16973826,
'Animation.InputMethod' : 16973910,
'Animation.Toast' : 16973828,
'Animation.Translucent' : 16973827,
'DeviceDefault.ButtonBar' : 16974287,
... | 44.947314 | 85 | 0.644051 | resources = {
'style': {
'Animation' : 16973824,
'Animation.Activity' : 16973825,
'Animation.Dialog' : 16973826,
'Animation.InputMethod' : 16973910,
'Animation.Toast' : 16973828,
'Animation.Translucent' : 16973827,
'DeviceDefault.ButtonBar' : 16974287,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d04cc6df4bc2c6680f882e969a37c77d253e0edb | 1,146 | py | Python | ChannelLogger.py | habu1010/gridbug-discord-bot | 81e445d7711b82574d30ccebbbddadc8adba075e | [
"MIT"
] | 1 | 2021-01-23T15:06:27.000Z | 2021-01-23T15:06:27.000Z | ChannelLogger.py | habu1010/gridbug-discord-bot | 81e445d7711b82574d30ccebbbddadc8adba075e | [
"MIT"
] | 12 | 2021-02-03T08:29:44.000Z | 2022-02-13T14:50:35.000Z | ChannelLogger.py | habu1010/gridbug-discord-bot | 81e445d7711b82574d30ccebbbddadc8adba075e | [
"MIT"
] | null | null | null | import logging
| 29.384615 | 98 | 0.685864 | import asyncio
import logging
import logging.handlers
import discord
from discord.ext import commands, tasks
class ChannelLogger(commands.Cog):
def __init__(self, bot: commands.Bot, bot_config: dict):
self._bot = bot
self._logging_queue = asyncio.Queue()
logger = logging.getLogger()
... | 0 | 239 | 145 | 565 | 0 | 39 | 0 | 6 | 135 |
77127d496d0c63d976c793da0625cd048509dd2b | 383 | py | Python | text_similarity/main.py | haiderstats/text-similarity | b0a18c31ac4132f600004adf097697a61ac54eb5 | [
"CC0-1.0"
] | 4 | 2021-06-17T12:46:21.000Z | 2022-01-10T18:44:26.000Z | text_similarity/main.py | haiderstats/text-similarity | b0a18c31ac4132f600004adf097697a61ac54eb5 | [
"CC0-1.0"
] | null | null | null | text_similarity/main.py | haiderstats/text-similarity | b0a18c31ac4132f600004adf097697a61ac54eb5 | [
"CC0-1.0"
] | null | null | null |
from fastapi import FastAPI
app = FastAPI()
| 21.277778 | 76 | 0.699739 | from typing import Dict
from fastapi import FastAPI, Query
from text_similarity.similarity import Texts
app = FastAPI()
@app.post("/similarity")
def text_similarity(
texts: Texts,
ngram_limit: int = Query(
3, description="The highest ngram used for comparision.", ge=1, le=5
),
) -> Dict[str, fl... | 0 | 236 | 0 | 0 | 0 | 0 | 0 | 32 | 68 |
f2756eca852c41fc3a17a4de7a36eb1528d26c22 | 77 | py | Python | hello.py | helloprasanna/python | 1f218ddf84bc082dca5906833238389011ae344b | [
"MIT"
] | null | null | null | hello.py | helloprasanna/python | 1f218ddf84bc082dca5906833238389011ae344b | [
"MIT"
] | null | null | null | hello.py | helloprasanna/python | 1f218ddf84bc082dca5906833238389011ae344b | [
"MIT"
] | null | null | null | """Hello World for python."""
a = 3
print(a)
print(a, ' helloworld number')
| 12.833333 | 30 | 0.636364 | """Hello World for python."""
a = 3
print(a)
print(a, ' helloworld number')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8aaba90b69e7591913e474723e3136553c765651 | 10,632 | py | Python | plugins/_Pre_Process/_Create_Dataset/create_shuffle_dataset/fashion_mnist/create_fashion_mnist_csv.py | isabella232/nnc-plugin | 3bc71266696d0341e5e9a2ff2020980700f28719 | [
"Apache-2.0"
] | 7 | 2021-09-04T13:10:07.000Z | 2022-03-21T08:51:45.000Z | plugins/_Pre_Process/_Create_Dataset/create_shuffle_dataset/fashion_mnist/create_fashion_mnist_csv.py | isabella232/nnc-plugin | 3bc71266696d0341e5e9a2ff2020980700f28719 | [
"Apache-2.0"
] | 1 | 2021-11-15T04:39:34.000Z | 2021-11-19T08:09:42.000Z | plugins/_Pre_Process/_Create_Dataset/create_shuffle_dataset/fashion_mnist/create_fashion_mnist_csv.py | isabella232/nnc-plugin | 3bc71266696d0341e5e9a2ff2020980700f28719 | [
"Apache-2.0"
] | 1 | 2022-03-25T16:52:05.000Z | 2022-03-25T16:52:05.000Z | # Copyright 2021 Sony Group Corporation.
#
# 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 ... | 32.316109 | 132 | 0.605813 | # Copyright 2021 Sony Group Corporation.
#
# 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 ... | 0 | 279 | 0 | 2,726 | 0 | 3,156 | 0 | -12 | 247 |
96264eefbcc71d8bbbe887923f0da92571272ddf | 1,640 | py | Python | dino/utils/handlers.py | thenetcircle/dino | 1047c3458e91a1b4189e9f48f1393b3a68a935b3 | [
"Apache-2.0"
] | 150 | 2016-10-05T11:09:36.000Z | 2022-03-06T16:24:41.000Z | dino/utils/handlers.py | thenetcircle/dino | 1047c3458e91a1b4189e9f48f1393b3a68a935b3 | [
"Apache-2.0"
] | 27 | 2017-03-02T03:37:02.000Z | 2022-02-10T04:59:54.000Z | dino/utils/handlers.py | thenetcircle/dino | 1047c3458e91a1b4189e9f48f1393b3a68a935b3 | [
"Apache-2.0"
] | 21 | 2016-11-11T07:51:48.000Z | 2020-04-26T21:38:33.000Z | #!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 27.79661 | 74 | 0.646951 | #!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 0 | 0 | 0 | 983 | 0 | 0 | 0 | -8 | 46 |
d36b0c4d3e977cd2d94ae76b9ab736a7585a4e6b | 1,408 | py | Python | e2e/Vectors/Generation/Consensus/MeritRemoval/Multiple.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 66 | 2019-01-14T08:39:52.000Z | 2022-01-06T11:39:15.000Z | e2e/Vectors/Generation/Consensus/MeritRemoval/Multiple.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 228 | 2019-01-16T15:42:44.000Z | 2022-02-05T07:48:07.000Z | e2e/Vectors/Generation/Consensus/MeritRemoval/Multiple.py | kayabaNerve/Currency | 260ebc20f1704f42ad6183fee39ad58ec6d07961 | [
"CC0-1.0"
] | 19 | 2019-01-14T08:53:04.000Z | 2021-11-03T20:19:28.000Z | import json
from e2e.Libs.BLS import PrivateKey, PublicKey
from e2e.Classes.Consensus.DataDifficulty import SignedDataDifficulty
from e2e.Classes.Consensus.MeritRemoval import SignedMeritRemoval
from e2e.Vectors.Generation.PrototypeChain import PrototypeChain
proto: PrototypeChain = PrototypeChain(1, False)
blsPri... | 34.341463 | 78 | 0.810369 | import json
from e2e.Libs.BLS import PrivateKey, PublicKey
from e2e.Classes.Consensus.DataDifficulty import SignedDataDifficulty
from e2e.Classes.Consensus.MeritRemoval import SignedMeritRemoval
from e2e.Vectors.Generation.PrototypeChain import PrototypeChain
proto: PrototypeChain = PrototypeChain(1, False)
blsPri... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
01122030ff57d9377ddf61352858ba09c5197d30 | 139 | py | Python | blog/urls.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | blog/urls.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | blog/urls.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import blog
urlpatterns = [
path('', blog, name='blog'),
]
| 15.444444 | 32 | 0.705036 | from django.contrib import admin
from django.urls import path
from .views import blog
urlpatterns = [
path('', blog, name='blog'),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 22 |
b34a1a7f59c7bf1d720c23f8b819112a2334aac4 | 1,506 | py | Python | code/snake_env.py | seahailang/LearningReinforcementLearning | f5b2425c352742440b3da0d428454fe29066129b | [
"MIT"
] | null | null | null | code/snake_env.py | seahailang/LearningReinforcementLearning | f5b2425c352742440b3da0d428454fe29066129b | [
"MIT"
] | null | null | null | code/snake_env.py | seahailang/LearningReinforcementLearning | f5b2425c352742440b3da0d428454fe29066129b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@version: 0.0
@author: hailang
@Email: seahailang@gmail.com
@software: PyCharm
@file: snake_env.py
@time: 2018/6/21 15:45
"""
if __name__ == '__main__':
s = SnakeEnv(10,[10]) | 22.818182 | 84 | 0.573705 | #!/usr/bin/env python
# encoding: utf-8
"""
@version: 0.0
@author: hailang
@Email: seahailang@gmail.com
@software: PyCharm
@file: snake_env.py
@time: 2018/6/21 15:45
"""
import numpy as np
import gym
from gym.spaces import Discrete
class SnakeEnv(gym.Env):
SIZE=100
def __init__(self,ladder_num,dices):
... | 177 | 0 | 0 | 1,136 | 0 | 0 | 0 | -4 | 90 |
dc0ceb405fac2cc1c20a9c0c0bcc6ae5f2dd07e9 | 134 | py | Python | Curso em video/Desafios1-20/Desafio6.py | Ry18-2003/Python-Journey | c926a733a578f3686767a1189bdccb4df137856d | [
"MIT"
] | null | null | null | Curso em video/Desafios1-20/Desafio6.py | Ry18-2003/Python-Journey | c926a733a578f3686767a1189bdccb4df137856d | [
"MIT"
] | null | null | null | Curso em video/Desafios1-20/Desafio6.py | Ry18-2003/Python-Journey | c926a733a578f3686767a1189bdccb4df137856d | [
"MIT"
] | null | null | null | n1 = int(input('Digite um nmero: '))
print(f'O dobro do nmero {n1} {n1*2} o seu triplo {n1*3} e sua raiz quadrada {n1**(1/2)}')
| 44.666667 | 95 | 0.626866 | n1 = int(input('Digite um número: '))
print(f'O dobro do número {n1} é {n1*2} o seu triplo {n1*3} e sua raiz quadrada é {n1**(1/2)}')
| 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
db29771268ea3ecddcf9d2fab597b5974c1769e6 | 532 | py | Python | testPython.py | nbcallah/Histogram-Sampler | 9360ea5c9923896a8ae63f5b7165f070645a8310 | [
"MIT"
] | null | null | null | testPython.py | nbcallah/Histogram-Sampler | 9360ea5c9923896a8ae63f5b7165f070645a8310 | [
"MIT"
] | null | null | null | testPython.py | nbcallah/Histogram-Sampler | 9360ea5c9923896a8ae63f5b7165f070645a8310 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import HistGen_py
import numpy
myHist = [100, 300, 300, 700, 900, 600, 400, 200, 300, 100]
myBins = ["infrared", "red", "orange", "yellow", "sour", "green", "teal", "blue", "violet", "ultraviolet"]
myTest = HistGen_py.HistGen(myHist)
for i in range(0,10):
index = myTest.genIndex(numpy.random.randi... | 38 | 106 | 0.695489 | #!/usr/bin/python
import HistGen_py
import numpy
myHist = [100, 300, 300, 700, 900, 600, 400, 200, 300, 100]
myBins = ["infrared", "red", "orange", "yellow", "sour", "green", "teal", "blue", "violet", "ultraviolet"]
myTest = HistGen_py.HistGen(myHist)
for i in range(0,10):
index = myTest.genIndex(numpy.random.randi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0fbe8b57c499b0a10f013e8738f4d89643439151 | 229 | py | Python | apronpy/cdll.py | caterinaurban/apronpy | 8a7e08e6929beeeeb97a9da648499be8c5d18bff | [
"MIT"
] | 7 | 2019-02-19T18:55:13.000Z | 2019-10-08T10:32:40.000Z | apronpy/cdll.py | caterinaurban/apronpy | 8a7e08e6929beeeeb97a9da648499be8c5d18bff | [
"MIT"
] | 3 | 2020-05-26T21:08:29.000Z | 2020-08-28T13:10:47.000Z | apronpy/cdll.py | caterinaurban/apronpy | 8a7e08e6929beeeeb97a9da648499be8c5d18bff | [
"MIT"
] | 1 | 2022-03-29T15:01:27.000Z | 2022-03-29T15:01:27.000Z | """
C DLLs
======
:Author: Caterina Urban
"""
from ctypes import util, CDLL
libc = CDLL(util.find_library('c'))
libapron = CDLL('libapron.so')
libgmp = CDLL(util.find_library('gmp'))
libmpfr = CDLL(util.find_library('mpfr'))
| 15.266667 | 41 | 0.676856 | """
C DLLs
======
:Author: Caterina Urban
"""
from ctypes import util, CDLL
libc = CDLL(util.find_library('c'))
libapron = CDLL('libapron.so')
libgmp = CDLL(util.find_library('gmp'))
libmpfr = CDLL(util.find_library('mpfr'))
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5586bd40bf6dcfef172e32da01af9f4807ea5a33 | 371 | py | Python | alphatwirl/nanoaod/EventBuilderConfig.py | benkrikler/alphatwirl | cda7d12fec21291ea33af23234fc08be19430934 | [
"BSD-3-Clause"
] | null | null | null | alphatwirl/nanoaod/EventBuilderConfig.py | benkrikler/alphatwirl | cda7d12fec21291ea33af23234fc08be19430934 | [
"BSD-3-Clause"
] | 7 | 2018-02-26T10:32:26.000Z | 2018-03-19T12:27:12.000Z | alphatwirl/nanoaod/EventBuilderConfig.py | benkrikler/alphatwirl | cda7d12fec21291ea33af23234fc08be19430934 | [
"BSD-3-Clause"
] | null | null | null | ##__________________________________________________________________||
import collections
##__________________________________________________________________||
EventBuilderConfig = collections.namedtuple(
'EventBuilderConfig',
'base component'
)
# base is for roottree.EventBuilderConfig
##__________________... | 28.538462 | 70 | 0.862534 | ##__________________________________________________________________||
import collections
##__________________________________________________________________||
EventBuilderConfig = collections.namedtuple(
'EventBuilderConfig',
'base component'
)
# base is for roottree.EventBuilderConfig
##__________________... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
12cab3794b847a73861f7c5ad2a6f0f5f9050205 | 5,289 | py | Python | laksyt/entities/kafka/poller.py | laksyt/lks-persister | 42d9c795343e41b75d1c1915e835446e32c2fa40 | [
"MIT"
] | null | null | null | laksyt/entities/kafka/poller.py | laksyt/lks-persister | 42d9c795343e41b75d1c1915e835446e32c2fa40 | [
"MIT"
] | null | null | null | laksyt/entities/kafka/poller.py | laksyt/lks-persister | 42d9c795343e41b75d1c1915e835446e32c2fa40 | [
"MIT"
] | null | null | null | import logging
from laksyt.config.config import Config
from laksyt.entities.kafka.consumer import get_kafka_consumer
from laksyt.entities.kafka.schedule import get_schedule
logger = logging.getLogger(__name__)
def get_kafka_poller(config: Config) -> KafkaPoller:
"""Extracts and validates Kafka consumer parame... | 35.496644 | 80 | 0.633012 | import asyncio
import logging
from dataclasses import dataclass
from typing import Optional
from kafka import KafkaConsumer
from kafka.errors import KafkaError
from laksyt.config.config import Config
from laksyt.entities.kafka.consumer import get_kafka_consumer
from laksyt.entities.kafka.schedule import Schedule, get... | 0 | 1,432 | 202 | 2,866 | 0 | 0 | 0 | 71 | 179 |
4b6f8bee9fa9d7aac526c896109c40567beae7a8 | 2,794 | py | Python | mvrss/learners/initializer.py | valeoai/MVRSS | 368c2c892d8e6076c59cb21fd1056d472887990d | [
"Apache-2.0"
] | 24 | 2021-05-19T02:38:48.000Z | 2022-03-28T09:19:15.000Z | mvrss/learners/initializer.py | xuqinwang/MVRSS | 368c2c892d8e6076c59cb21fd1056d472887990d | [
"Apache-2.0"
] | 1 | 2021-07-17T01:54:53.000Z | 2021-09-13T10:34:06.000Z | mvrss/learners/initializer.py | xuqinwang/MVRSS | 368c2c892d8e6076c59cb21fd1056d472887990d | [
"Apache-2.0"
] | 6 | 2021-06-02T09:14:04.000Z | 2022-03-02T15:21:44.000Z | """Initializer class to prepare training"""
| 35.367089 | 93 | 0.618826 | """Initializer class to prepare training"""
import json
from torch.utils.data import DataLoader
from mvrss.utils.paths import Paths
from mvrss.loaders.dataset import Carrada
from mvrss.loaders.dataloaders import SequenceCarradaDataset
class Initializer:
"""Class to prepare training model
PARAMETERS
----... | 0 | 0 | 0 | 2,534 | 0 | 0 | 0 | 81 | 134 |
f302fb50c34cca6ae19d61421d07a3441abffc5d | 1,858 | py | Python | pdc/apps/osbs/signals.py | tzhaoredhat/automation | a1867dc2d3591fdae1fa7f80d457c25f9705070e | [
"MIT"
] | 18 | 2015-12-15T17:56:18.000Z | 2021-04-10T13:49:48.000Z | pdc/apps/osbs/signals.py | tzhaoredhat/automation | a1867dc2d3591fdae1fa7f80d457c25f9705070e | [
"MIT"
] | 303 | 2015-11-18T07:37:06.000Z | 2021-05-26T12:34:01.000Z | pdc/apps/osbs/signals.py | tzhaoredhat/automation | a1867dc2d3591fdae1fa7f80d457c25f9705070e | [
"MIT"
] | 27 | 2015-11-19T20:33:54.000Z | 2021-03-25T08:15:28.000Z | #
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
| 36.431373 | 79 | 0.738967 | #
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
import json
from django.dispatch import receiver
from django.db.models.signals import post_save
from . import models
from pdc.apps.component import signals as component_signals
from pdc.apps.component import m... | 0 | 1,440 | 0 | 0 | 0 | 0 | 0 | 103 | 203 |
1cfe73b68360a104ad108ff8ef1c4c995a3eb057 | 241 | py | Python | components/icdc-sheepdog/tests/integration/datadictwithobjid/utils.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | 2 | 2019-06-10T15:30:51.000Z | 2020-01-18T23:24:13.000Z | components/icdc-sheepdog/tests/utils.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | null | null | null | components/icdc-sheepdog/tests/utils.py | CBIIT/icdc-docker | 5dc78b96a8d885b3fa427c55b9cc19f4771910fa | [
"Apache-2.0"
] | 1 | 2022-03-31T09:52:46.000Z | 2022-03-31T09:52:46.000Z | import os
def read_file(filename):
"""Read the contents of a file in the tests directory."""
root_dir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(root_dir, filename), 'r') as f:
return f.read()
| 26.777778 | 61 | 0.66805 | import os
def read_file(filename):
"""Read the contents of a file in the tests directory."""
root_dir = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(root_dir, filename), 'r') as f:
return f.read()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
27cd2cb7ec28c5369648661a45650146484ef31f | 8,687 | py | Python | src/extract_holds.py | juangallostra/climbnet | 6ea48360b4501b40b24b3e6ff6182d1171d1ea9c | [
"Apache-2.0"
] | null | null | null | src/extract_holds.py | juangallostra/climbnet | 6ea48360b4501b40b24b3e6ff6182d1171d1ea9c | [
"Apache-2.0"
] | null | null | null | src/extract_holds.py | juangallostra/climbnet | 6ea48360b4501b40b24b3e6ff6182d1171d1ea9c | [
"Apache-2.0"
] | null | null | null | import os
from itertools import product
from PIL import Image
from os import walk
OUTPUT_IMAGE_EXTENSION = '.png'
INPUT_DIR = 'raw_images'
OUTPUT_DIR = 'processed_images'
# All this should better be refactored into a class
def segment_image_into_tiles(
filename,
tile_dimensions = (None, None),
dir_in = ... | 38.608889 | 137 | 0.657419 | import os
import json
from itertools import product
import numpy as np
from PIL import Image
from os import walk
import cv2
from detectron2 import model_zoo
from detectron2.config import get_cfg
from detectron2.data import DatasetCatalog
from detectron2.data import MetadataCatalog
from detectron2.data.datasets import... | 0 | 0 | 0 | 0 | 0 | 5,614 | 0 | 167 | 381 |
cceb19f18e4db1f1bc90595c42aabfc173275b59 | 5,083 | py | Python | vocabs/views.py | acdh-oeaw/vhioe | 83c8bce83d7cb21150f404409477d2cd1c7ee240 | [
"MIT"
] | 1 | 2017-10-17T10:05:44.000Z | 2017-10-17T10:05:44.000Z | vocabs/views.py | acdh-oeaw/cbab | 7cd25f057913dccf85f851e448b1dbc2c5f8d624 | [
"MIT"
] | 15 | 2017-10-17T09:57:10.000Z | 2021-12-13T19:48:46.000Z | vocabs/views.py | acdh-oeaw/thunau | 06e4d54f4553939ffba3c504088055c3807328c6 | [
"MIT"
] | 1 | 2017-11-09T11:18:24.000Z | 2017-11-09T11:18:24.000Z |
#####################################################
# ConceptScheme
#####################################################
###################################################
# SkosLabel
###################################################
| 29.725146 | 97 | 0.714539 | from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import r... | 0 | 883 | 0 | 2,968 | 0 | 0 | 0 | 384 | 587 |
ab1da09f99b9d7d70090d275398149f2669bd51b | 621 | py | Python | model_prefix/models.py | anx-abruckner/django-model-prefix | a5cabf1ac210b6358ea358b1d268d802114d85d4 | [
"MIT"
] | null | null | null | model_prefix/models.py | anx-abruckner/django-model-prefix | a5cabf1ac210b6358ea358b1d268d802114d85d4 | [
"MIT"
] | null | null | null | model_prefix/models.py | anx-abruckner/django-model-prefix | a5cabf1ac210b6358ea358b1d268d802114d85d4 | [
"MIT"
] | 1 | 2021-10-08T13:26:44.000Z | 2021-10-08T13:26:44.000Z | from django.db.models import options
from django.db.models.signals import class_prepared, pre_init
options.DEFAULT_NAMES = options.DEFAULT_NAMES + ('db_prefix',)
pre_init.connect(model_prefix)
class_prepared.connect(model_prefix)
| 28.227273 | 63 | 0.752013 | from django.conf import settings
from django.db.models import options
from django.db.models.signals import class_prepared, pre_init
options.DEFAULT_NAMES = options.DEFAULT_NAMES + ('db_prefix',)
def model_prefix(sender, **kwargs):
# Global defined prefix
prefix = getattr(settings, "DB_PREFIX", None)
# M... | 0 | 0 | 0 | 0 | 0 | 331 | 0 | 11 | 45 |
12d4d0256da740c2a3582b488dd59b67b7c4e8b1 | 636 | py | Python | qatrack/qa/migrations/0048_auto_20200102_1356.py | crcrewso/qatrackplus | b9da3bc542d9e3eca8b7291bb631d1c7255d528e | [
"MIT"
] | 20 | 2021-03-11T18:37:32.000Z | 2022-03-23T19:38:07.000Z | qatrack/qa/migrations/0048_auto_20200102_1356.py | crcrewso/qatrackplus | b9da3bc542d9e3eca8b7291bb631d1c7255d528e | [
"MIT"
] | 75 | 2021-02-12T02:37:33.000Z | 2022-03-29T20:56:16.000Z | qatrack/qa/migrations/0048_auto_20200102_1356.py | crcrewso/qatrackplus | b9da3bc542d9e3eca8b7291bb631d1c7255d528e | [
"MIT"
] | 5 | 2021-04-07T15:46:53.000Z | 2021-09-18T16:55:00.000Z | # Generated by Django 2.1.11 on 2020-01-02 18:56
| 30.285714 | 256 | 0.690252 | # Generated by Django 2.1.11 on 2020-01-02 18:56
from django.db import migrations, models
import qatrack.qatrack_core.fields
class Migration(migrations.Migration):
dependencies = [
('qa', '0047_fix_serialized_uploads'),
]
operations = [
migrations.AddField(
model_name='test... | 0 | 0 | 0 | 485 | 0 | 0 | 0 | 32 | 69 |
d1148f4d27190c9bffce4be88de4cecf1a8da8ad | 219 | py | Python | main.py | CS-Cafe/Rube-Goldberg-Machine | e66643e552ca41a3b51a9d8d22064465300d3bb6 | [
"MIT"
] | 1 | 2021-09-20T01:40:40.000Z | 2021-09-20T01:40:40.000Z | main.py | CS-Cafe/Rube-Goldberg-Machine | e66643e552ca41a3b51a9d8d22064465300d3bb6 | [
"MIT"
] | null | null | null | main.py | CS-Cafe/Rube-Goldberg-Machine | e66643e552ca41a3b51a9d8d22064465300d3bb6 | [
"MIT"
] | null | null | null | from pynput.keyboard import Key, Controller
import time
keyboard = Controller()
try:
while 1:
time.sleep(3)
keyboard.press(Key.alt)
keyboard.press(Key.f4)
except KeyboardInterrupt:
pass
| 18.25 | 43 | 0.675799 | from pynput.keyboard import Key, Controller
import time
keyboard = Controller()
try:
while 1:
time.sleep(3)
keyboard.press(Key.alt)
keyboard.press(Key.f4)
except KeyboardInterrupt:
pass
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5a668792bed1487d85ba503a8538660f4ba65b76 | 356 | py | Python | hysds/celery.py | hysds/hysds | 839d527114e115603ea0a2c4c1b7fe474f7b7b39 | [
"Apache-2.0"
] | 17 | 2018-04-30T17:53:23.000Z | 2021-11-10T18:24:24.000Z | hysds/celery.py | hysds/hysds | 839d527114e115603ea0a2c4c1b7fe474f7b7b39 | [
"Apache-2.0"
] | 54 | 2017-10-17T23:22:53.000Z | 2022-02-09T22:05:07.000Z | hysds/celery.py | hysds/hysds | 839d527114e115603ea0a2c4c1b7fe474f7b7b39 | [
"Apache-2.0"
] | 9 | 2018-01-13T01:07:21.000Z | 2021-02-25T21:21:43.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
from celery import Celery
app = Celery("hysds")
app.config_from_object("celeryconfig")
if __na... | 19.777778 | 39 | 0.817416 | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
from celery import Celery
app = Celery("hysds")
app.config_from_object("celeryconfig")
if __na... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
72d9061cbbb2486c49ca34fb4aa672a7b5f9438e | 7,762 | py | Python | audio_zen/inferencer/base_inferencer.py | ShkarupaDC/FullSubNet | 2aef8b656376a42fbf519e0020636a893b56c4f8 | [
"MIT"
] | 219 | 2020-12-19T02:22:23.000Z | 2022-03-31T13:38:47.000Z | audio_zen/inferencer/base_inferencer.py | ShkarupaDC/FullSubNet | 2aef8b656376a42fbf519e0020636a893b56c4f8 | [
"MIT"
] | 39 | 2021-01-25T06:51:43.000Z | 2022-03-15T22:35:13.000Z | audio_zen/inferencer/base_inferencer.py | ShkarupaDC/FullSubNet | 2aef8b656376a42fbf519e0020636a893b56c4f8 | [
"MIT"
] | 77 | 2020-12-19T13:08:08.000Z | 2022-03-28T06:48:27.000Z | import torch
if __name__ == '__main__':
ipt = torch.rand(10, 1, 257, 100)
opt = BaseInferencer._unfold_along_time(ipt, 30)
print(opt.shape) | 41.068783 | 128 | 0.643391 | from functools import partial
from pathlib import Path
import librosa
import numpy as np
import soundfile as sf
import toml
import torch
from torch.nn import functional
from torch.utils.data import DataLoader
from tqdm import tqdm
from audio_zen.acoustics.feature import stft, istft
from audio_zen.utils import initial... | 165 | 5,152 | 0 | 2,026 | 0 | 0 | 0 | 109 | 267 |
eba865e72fedda4b6e07ef427f423c883f1ecadc | 2,995 | py | Python | scalable_individual_tests/test/test_skiros2.py | ScalABLE40/scalable_tests | ce6bcd3343d360d05310b9d8d09328bdded0ec1e | [
"Apache-2.0"
] | null | null | null | scalable_individual_tests/test/test_skiros2.py | ScalABLE40/scalable_tests | ce6bcd3343d360d05310b9d8d09328bdded0ec1e | [
"Apache-2.0"
] | null | null | null | scalable_individual_tests/test/test_skiros2.py | ScalABLE40/scalable_tests | ce6bcd3343d360d05310b9d8d09328bdded0ec1e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
PKG = 'integration_tests'
NAME = 'test_integration_tm'
## A sample python unit test
if __name__ == '__main__':
import rostest
rostest.rosrun(PKG, NAME, 'test_skiros2.SuiteTest', sys.argv)
| 33.651685 | 101 | 0.674791 | #!/usr/bin/env python
import rospy
import sys
import unittest
import threading
from turtlesim.msg import Pose
from geometry_msgs.msg import Twist
from skiros2_skill.ros.skill_layer_interface import SkillLayerInterface
PKG = 'integration_tests'
NAME = 'test_integration_tm'
## A sample python unit test
class TestSkiro... | 0 | 326 | 0 | 2,203 | 0 | 0 | 0 | 53 | 177 |
03fcf7a942c07ded7389e9ed4024b7d2bbb377e4 | 4,884 | py | Python | scripts/process_adsorbates.py | krylea/ocp | 00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540 | [
"MIT"
] | null | null | null | scripts/process_adsorbates.py | krylea/ocp | 00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540 | [
"MIT"
] | null | null | null | scripts/process_adsorbates.py | krylea/ocp | 00fc1df29731d70ff1b5cf8e9323d1d2f1f8e540 | [
"MIT"
] | null | null | null |
ADS_DL_LINK = "https://dl.fbaipublicfiles.com/opencatalystproject/data/per_adsorbate_is2res/"
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--root_dir', type=str, default="adsorbate-data")
args = parser.parse_args()
process_a... | 32.56 | 109 | 0.668919 | from ocpmodels.preprocessing import AtomsToGraphs
from ocpmodels.datasets import SinglePointLmdbDataset, TrajectoryLmdbDataset
import ase.io
from ase.build import bulk
from ase.build import fcc100, add_adsorbate, molecule
from ase.constraints import FixAtoms
from ase.calculators.emt import EMT
from ase.optimize import ... | 0 | 0 | 0 | 0 | 0 | 3,944 | 0 | 83 | 511 |
e10c0d431f4e1a04c9d593c344afdd2132cd7d07 | 8,225 | py | Python | transferchannel/transferchannel.py | AAA3A-AAA3A/AAA3A-cogs | 076ff390610e2470a086bdae41647ee21f01c323 | [
"MIT"
] | 1 | 2022-03-17T02:06:37.000Z | 2022-03-17T02:06:37.000Z | transferchannel/transferchannel.py | AAA3A-AAA3A/AAA3A-cogs | 076ff390610e2470a086bdae41647ee21f01c323 | [
"MIT"
] | 2 | 2022-03-07T03:29:33.000Z | 2022-03-17T06:51:43.000Z | transferchannel/transferchannel.py | AAA3A-AAA3A/AAA3A-cogs | 076ff390610e2470a086bdae41647ee21f01c323 | [
"MIT"
] | 2 | 2021-11-24T19:31:55.000Z | 2022-01-02T06:34:22.000Z | from .AAA3A_utils.cogsutils import CogsUtils # isort:skip
from redbot.core import commands # isort:skip
from redbot.core.i18n import Translator # isort:skip
import typing # isort:skip
if CogsUtils().is_dpy2: # To remove
setattr(commands, 'Literal', typing.Literal)
# Credits:
# Thanks to TrustyJAID's... | 62.78626 | 299 | 0.643161 | from .AAA3A_utils.cogsutils import CogsUtils # isort:skip
from redbot.core import commands # isort:skip
from redbot.core.i18n import Translator, cog_i18n # isort:skip
from redbot.core.bot import Red # isort:skip
import discord # isort:skip
import typing # isort:skip
from .helpers import embed_from_msg
... | 0 | 6,302 | 0 | 281 | 0 | 0 | 0 | 49 | 173 |
3ae75d8b75ea2eb0be1ad6128bc5b65fc54e72ec | 1,159 | py | Python | server.py | Benjadahl/BenjaWorld | c07cd5bc0960db81d0462e87793ec1af7885c3fb | [
"Apache-2.0"
] | null | null | null | server.py | Benjadahl/BenjaWorld | c07cd5bc0960db81d0462e87793ec1af7885c3fb | [
"Apache-2.0"
] | null | null | null | server.py | Benjadahl/BenjaWorld | c07cd5bc0960db81d0462e87793ec1af7885c3fb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#Import packages
#Import local packages
import dbHandler as db
#Start flask app
app = Flask(__name__)
#Default index page
#The town page, the game will automatically direct the page to your town when accesing this URL
#The town page, the game will automatically direct the page to your town ... | 23.18 | 95 | 0.69025 | #!/usr/bin/env python3
#Import packages
from flask import *
#Import local packages
import dbHandler as db
#Start flask app
app = Flask(__name__)
#Default index page
@app.route('/')
def showStart():
return render_template("index.html")
#The town page, the game will automatically direct the page to your town whe... | 0 | 508 | 0 | 0 | 0 | 0 | 0 | -2 | 156 |
21d106280f96337744d3d15fd3da390137d948df | 1,046 | py | Python | INF101/TP/TP6/2.6.1.4_mirror.py | Marshellson/UGA_IMF | eb293deabcc5ef6e45617d8c5bb6268b63b34f21 | [
"MIT"
] | 1 | 2021-09-21T21:53:17.000Z | 2021-09-21T21:53:17.000Z | INF101/TP/TP6/2.6.1.4_mirror.py | Marshellson/UGA_INF | eb293deabcc5ef6e45617d8c5bb6268b63b34f21 | [
"MIT"
] | null | null | null | INF101/TP/TP6/2.6.1.4_mirror.py | Marshellson/UGA_INF | eb293deabcc5ef6e45617d8c5bb6268b63b34f21 | [
"MIT"
] | null | null | null | '''
Author: JIANG Yilun
Date: 2022-02-21 15:13:14
LastEditTime: 2022-02-21 15:16:30
LastEditors: JIANG Yilun
Description:
FilePath: /UGA_INF/INF101/TP/TP6/2.6.1.4_mirror.py
'''
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
n = int(input()) # the numbe... | 26.820513 | 72 | 0.646272 | '''
Author: JIANG Yilun
Date: 2022-02-21 15:13:14
LastEditTime: 2022-02-21 15:16:30
LastEditors: JIANG Yilun
Description:
FilePath: /UGA_INF/INF101/TP/TP6/2.6.1.4_mirror.py
'''
import sys
import math
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
n = in... | 0 | 0 | 0 | 0 | 0 | 383 | 0 | -21 | 67 |
0923b4b9e6beca141814053d0ad67f5a6310a74b | 495 | py | Python | students/k3342/laboratory_works/Shaidullina_Regina/laboratory_work_1/leaderboard/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3342/laboratory_works/Shaidullina_Regina/laboratory_work_1/leaderboard/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3342/laboratory_works/Shaidullina_Regina/laboratory_work_1/leaderboard/urls.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | from django.urls import path
from leaderboard import views
from django.contrib.auth.views import LoginView #, LogoutView
urlpatterns = [
path('', views.main, name='main'),
path('leaderboard/', views.leaderboard_view, name='leaderboard'),
path('comments/', views.comments, name='comments'),
path('register/', views.... | 35.357143 | 66 | 0.729293 | from django.contrib import admin
from django.urls import path
from leaderboard import views
from django.contrib.auth.views import LoginView #, LogoutView
urlpatterns = [
path('', views.main, name='main'),
path('leaderboard/', views.leaderboard_view, name='leaderboard'),
path('comments/', views.comments, name='comm... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 22 |
8e52a4f5718b64fe398109099129281604f196a7 | 456 | py | Python | lib/solutions/SUM/sum_solution.py | DPNT-Sourcecode/CHK-pttv01 | caf1e37c53cee5ab4844a6c9a5f7d904b1461fb0 | [
"Apache-2.0"
] | null | null | null | lib/solutions/SUM/sum_solution.py | DPNT-Sourcecode/CHK-pttv01 | caf1e37c53cee5ab4844a6c9a5f7d904b1461fb0 | [
"Apache-2.0"
] | null | null | null | lib/solutions/SUM/sum_solution.py | DPNT-Sourcecode/CHK-pttv01 | caf1e37c53cee5ab4844a6c9a5f7d904b1461fb0 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python3
# noinspection PyShadowingBuiltins,PyUnusedLocal
def compute(val1, val2):
'''
Function returning the sum of two parameters.
Args:
val1 : Integer between 0 and 100.
val2 : Integer between 0 and 100.
Return:
Integer : Sum of val1 and val2.
'''
retu... | 24 | 49 | 0.600877 | #!/usr/local/bin/python3
# noinspection PyShadowingBuiltins,PyUnusedLocal
def compute(val1, val2):
'''
Function returning the sum of two parameters.
Args:
val1 : Integer between 0 and 100.
val2 : Integer between 0 and 100.
Return:
Integer : Sum of val1 and val2.
'''
retu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4f76e389f54e3aa0502a094ec4b3d7cc71a662bd | 3,101 | py | Python | ipbm-old/controller/util/python/generate_header_json_from_file.py | jijinfanhua/IPSA-ipbm | c82dc003bf9c68ba029814d7539f502fd29e1326 | [
"Apache-2.0"
] | null | null | null | ipbm-old/controller/util/python/generate_header_json_from_file.py | jijinfanhua/IPSA-ipbm | c82dc003bf9c68ba029814d7539f502fd29e1326 | [
"Apache-2.0"
] | null | null | null | ipbm-old/controller/util/python/generate_header_json_from_file.py | jijinfanhua/IPSA-ipbm | c82dc003bf9c68ba029814d7539f502fd29e1326 | [
"Apache-2.0"
] | null | null | null | import json
# fp = open("../config/header_pure.txt", "r")
fp = open("../../config/header_pure.txt", "r")
header_list = []
while True:
line = fp.readline()
# print(line)
if line == "*":
break
elif line == "":
continue
else:
l = line.split()
if line[0] == 'h':
... | 41.346667 | 113 | 0.570461 | import json
from basic_class import *
# fp = open("../config/header_pure.txt", "r")
fp = open("../../config/header_pure.txt", "r")
header_list = []
while True:
line = fp.readline()
# print(line)
if line == "*":
break
elif line == "":
continue
else:
l = line.split()
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 22 |
d1b6bda899be2b2c1c9f15895d3f6979a97d89d0 | 649 | py | Python | NN utilizando PIXELES/rendimiento_de_theta_de_pixeles.py | DussanFreire/NN-used-to-recognize-numbers-and-basic-operations | e023e1bd698b8acc2b01b796dd5a8036946f617f | [
"MIT"
] | null | null | null | NN utilizando PIXELES/rendimiento_de_theta_de_pixeles.py | DussanFreire/NN-used-to-recognize-numbers-and-basic-operations | e023e1bd698b8acc2b01b796dd5a8036946f617f | [
"MIT"
] | null | null | null | NN utilizando PIXELES/rendimiento_de_theta_de_pixeles.py | DussanFreire/NN-used-to-recognize-numbers-and-basic-operations | e023e1bd698b8acc2b01b796dd5a8036946f617f | [
"MIT"
] | null | null | null | from RedNeuronal import RedNeuronal
import h5py
# direccion alvaro
# data = h5py.File(r"C:\Users\Lenovo\Downloads\modelado\practica_3\digitos.h5", "r")
# direccion dussan
data = h5py.File(r"C:\Users\Dussan\Desktop\digitos_con_signos.h5", "r")
X_train = data["X_train"][:]
y_train = data["y_train"][:]
X_test = data["X... | 24.037037 | 84 | 0.74114 | from RedNeuronal import RedNeuronal
import h5py
# direccion alvaro
# data = h5py.File(r"C:\Users\Lenovo\Downloads\modelado\practica_3\digitos.h5", "r")
# direccion dussan
data = h5py.File(r"C:\Users\Dussan\Desktop\digitos_con_signos.h5", "r")
X_train = data["X_train"][:]
y_train = data["y_train"][:]
X_test = data["X... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0f223ad90181adf72be759f9ee7f7d47f3d7ed0c | 2,594 | py | Python | Utility/Torch/Models/Supertransformer/Layers/DeepMemory.py | smithblack-0/Utility | 875ab69fffad1412174d9d0a1de70edc1fd64152 | [
"MIT"
] | null | null | null | Utility/Torch/Models/Supertransformer/Layers/DeepMemory.py | smithblack-0/Utility | 875ab69fffad1412174d9d0a1de70edc1fd64152 | [
"MIT"
] | null | null | null | Utility/Torch/Models/Supertransformer/Layers/DeepMemory.py | smithblack-0/Utility | 875ab69fffad1412174d9d0a1de70edc1fd64152 | [
"MIT"
] | null | null | null | """
A class for the deep memory process. Deep memory is a flavor spawned by the techniques
displayed in Memorizing Transformers (https://arxiv.org/abs/2203.08913). However,
rather thqn saving each instance to an external memory bank, instead we search a
space of differential memory, and only train the topk instances
... | 35.054054 | 86 | 0.660756 | """
A class for the deep memory process. Deep memory is a flavor spawned by the techniques
displayed in Memorizing Transformers (https://arxiv.org/abs/2203.08913). However,
rather thqn saving each instance to an external memory bank, instead we search a
space of differential memory, and only train the topk instances
... | 0 | 0 | 0 | 2,133 | 0 | 0 | 0 | 18 | 112 |
7563d761b6b45d37317527e311c9b9997d563f4b | 760 | py | Python | tools/init_paths.py | ys7yoo/HRNet | 264414c06d64aa0b4327930b8f612a50fc6450cd | [
"MIT"
] | null | null | null | tools/init_paths.py | ys7yoo/HRNet | 264414c06d64aa0b4327930b8f612a50fc6450cd | [
"MIT"
] | 3 | 2019-10-27T13:19:32.000Z | 2019-10-28T10:05:16.000Z | tools/init_paths.py | ys7yoo/HRNet | 264414c06d64aa0b4327930b8f612a50fc6450cd | [
"MIT"
] | null | null | null | ## MODIFIED FROM _init_paths.py
import os
PATH_CURRENT = os.path.abspath(os.path.dirname(__file__))
# print(PATH_CURRENT)
# get parent dir: https://stackoverflow.com/questions/2860153/how-do-i-get-the-parent-directory-in-python
from pathlib import Path
PATH_PARENT = Path(PATH_CURRENT).parent
#PATH_PARENT = os.path.ab... | 26.206897 | 120 | 0.746053 | ## MODIFIED FROM _init_paths.py
import os
import sys
def add_path(path):
if path not in sys.path:
# print('adding path {}'.format(path))
sys.path.append(path)
PATH_CURRENT = os.path.abspath(os.path.dirname(__file__))
# print(PATH_CURRENT)
# get parent dir: https://stackoverflow.com/questions/2860... | 0 | 0 | 0 | 0 | 0 | 104 | 0 | -11 | 45 |
dcbe0f04a0fe2c456ffd41f8434bc8e697bca643 | 12,349 | py | Python | test/test_cmds.py | codeLovingYogi/cmdstanpy | b9d418c98535fb5571ae70058c73f75eac3637f7 | [
"BSD-3-Clause"
] | null | null | null | test/test_cmds.py | codeLovingYogi/cmdstanpy | b9d418c98535fb5571ae70058c73f75eac3637f7 | [
"BSD-3-Clause"
] | null | null | null | test/test_cmds.py | codeLovingYogi/cmdstanpy | b9d418c98535fb5571ae70058c73f75eac3637f7 | [
"BSD-3-Clause"
] | null | null | null | import os
import os.path
import unittest
datafiles_path = os.path.join('test', 'data')
if __name__ == '__main__':
unittest.main()
| 39.453674 | 80 | 0.616244 | import io
import os
import os.path
import sys
import unittest
from cmdstanpy import TMPDIR
from cmdstanpy.lib import Model, SamplerArgs, RunSet
from cmdstanpy.cmds import compile_model, sample, summary, diagnose
from cmdstanpy.cmds import get_drawset, save_csvfiles
datafiles_path = os.path.join('test', 'data')
clas... | 0 | 0 | 0 | 11,842 | 0 | 0 | 0 | 93 | 271 |
f2d98036f31e9ac0c6c4d125d74180c592d5c6c2 | 1,782 | py | Python | functions/getTcxData.py | TomBolton/aeroCode | 7e26ffb295cb76367a57993420fb93f976df9199 | [
"MIT"
] | 1 | 2016-12-18T18:36:47.000Z | 2016-12-18T18:36:47.000Z | functions/getTcxData.py | TomBolton/aeroCode | 7e26ffb295cb76367a57993420fb93f976df9199 | [
"MIT"
] | null | null | null | functions/getTcxData.py | TomBolton/aeroCode | 7e26ffb295cb76367a57993420fb93f976df9199 | [
"MIT"
] | null | null | null | # This script will extract the important ride data from a .tcx
# file specified by the user. The code below will then extract
# the speed and power values at each time step. The data recording
# of the Garmin MUST be set to one data point per second, as the
# analysis assumes a time-step of 1 second.
| 34.269231 | 100 | 0.615039 | # This script will extract the important ride data from a .tcx
# file specified by the user. The code below will then extract
# the speed and power values at each time step. The data recording
# of the Garmin MUST be set to one data point per second, as the
# analysis assumes a time-step of 1 second.
import lxml.etree... | 0 | 0 | 0 | 0 | 0 | 1,401 | 0 | -12 | 90 |
4b834fdd7c8b2ebcd71b69384ea4dad7f6c6b6c1 | 295 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/test/acceptance/pages/lms/__init__.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/test/acceptance/pages/lms/__init__.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/test/acceptance/pages/lms/__init__.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Package of lms page objects for acceptance tests
"""
import os
# Get the URL of the instance under test
HOSTNAME = os.environ.get('BOK_CHOY_HOSTNAME', 'localhost')
LMS_PORT = os.environ.get('BOK_CHOY_LMS_PORT', 8003)
BASE_URL = os.environ.get('test_url', f'http://{HOSTNAME}:{LMS_PORT}')
| 24.583333 | 70 | 0.732203 | """
Package of lms page objects for acceptance tests
"""
import os
# Get the URL of the instance under test
HOSTNAME = os.environ.get('BOK_CHOY_HOSTNAME', 'localhost')
LMS_PORT = os.environ.get('BOK_CHOY_LMS_PORT', 8003)
BASE_URL = os.environ.get('test_url', f'http://{HOSTNAME}:{LMS_PORT}')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d1cf3c14f61b807c9522bcfdd5c5441669891163 | 622 | py | Python | web/ml/admin.py | MTES-MCT/biocarburants | ff084916e18cdbdc41400f36fa6cc76a5e05900e | [
"MIT"
] | null | null | null | web/ml/admin.py | MTES-MCT/biocarburants | ff084916e18cdbdc41400f36fa6cc76a5e05900e | [
"MIT"
] | 1 | 2020-02-17T11:01:03.000Z | 2020-02-17T11:01:03.000Z | web/ml/admin.py | MTES-MCT/biocarburants | ff084916e18cdbdc41400f36fa6cc76a5e05900e | [
"MIT"
] | null | null | null |
# Register your models here.
| 34.555556 | 123 | 0.737942 | from django.contrib import admin
# Register your models here.
from ml.models import EECStats, EPStats, ETDStats
@admin.register(EECStats)
class EECStatsAdmin(admin.ModelAdmin):
list_display = ('feedstock', 'origin', 'nb_lots', 'default_value', 'stddev', 'average')
list_filter = ('feedstock', 'origin',)
@admi... | 0 | 436 | 0 | 0 | 0 | 0 | 0 | 39 | 117 |
f8bb05792786b247bfb57d1e945a780db3af525b | 2,816 | py | Python | leetcode/Depth First Search & Backtracking/112. Path Sum.py | yanshengjia/algorithm | 0608d286be9c93d51768d47f21e569c6b0be9cda | [
"MIT"
] | 23 | 2019-08-02T12:02:47.000Z | 2022-03-09T15:24:16.000Z | leetcode/Depth First Search & Backtracking/112. Path Sum.py | yanshengjia/algorithm | 0608d286be9c93d51768d47f21e569c6b0be9cda | [
"MIT"
] | null | null | null | leetcode/Depth First Search & Backtracking/112. Path Sum.py | yanshengjia/algorithm | 0608d286be9c93d51768d47f21e569c6b0be9cda | [
"MIT"
] | 21 | 2019-12-22T04:47:32.000Z | 2021-09-12T14:29:35.000Z | """
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
Note: A leaf is a node with no children.
Example:
Given the below binary tree and sum = 22,
5
/ \
4 8
/ / \
11 13 4
/ \ \
7 2 ... | 36.571429 | 443 | 0.615767 | """
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
Note: A leaf is a node with no children.
Example:
Given the below binary tree and sum = 22,
5
/ \
4 8
/ / \
11 13 4
/ \ \
7 2 ... | 0 | 0 | 0 | 1,029 | 0 | 0 | 0 | 0 | 44 |
b1e550d7831a4be263bbb48382a1b7866b34b3ed | 694 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLX/MESA/pixmap_colormap.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLX/MESA/pixmap_colormap.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLX/MESA/pixmap_colormap.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''Autogenerated by xml_generate script, do not edit!'''
# Code generation uses this
# End users want this...
_EXTENSION_NAME = 'GLX_MESA_pixmap_colormap'
| 38.555556 | 120 | 0.783862 | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLX import _types as _cs
# End users want this...
from OpenGL.raw.GLX._types import *
from OpenGL.raw.GLX import _errors
from OpenGL.constant import Constant as _C
imp... | 0 | 149 | 0 | 0 | 0 | 119 | 0 | 79 | 188 |
64e6de1504c2c09f42075f8ff35b9b1da282039e | 7,215 | py | Python | models/agents.py | michchr/HybridControlPy | 75d64810956fade5360f18b81332a781b31eebf9 | [
"MIT"
] | 1 | 2020-05-16T07:10:51.000Z | 2020-05-16T07:10:51.000Z | models/agents.py | michchr/HybridControlPy | 75d64810956fade5360f18b81332a781b31eebf9 | [
"MIT"
] | null | null | null | models/agents.py | michchr/HybridControlPy | 75d64810956fade5360f18b81332a781b31eebf9 | [
"MIT"
] | 1 | 2022-02-10T03:15:28.000Z | 2022-02-10T03:15:28.000Z |
# import pandas as pd
# pd.set_option('mode.chained_assignment', 'raise')
| 37.774869 | 120 | 0.691892 | import bisect
from collections import OrderedDict
from reprlib import recursive_repr as _recursive_repr
# import pandas as pd
# pd.set_option('mode.chained_assignment', 'raise')
from controllers.mpc_controller import MpcController
from controllers.controller_base import ControllerBase
from structdict import StructDic... | 0 | 1,440 | 0 | 5,160 | 0 | 0 | 0 | 245 | 292 |
e7c5b2a3eb3df4f97e0326f7ff5cf6ac5fce2de0 | 4,208 | py | Python | test/test_invoke_saving_pot.py | punica-box/saving-pot-box | 8824e3621b21a8e06ac398c29e7ec07ac1442d1f | [
"MIT"
] | 1 | 2018-11-17T10:37:38.000Z | 2018-11-17T10:37:38.000Z | test/test_invoke_saving_pot.py | NashMiao/saving-pot-box | 0ea7b0ee4be8aadf069faacf1d862d7412d5b4da | [
"MIT"
] | null | null | null | test/test_invoke_saving_pot.py | NashMiao/saving-pot-box | 0ea7b0ee4be8aadf069faacf1d862d7412d5b4da | [
"MIT"
] | 1 | 2018-11-10T15:56:58.000Z | 2018-11-10T15:56:58.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
from ontology.ont_sdk import OntologySdk
from ontology.wallet.wallet_manager import WalletManager
from pot.default_settings import (WALLET_PATH, CONTRACT_ABI, CONTRACT_ADDRESS_HEX)
from pot.invoke_saving_pot import InvokeSavingPot
ontology = OntologySdk(... | 38.605505 | 89 | 0.73788 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import binascii
import time
import unittest
from unittest.mock import patch
from ontology.ont_sdk import OntologySdk
from ontology.smart_contract.neo_contract.abi.abi_function import AbiFunction
from ontology.smart_contract.neo_contract.abi.abi_info import AbiInfo
from on... | 0 | 0 | 0 | 3,153 | 0 | 0 | 0 | 163 | 133 |
3819d955d228cdd08ec15658407df47f685a3639 | 784 | py | Python | config.py | apython1998/porchfest_radio | d120578e90c99606d59868adbf19a2e2d3775dc9 | [
"MIT"
] | null | null | null | config.py | apython1998/porchfest_radio | d120578e90c99606d59868adbf19a2e2d3775dc9 | [
"MIT"
] | 1 | 2021-04-30T20:44:10.000Z | 2021-04-30T20:44:10.000Z | config.py | apython1998/porchfest_radio | d120578e90c99606d59868adbf19a2e2d3775dc9 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
| 39.2 | 71 | 0.701531 | import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
MONGODB_SETTINGS = {
'db': 'porchfest_radio',
'host': 'mongodb://lo... | 0 | 0 | 0 | 623 | 0 | 0 | 0 | 0 | 23 |
f5c5906f366de46db049d2907d3e8017997f8386 | 619 | py | Python | src/main/python/leetcode-python/easy/400.Nth Digit.py | sonymoon/algorithm | cc2a9e0125fc64bdbf6549034bad6482d2027ea2 | [
"Apache-2.0"
] | null | null | null | src/main/python/leetcode-python/easy/400.Nth Digit.py | sonymoon/algorithm | cc2a9e0125fc64bdbf6549034bad6482d2027ea2 | [
"Apache-2.0"
] | null | null | null | src/main/python/leetcode-python/easy/400.Nth Digit.py | sonymoon/algorithm | cc2a9e0125fc64bdbf6549034bad6482d2027ea2 | [
"Apache-2.0"
] | null | null | null |
print(Solution().findNthDigit(194))
| 24.76 | 65 | 0.434572 | class Solution:
def findNthDigit(self, n):
"""
:type n: int
:rtype: int
"""
if n < 10:
return n
maxBits = 1
for i in range(1, 11):
numberInbitsI = (10 ** i - 10 ** (i - 1)) * i
if n <= numberInbitsI:
maxBits ... | 0 | 0 | 0 | 559 | 0 | 0 | 0 | 0 | 22 |
8064cb779b30bc7cc41fa4ed8c9047964653750a | 5,132 | py | Python | python/bridge.py | bmilde/ambientsearch | 74bf83a313e19da54a4e44158063041f981424c9 | [
"Apache-2.0"
] | 20 | 2016-04-30T11:24:45.000Z | 2021-11-09T10:39:25.000Z | python/bridge.py | bmilde/ambientsearch | 74bf83a313e19da54a4e44158063041f981424c9 | [
"Apache-2.0"
] | 1 | 2020-09-23T13:36:58.000Z | 2020-09-23T13:36:58.000Z | python/bridge.py | bmilde/ambientsearch | 74bf83a313e19da54a4e44158063041f981424c9 | [
"Apache-2.0"
] | 8 | 2015-10-07T13:40:36.000Z | 2019-08-07T06:45:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Benjamin Milde'
import redis
red = redis.StrictRedis()
#Todo: refactor. This has been mved to the relevant event generator
#Abstracts away the details of communicating with the ambient server
#Do most of the message passing with redis, now standard versio... | 43.863248 | 211 | 0.67537 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Benjamin Milde'
import requests
import json
import redis
import re
from timer import Timer
red = redis.StrictRedis()
#Todo: refactor. This has been mved to the relevant event generator
def idFromTitle(title):
return re.sub(r'[^\w]', '_', title.replace(... | 0 | 0 | 0 | 4,554 | 0 | 128 | 0 | -26 | 155 |
e5971ec81aae8b6929e0ae0e93757b73ff60b49f | 5,052 | py | Python | data_code/image_scraping.py | natashanorsker/fagprojekt | ef9a8cc2128c43d891c8a7a47e14916af2b9c602 | [
"MIT"
] | 1 | 2021-02-15T08:08:38.000Z | 2021-02-15T08:08:38.000Z | data_code/image_scraping.py | natashanorsker/fagprojekt | ef9a8cc2128c43d891c8a7a47e14916af2b9c602 | [
"MIT"
] | 3 | 2021-02-24T10:43:41.000Z | 2021-06-21T12:54:51.000Z | data_code/image_scraping.py | natashanorsker/fagprojekt | ef9a8cc2128c43d891c8a7a47e14916af2b9c602 | [
"MIT"
] | 1 | 2021-02-15T10:50:19.000Z | 2021-02-15T10:50:19.000Z | # imports
import json
from utilities import dict_from_json
#websites: (these are the websites with the same format as UK)
#does not work:
#'https://us.pandora.net/en/jewelry/?start={}&sz=36&format=page-element''
websites = ['https://cn.pandora.net/zh/jewellery/?start={}&sz=36&format=page-element',
... | 45.513514 | 207 | 0.617973 | # imports
import requests
import json
from bs4 import BeautifulSoup
from tqdm import tqdm
import random
from utilities import dict_from_json
#websites: (these are the websites with the same format as UK)
#does not work:
#'https://us.pandora.net/en/jewelry/?start={}&sz=36&format=page-element''
websites = ['ht... | 0 | 0 | 0 | 0 | 0 | 2,435 | 0 | -6 | 111 |
2dffac327b451073edbc101c6a98c989c4acd12b | 7,900 | py | Python | AnalyzeLazyTime.py | pirtim/complex_networks_sim | f669c83439d9386d1f4e33bcb60f16f0dac7278d | [
"MIT"
] | null | null | null | AnalyzeLazyTime.py | pirtim/complex_networks_sim | f669c83439d9386d1f4e33bcb60f16f0dac7278d | [
"MIT"
] | null | null | null | AnalyzeLazyTime.py | pirtim/complex_networks_sim | f669c83439d9386d1f4e33bcb60f16f0dac7278d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division #~ Domysle dzielenie int jako liczb float
# from igraph import * #~ Niepotrzebne
# matplotlib.use('Agg')
from matplotlib import rc
#~ Funkcja bierze liste i odwraca tam gdzie sa mniejsze niz 0.5
#~ Funkcja bierze liste i przedloza ja zerami lub jedyn... | 42.934783 | 139 | 0.630759 | # -*- coding: utf-8 -*-
from __future__ import division #~ Domysle dzielenie int jako liczb float
# from igraph import * #~ Niepotrzebne
import random #~ Niepotrzebne
import matplotlib
# matplotlib.use('Agg')
import matplotlib.pyplot as plt #~ Do wykresow
from matplotlib import rc
import time ... | 6 | 0 | 0 | 0 | 0 | 6,181 | 0 | 3 | 588 |
3406049335d99d644917125e8b716c8c4bbe412b | 4,174 | py | Python | tic-tac-toe.py | RuTh-git/Tic-tac-toe-project | 8a7f7720b91ca7f519c5fd66925ef154aa938142 | [
"MIT"
] | null | null | null | tic-tac-toe.py | RuTh-git/Tic-tac-toe-project | 8a7f7720b91ca7f519c5fd66925ef154aa938142 | [
"MIT"
] | null | null | null | tic-tac-toe.py | RuTh-git/Tic-tac-toe-project | 8a7f7720b91ca7f519c5fd66925ef154aa938142 | [
"MIT"
] | null | null | null | # -------Global Variables---------
# Game board
board =["-","-","-",
"-","-","-",
"-","-","-",]
# If game is still going
game_still_going = True
# Who won? Or tie?
winner = None
# Whos turn is it
current_player = "X"
# Display board
# Play a game of tic tac toe
# Handle a single turn of an arb... | 20.766169 | 74 | 0.626977 | # -------Global Variables---------
# Game board
board =["-","-","-",
"-","-","-",
"-","-","-",]
# If game is still going
game_still_going = True
# Who won? Or tie?
winner = None
# Whos turn is it
current_player = "X"
# Display board
def display_board():
print("\n")
print(board[0] + " | " + boa... | 0 | 0 | 0 | 0 | 0 | 3,449 | 0 | 0 | 227 |
8c4cc89a3ae7d346b023dc93a3ae432c4760b998 | 1,560 | py | Python | preprocessing/audio_download/helperfiles/audio_download.py | sereini/SpeechSeparationModel | ea44c845762112f3bc2e5e54c5530e6fd429464f | [
"MIT"
] | 3 | 2019-12-05T10:22:19.000Z | 2021-11-08T12:19:54.000Z | preprocessing/audio_download/helperfiles/audio_download.py | sereini/SpeechSeparationModel | ea44c845762112f3bc2e5e54c5530e6fd429464f | [
"MIT"
] | null | null | null | preprocessing/audio_download/helperfiles/audio_download.py | sereini/SpeechSeparationModel | ea44c845762112f3bc2e5e54c5530e6fd429464f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 25 17:34:23 2019
@author: chalbeisen
This program is to download audios. The required arguments are set by the
powershell script "Run-audio_download.ps1".
"""
import sys
'''
------------------------------------------------------------------------------
des... | 31.836735 | 79 | 0.525 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 25 17:34:23 2019
@author: chalbeisen
This program is to download audios. The required arguments are set by the
powershell script "Run-audio_download.ps1".
"""
from LookingToListen_Audio_clean import Audio
import argparse
import sys
'''
-----------------... | 0 | 0 | 0 | 0 | 0 | 508 | 0 | 18 | 106 |
897df636f8322f5671a5d204f36d6950b78f524e | 4,566 | py | Python | ex_simulation/mnist_based/cd_interp_nmf.py | csinva/transformation-importance | 256ebdb7c05bcc34c8f8bdbbdd0a09dc3585ea0e | [
"MIT"
] | 6 | 2020-03-05T14:44:09.000Z | 2021-12-14T12:28:24.000Z | ex_simulation/mnist_based/cd_interp_nmf.py | csinva/transformation-importance | 256ebdb7c05bcc34c8f8bdbbdd0a09dc3585ea0e | [
"MIT"
] | null | null | null | ex_simulation/mnist_based/cd_interp_nmf.py | csinva/transformation-importance | 256ebdb7c05bcc34c8f8bdbbdd0a09dc3585ea0e | [
"MIT"
] | 2 | 2020-04-23T19:29:38.000Z | 2021-07-12T19:45:55.000Z | import numpy as np
import torch
device = 'cuda' if torch.cuda.is_available() else 'cpu'
import sys
import acd
sys.path.append('../..')
sys.path.append('../../..')
# plt.style.use('dark_background')
sys.path.append('../../../dsets/mnist')
import dset
from model import Net, Net2c
import pickle as pkl
from torchvision imp... | 33.328467 | 118 | 0.669295 | import numpy as np
import matplotlib.pyplot as plt
import torch
import random
device = 'cuda' if torch.cuda.is_available() else 'cpu'
from scipy.ndimage import gaussian_filter
import sys
from tqdm import tqdm
from functools import partial
import acd
from copy import deepcopy
sys.path.append('../..')
sys.path.append('..... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 298 | 396 |
6b127412effc26232fb45df404dd75fcf5cc85f7 | 25,037 | py | Python | CyberTron5000/cogs/fun.py | niztg/CyberTron5000 | 6b93305ef26e022063bffa8620b53076ba5948f7 | [
"MIT"
] | 20 | 2020-06-20T20:26:33.000Z | 2021-01-12T20:47:52.000Z | CyberTron5000/cogs/fun.py | niztg/CyberTron5000 | 6b93305ef26e022063bffa8620b53076ba5948f7 | [
"MIT"
] | 1,005 | 2020-07-09T18:27:17.000Z | 2020-07-30T20:41:33.000Z | CyberTron5000/cogs/fun.py | niztg/CyberTron5000 | 6b93305ef26e022063bffa8620b53076ba5948f7 | [
"MIT"
] | 7 | 2020-07-09T18:23:24.000Z | 2020-11-21T20:47:03.000Z | import json
import random
import string
from asyncio import TimeoutError
from datetime import datetime as dt
from io import BytesIO
from time import time
import discord
from PyDictionary import PyDictionary as dictionary
from discord.ext import commands, flags
from humanize import naturaltime as nt
from jikanpy import... | 45.030576 | 232 | 0.591724 | import json
import random
import string
from asyncio import TimeoutError
from datetime import datetime as dt
from io import BytesIO
from time import time
import discord
from PyDictionary import PyDictionary as dictionary
from discord.ext import commands, flags
from humanize import naturaltime as nt
from jikanpy import... | 41 | 20,662 | 505 | 0 | 0 | 360 | 0 | 24 | 1,319 |
7fec8510d8834d53c7b7fbb66f1d96b267c28dfc | 1,764 | py | Python | PLM/cores/base/BaseProfile.py | vtta2008/pipelineTool | 2431d2fc987e3b31f2a6a63427fee456fa0765a0 | [
"Apache-2.0"
] | 7 | 2017-12-22T02:49:58.000Z | 2018-05-09T05:29:06.000Z | PLM/cores/base/BaseProfile.py | vtta2008/pipelineTool | 2431d2fc987e3b31f2a6a63427fee456fa0765a0 | [
"Apache-2.0"
] | null | null | null | PLM/cores/base/BaseProfile.py | vtta2008/pipelineTool | 2431d2fc987e3b31f2a6a63427fee456fa0765a0 | [
"Apache-2.0"
] | 3 | 2019-03-11T21:54:52.000Z | 2019-11-25T11:23:17.000Z | # -*- coding: utf-8 -*-
"""
Script Name:
Author: Do Trinh/Jimmy - 3D artist.
Description:
"""
# -------------------------------------------------------------------------------------------------------------
""" Import """
# ---------------------------------------------------------------------------------------... | 20.045455 | 111 | 0.452381 | # -*- coding: utf-8 -*-
"""
Script Name:
Author: Do Trinh/Jimmy - 3D artist.
Description:
"""
# -------------------------------------------------------------------------------------------------------------
""" Import """
from pyPLM.damg import DAMGDICT
class BaseProfile(DAMGDICT):
key ... | 2 | 577 | 0 | 698 | 0 | 0 | 0 | 10 | 46 |
60f526518d09f8565abde81e7e957b5c348fcd01 | 5,014 | py | Python | third_party/blink/tools/blinkpy/w3c/test_copier_unittest.py | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/blink/tools/blinkpy/w3c/test_copier_unittest.py | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/blink/tools/blinkpy/w3c/test_copier_unittest.py | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above
# copyright notice, this list of con... | 39.793651 | 90 | 0.631432 | # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above
# copyright notice, this list of con... | 0 | 0 | 0 | 2,898 | 0 | 0 | 0 | 186 | 134 |
d5386382d1006c88589c40562d15a92314c4d07c | 1,106 | py | Python | backend/paperchase/manage/users.py | dedalusj/PaperChase | 728cd2f742275b12223d91613275358fb4a92feb | [
"MIT"
] | 3 | 2015-02-13T02:42:39.000Z | 2016-11-22T08:03:45.000Z | backend/paperchase/manage/users.py | dedalusj/PaperChase | 728cd2f742275b12223d91613275358fb4a92feb | [
"MIT"
] | null | null | null | backend/paperchase/manage/users.py | dedalusj/PaperChase | 728cd2f742275b12223d91613275358fb4a92feb | [
"MIT"
] | 1 | 2020-10-10T08:35:16.000Z | 2020-10-10T08:35:16.000Z | # -*- coding: utf-8 -*-
"""
paperchase.manage.journals
~~~~~~~~~~~~~~~~~~~~~
jorunals management commands
""" | 29.891892 | 166 | 0.631103 | # -*- coding: utf-8 -*-
"""
paperchase.manage.journals
~~~~~~~~~~~~~~~~~~~~~
jorunals management commands
"""
import datetime
from flask.ext.script import Command, prompt, prompt_pass
from werkzeug.datastructures import MultiDict
from ..services import users
class CreateUser(Command):
def run(self)... | 0 | 0 | 0 | 787 | 0 | 0 | 0 | 61 | 136 |
096913bfd7f5ce438837ebc5ce70ac71e4b5cab7 | 817 | py | Python | simpleotp/__init__.py | soumilrao/simple-otp | b1b5865850902f2b3e7b46e2205525daacb69fb4 | [
"MIT"
] | null | null | null | simpleotp/__init__.py | soumilrao/simple-otp | b1b5865850902f2b3e7b46e2205525daacb69fb4 | [
"MIT"
] | null | null | null | simpleotp/__init__.py | soumilrao/simple-otp | b1b5865850902f2b3e7b46e2205525daacb69fb4 | [
"MIT"
] | 2 | 2020-07-03T03:47:11.000Z | 2022-02-22T07:39:09.000Z | """Top-level package for simple-otp."""
__author__ = """Kshitij Nagvekar"""
__email__ = 'kshitij.nagvekar@workindia.in'
__version__ = '0.1.0'
try:
from secrets import SystemRandom
except ImportError:
from random import SystemRandom
from typing import Sequence
from .otp import OTP
random = SystemRandom()
d... | 20.948718 | 70 | 0.673195 | """Top-level package for simple-otp."""
__author__ = """Kshitij Nagvekar"""
__email__ = 'kshitij.nagvekar@workindia.in'
__version__ = '0.1.0'
try:
from secrets import SystemRandom
except ImportError:
from random import SystemRandom
from typing import Sequence
from .otp import OTP
random = SystemRandom()
d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6796c13cf7475026c9ef081da79d73b79b3ed231 | 1,777 | py | Python | cases/caseFoamEx/Cases/nEquivalentParticles_06/maxRadialWeightingFactor_04/graphCaseValidation.py | andytorrestb/rarefiedPlume | c09234c701c395d16519d8a361eae17540711530 | [
"MIT"
] | null | null | null | cases/caseFoamEx/Cases/nEquivalentParticles_06/maxRadialWeightingFactor_04/graphCaseValidation.py | andytorrestb/rarefiedPlume | c09234c701c395d16519d8a361eae17540711530 | [
"MIT"
] | null | null | null | cases/caseFoamEx/Cases/nEquivalentParticles_06/maxRadialWeightingFactor_04/graphCaseValidation.py | andytorrestb/rarefiedPlume | c09234c701c395d16519d8a361eae17540711530 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import os
import pandas as pd
# Find path for cases
curr_dir_path = os.path.dirname(os.path.realpath(__file__))
# print(curr_dir_path)
# cases = os.listdir(curr_dir_path + '/Cases')
# pop = cases.index('baseCase')
# cases.pop(pop)
# Label graph with bold characters
font_axis_publish = ... | 26.522388 | 87 | 0.670793 | import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
# Find path for cases
curr_dir_path = os.path.dirname(os.path.realpath(__file__))
# print(curr_dir_path)
# cases = os.listdir(curr_dir_path + '/Cases')
# pop = cases.index('baseCase')
# cases.pop(pop)
# Label graph with bold characters
f... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 22 |
6d599e732315b98ff9361f50870da4ee3d6c72bc | 2,935 | py | Python | pointy/__init__.py | AlexLloyd0/pointy-mcpointface | 2c5f3edf14a1d3821933ba8daa3fd616366055a0 | [
"MIT"
] | 1 | 2017-11-22T15:12:39.000Z | 2017-11-22T15:12:39.000Z | pointy/__init__.py | AlexLloyd0/pointy-mcpointface | 2c5f3edf14a1d3821933ba8daa3fd616366055a0 | [
"MIT"
] | 3 | 2017-10-31T22:56:14.000Z | 2017-11-01T21:04:49.000Z | pointy/__init__.py | AlexLloyd0/pointy-mcpointface | 2c5f3edf14a1d3821933ba8daa3fd616366055a0 | [
"MIT"
] | null | null | null | import logging
import os
from flask import Flask
from pointy.setup_logging import setup_logging
setup_logging()
logger = logging.getLogger(__name__)
app = Flask(__name__)
verify_token = os.environ.get('POINTY_VERIFY_TOKEN')
| 30.257732 | 113 | 0.687223 | import json
import logging
import os
from flask import Flask, request, jsonify
from pointy.api.add_points import add_points
from pointy.api.add_team import add_team
from pointy.api.add_user import add_user
from pointy.api.get_score import get_score
from pointy.api.get_scoreboard import get_scoreboard, get_scoreboard_... | 0 | 2,122 | 0 | 0 | 0 | 118 | 0 | 142 | 317 |
ca40a55c661538e7cdefeeb691b340aad696816b | 232 | py | Python | routines/__init__.py | meteostat/routines | 8867b96a3fcb254ebcc9623933a76dac44157b70 | [
"MIT"
] | 7 | 2020-07-02T09:49:06.000Z | 2021-05-24T11:46:00.000Z | routines/__init__.py | meteostat/routines | 8867b96a3fcb254ebcc9623933a76dac44157b70 | [
"MIT"
] | 16 | 2021-03-29T19:45:01.000Z | 2021-11-14T11:39:12.000Z | routines/__init__.py | meteostat/routines | 8867b96a3fcb254ebcc9623933a76dac44157b70 | [
"MIT"
] | 1 | 2021-04-06T20:58:42.000Z | 2021-04-06T20:58:42.000Z | """
Import & export routines.
The code is licensed under the MIT license.
"""
__appname__ = 'routines'
__version__ = '0.0.1'
| 16.571429 | 43 | 0.482759 | """
█▀▄▀█ █▀▀ ▀█▀ █▀▀ █▀█ █▀ ▀█▀ ▄▀█ ▀█▀
█░▀░█ ██▄ ░█░ ██▄ █▄█ ▄█ ░█░ █▀█ ░█░
Import & export routines.
The code is licensed under the MIT license.
"""
__appname__ = 'routines'
__version__ = '0.0.1'
from .routine import Routine
| 216 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 23 |
2d6b6eb80f38322fca3e11e158d98822aa0f5e99 | 1,678 | py | Python | moove.py | Sanchopanch/matrix | 16289a56688047f623b46de74f7f7f4380006d08 | [
"Apache-2.0"
] | null | null | null | moove.py | Sanchopanch/matrix | 16289a56688047f623b46de74f7f7f4380006d08 | [
"Apache-2.0"
] | null | null | null | moove.py | Sanchopanch/matrix | 16289a56688047f623b46de74f7f7f4380006d08 | [
"Apache-2.0"
] | null | null | null | import pickle
import os
import time
if __name__ == "__main__":
fileNameOfJob = 'mov_1.pkl'
if(not os.path.exists( fileNameOfJob)):
pass
with open(fileNameOfJob,'rb') as f:
currMoove =pickle.load(f)
print(' loaded moove with %i cadrs'%len(currMoove))
root = Tk()... | 27.064516 | 139 | 0.54112 | import pickle
import os
from tkinter import *
import time
class moove():
def __init__(self):
self.points = []
self.lines = []
self.pause = 0
if __name__ == "__main__":
fileNameOfJob = 'mov_1.pkl'
if(not os.path.exists( fileNameOfJob)):
pass
with op... | 0 | 0 | 0 | 93 | 0 | 0 | 0 | 0 | 48 |
a4fe50a6a59ef1524c840ac3e8ae35559b6538ac | 9,678 | py | Python | EDA/SRC/dashboard/app.py | PabloEduardoMartinezPicazo/Bootcamp-DataScience-2021 | 0fa5288aec5fb14e3796877882e4f1ddc5ad4aea | [
"MIT"
] | null | null | null | EDA/SRC/dashboard/app.py | PabloEduardoMartinezPicazo/Bootcamp-DataScience-2021 | 0fa5288aec5fb14e3796877882e4f1ddc5ad4aea | [
"MIT"
] | null | null | null | EDA/SRC/dashboard/app.py | PabloEduardoMartinezPicazo/Bootcamp-DataScience-2021 | 0fa5288aec5fb14e3796877882e4f1ddc5ad4aea | [
"MIT"
] | null | null | null | import streamlit as st
import pandas as pd
from PIL import Image
import requests
import sys, os
pato = os.path.dirname
direccion=pato(pato(pato(__file__)))
sys.path.append(direccion)
from notebooks.Canada_2 import df_canada1
from notebooks.Japon_2 import df_japon1
from notebooks.Corea_aranceles import df_corea1
from ... | 58.301205 | 281 | 0.678859 | import re
import streamlit as st
import pandas as pd
import numpy as np
import altair as alt
from PIL import Image
import requests
import sys,os
pato = os.path.dirname
direccion=pato(pato(pato(__file__)))
sys.path.append(direccion)
from notebooks.Canada import df_canada
from notebooks.Canada_2 import df_canada1
from ... | 148 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 242 |
b4d5f8b9de9168b54916b7b72cb30ed041002a0c | 3,382 | py | Python | src/research/three_phase/tests/vectorized_y_bus.py | mzy2240/GridCal | 0352f0e9ce09a9c037722bf2f2afc0a31ccd2880 | [
"BSD-3-Clause"
] | 284 | 2016-01-31T03:20:44.000Z | 2022-03-17T21:16:52.000Z | src/research/three_phase/tests/vectorized_y_bus.py | mzy2240/GridCal | 0352f0e9ce09a9c037722bf2f2afc0a31ccd2880 | [
"BSD-3-Clause"
] | 94 | 2016-01-14T13:37:40.000Z | 2022-03-28T03:13:56.000Z | src/research/three_phase/tests/vectorized_y_bus.py | mzy2240/GridCal | 0352f0e9ce09a9c037722bf2f2afc0a31ccd2880 | [
"BSD-3-Clause"
] | 84 | 2016-03-29T10:43:04.000Z | 2022-02-22T16:26:55.000Z |
from scipy.sparse import lil_matrix
np.set_printoptions(linewidth=100000)
def set_sub(A, cols, rows, sub_mat):
"""
Set sub-matrix in place into sparse matrix
:param A: Sparse matrix
:param cols: array of columns (size m)
:param rows: array of rows (size n)
:param sub_mat: dense array (size n... | 29.929204 | 118 | 0.587522 |
from research.three_phase.Engine import *
from scipy.sparse import lil_matrix
np.set_printoptions(linewidth=100000)
def set_sub(A, cols, rows, sub_mat):
"""
Set sub-matrix in place into sparse matrix
:param A: Sparse matrix
:param cols: array of columns (size m)
:param rows: array of rows (size... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 23 |
9d9dad60fb7a4a12ac3627ec22f153d2fd0908f8 | 789 | py | Python | v32_3/app/route/route.py | thangpxph/python_training | e05eceba9b39dd0b23076be1eb3b85dee24fcdaa | [
"MIT"
] | null | null | null | v32_3/app/route/route.py | thangpxph/python_training | e05eceba9b39dd0b23076be1eb3b85dee24fcdaa | [
"MIT"
] | null | null | null | v32_3/app/route/route.py | thangpxph/python_training | e05eceba9b39dd0b23076be1eb3b85dee24fcdaa | [
"MIT"
] | null | null | null | from flask import Blueprint
route_path = Blueprint('route_path', __name__)
| 30.346154 | 64 | 0.730038 | from flask import Blueprint, request as flask_request, jsonify
from cartmigration.libs.utils import *
route_path = Blueprint('route_path', __name__)
@route_path.route("/action/<string:method>", methods = ['post'])
def action(method):
request_data = flask_request.data
if isinstance(request_data, bytes):
request_d... | 0 | 614 | 0 | 0 | 0 | 0 | 0 | 52 | 46 |
70567d2c43a47fc18436aa805eb67644efa687b1 | 26,350 | py | Python | tensorflow_federated/python/simulation/training_loop_test.py | alessiomora/federated | 3b501067ed7062aaec3cc8830aaec0a7cf8f0942 | [
"Apache-2.0"
] | 1 | 2021-05-10T10:49:34.000Z | 2021-05-10T10:49:34.000Z | tensorflow_federated/python/simulation/training_loop_test.py | alessiomora/federated | 3b501067ed7062aaec3cc8830aaec0a7cf8f0942 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/simulation/training_loop_test.py | alessiomora/federated | 3b501067ed7062aaec3cc8830aaec0a7cf8f0942 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 46.390845 | 80 | 0.731917 | # Copyright 2021, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 0 | 22,555 | 0 | 2,109 | 0 | 0 | 0 | 205 | 794 |
acb41a4176be094274e70012ad8343911c4182ad | 30 | py | Python | src/keyrings/envvars/tests/__init__.py | wwuck/keyrings.envvars | ca8ddf39cd8162d6b5bb51623a8cfd5cbf37b547 | [
"MIT"
] | null | null | null | src/keyrings/envvars/tests/__init__.py | wwuck/keyrings.envvars | ca8ddf39cd8162d6b5bb51623a8cfd5cbf37b547 | [
"MIT"
] | 33 | 2021-11-30T11:43:54.000Z | 2022-01-29T20:05:52.000Z | src/keyrings/envvars/tests/__init__.py | wwuck/keyrings.envvars | ca8ddf39cd8162d6b5bb51623a8cfd5cbf37b547 | [
"MIT"
] | null | null | null | """keyrings.envvars tests."""
| 15 | 29 | 0.666667 | """keyrings.envvars tests."""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e075b7a83faeb41e24824072dfdc5caff4bca598 | 130 | py | Python | qproject/__init__.py | KirovVerst/YAQueueProject | d232267f67230dc54223c4b1019b6f66b9f5e249 | [
"MIT"
] | null | null | null | qproject/__init__.py | KirovVerst/YAQueueProject | d232267f67230dc54223c4b1019b6f66b9f5e249 | [
"MIT"
] | null | null | null | qproject/__init__.py | KirovVerst/YAQueueProject | d232267f67230dc54223c4b1019b6f66b9f5e249 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from qproject.celery import app as celery_app
__all__ = ['celery_app']
| 21.666667 | 56 | 0.823077 | from __future__ import absolute_import, unicode_literals
from qproject.celery import app as celery_app
__all__ = ['celery_app']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f1a4c916269fa93d57546166ac49a6863a3bbc75 | 541 | py | Python | demonstrations/synthesize_data/send_markers.py | stfnrpplngr/rteeg | e73331ef46a269cf0dda1b04333784ce3cf44247 | [
"MIT"
] | 30 | 2017-03-17T02:15:45.000Z | 2022-02-21T06:20:37.000Z | demonstrations/synthesize_data/send_markers.py | stfnrpplngr/rteeg | e73331ef46a269cf0dda1b04333784ce3cf44247 | [
"MIT"
] | 10 | 2016-12-29T21:09:47.000Z | 2017-03-28T18:05:06.000Z | demonstrations/synthesize_data/send_markers.py | stfnrpplngr/rteeg | e73331ef46a269cf0dda1b04333784ce3cf44247 | [
"MIT"
] | 12 | 2017-03-14T07:09:40.000Z | 2021-01-06T06:22:27.000Z | """Example program to demonstrate how to send markers into LSL."""
import time
from pylsl import StreamInfo, StreamOutlet
info = StreamInfo(name='markers', type='Markers', channel_count=1,
channel_format='int32', source_id='markers_test1234')
# next make an outlet
outlet = StreamOutlet(inf... | 25.761905 | 72 | 0.674677 | """Example program to demonstrate how to send markers into LSL."""
import random
import time
from pylsl import StreamInfo, StreamOutlet
info = StreamInfo(name='markers', type='Markers', channel_count=1,
channel_format='int32', source_id='markers_test1234')
# next make an outlet
outlet =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -8 | 25 |
54f7145a40819c4d3fb5da72f1515717ad7d7027 | 971 | py | Python | models/Iris/score.py | cghat/pipelines-azureml | 296349847f1d151af2e5366dad3b117d8e84ec67 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | models/Iris/score.py | cghat/pipelines-azureml | 296349847f1d151af2e5366dad3b117d8e84ec67 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | models/Iris/score.py | cghat/pipelines-azureml | 296349847f1d151af2e5366dad3b117d8e84ec67 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | import numpy as np
input_sample = np.array([[11, 0, 0, 0, 8, 5, 0, 0, 6]])
output_sample = np.array([0.95])
| 27.742857 | 84 | 0.722966 | import json
import numpy as np
import pickle
from sklearn.linear_model import Ridge
from azureml.core.model import Model
from inference_schema.schema_decorators import input_schema, output_schema
from inference_schema.parameter_types.numpy_parameter_type import NumpyParameterType
from utils import mylib
def init():
... | 0 | 320 | 0 | 0 | 0 | 208 | 0 | 132 | 200 |
f5442fda543ea143316e891a5b0389f7115be0b9 | 789 | py | Python | baekjoon/11292.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | baekjoon/11292.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | baekjoon/11292.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | """
11292 :
URL : https://www.acmicpc.net/problem/11292
Input :
3
John 1.75
Mary 1.64
Sam 1.81
2
Jose 1.62
Miguel 1.58
5
John 1.75
Mary 1.75
Sam 1.74
Jose 1.75
Miguel 1.75
0
Output :
... | 18.785714 | 47 | 0.474018 | """
11292 : 키 큰 사람
URL : https://www.acmicpc.net/problem/11292
Input :
3
John 1.75
Mary 1.64
Sam 1.81
2
Jose 1.62
Miguel 1.58
5
John 1.75
Mary 1.75
Sam 1.74
Jose 1.75
Miguel 1.75
0
Output :
... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
864726b1c8e9989ced807885a138a4c2e08ae26a | 1,459 | py | Python | dev/local/notebook/core.py | LaurenSpiegel/fastai_docs | 4fe6b62116d88dea9610548133e6cadb6b260a73 | [
"Apache-2.0"
] | null | null | null | dev/local/notebook/core.py | LaurenSpiegel/fastai_docs | 4fe6b62116d88dea9610548133e6cadb6b260a73 | [
"Apache-2.0"
] | null | null | null | dev/local/notebook/core.py | LaurenSpiegel/fastai_docs | 4fe6b62116d88dea9610548133e6cadb6b260a73 | [
"Apache-2.0"
] | null | null | null | #AUTOGENERATED! DO NOT EDIT! File to edit: dev/90_notebook_core.ipynb (unless otherwise specified).
__all__ = ['in_ipython', 'IN_IPYTHON', 'in_colab', 'IN_COLAB', 'in_notebook', 'IN_NOTEBOOK']
def in_ipython():
"Check if the code is running in the ipython environment (jupyter including)"
program_name = os.pat... | 31.717391 | 99 | 0.655243 | #AUTOGENERATED! DO NOT EDIT! File to edit: dev/90_notebook_core.ipynb (unless otherwise specified).
__all__ = ['in_ipython', 'IN_IPYTHON', 'in_colab', 'IN_COLAB', 'in_notebook', 'IN_NOTEBOOK']
from ..imports import *
def in_ipython():
"Check if the code is running in the ipython environment (jupyter including)"
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 53 |
4d127e1cd3fe18cacf11291a387628624ffb1c7b | 5,685 | py | Python | requestsdata.py | saulcosta18/hackvt2016 | c4aa26b71079422ffbb7e15f1dfe41235c93a220 | [
"BSD-3-Clause"
] | null | null | null | requestsdata.py | saulcosta18/hackvt2016 | c4aa26b71079422ffbb7e15f1dfe41235c93a220 | [
"BSD-3-Clause"
] | null | null | null | requestsdata.py | saulcosta18/hackvt2016 | c4aa26b71079422ffbb7e15f1dfe41235c93a220 | [
"BSD-3-Clause"
] | null | null | null | import random
from hackvt2016.resource.models import Resource
from hackvt2016.category.models import Category
def load_seeds():
"""
max longitudes and latitudes:
Coordinates
[5:55]
lat: 42.777 - 44.953
long: (-72.632) - (-73.132)
lat: 44.452 - 44.953
long: (-71.739) - (-72.632)
"""
for ind... | 50.758929 | 160 | 0.619173 | import requests
import random
from hackvt2016.app import create_app
from hackvt2016.resource.models import Resource
from hackvt2016.category.models import Category
def main():
create_app().app_context().push()
Resource.query.delete()
load_libraries()
load_seeds()
def load_seeds():
"""
max ... | 0 | 0 | 0 | 0 | 0 | 833 | 0 | 10 | 90 |
d11452d1558b0f5076cec42d82d74dea95d013aa | 3,528 | py | Python | [OPMan]/Seasonals [TV]/2011-4 - Fall/[a8292] Ben-To/BentoBD_NCOP1v01.py | LightArrowsEXE/Encoding-Projects | 4ea96a5b25a7710f615ada5ff25949c496492b53 | [
"MIT"
] | 57 | 2019-01-31T17:32:46.000Z | 2022-03-23T05:46:51.000Z | [OPMan]/Seasonals [TV]/2011-4 - Fall/[a8292] Ben-To/BentoBD_NCOP1v01.py | LightArrowsEXE/Encoding-Projects | 4ea96a5b25a7710f615ada5ff25949c496492b53 | [
"MIT"
] | null | null | null | [OPMan]/Seasonals [TV]/2011-4 - Fall/[a8292] Ben-To/BentoBD_NCOP1v01.py | LightArrowsEXE/Encoding-Projects | 4ea96a5b25a7710f615ada5ff25949c496492b53 | [
"MIT"
] | 12 | 2019-04-30T06:16:13.000Z | 2022-03-14T16:15:07.000Z | from typing import List
import vapoursynth as vs
from lvsfunc.misc import source
from lvsfunc.types import Range
from vardautomation import (FileInfo, PresetBD, PresetFLAC, VPath)
from bento_filters import flt
core = vs.core
core.num_threads = 16
EPNUM = __file__[-5:-3]
# Sources
JPBD = FileInfo(r'BDMV/Vol.1/BDMV... | 31.5 | 127 | 0.642574 | import subprocess
from typing import List, Tuple
import vapoursynth as vs
from lvsfunc.misc import source
from lvsfunc.types import Range
from vardautomation import (FSRCNNX_56_16_4_1, JAPANESE, AudioCutter,
AudioStream, BasicTool, FileInfo, FlacEncoder, Mux,
Pre... | 0 | 0 | 0 | 1,096 | 0 | 0 | 0 | 250 | 89 |
ee5b6fba5eb91f07b96eece0fb24f71f34b641c3 | 390 | py | Python | ribosome/test/klk/matchers/window.py | tek/ribosome-py | 8bd22e549ddff1ee893d6e3a0bfba123a09e96c6 | [
"MIT"
] | null | null | null | ribosome/test/klk/matchers/window.py | tek/ribosome-py | 8bd22e549ddff1ee893d6e3a0bfba123a09e96c6 | [
"MIT"
] | null | null | null | ribosome/test/klk/matchers/window.py | tek/ribosome-py | 8bd22e549ddff1ee893d6e3a0bfba123a09e96c6 | [
"MIT"
] | null | null | null |
__all__ = ('current_cursor_is',)
| 27.857143 | 66 | 0.8 | from kallikrein import Expectation
from kallikrein.matchers.comparison import eq
from ribosome.test.klk.expectation import await_k_with
from ribosome.nvim.io.compute import NvimIO
from ribosome.nvim.api.ui import current_cursor
def current_cursor_is(line: int, col: int) -> NvimIO[Expectation]:
return await_k_wit... | 0 | 0 | 0 | 0 | 0 | 102 | 0 | 118 | 134 |
a2f6168f0742f4589ed364cb98a691fe3a86d64b | 903 | py | Python | Exception Case/304. Range Sum Query 2D - Immutable.py | Into-Y0u/Github-Baby | 5e4e6b02f49c2c99533289be9d49911006cad919 | [
"MIT"
] | null | null | null | Exception Case/304. Range Sum Query 2D - Immutable.py | Into-Y0u/Github-Baby | 5e4e6b02f49c2c99533289be9d49911006cad919 | [
"MIT"
] | null | null | null | Exception Case/304. Range Sum Query 2D - Immutable.py | Into-Y0u/Github-Baby | 5e4e6b02f49c2c99533289be9d49911006cad919 | [
"MIT"
] | null | null | null |
# Your NumMatrix object will be instantiated and called as such:
# obj = NumMatrix(matrix)
# param_1 = obj.sumRegion(row1,col1,row2,col2)
| 30.1 | 75 | 0.528239 | class NumMatrix:
def __init__(self, mat: List[List[int]]):
row = len(mat)
col = len(mat[0])
self.dp = [[0]*(col+1) for _ in range(row+1)]
for i in range(row):
prefix = 0
for j in range(col):
prefix += mat[i][j]
... | 0 | 0 | 0 | 732 | 0 | 0 | 0 | 0 | 22 |
78b02f8a4c005f33a699cb1d5f31e0d92ffae42d | 6,033 | py | Python | tests/test_varma_lingam.py | Koji-Kurihara/lingam | 880561f619d2d185614df4a97b6bc38917f9e901 | [
"MIT"
] | 159 | 2019-08-22T05:17:19.000Z | 2022-03-28T23:41:27.000Z | tests/test_varma_lingam.py | Koji-Kurihara/lingam | 880561f619d2d185614df4a97b6bc38917f9e901 | [
"MIT"
] | 14 | 2020-04-26T17:25:42.000Z | 2022-02-14T08:05:05.000Z | tests/test_varma_lingam.py | Koji-Kurihara/lingam | 880561f619d2d185614df4a97b6bc38917f9e901 | [
"MIT"
] | 27 | 2020-01-19T07:31:08.000Z | 2021-12-26T06:23:35.000Z |
import numpy as np
def randnetbalanced(dims, samples, indegree, parminmax, errminmax):
"""
matlab
create a more balanced random network
Parameter
---------
dims : int
number of variables
samples : int
number of samples
indegree : int or float('inf')
number of p... | 32.262032 | 133 | 0.554119 | import os
import numpy as np
import pandas as pd
from lingam.varma_lingam import VARMALiNGAM
def randnetbalanced(dims, samples, indegree, parminmax, errminmax):
"""
この関数は以前頂いたmatlabのスクリプトを移植したものですのでご確認不要です。
create a more balanced random network
Parameter
---------
dims : int
number o... | 105 | 0 | 0 | 0 | 0 | 3,226 | 0 | 8 | 113 |
76fa268006028c6c1e1382c0093069282b0af4b7 | 2,295 | py | Python | examples/pxScene2d/external/libnode-v6.9.0/tools/comtypes/test/test_outparam.py | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 212 | 2015-01-13T18:24:17.000Z | 2022-03-28T07:52:48.000Z | examples/pxScene2d/external/libnode-v6.9.0/tools/comtypes/test/test_outparam.py | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 1,432 | 2017-06-21T04:08:48.000Z | 2020-08-25T16:21:15.000Z | examples/pxScene2d/external/libnode-v6.9.0/tools/comtypes/test/test_outparam.py | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 317 | 2017-06-20T19:57:17.000Z | 2020-09-16T10:28:30.000Z | import unittest
import comtypes.test
comtypes.test.requires("devel")
malloc = POINTER(IMalloc)()
oledll.ole32.CoGetMalloc(1, byref(malloc))
assert bool(malloc)
c_wchar_p.__ctypes_from_outparam__ = from_outparm
## print comstring("Hello, World", c_wchar_p).__ctypes_from_outparam__()
## print comstring("... | 32.785714 | 81 | 0.606536 | from ctypes import *
import unittest
import comtypes.test
comtypes.test.requires("devel")
from comtypes import BSTR, IUnknown, GUID, COMMETHOD, HRESULT
class IMalloc(IUnknown):
_iid_ = GUID("{00000002-0000-0000-C000-000000000046}")
_methods_ = [
COMMETHOD([], c_void_p, "Alloc",
([], ... | 0 | 0 | 0 | 1,063 | 0 | 476 | 0 | 39 | 136 |
6f4549892c4096edd9c43c705922b69c8f1d0a6c | 2,458 | py | Python | scripts/logreg_multiclass_demo2.py | vipavlovic/pyprobml | 59a2edc682d0163955db5e2f27491ad772b60141 | [
"MIT"
] | 4,895 | 2016-08-17T22:28:34.000Z | 2022-03-31T17:07:15.000Z | scripts/logreg_multiclass_demo2.py | vipavlovic/pyprobml | 59a2edc682d0163955db5e2f27491ad772b60141 | [
"MIT"
] | 446 | 2016-09-17T14:35:29.000Z | 2022-03-31T19:59:33.000Z | scripts/logreg_multiclass_demo2.py | vipavlovic/pyprobml | 59a2edc682d0163955db5e2f27491ad772b60141 | [
"MIT"
] | 1,160 | 2016-08-18T23:19:27.000Z | 2022-03-31T12:44:07.000Z |
# Fit logistic regression models to 3 classs 2d data.
import matplotlib.pyplot as plt
import numpy as np
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LogisticRegression
figdir = "../figures"
X, y = create_data(100)
nclasses = len(np.unique(y))
degrees = [1, 2, 10, 20]
... | 30.725 | 127 | 0.615948 |
# Fit logistic regression models to 3 classs 2d data.
import superimport
import matplotlib.pyplot as plt
import numpy as np
from sklearn.preprocessing import PolynomialFeatures
from scipy.stats import multivariate_normal as mvn
from sklearn.linear_model import LogisticRegression
import matplotlib.colors as mcol
impo... | 0 | 0 | 0 | 0 | 0 | 769 | 0 | 25 | 157 |
7756c016ce3496559cfa61adcacf9fdb4304fee4 | 14,346 | py | Python | python/presched.py | lsst/rtn-014 | 773e470c06371fffb3c9844923065a9f0e0e70bf | [
"CC-BY-4.0"
] | null | null | null | python/presched.py | lsst/rtn-014 | 773e470c06371fffb3c9844923065a9f0e0e70bf | [
"CC-BY-4.0"
] | null | null | null | python/presched.py | lsst/rtn-014 | 773e470c06371fffb3c9844923065a9f0e0e70bf | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
"""Pre-schedule DDF sequences
"""
# pylint: disable=no-member
# imports
import sys
import logging
from argparse import ArgumentParser
import yaml
import numpy as np
import pandas as pd
import astropy.coordinates
import astropy.units as u
import lsst.sims.utils
# constants
# exception classes
... | 33.362791 | 88 | 0.640876 | #!/usr/bin/env python
"""Pre-schedule DDF sequences
"""
# pylint: disable=no-member
# imports
import sys
import logging
from argparse import ArgumentParser
import yaml
import numpy as np
import pandas as pd
import astropy.coordinates
import astropy.units as u
import lsst.sims.utils
# constants
# exception classes
... | 0 | 0 | 0 | 0 | 0 | 4,567 | 0 | 0 | 115 |
4ffb8db0c57128edf137b856b06f93dfc1f283a0 | 8,608 | py | Python | mab/gd/nbody/snapshot.py | maartenbreddels/mab | 112dcfbc4a74b07aff13d489b3776bca58fe9bdf | [
"MIT"
] | 1 | 2018-12-01T04:10:34.000Z | 2018-12-01T04:10:34.000Z | mab/gd/nbody/snapshot.py | maartenbreddels/mab | 112dcfbc4a74b07aff13d489b3776bca58fe9bdf | [
"MIT"
] | null | null | null | mab/gd/nbody/snapshot.py | maartenbreddels/mab | 112dcfbc4a74b07aff13d489b3776bca58fe9bdf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import mab.gd.logging as logging
logger = logging.getLogger("gd.nbody.gadget")
| 33.364341 | 132 | 0.646027 | # -*- coding: utf-8 -*-
from numpy import *
from mab.binningtools import bingrid, binrange
import mab.gd.logging as logging
logger = logging.getLogger("gd.nbody.gadget")
class Component(object):
def __init__(self, name, q, p, mass, potential=None):
self.name = name
self.q = q
self.p = p
self.mass = mass
... | 0 | 0 | 0 | 8,258 | 0 | 0 | 0 | 23 | 215 |
0f9938e3d277edecec666efae97a653271e989ee | 6,892 | py | Python | chb/arm/ARMFunction.py | orinatic/CodeHawk-Binary | 8b4fd728213e629736d5ece840ea3b43cea53f30 | [
"MIT"
] | null | null | null | chb/arm/ARMFunction.py | orinatic/CodeHawk-Binary | 8b4fd728213e629736d5ece840ea3b43cea53f30 | [
"MIT"
] | null | null | null | chb/arm/ARMFunction.py | orinatic/CodeHawk-Binary | 8b4fd728213e629736d5ece840ea3b43cea53f30 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# CodeHawk Binary Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2021 Aarno Labs LLC
#
# Permission is hereby granted, free of charg... | 36.465608 | 82 | 0.606065 | # ------------------------------------------------------------------------------
# CodeHawk Binary Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2021 Aarno Labs LLC
#
# Permission is hereby granted, free of charg... | 0 | 1,909 | 0 | 2,751 | 0 | 0 | 0 | 416 | 404 |
6ece77b6e0e3299f441d2801f483c672b6b6feb4 | 9,137 | py | Python | KmeansCluster.py | QuKunLab/RA-OA | 0672bf306a31e2e4295ec7e6d279daf34ba30b91 | [
"BSD-2-Clause"
] | null | null | null | KmeansCluster.py | QuKunLab/RA-OA | 0672bf306a31e2e4295ec7e6d279daf34ba30b91 | [
"BSD-2-Clause"
] | null | null | null | KmeansCluster.py | QuKunLab/RA-OA | 0672bf306a31e2e4295ec7e6d279daf34ba30b91 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import matplotlib.pyplot as plt
import os
import scipy.stats
import scipy.stats as stats
import matplotlib as mpl
from sklearn.cluster import KMeans
mpl.rcParams['pdf.fonttype'] = 42
mpl.rcParams["font.sans-serif"] = "Arial"
#1.Z-score Normalzie Di... | 36.257937 | 246 | 0.700887 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import statsmodels.api as sm
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from mpl_toolkits.mplot3d import Axes3D
import seaborn as sns
import os
import sys
import scipy.stats
from scipy.stats.mstats import... | 141 | 0 | 0 | 0 | 0 | 6,612 | 0 | 32 | 221 |
53904af3d0ccc22a36392a88bb13320439f920d6 | 515 | py | Python | Versuch5/versuch5/task1.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch5/versuch5/task1.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch5/versuch5/task1.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | 1 | 2022-01-06T12:47:53.000Z | 2022-01-06T12:47:53.000Z | import redlab as rl
print("-------einzelneWerte-------------------------")
print("16BitValue:" + str(rl.cbAIn(0, 0, 1)))
print("VoltageValue:" + str(rl.cbVIn(0, 0, 1)))
print("-------Messreihe-------------------------")
print("Messreihe:" + str(rl.cbAInScan(0, 0, 0, 300, 8000, 1)))
print("Messreihe:" + str(rl.cbVInSca... | 42.916667 | 62 | 0.528155 | import redlab as rl
print("-------einzelneWerte-------------------------")
print("16BitValue:" + str(rl.cbAIn(0, 0, 1)))
print("VoltageValue:" + str(rl.cbVIn(0, 0, 1)))
print("-------Messreihe-------------------------")
print("Messreihe:" + str(rl.cbAInScan(0, 0, 0, 300, 8000, 1)))
print("Messreihe:" + str(rl.cbVInSca... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c8e80520bc7afbfcc20d06219c5fce1dcc434c47 | 7,628 | py | Python | Groups/Group_ID_3/Resources/dgcca_pckg/dgcca.py | gupta19avaneesh/DataScience | b37fc1208fc47187352b2066dbdca629014d92db | [
"MIT"
] | null | null | null | Groups/Group_ID_3/Resources/dgcca_pckg/dgcca.py | gupta19avaneesh/DataScience | b37fc1208fc47187352b2066dbdca629014d92db | [
"MIT"
] | null | null | null | Groups/Group_ID_3/Resources/dgcca_pckg/dgcca.py | gupta19avaneesh/DataScience | b37fc1208fc47187352b2066dbdca629014d92db | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DGCCA.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/15L_7jxf0KH81UjAO6waIbQso1nqML0kD
# Deep Generalized Cannonical Correlation Analysis Implementaion for 3 views
cca-zoo package is used for the implemntaion of gcca ... | 37.950249 | 300 | 0.62795 | # -*- coding: utf-8 -*-
"""DGCCA.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/15L_7jxf0KH81UjAO6waIbQso1nqML0kD
# Deep Generalized Cannonical Correlation Analysis Implementaion for 3 views
cca-zoo package is used for the implemntaion of gcca ... | 0 | 0 | 0 | 4,958 | 0 | 0 | 0 | -21 | 154 |
50d399aabd96ba4e8fc399b405e8d3519c4ea599 | 1,016 | py | Python | Calibration/HcalIsolatedTrackReco/python/isolPixelTrackProdL1T_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Calibration/HcalIsolatedTrackReco/python/isolPixelTrackProdL1T_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | Calibration/HcalIsolatedTrackReco/python/isolPixelTrackProdL1T_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
#IsolatedPixelTrackCandidateProducer default configuration
isolPixelTrackProd = cms.EDProducer("IsolatedPixelTrackCandidateL1TProducer",
L1eTauJetsSource = cms.InputTag( 'hltGtStage2Digis','Tau' ),
tauAssociationCone = cms.double( 0.0 ),
tauUnbi... | 46.181818 | 80 | 0.629921 | import FWCore.ParameterSet.Config as cms
#IsolatedPixelTrackCandidateProducer default configuration
isolPixelTrackProd = cms.EDProducer("IsolatedPixelTrackCandidateL1TProducer",
L1eTauJetsSource = cms.InputTag( 'hltGtStage2Digis','Tau' ),
tauAssociationCone = cms.double( 0.0 ),
tauUnbi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
509f3b7436d7a1154fae2d44583752b3127e2a1d | 3,406 | py | Python | tools/utilities/pythonlibs/procmon.py | awf/ELL | 25c94a1422efc41d5560db11b136f9d8f957ad41 | [
"MIT"
] | 2,094 | 2016-09-28T05:55:24.000Z | 2019-05-04T19:06:36.000Z | tools/utilities/pythonlibs/procmon.py | awesomemachinelearning/ELL | cb897e3aec148a1e9bd648012b5f53ab9d0dd20c | [
"MIT"
] | 213 | 2017-06-30T12:53:40.000Z | 2019-05-03T06:35:38.000Z | tools/utilities/pythonlibs/procmon.py | awesomemachinelearning/ELL | cb897e3aec148a1e9bd648012b5f53ab9d0dd20c | [
"MIT"
] | 301 | 2017-03-24T08:40:00.000Z | 2019-05-02T21:22:28.000Z | #!/usr/bin/env python3
####################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: procmon.py
# Authors: Lisa Ong
#
# Requires: Python 3.4+, psutil (pip install psutil)
#
#############################################... | 36.623656 | 110 | 0.576629 | #!/usr/bin/env python3
####################################################################################################
#
# Project: Embedded Learning Library (ELL)
# File: procmon.py
# Authors: Lisa Ong
#
# Requires: Python 3.4+, psutil (pip install psutil)
#
#############################################... | 0 | 0 | 0 | 2,442 | 0 | 0 | 0 | -21 | 111 |
a67a765a9a4713271e8e62411009037eac7253b5 | 2,047 | py | Python | chapter5/logistic_regression_tf.py | arifmudi/Python-Machine-Learning-By-Example-Third-Edition | 7bdc45df2b519e3c0a929b03f0ac6fe30e028382 | [
"MIT"
] | 49 | 2020-03-21T08:37:46.000Z | 2022-02-01T12:48:23.000Z | chapter5/logistic_regression_tf.py | hmoharrer/Python-Machine-Learning-By-Example-Third-Edition | 7bdc45df2b519e3c0a929b03f0ac6fe30e028382 | [
"MIT"
] | 2 | 2021-03-28T17:25:57.000Z | 2021-04-05T18:14:55.000Z | chapter5/logistic_regression_tf.py | hmoharrer/Python-Machine-Learning-By-Example-Third-Edition | 7bdc45df2b519e3c0a929b03f0ac6fe30e028382 | [
"MIT"
] | 40 | 2020-05-02T18:30:00.000Z | 2022-02-27T09:15:16.000Z | '''
Source codes for Python Machine Learning By Example 3rd Edition (Packt Publishing)
Chapter 5 Predicting Online Ads Click-through with Logistic Regression
Author: Yuxi (Hayden) Liu (yuxi.liu.ece@gmail.com)
'''
import tensorflow as tf
import pandas as pd
n_rows = 300000
df = pd.read_csv("train", nrows=n_rows)
X = ... | 32.492063 | 101 | 0.713727 | '''
Source codes for Python Machine Learning By Example 3rd Edition (Packt Publishing)
Chapter 5 Predicting Online Ads Click-through with Logistic Regression
Author: Yuxi (Hayden) Liu (yuxi.liu.ece@gmail.com)
'''
import tensorflow as tf
import pandas as pd
n_rows = 300000
df = pd.read_csv("train", nrows=n_rows)
X = ... | 0 | 0 | 0 | 0 | 0 | 280 | 0 | 0 | 23 |
7afcc3bdf1870a247dc1c1d0dbd2c4cb23972b11 | 1,243 | py | Python | zipline/research/utils.py | zhangshoug/czipline | 6bce0abd4772443547f44669c0adb2b5c63f64db | [
"Apache-2.0"
] | 9 | 2019-05-18T10:44:48.000Z | 2022-01-01T15:12:49.000Z | zipline/research/utils.py | yuanyichuangzhi/czipline | 6bce0abd4772443547f44669c0adb2b5c63f64db | [
"Apache-2.0"
] | null | null | null | zipline/research/utils.py | yuanyichuangzhi/czipline | 6bce0abd4772443547f44669c0adb2b5c63f64db | [
"Apache-2.0"
] | 10 | 2019-05-18T10:58:55.000Z | 2022-03-24T13:37:17.000Z | """
"""
from .core import symbols, to_tdates
def select_output_by(output, start=None, end=None, assets=None):
"""
`pipeline`
run_pipeline
----
output : MultiIndex DataFrame
pipeline
start str
end str
assets str
----
... | 25.367347 | 90 | 0.552695 | """
辅助函数
"""
from cswd.common.utils import ensure_list
from .core import symbols, to_tdates
def select_output_by(output, start=None, end=None, assets=None):
"""
按时间及代码选择`pipeline`输出数据框
专用于研究环境下的run_pipeline输出结果分析
参数
----
output : MultiIndex DataFrame
pipeline输出结果
start : str... | 267 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 22 |
0704bd67d154c320c0f8e0d4454e9c628972c408 | 2,068 | py | Python | NodeGraphQt/widgets/actions.py | uclatommy/NodeGraphQt | aaf09fa6e7cd0745218e6039ee2befdab117daec | [
"MIT"
] | 582 | 2018-03-04T10:25:32.000Z | 2022-03-31T06:41:17.000Z | NodeGraphQt/widgets/actions.py | zhollosy/NodeGraphQt | c2ad7ce3ee31e348207f18636571bcb53ac8f5b9 | [
"MIT"
] | 156 | 2018-03-03T21:41:36.000Z | 2022-03-29T02:14:42.000Z | NodeGraphQt/widgets/actions.py | zhollosy/NodeGraphQt | c2ad7ce3ee31e348207f18636571bcb53ac8f5b9 | [
"MIT"
] | 160 | 2018-03-09T10:29:42.000Z | 2022-03-31T06:41:23.000Z | #!/usr/bin/python
| 28.722222 | 59 | 0.587524 | #!/usr/bin/python
from Qt import QtCore, QtWidgets
from .stylesheet import STYLE_QMENU
class BaseMenu(QtWidgets.QMenu):
def __init__(self, *args, **kwargs):
super(BaseMenu, self).__init__(*args, **kwargs)
self.setStyleSheet(STYLE_QMENU)
self.node_class = None
self.graph = None
... | 0 | 0 | 0 | 1,909 | 0 | 0 | 0 | 25 | 113 |
18f3fbdbd98aa3ec3c80b36171574776f4dfd9c4 | 1,270 | py | Python | src/common/status.py | cchienhao/data_collector | 89546e6445f51ce29197c2bdc508d495a100ffb0 | [
"Apache-2.0"
] | 1 | 2016-02-05T06:54:15.000Z | 2016-02-05T06:54:15.000Z | src/common/status.py | cchienhao/data_collector | 89546e6445f51ce29197c2bdc508d495a100ffb0 | [
"Apache-2.0"
] | null | null | null | src/common/status.py | cchienhao/data_collector | 89546e6445f51ce29197c2bdc508d495a100ffb0 | [
"Apache-2.0"
] | null | null | null | '''
Created on Aug 29 2015
@author: kevin.chien@94301.ca
'''
# server info status code
OK = FlamesStatus(0, 'common.ok', 'OK.')
# server error status code
UNEXPECTED_EXCEPTION = FlamesStatus(1000001, 'common.unexpected_exception', 'Unknown Error.')
UNKNOWN_RESOURCE = FlamesStatus(1000002, 'common.unknown_res... | 36.285714 | 115 | 0.687402 | '''
Created on Aug 29 2015
@author: kevin.chien@94301.ca
'''
class FlamesStatus(object):
def __init__(self, code, key, message):
self.code = code
self.key = key
self.message = message
def __eq__(self, other):
if isinstance(other, FlamesStatus):
return other.code == ... | 0 | 0 | 0 | 348 | 0 | 0 | 0 | 0 | 22 |
9bfb88480b31160b32d5aff1097a83c3f22006d7 | 3,125 | py | Python | tests/unittests/pytorch_lightning/test_prepare.py | lf1-io/padl-extensions | f82c9591e07e30d770ea8ec4ae411d9b4838ac0a | [
"Apache-2.0"
] | 1 | 2022-03-15T14:16:01.000Z | 2022-03-15T14:16:01.000Z | tests/unittests/pytorch_lightning/test_prepare.py | lf1-io/padl-extensions | f82c9591e07e30d770ea8ec4ae411d9b4838ac0a | [
"Apache-2.0"
] | 4 | 2022-03-07T13:54:01.000Z | 2022-03-09T08:48:19.000Z | tests/unittests/pytorch_lightning/test_prepare.py | lf1-io/padl-extensions | f82c9591e07e30d770ea8ec4ae411d9b4838ac0a | [
"Apache-2.0"
] | null | null | null | try:
except (ImportError, ModuleNotFoundError):
pass
| 32.552083 | 89 | 0.67872 | import pytest
import torch
import tempfile
import shutil
import os
from tests.material import utils
import padl
from padl import transform, identity, batch
from padl_ext.pytorch_lightning.prepare import LightningModule
try:
import pytorch_lightning as pl
from pytorch_lightning.callbacks import ModelCheckpoin... | 0 | 2,494 | 0 | 137 | 0 | 0 | 0 | 64 | 368 |
a8240d96ece80865b53b5757db01662c80a211d1 | 1,314 | py | Python | pyAnaf/console.py | agilegeeks/pyAnaf | 764f7d8fb300135a3d98559b953e3ca2a4507216 | [
"MIT"
] | null | null | null | pyAnaf/console.py | agilegeeks/pyAnaf | 764f7d8fb300135a3d98559b953e3ca2a4507216 | [
"MIT"
] | null | null | null | pyAnaf/console.py | agilegeeks/pyAnaf | 764f7d8fb300135a3d98559b953e3ca2a4507216 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import print_function
import sys
import os
try:
from pyAnaf.api import Anaf
except:
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
if __name__ == '__main__':
main()
| 21.540984 | 86 | 0.614916 | # coding: utf-8
from __future__ import print_function
import sys
import os
import datetime
import pprint
try:
from pyAnaf.api import Anaf
except:
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from pyAnaf.api import Anaf
class MyPrettyPrinter(pprint.PrettyPrinter):
... | 0 | 0 | 0 | 314 | 0 | 619 | 0 | -8 | 139 |
c0ac5e48f23ca1dfac72643fbf846a6c9a2d0143 | 3,837 | py | Python | binary_validation.py | jorgessanchez7/Global_Forecast_Validation | d3178acaa2a67801e832554a3f871b36c266fe3a | [
"MIT"
] | null | null | null | binary_validation.py | jorgessanchez7/Global_Forecast_Validation | d3178acaa2a67801e832554a3f871b36c266fe3a | [
"MIT"
] | null | null | null | binary_validation.py | jorgessanchez7/Global_Forecast_Validation | d3178acaa2a67801e832554a3f871b36c266fe3a | [
"MIT"
] | null | null | null | import pandas as pd
df = pd.read_csv('/Users/student/Dropbox/PhD/2019 Summer/Dissertation_v7/Colombia/Stations_Selected_Colombia_RT.csv')
IDs = df['Codigo'].tolist()
COMIDs = df['COMID'].tolist()
Names = df['Nombre'].tolist()
Rivers = df['Corriente'].tolist()
'''Get Historical Observed Water Levels'''
observed_wl_d... | 44.103448 | 192 | 0.765181 | import pandas as pd
df = pd.read_csv('/Users/student/Dropbox/PhD/2019 Summer/Dissertation_v7/Colombia/Stations_Selected_Colombia_RT.csv')
IDs = df['Codigo'].tolist()
COMIDs = df['COMID'].tolist()
Names = df['Nombre'].tolist()
Rivers = df['Corriente'].tolist()
'''Get Historical Observed Water Levels'''
observed_wl_d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cde94d9729ccd961b34eeaae00dfaa61f34100e7 | 484 | py | Python | solutions/python3/366.py | sm2774us/amazon_interview_prep_2021 | f580080e4a6b712b0b295bb429bf676eb15668de | [
"MIT"
] | 42 | 2020-08-02T07:03:49.000Z | 2022-03-26T07:50:15.000Z | solutions/python3/366.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | null | null | null | solutions/python3/366.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | 40 | 2020-02-08T02:50:24.000Z | 2022-03-26T15:38:10.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None | 26.888889 | 56 | 0.508264 | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def findLeaves(self, root):
res = []
def dfs(node):
if not node: return -1
i = max(dfs(node.left)... | 0 | 0 | 0 | 300 | 0 | 0 | 0 | 0 | 23 |
f431633ee4462edfe7c7f4f450d9d0fb74a2ba86 | 372 | py | Python | game/drawing/background.py | samer25/Game-Tank | fa5b63f6b224e56205ab75b8aefcf557405e1ffe | [
"MIT"
] | null | null | null | game/drawing/background.py | samer25/Game-Tank | fa5b63f6b224e56205ab75b8aefcf557405e1ffe | [
"MIT"
] | 1 | 2020-04-13T21:04:46.000Z | 2020-04-13T22:17:12.000Z | game/drawing/background.py | samer25/Game-Tank | fa5b63f6b224e56205ab75b8aefcf557405e1ffe | [
"MIT"
] | null | null | null |
"""getting the screen and setting background """
| 28.615385 | 62 | 0.715054 | from main_dir.drawing.background_loads import BackgroundLoads
"""getting the screen and setting background """
class BackGround:
"""taking the image"""
view_background = BackgroundLoads().load_and_move()
def redraw_game_window(self, screen):
"""setting background in the screen at position x y""... | 0 | 0 | 0 | 235 | 0 | 0 | 0 | 40 | 45 |
81315fed9dd12dbca559c8e90236ab5b3cad7118 | 3,011 | py | Python | yellowbrick/utils/decorators.py | souravsingh/yellowbrick | a5941a6c47fbe5264f3622bc15276ba618bbe1d0 | [
"Apache-2.0"
] | 20 | 2018-03-24T02:29:20.000Z | 2022-03-03T05:01:40.000Z | yellowbrick/utils/decorators.py | souravsingh/yellowbrick | a5941a6c47fbe5264f3622bc15276ba618bbe1d0 | [
"Apache-2.0"
] | 4 | 2018-03-20T12:01:17.000Z | 2019-04-07T16:02:19.000Z | yellowbrick/utils/decorators.py | souravsingh/yellowbrick | a5941a6c47fbe5264f3622bc15276ba618bbe1d0 | [
"Apache-2.0"
] | 5 | 2018-03-17T08:18:57.000Z | 2019-11-15T02:20:20.000Z | # yellowbrick.utils.decorators
# Decorators and descriptors for annotating yellowbrick library functions.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Thu May 18 15:13:33 2017 -0400
#
# Copyright (C) 2017 District Data Labs
# For license information, see LICENSE.txt
#
# ID: decorators.py... | 31.041237 | 92 | 0.608436 | # yellowbrick.utils.decorators
# Decorators and descriptors for annotating yellowbrick library functions.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Thu May 18 15:13:33 2017 -0400
#
# Copyright (C) 2017 District Data Labs
# For license information, see LICENSE.txt
#
# ID: decorators.py... | 0 | 150 | 0 | 1,419 | 0 | 0 | 0 | 6 | 73 |
47aea7edbb1624ac0e6d24aad6bfb86d4c710c29 | 1,169 | py | Python | manage.py | AymanKandil/OHAS | 1f19a790a8e8c6a864c0dcb75cf127f591121d3b | [
"MIT"
] | null | null | null | manage.py | AymanKandil/OHAS | 1f19a790a8e8c6a864c0dcb75cf127f591121d3b | [
"MIT"
] | null | null | null | manage.py | AymanKandil/OHAS | 1f19a790a8e8c6a864c0dcb75cf127f591121d3b | [
"MIT"
] | null | null | null |
main()
| 29.974359 | 86 | 0.640719 | import argparse
from werkzeug.security import generate_password_hash
import secrets
import string
from modules.Auth.auth import auth
from modules.Auth.user_db import UserDatabase
from app import app
def main():
parser = argparse.ArgumentParser(description="Archive posters from impawards.com")
parser.add_argum... | 0 | 0 | 0 | 0 | 0 | 938 | 0 | 45 | 178 |
6d7e33ce60a96fcf9572c9733c365e3a8e958a32 | 12,085 | py | Python | version/database/db.py | rabaarabaa/happypanda | e35fe4b32ea4fd5f373f226c4d6026e0d6d11e80 | [
"Apache-2.0"
] | null | null | null | version/database/db.py | rabaarabaa/happypanda | e35fe4b32ea4fd5f373f226c4d6026e0d6d11e80 | [
"Apache-2.0"
] | 4 | 2020-11-10T01:43:50.000Z | 2021-01-14T21:14:38.000Z | version/database/db.py | rabaarabaa/happypanda | e35fe4b32ea4fd5f373f226c4d6026e0d6d11e80 | [
"Apache-2.0"
] | null | null | null | # """
# This file is part of Happypanda.
# Happypanda is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# any later version.
# Happypanda is distributed in the hope that it wi... | 31.146907 | 112 | 0.629458 | # """
# This file is part of Happypanda.
# Happypanda is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# any later version.
# Happypanda is distributed in the hope that it wi... | 0 | 1,683 | 0 | 352 | 0 | 4,985 | 0 | 9 | 328 |