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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
057b011483b41a91c210fe28c87ea22775a3cfe2 | 1,336 | py | Python | setup.py | mark-summerfield/goldilocks | ea333a739baf71e6d2e3a9a2b5afde9e14cf9eb1 | [
"MIT"
] | 14 | 2015-03-05T13:10:21.000Z | 2021-10-30T01:25:51.000Z | setup.py | mark-summerfield/goldilocks | ea333a739baf71e6d2e3a9a2b5afde9e14cf9eb1 | [
"MIT"
] | 11 | 2015-03-05T12:43:22.000Z | 2016-10-26T09:14:38.000Z | setup.py | mark-summerfield/goldilocks | ea333a739baf71e6d2e3a9a2b5afde9e14cf9eb1 | [
"MIT"
] | 19 | 2015-06-29T08:07:46.000Z | 2022-02-03T18:00:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
README = open('README.rst').read()
CHANGELOG = open('CHANGELOG.rst').read()
requirements = [
"numpy",
"matplotlib"
]
test_requirements = [
"tox",
"pytest",
"nose",
"python-coveralls",
]
setuptools.setup(
name="goldilocks",
... | 23.034483 | 68 | 0.633234 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
README = open('README.rst').read()
CHANGELOG = open('CHANGELOG.rst').read()
requirements = [
"numpy",
"matplotlib"
]
test_requirements = [
"tox",
"pytest",
"nose",
"python-coveralls",
]
setuptools.setup(
name="goldilocks",
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7220b8eda7f03bd50e2ed725b317e165c0308e13 | 262 | py | Python | src/artwork.py | Wanessa14/instahack | 66db0de4e829607a58056a9b963acaf1c2501915 | [
"MIT"
] | 1 | 2021-08-24T16:45:56.000Z | 2021-08-24T16:45:56.000Z | src/artwork.py | Dragon-Hacking/instahack | 2bd3b17d8ca994ea9ca11750ad7f838c61bf0aef | [
"MIT"
] | 1 | 2021-10-08T14:12:03.000Z | 2021-11-14T03:00:23.000Z | src/artwork.py | Dragon-Hacking/instahack | 2bd3b17d8ca994ea9ca11750ad7f838c61bf0aef | [
"MIT"
] | 1 | 2021-11-16T03:35:36.000Z | 2021-11-16T03:35:36.000Z | ascii_art = r"""
_ _ _ __
(_)_ __ ___| |_ __ _(_)_ __ / _| ___
| | '_ \/ __| __/ _` | | '_ \| |_ / _ \
| | | | \__ \ || (_| | | | | | _| (_) |
|_|_| |_|___/\__\__,_|_|_| |_|_| \___/
Author : Waseem Akram (Hacker wasii)
"""
| 29.111111 | 40 | 0.358779 | ascii_art = r"""
_ _ _ __
(_)_ __ ___| |_ __ _(_)_ __ / _| ___
| | '_ \/ __| __/ _` | | '_ \| |_ / _ \
| | | | \__ \ || (_| | | | | | _| (_) |
|_|_| |_|___/\__\__,_|_|_| |_|_| \___/
Author : Waseem Akram (Hacker wasii)
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7fffeaef9c794749123f4a8e58438099ee9b0dea | 2,998 | py | Python | main/wp_file_hash.py | Ollen/wp-scanner | 58b0452162e0a92ce5bc24eb6f0a2083f93a6774 | [
"MIT"
] | null | null | null | main/wp_file_hash.py | Ollen/wp-scanner | 58b0452162e0a92ce5bc24eb6f0a2083f93a6774 | [
"MIT"
] | null | null | null | main/wp_file_hash.py | Ollen/wp-scanner | 58b0452162e0a92ce5bc24eb6f0a2083f93a6774 | [
"MIT"
] | null | null | null | """ Hash wordpress files through FTP server """
import hashlib, os
def md5(fname, r_mode='rb'):
""" Returns a md5 hash string of a given filename """
hash_md5 = hashlib.md5()
with open(fname, r_mode) as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
... | 34.860465 | 114 | 0.6004 | """ Hash wordpress files through FTP server """
import hashlib, os
def md5(fname, r_mode='rb'):
""" Returns a md5 hash string of a given filename """
hash_md5 = hashlib.md5()
with open(fname, r_mode) as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
13e5b76e0a1a705b01ceedf6a1f4c3bd35635d64 | 1,271 | py | Python | wiki/wiki_dts2pdf.py | sourceperl/sandbox | bbe1be52c3e51906a8ec94411c4df6a95dcbb39c | [
"MIT"
] | null | null | null | wiki/wiki_dts2pdf.py | sourceperl/sandbox | bbe1be52c3e51906a8ec94411c4df6a95dcbb39c | [
"MIT"
] | null | null | null | wiki/wiki_dts2pdf.py | sourceperl/sandbox | bbe1be52c3e51906a8ec94411c4df6a95dcbb39c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# connect to mediawiki server and export all pages from a category to PDF files
#
# setup to use this script
# sudo pip3 install mwclient
# sudo apt-get install wkhtmltopdf
# WARN: wkhtmltopdf need an X server running, so if need, we use xvfb (virtual X server)
# s... | 32.589744 | 88 | 0.675059 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# connect to mediawiki server and export all pages from a category to PDF files
#
# setup to use this script
# sudo pip3 install mwclient
# sudo apt-get install wkhtmltopdf
# WARN: wkhtmltopdf need an X server running, so if need, we use xvfb (virtual X server)
# s... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a652f4643813debefc4f58d0ac33be8728d6fd55 | 1,464 | py | Python | pyras/controllers/hecras/hecrascontroller/__init__.py | solomonvimal/pyras | 5819d19eddc9165ac5179f4651f25fd5ecee70a3 | [
"MIT"
] | 11 | 2015-06-04T16:42:45.000Z | 2021-06-06T18:10:34.000Z | pyras/controllers/hecras/hecrascontroller/__init__.py | solomonvimal/pyras | 5819d19eddc9165ac5179f4651f25fd5ecee70a3 | [
"MIT"
] | null | null | null | pyras/controllers/hecras/hecrascontroller/__init__.py | solomonvimal/pyras | 5819d19eddc9165ac5179f4651f25fd5ecee70a3 | [
"MIT"
] | 10 | 2018-07-24T09:01:23.000Z | 2021-08-31T16:44:12.000Z | import os
from .. import hecrasgeometry
from .. import get_supported_versions
def HECRASController(ras_version=None):
""" """
if ras_version is None:
ras_version = os.environ['RAS_CONTROLLER_VERSION']
elif ras_version not in get_supported_versions():
error = 'ras_version "{}" not supporte... | 32.533333 | 79 | 0.631148 | import os
import win32com.client
from .. import hecrasgeometry
from .. import get_supported_versions
from ..runtime import Runtime
def HECRASController(ras_version=None):
""" """
if ras_version is None:
ras_version = os.environ['RAS_CONTROLLER_VERSION']
elif ras_version not in get_supported_vers... | 0 | 0 | 0 | 897 | 0 | 0 | 0 | 9 | 72 |
10cc8033fa0fec50e01f04efd4a1156ba10ea3ce | 6,755 | py | Python | soops/plot_selected.py | rc/pastrun | c88be09a7b7bd7ab56f1a0d27203c871a2aa1020 | [
"BSD-3-Clause"
] | null | null | null | soops/plot_selected.py | rc/pastrun | c88be09a7b7bd7ab56f1a0d27203c871a2aa1020 | [
"BSD-3-Clause"
] | null | null | null | soops/plot_selected.py | rc/pastrun | c88be09a7b7bd7ab56f1a0d27203c871a2aa1020 | [
"BSD-3-Clause"
] | null | null | null |
def get_row_style_used(row, selected, compares, styles, used, **plot_kwargs):
"""
Combines :func:`get_row_style()` and :func:`update_used()` into a single
call.
"""
style_kwargs, indices = get_row_style(
row, selected, compares, styles, **plot_kwargs
)
if indices is not None:
... | 31.273148 | 79 | 0.560622 | import itertools
import numpy as np
import matplotlib.pyplot as plt
from soops.base import output
from soops.parsing import parse_as_dict
def select_by_keys(df, keys):
selected = {key : sorted(df[key].unique()) for key in keys}
return selected
def normalize_selected(selected):
nselected = selected.copy(... | 0 | 0 | 0 | 0 | 0 | 5,943 | 0 | 28 | 388 |
992b3d20a5a1616d6906de4352555b09f48ab489 | 20,243 | py | Python | qupulse/pulses/loop_pulse_template.py | lankes-fzj/qupulse | 46f00f70bc998b98ac1ae4721d1a9a1c10b675aa | [
"MIT"
] | 2 | 2021-05-22T00:04:20.000Z | 2021-11-17T11:21:46.000Z | qupulse/pulses/loop_pulse_template.py | bpapajewski/qupulse | c3969a4fa9eabe69c1143ad16e6e3ca5fb9c068e | [
"MIT"
] | null | null | null | qupulse/pulses/loop_pulse_template.py | bpapajewski/qupulse | c3969a4fa9eabe69c1143ad16e6e3ca5fb9c068e | [
"MIT"
] | null | null | null | """This module defines LoopPulseTemplate, a higher-order hierarchical pulse template that loops
another PulseTemplate based on a condition."""
__all__ = ['ForLoopPulseTemplate', 'LoopPulseTemplate', 'LoopIndexNotUsedException']
| 47.076744 | 150 | 0.624364 | """This module defines LoopPulseTemplate, a higher-order hierarchical pulse template that loops
another PulseTemplate based on a condition."""
from typing import Dict, Set, Optional, Any, Union, Tuple, Generator, Sequence, cast
import warnings
import sympy
from cached_property import cached_property
from qupulse.se... | 0 | 3,974 | 0 | 15,004 | 0 | 0 | 0 | 581 | 449 |
58f461be6b931bf4e77d47cb2ba2f65f64387b60 | 4,246 | py | Python | util/templates/yfinance_daily_stock_etl_v_1.py | markortleb/asset_data_system | 976814cac4529188d7ddf9fe19d4bb47488c9b80 | [
"Apache-2.0"
] | null | null | null | util/templates/yfinance_daily_stock_etl_v_1.py | markortleb/asset_data_system | 976814cac4529188d7ddf9fe19d4bb47488c9b80 | [
"Apache-2.0"
] | null | null | null | util/templates/yfinance_daily_stock_etl_v_1.py | markortleb/asset_data_system | 976814cac4529188d7ddf9fe19d4bb47488c9b80 | [
"Apache-2.0"
] | null | null | null |
ARGS, UNKNOWN = parse_args()
def merge_daily_df(new_df, old_df):
"""Merge YFinance Daily Dfs
Args:
new_df (pandas dataframe): DF containg YFinance Ticker Info, new read
old_df (pandas dataframe): DF containg Stored MongoDB Ticker Info, old read
Returns:
pandas dataframe: ... | 27.571429 | 87 | 0.653085 | from pymongo import MongoClient
import yfinance as yf #pip install yfinance
import os
from datetime import datetime, timedelta
import glob
import shutil
import time
import csv
import argparse
import pandas as pd
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
'-s',
'-... | 0 | 0 | 0 | 0 | 0 | 2,616 | 0 | -30 | 405 |
db6a151b04c7a92fcf27a5834e943210e04cccfb | 1,420 | py | Python | core/progress.py | TSalty21/bifurcations | c0aa3f2bac4d75cfca015584bd14be5dfc963434 | [
"MIT"
] | null | null | null | core/progress.py | TSalty21/bifurcations | c0aa3f2bac4d75cfca015584bd14be5dfc963434 | [
"MIT"
] | null | null | null | core/progress.py | TSalty21/bifurcations | c0aa3f2bac4d75cfca015584bd14be5dfc963434 | [
"MIT"
] | null | null | null |
__all__ = ["ProgressBar"]
| 27.843137 | 91 | 0.617606 | import functools
__all__ = ["ProgressBar"]
class ProgressBarPrinter:
def __init__(self, decorated, width, step):
self._decorated = decorated
self.width = width
self.step = step
self.current_progress = 0
self.last_progress = 0
def __get__(self, obj, objtype):
... | 0 | 0 | 0 | 1,209 | 0 | 120 | 0 | -5 | 68 |
66f28df64f288211a5c2913c7ad69b9cbb13bc85 | 806 | py | Python | parser.py | ceri01/volumesTrackerBot | 941d0c51568c90bfa29d6a96265e828a18a882e9 | [
"MIT"
] | null | null | null | parser.py | ceri01/volumesTrackerBot | 941d0c51568c90bfa29d6a96265e828a18a882e9 | [
"MIT"
] | null | null | null | parser.py | ceri01/volumesTrackerBot | 941d0c51568c90bfa29d6a96265e828a18a882e9 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
URL = "https://www.starcomics.com/catalogo-fumetti"
page = requests.get(URL)
soup = BeautifulSoup(page.content, "html.parser").find("tbody")
# This function format scraped elements
# This function adds manga to list
| 26.866667 | 63 | 0.624069 | from bs4 import BeautifulSoup
from manga import Manga
import requests
import re
URL = "https://www.starcomics.com/catalogo-fumetti"
page = requests.get(URL)
soup = BeautifulSoup(page.content, "html.parser").find("tbody")
# This function format scraped elements
def format_text(element):
element = element.text
... | 0 | 0 | 0 | 0 | 0 | 461 | 0 | -10 | 88 |
4a14f4e575b2ec54aa133ce3b2fca0d8dd934262 | 1,302 | py | Python | app/modules/social/video.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 7 | 2018-01-29T02:46:31.000Z | 2018-03-25T11:15:10.000Z | app/modules/social/video.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 4 | 2021-06-08T19:38:03.000Z | 2022-03-11T23:18:46.000Z | app/modules/social/video.py | Eastwu5788/Heron | 646eeaacea77e293c6eccc6dad82a04ece9294a3 | [
"Apache-2.0"
] | 1 | 2021-06-12T14:14:35.000Z | 2021-06-12T14:14:35.000Z | from . import social
social.add_url_rule("/video/uploadchatvideo", view_func=UploadChatVideoHandler.as_view("video_upload_chat_video"))
| 32.55 | 114 | 0.738095 | from . import social
from app import db
from app.modules.base.base_handler import BaseHandler
from app.models.social.image import ImageModel
from app.models.social.video import VideoModel
from app.helper.auth import login_required
from app.helper.upload import UploadImage, UploadVideo
from app.helper.response import js... | 0 | 753 | 0 | 21 | 0 | 0 | 0 | 185 | 204 |
e8ed5825b19b3e2f8eb75934d76e7fc80e5c0d42 | 1,751 | py | Python | exercises/exercise_4.py | marvinlwenzel/thb_dmc_ss19 | 4c4e24fe5616e897f071813eb82a859ad3596fb2 | [
"MIT"
] | null | null | null | exercises/exercise_4.py | marvinlwenzel/thb_dmc_ss19 | 4c4e24fe5616e897f071813eb82a859ad3596fb2 | [
"MIT"
] | null | null | null | exercises/exercise_4.py | marvinlwenzel/thb_dmc_ss19 | 4c4e24fe5616e897f071813eb82a859ad3596fb2 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
two() | 25.014286 | 84 | 0.639634 | import numpy
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler, StandardScaler
from sklearn.linear_model import LinearRegression
def scale_normalize(input_array):
min = input_array.min
max = input_array.max
result = numpy.copy(input_array)
for i in range(len(input_array))... | 0 | 0 | 0 | 0 | 0 | 1,507 | 0 | 70 | 134 |
7c178e40dd6354b9e4518d1ecc7a7b7bf8c01a13 | 620 | py | Python | reid/modeling/heads/__init__.py | tkianai/person_reid.pytorch | 5327a28108829376f60543c9fe383b34b31bd357 | [
"MIT"
] | 4 | 2020-01-02T09:59:24.000Z | 2020-06-26T23:36:27.000Z | reid/modeling/heads/__init__.py | tkianai/re-identification_pytorch | 5327a28108829376f60543c9fe383b34b31bd357 | [
"MIT"
] | null | null | null | reid/modeling/heads/__init__.py | tkianai/re-identification_pytorch | 5327a28108829376f60543c9fe383b34b31bd357 | [
"MIT"
] | 1 | 2020-06-08T11:42:59.000Z | 2020-06-08T11:42:59.000Z |
from .softmax import SoftmaxHead, AmSoftmaxHead
from .arc import ArcHead
from .cos import CosHead
from .sphere import SphereHead
__all__ = ['build_head']
_head_factory = {
'softmax': SoftmaxHead,
'am_softmax': AmSoftmaxHead,
'arc': ArcHead,
'cos': CosHead,
'sphere': SphereHead,
}
| 20.666667 | 77 | 0.693548 |
from .softmax import SoftmaxHead, AmSoftmaxHead
from .arc import ArcHead
from .cos import CosHead
from .sphere import SphereHead
__all__ = ['build_head']
_head_factory = {
'softmax': SoftmaxHead,
'am_softmax': AmSoftmaxHead,
'arc': ArcHead,
'cos': CosHead,
'sphere': SphereHead,
}
def build_h... | 0 | 0 | 0 | 0 | 0 | 289 | 0 | 0 | 23 |
235756d713f619625d270057244478c870d7a925 | 3,857 | py | Python | assets/scripts/dataset_adain_attack.py | ga642381/robust-vc | 90c5c51007db4544885e903d755fb95fadd1fb71 | [
"MIT"
] | 12 | 2022-01-12T12:38:22.000Z | 2022-02-14T02:25:48.000Z | assets/scripts/dataset_adain_attack.py | ga642381/robust-vc | 90c5c51007db4544885e903d755fb95fadd1fb71 | [
"MIT"
] | null | null | null | assets/scripts/dataset_adain_attack.py | ga642381/robust-vc | 90c5c51007db4544885e903d755fb95fadd1fb71 | [
"MIT"
] | null | null | null | import argparse
from pathlib import Path
import torch.nn as nn
import torchaudio
# attack_and_save function modified from attack.py
if __name__ == "__main__":
torchaudio.set_audio_backend("sox_io")
parser = argparse.ArgumentParser()
parser.add_argument("--data_dir", type=Path, default="../vctk_test_va... | 29.899225 | 86 | 0.651543 | import argparse
import copy
import json
import random
from functools import partial
from pathlib import Path
import torch
import torch.nn as nn
import torchaudio
from torch import Tensor
from utils.wav2mel import Wav2Mel
def emb_attack(
model: nn.Module,
wav2mel: Wav2Mel,
src: Tensor,
tgt: Tensor,
... | 0 | 0 | 0 | 0 | 0 | 3,010 | 0 | -14 | 224 |
10a2246c3576f4363bf199866de92e17726d2b8f | 8,775 | py | Python | online/online_inference.py | Grinjero/HandGestureClassification | 141a30357e49f028f5808c22cd9f03a1361b1206 | [
"MIT"
] | null | null | null | online/online_inference.py | Grinjero/HandGestureClassification | 141a30357e49f028f5808c22cd9f03a1361b1206 | [
"MIT"
] | null | null | null | online/online_inference.py | Grinjero/HandGestureClassification | 141a30357e49f028f5808c22cd9f03a1361b1206 | [
"MIT"
] | null | null | null |
DISPLAY_SCALE = 600
if __name__ == "__main__":
main()
| 44.095477 | 206 | 0.702108 | import cv2
import argparse
import time
import os
from torch import Tensor
from datasets.dataset_utils import get_class_labels
from opts import parse_model
from spatial_transforms import *
from online.online_classifier import OnlineClassifier
from online.online_utils import FPSMeasurer, ImageStreamer
from visualization... | 0 | 0 | 0 | 0 | 0 | 8,276 | 0 | 127 | 311 |
8297e68bf2169ecdb72cc4344aaa8cb523e5283c | 2,289 | py | Python | tests/search/dummies.py | GeekLiB/simpleai-lee | dd49778d3521b725fa1666c6e64b48c986528250 | [
"MIT"
] | null | null | null | tests/search/dummies.py | GeekLiB/simpleai-lee | dd49778d3521b725fa1666c6e64b48c986528250 | [
"MIT"
] | null | null | null | tests/search/dummies.py | GeekLiB/simpleai-lee | dd49778d3521b725fa1666c6e64b48c986528250 | [
"MIT"
] | 2 | 2020-01-03T06:28:23.000Z | 2020-02-23T16:01:42.000Z | # coding=utf-8
GOAL = 'iabcabc'
| 24.351064 | 66 | 0.566623 | # coding=utf-8
class DummyNode(object):
def __init__(self, value):
self.value = value
def __lt__(self, other):
return self.value < other.value
GOAL = 'iabcabc'
class DummyProblem(object):
def actions(self, state):
return ['a', 'b', 'c'] if len(state) < len(GOAL) else []
d... | 0 | 0 | 0 | 2,160 | 0 | 0 | 0 | 0 | 92 |
394abc596eaea8483f52f71129aa004f2aa41a10 | 47 | py | Python | Problem152.py | Cleancode404/ProjectEuler | 2f93b256b107bfb6a395b8aa197cfeacc599b00b | [
"MIT"
] | null | null | null | Problem152.py | Cleancode404/ProjectEuler | 2f93b256b107bfb6a395b8aa197cfeacc599b00b | [
"MIT"
] | null | null | null | Problem152.py | Cleancode404/ProjectEuler | 2f93b256b107bfb6a395b8aa197cfeacc599b00b | [
"MIT"
] | null | null | null | """
Writing 1/2 as a sum of inverse squares
""" | 15.666667 | 39 | 0.659574 | """
Writing 1/2 as a sum of inverse squares
""" | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3e45c2bdd233484a23e3beb361ea7b71cd411418 | 5,875 | py | Python | tests/conn_test.py | kstaniek/condoor-old | c4e7d7c0ae72f1af29c133da46ff6c0850c6878c | [
"BSD-2-Clause"
] | null | null | null | tests/conn_test.py | kstaniek/condoor-old | c4e7d7c0ae72f1af29c133da46ff6c0850c6878c | [
"BSD-2-Clause"
] | null | null | null | tests/conn_test.py | kstaniek/condoor-old | c4e7d7c0ae72f1af29c133da46ff6c0850c6878c | [
"BSD-2-Clause"
] | null | null | null | # =============================================================================
# url_test
#
# Copyright (c) 2014, Cisco Systems
# All rights reserved.
#
# # Author: Klaudiusz Staniek
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condit... | 46.626984 | 192 | 0.64766 | # =============================================================================
# url_test
#
# Copyright (c) 2014, Cisco Systems
# All rights reserved.
#
# # Author: Klaudiusz Staniek
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condit... | 0 | 2,950 | 0 | 0 | 0 | 491 | 0 | 30 | 159 |
e2c6b9f24bd38fe50c9d7c496d3eab469a66aad4 | 8,713 | py | Python | EquationModels/TaylorVortex.py | mroberto166/PinnsSub | 338c5400080ba570fd8f53d7481539225fcf4d17 | [
"MIT"
] | 12 | 2020-12-02T13:04:55.000Z | 2022-01-07T21:48:30.000Z | EquationModels/TaylorVortex.py | mroberto166/PinnsSub | 338c5400080ba570fd8f53d7481539225fcf4d17 | [
"MIT"
] | null | null | null | EquationModels/TaylorVortex.py | mroberto166/PinnsSub | 338c5400080ba570fd8f53d7481539225fcf4d17 | [
"MIT"
] | 7 | 2020-12-02T13:04:57.000Z | 2021-12-28T14:28:19.000Z |
pi = math.pi
T = 10
a = [4, 0]
extrema_values = torch.tensor([[0, 1],
[-8, 8],
[-8, 8]])
list_of_BC = [[ub0, ub1], [ub0y, ub1y]]
| 35.709016 | 135 | 0.579479 | from ImportFile import *
pi = math.pi
T = 10
a = [4, 0]
extrema_values = torch.tensor([[0, 1],
[-8, 8],
[-8, 8]])
def compute_res(network, x_f_train, space_dimensions, solid, computing_error=False):
x_f_train.requires_grad = True
u = (network(x_... | 0 | 0 | 0 | 0 | 0 | 8,252 | 0 | 3 | 252 |
b37acde573a8349878c3b5514ceba4f7c308e63b | 1,017 | py | Python | powerwatch/deployment-tools/devices_to_postgres/psheets_to_postgres.py | nklugman/PlugWatch | 4fbd2506a6808542fc5246e87d3c382761da1eaf | [
"MIT"
] | null | null | null | powerwatch/deployment-tools/devices_to_postgres/psheets_to_postgres.py | nklugman/PlugWatch | 4fbd2506a6808542fc5246e87d3c382761da1eaf | [
"MIT"
] | null | null | null | powerwatch/deployment-tools/devices_to_postgres/psheets_to_postgres.py | nklugman/PlugWatch | 4fbd2506a6808542fc5246e87d3c382761da1eaf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pygsheets
import psycopg2
import yaml
with open('postgres_config.json') as config_file:
config = yaml.safe_load(config_file)
connection = psycopg2.connect(dbname=config['database'], user=config['user'], host=config['host'], password=config['password'])
cursor = connection.cursor();
... | 24.804878 | 128 | 0.685349 | #!/usr/bin/env python
import pygsheets
import datetime
import time
import psycopg2
import yaml
with open('postgres_config.json') as config_file:
config = yaml.safe_load(config_file)
connection = psycopg2.connect(dbname=config['database'], user=config['user'], host=config['host'], password=config['password'])
cu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -16 | 44 |
ed5332c51dfdd9ecb20aa2ef8ffd6d9ae8abd275 | 907 | py | Python | blog/context_processors.py | ibnshayed/Advanced-Blog-Application | 27b38d569d5f883a0cd02b04d50162fa35de2388 | [
"MIT"
] | 21 | 2021-04-24T19:45:07.000Z | 2022-02-10T05:50:16.000Z | blog/context_processors.py | ibnshayed/Advanced-Blog-Application | 27b38d569d5f883a0cd02b04d50162fa35de2388 | [
"MIT"
] | 3 | 2021-07-22T00:45:52.000Z | 2021-09-01T16:31:32.000Z | blog/context_processors.py | ibnshayed/Advanced-Blog-Application | 27b38d569d5f883a0cd02b04d50162fa35de2388 | [
"MIT"
] | 14 | 2021-05-24T16:27:32.000Z | 2022-03-25T18:02:19.000Z | # for blog views global varibale calls
# src = https://able.bio/rhett/how-to-order-by-count-of-a-foreignkey-field-in-django--26y1ug1
## Information
#.annotate(post_count=Count('blog'))\ -> countin the blog post under each category
#.filter(blog__isnull=False)\ -> Filtering the blog model so that category witho... | 39.434783 | 100 | 0.70011 | # for blog views global varibale calls
from .models import Catagory, Blog
from django.db.models import Count
# src = https://able.bio/rhett/how-to-order-by-count-of-a-foreignkey-field-in-django--26y1ug1
def globalVariable(request):
# showing The categories with most post under each category
category = Cata... | 0 | 0 | 0 | 0 | 0 | 376 | 0 | 27 | 66 |
3755c8d5e0ac5aba603f8a39ea5b01e998eb83e5 | 7,043 | py | Python | yandex/cloud/mdb/elasticsearch/v1/config/elasticsearch_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 36 | 2018-12-23T13:51:50.000Z | 2022-03-25T07:48:24.000Z | yandex/cloud/mdb/elasticsearch/v1/config/elasticsearch_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 15 | 2019-02-28T04:55:09.000Z | 2022-03-06T23:17:24.000Z | yandex/cloud/mdb/elasticsearch/v1/config/elasticsearch_pb2.py | korsar182/python-sdk | 873bf2a9b136a8f2faae72e86fae1f5b5c3d896a | [
"MIT"
] | 18 | 2019-02-23T07:10:57.000Z | 2022-03-28T14:41:08.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: yandex/cloud/mdb/elasticsearch/v1/config/elasticsearch.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf impor... | 49.950355 | 948 | 0.800653 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: yandex/cloud/mdb/elasticsearch/v1/config/elasticsearch.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf impor... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d82fe37702a041ccef638c972371b4c8c7193ee4 | 3,744 | py | Python | fbmeshd/linkstatsd/meshquery.py | yuyanduan/fbmeshd | 56650c4bab7d4ab15d3f1a853d17fa12f83f43f2 | [
"MIT"
] | 36 | 2019-10-03T22:33:51.000Z | 2020-11-04T15:04:29.000Z | fbmeshd/linkstatsd/meshquery.py | yuyanduan/fbmeshd | 56650c4bab7d4ab15d3f1a853d17fa12f83f43f2 | [
"MIT"
] | 3 | 2019-10-31T01:27:26.000Z | 2020-10-06T17:35:50.000Z | fbmeshd/linkstatsd/meshquery.py | yuyanduan/fbmeshd | 56650c4bab7d4ab15d3f1a853d17fa12f83f43f2 | [
"MIT"
] | 15 | 2019-10-30T15:57:09.000Z | 2020-11-11T06:34:59.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved
from typing import List, cast
from fbmeshd.ttypes import MpathEntry, PeerMetrics
MESH_SERVICE_HOST = "localhost"
MESH_SERVICE_PORT = 30303
MESH_SERVICE_TIMEOUT_MS = 5000
def peers(interface_name: str) -> List[str]:
"""Info... | 30.193548 | 82 | 0.658921 | #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved
from contextlib import contextmanager
from typing import Generator, List, Optional, cast
from fbmeshd import MeshService
from fbmeshd.ttypes import MpathEntry, PeerMetrics, StatCounter
from thrift.protocol import TBinaryProtocol
... | 0 | 603 | 0 | 0 | 0 | 1,696 | 0 | 109 | 251 |
c46d979aadd70a751f5aeac9b7eb704c5255f454 | 7,286 | py | Python | lib/python2.7/site-packages/appionlib/spyder.py | leschzinerlab/myami-3.2-freeHand | 974b8a48245222de0d9cfb0f433533487ecce60d | [
"MIT"
] | 6 | 2018-05-10T19:12:53.000Z | 2021-05-19T21:11:56.000Z | appionlib/spyder.py | vosslab/ctfeval | 6cfc648f91c318c3a46a959e4771c3d16d8e741a | [
"Apache-2.0"
] | 1 | 2017-04-15T11:04:39.000Z | 2017-04-17T20:21:53.000Z | appionlib/spyder.py | vossman/ctfeval | 6cfc648f91c318c3a46a959e4771c3d16d8e741a | [
"Apache-2.0"
] | 1 | 2019-09-05T20:58:37.000Z | 2019-09-05T20:58:37.000Z | #!/usr/bin/env python
"""
Downloaded from:
http://www.wadsworth.org/spider_doc/spider/proc/spyder.py
Documentation:
http://www.wadsworth.org/spider_doc/spider/docs/scripting2.html
by Neil on Feb 12, 2008
"""
"""
There are 2 streams:
The Python program sends commands to Spider as if they were typed at the
.OPERATI... | 28.572549 | 114 | 0.660033 | #!/usr/bin/env python
import os
import sys
import time
import math
from struct import unpack
import re
import subprocess
"""
Downloaded from:
http://www.wadsworth.org/spider_doc/spider/proc/spyder.py
Documentation:
http://www.wadsworth.org/spider_doc/spider/docs/scripting2.html
by Neil on Feb 12, 2008
"""
"""
Ther... | 0 | 0 | 0 | 6,040 | 0 | 169 | 0 | -55 | 201 |
915211b2ea8e5ed30d6816c2ff8ebd374a28c8c4 | 385 | py | Python | snakemake/configs/pan_paniscus_SRP007412_single.py | saketkc/EE-546-project | fb7eacd90f6c0a2cb3061837ec5427a14f521aa5 | [
"BSD-2-Clause"
] | 1 | 2020-11-02T07:05:09.000Z | 2020-11-02T07:05:09.000Z | snakemake/configs/pan_paniscus_SRP007412_single.py | saketkc/EE-546-project | fb7eacd90f6c0a2cb3061837ec5427a14f521aa5 | [
"BSD-2-Clause"
] | null | null | null | snakemake/configs/pan_paniscus_SRP007412_single.py | saketkc/EE-546-project | fb7eacd90f6c0a2cb3061837ec5427a14f521aa5 | [
"BSD-2-Clause"
] | null | null | null |
RAWDATA_DIR = '/staging/as/skchoudh/rna-seq-datasets/single/pan_paniscus/SRP007412'
OUT_DIR = '/staging/as/skchoudh/rna-seq-output/pan_paniscus/SRP007412'
CDNA_FA_GZ = '/home/cmb-panasas2/skchoudh/genomes/pan_paniscus/cdna/Pan_paniscus.panpan1.1.cdna.all.fa.gz'
CDNA_IDX = '/home/cmb-panasas2/skchoudh/genomes/pan_p... | 64.166667 | 117 | 0.797403 |
RAWDATA_DIR = '/staging/as/skchoudh/rna-seq-datasets/single/pan_paniscus/SRP007412'
OUT_DIR = '/staging/as/skchoudh/rna-seq-output/pan_paniscus/SRP007412'
CDNA_FA_GZ = '/home/cmb-panasas2/skchoudh/genomes/pan_paniscus/cdna/Pan_paniscus.panpan1.1.cdna.all.fa.gz'
CDNA_IDX = '/home/cmb-panasas2/skchoudh/genomes/pan_p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f2f7b1dfd0ed5921434b93f529ee81fa8fe23d13 | 6,936 | py | Python | novem/cli/__init__.py | novem-no/novem | dc6bc99afd426dc55f896de611dbe300d5491af3 | [
"MIT"
] | null | null | null | novem/cli/__init__.py | novem-no/novem | dc6bc99afd426dc55f896de611dbe300d5491af3 | [
"MIT"
] | null | null | null | novem/cli/__init__.py | novem-no/novem | dc6bc99afd426dc55f896de611dbe300d5491af3 | [
"MIT"
] | null | null | null | import getpass
import random
import socket
import string
import sys
from datetime import datetime
from typing import Dict, Union
from ..api import Novem401, NovemAPI
from ..utils import cl, get_current_config
from .config import check_if_profile_exists
def init_config(args: Dict[str, str] = None) -> None:
"""
... | 26.473282 | 78 | 0.61361 | import getpass
import random
import readline
import socket
import string
import sys
from datetime import datetime
from signal import SIG_DFL, SIGPIPE, signal
from typing import Any, Dict, Union
from ..api import Novem401, NovemAPI
from ..utils import cl, colors, get_current_config
from ..version import __version__
fro... | 0 | 0 | 0 | 0 | 0 | 2,201 | 0 | 60 | 225 |
ee515d46c89676f72b140d8e001307dbc079ed7d | 3,351 | py | Python | 0_cre_pipeline/just21/python/00_create_hg38.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 5 | 2020-07-30T02:35:20.000Z | 2020-12-24T01:26:47.000Z | 0_cre_pipeline/just21/python/00_create_hg38.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 6 | 2021-03-04T10:30:11.000Z | 2022-03-16T16:47:47.000Z | 0_cre_pipeline/just21/python/00_create_hg38.py | weng-lab/SCREEN | e8e7203e2f9baa2de70e2f75bdad3ae24b568367 | [
"MIT"
] | 2 | 2020-12-08T10:05:02.000Z | 2022-03-10T09:41:19.000Z |
# SPDX-License-Identifier: MIT
# Copyright (c) 2016-2020 Michael Purcaro, Henry Pratt, Jill Moore, Zhiping Weng
from __future__ import print_function
import sys
import os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../../../metadata/utils"))
if __name__ == "__main__":
sys.e... | 38.965116 | 144 | 0.570278 |
# SPDX-License-Identifier: MIT
# Copyright (c) 2016-2020 Michael Purcaro, Henry Pratt, Jill Moore, Zhiping Weng
from __future__ import print_function
import sys
import os
import glob
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../../../metadata/utils"))
from exp import Exp
from exp... | 0 | 1,045 | 0 | 1,799 | 0 | 68 | 0 | -5 | 112 |
90bae6d7fd7e6d9d1f4ac05ef9d0d6152245d21c | 7,145 | py | Python | lfs/payment/utils.py | naro/django-lfs | 312404370e497d00aa0f7221dc55a70a20490fb5 | [
"BSD-3-Clause"
] | null | null | null | lfs/payment/utils.py | naro/django-lfs | 312404370e497d00aa0f7221dc55a70a20490fb5 | [
"BSD-3-Clause"
] | null | null | null | lfs/payment/utils.py | naro/django-lfs | 312404370e497d00aa0f7221dc55a70a20490fb5 | [
"BSD-3-Clause"
] | null | null | null | # python imports
import locale
# django imports
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
# lfs imports
import lfs.core.utils
from lfs.caching.utils import lfs_get_object_or_404
from lfs.core.models import Shop
from lfs.core.signals impo... | 32.330317 | 79 | 0.644507 | # python imports
import locale
# django imports
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
# lfs imports
import lfs.core.utils
from lfs.caching.utils import lfs_get_object_or_404
from lfs.core.models import Shop
from lfs.core.signals impo... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
252a31d12c42d904b09c5d318e52b9280d7f454f | 16,508 | py | Python | EMS/user/views.py | avi-dak-hyd/dbms_project-EMS- | 3c837c91486ad4248f08152a0cea82a509be5ffd | [
"Unlicense",
"MIT"
] | null | null | null | EMS/user/views.py | avi-dak-hyd/dbms_project-EMS- | 3c837c91486ad4248f08152a0cea82a509be5ffd | [
"Unlicense",
"MIT"
] | null | null | null | EMS/user/views.py | avi-dak-hyd/dbms_project-EMS- | 3c837c91486ad4248f08152a0cea82a509be5ffd | [
"Unlicense",
"MIT"
] | null | null | null | from django.shortcuts import render
from datetime import datetime
from pathlib import Path
# Create your views here.
BASE_DIR = Path(__file__).resolve().parent.parent
| 39.58753 | 177 | 0.592077 | from django.shortcuts import render
from django.shortcuts import render, redirect
from django.contrib import messages
from django.db import connection, transaction
from django.db import connections
from datetime import datetime
from datetime import date
import datetime
from PIL import Image
import os
from pathlib impo... | 0 | 0 | 0 | 0 | 0 | 15,690 | 0 | 120 | 519 |
b1238c266f21c04cf6e6232c6470ddd4df9d9443 | 1,912 | py | Python | growth_investing/calculate_growth_stocks.py | bfan1256/fundamental-analysis-algorithms | 96b41d46eb40124d0b2d74bd3f51b3b431e50be3 | [
"Apache-2.0"
] | null | null | null | growth_investing/calculate_growth_stocks.py | bfan1256/fundamental-analysis-algorithms | 96b41d46eb40124d0b2d74bd3f51b3b431e50be3 | [
"Apache-2.0"
] | null | null | null | growth_investing/calculate_growth_stocks.py | bfan1256/fundamental-analysis-algorithms | 96b41d46eb40124d0b2d74bd3f51b3b431e50be3 | [
"Apache-2.0"
] | null | null | null | import csv
from glob import glob
from tqdm import tqdm
glob_path = '../stock-tickers/*.txt'
tickers = []
ticker_paths = glob(glob_path)
for path in ticker_paths:
with open(path) as f:
reader = csv.DictReader(f, delimiter='|')
for row in reader:
# check if it is an ETF
if r... | 29.415385 | 156 | 0.598326 | import os
import csv
import requests
import numpy as np
from glob import glob
from tqdm import tqdm
from growth_stock_functions import *
glob_path = '../stock-tickers/*.txt'
tickers = []
ticker_paths = glob(glob_path)
for path in ticker_paths:
with open(path) as f:
reader = csv.DictReader(f, delimiter='... | 0 | 0 | 0 | 0 | 0 | 842 | 0 | -6 | 112 |
0eac0ca18dbdc2a49d1b2d6b7a4379a60fcde1d9 | 3,840 | py | Python | modules/train.py | meszdav/human-activity-recognition | 6506d858818a579cf912526571426060f59724d3 | [
"MIT"
] | null | null | null | modules/train.py | meszdav/human-activity-recognition | 6506d858818a579cf912526571426060f59724d3 | [
"MIT"
] | 5 | 2021-03-31T20:01:10.000Z | 2021-12-13T20:50:52.000Z | modules/train.py | meszdav/human-activity-recognition | 6506d858818a579cf912526571426060f59724d3 | [
"MIT"
] | null | null | null | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--save_as", action = 'store', default = "../models/har_model_v10.pkl" ,
help='Give the name of the trained model. Default: ../models/har_model_v10.pkl')
parser.add_argument("--acc_cut_off", action = 'store', default = 12 , typ... | 31.47541 | 100 | 0.66875 | from func_data_preparation import *
from func_ml import *
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--save_as", action = 'store', default = "../models/har_model_v10.pkl" ,
help='Give the name of the trained model. Default: ../models/har_model_v10.pkl')
parser.add_argu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 44 |
442362f77a5d9490700e546bfee99c0208483d69 | 521 | py | Python | setup_cython.py | tcompa/Laughlin-Metropolis | 9025c20e19a93aaada2d8d2edd14639ebe77fc17 | [
"MIT"
] | 3 | 2019-05-26T11:53:44.000Z | 2021-12-09T05:22:29.000Z | setup_cython.py | tcompa/Laughlin-Metropolis | 9025c20e19a93aaada2d8d2edd14639ebe77fc17 | [
"MIT"
] | null | null | null | setup_cython.py | tcompa/Laughlin-Metropolis | 9025c20e19a93aaada2d8d2edd14639ebe77fc17 | [
"MIT"
] | null | null | null | '''
Program: setup_cython.py
Created: Tue Aug 22 22:06:12 CEST 2017
Author: Tommaso Comparin
Description: Compiles a cython module
Notes: To be executed through
$ python setup_cython.py build_ext --inplace
'''
from distutils.extension import Extension
from distutils.core import setup
from Cython.Distuti... | 27.421053 | 65 | 0.758157 | '''
Program: setup_cython.py
Created: Tue Aug 22 22:06:12 CEST 2017
Author: Tommaso Comparin
Description: Compiles a cython module
Notes: To be executed through
$ python setup_cython.py build_ext --inplace
'''
from distutils.extension import Extension
from distutils.core import setup
from Cython.Distuti... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2afd9482fc19816c965b9ecdb277176cfb57a800 | 654 | py | Python | constructions_planning_docs/testdatetime.py | Baraa2nassar/RemindME | eadf4d7ed5fd8188067ef656fe057e4200354a3c | [
"MIT"
] | 2 | 2022-01-07T21:52:32.000Z | 2022-03-10T13:44:11.000Z | constructions_planning_docs/testdatetime.py | Baraa2nassar/RemindME | eadf4d7ed5fd8188067ef656fe057e4200354a3c | [
"MIT"
] | 1 | 2021-08-28T23:50:06.000Z | 2021-08-28T23:50:06.000Z | constructions_planning_docs/testdatetime.py | Baraa2nassar/RemindME | eadf4d7ed5fd8188067ef656fe057e4200354a3c | [
"MIT"
] | null | null | null | import datetime
import pytz
from pytz import timezone
#filename = input("filename: ")
eastern = timezone('US/Central')
now=datetime.datetime.now().astimezone(eastern)
remindMeAT =datetime.datetime(2021,7,8,16,11) #year,month,day,hour,min,sec
week= datetime.timedelta(days = 7)
hour = datetime.timedelta(hours = 9)
my... | 21.096774 | 75 | 0.69419 | import re,os
import sys
import datetime
import pytz
from pytz import timezone
#filename = input("filename: ")
eastern = timezone('US/Central')
now=datetime.datetime.now().astimezone(eastern)
remindMeAT =datetime.datetime(2021,7,8,16,11) #year,month,day,hour,min,sec
week= datetime.timedelta(days = 7)
hour = datetime.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -20 | 44 |
ddd0a54fbb91ba62ba734135a4f1c7ea624ddf66 | 3,050 | py | Python | rare_variants/bin/rare-variants.make_groupfiles.py | kjgaulton/pipelines | 55ebf19c788bc8ad4ca4e61c3a0979cf47bb3744 | [
"MIT"
] | 20 | 2017-07-04T03:26:22.000Z | 2022-01-20T14:51:08.000Z | rare_variants/bin/rare-variants.make_groupfiles.py | dongwei1220/pipelines | 55ebf19c788bc8ad4ca4e61c3a0979cf47bb3744 | [
"MIT"
] | 3 | 2021-01-14T14:50:59.000Z | 2022-02-02T16:29:13.000Z | rare_variants/bin/rare-variants.make_groupfiles.py | dongwei1220/pipelines | 55ebf19c788bc8ad4ca4e61c3a0979cf47bb3744 | [
"MIT"
] | 11 | 2017-07-04T02:40:37.000Z | 2022-01-30T19:43:39.000Z | #!/usr/bin/env python3
import logging
args = process_args()
logging.basicConfig(format='[%(filename)s] %(asctime)s %(levelname)s: %(message)s', datefmt='%I:%M:%S', level=logging.DEBUG)
main(args)
| 45.522388 | 124 | 0.642951 | #!/usr/bin/env python3
import os
import sys
import argparse
import subprocess
import logging
from multiprocessing import Pool
def make_groupfiles(args, name):
try:
vcf_file = os.path.join(args.proc_vcf_dir, name + '.vcf.gz')
footprints_file = os.path.join(args.footprints_dir, name + '.bed')
... | 0 | 0 | 0 | 0 | 0 | 2,694 | 0 | -22 | 180 |
a246079d5d936dcb0b7ff876ab800af89197d6ad | 2,661 | py | Python | examples/images.py | charliebruce/gc9a01-python | a4dd033fb13fa84043be9f3ec7a403befe3c53bb | [
"MIT"
] | null | null | null | examples/images.py | charliebruce/gc9a01-python | a4dd033fb13fa84043be9f3ec7a403befe3c53bb | [
"MIT"
] | null | null | null | examples/images.py | charliebruce/gc9a01-python | a4dd033fb13fa84043be9f3ec7a403befe3c53bb | [
"MIT"
] | null | null | null | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | 33.2625 | 143 | 0.725667 | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1f659201c9b489d3097e1828b6592790ceac610a | 937 | py | Python | gamestore/forms.py | jaantollander/GameStore | 8b3bebf214a7786e55a5860ae53a3b9eaaec8f5f | [
"MIT"
] | null | null | null | gamestore/forms.py | jaantollander/GameStore | 8b3bebf214a7786e55a5860ae53a3b9eaaec8f5f | [
"MIT"
] | null | null | null | gamestore/forms.py | jaantollander/GameStore | 8b3bebf214a7786e55a5860ae53a3b9eaaec8f5f | [
"MIT"
] | 2 | 2018-01-11T18:32:14.000Z | 2021-01-05T21:46:04.000Z | """Gamestore Forms"""
| 23.425 | 77 | 0.616862 | """Gamestore Forms"""
from django import forms
from django.contrib.auth.models import User
from gamestore.models import Game, UserProfile, Application
class UserForm(forms.ModelForm):
"""User form"""
class Meta:
model = User
fields = ['first_name', 'last_name', 'email']
class UserProfileFo... | 0 | 0 | 0 | 689 | 0 | 0 | 0 | 63 | 159 |
71ecdb46fc97258c2106c30c9bdf94b9769b6608 | 1,210 | py | Python | blur.py | DakotaNelson/hamming-stego | b5767289d1da14fab798589c4c2e25a6fb5c378f | [
"MIT"
] | 9 | 2017-04-20T20:52:52.000Z | 2021-09-06T19:46:20.000Z | blur.py | DakotaNelson/hamming-stego | b5767289d1da14fab798589c4c2e25a6fb5c378f | [
"MIT"
] | null | null | null | blur.py | DakotaNelson/hamming-stego | b5767289d1da14fab798589c4c2e25a6fb5c378f | [
"MIT"
] | 6 | 2017-08-09T06:26:31.000Z | 2021-09-28T02:16:46.000Z | import random
import numpy as np
def randomize(img, noise_level=.03):
""" given an array, randomizes the values in that array
noise_level [0,1] controls the overall likelihood of a bit being
flipped. This overall level is then multiplied by the levels variable,
which modifies the noise lev... | 33.611111 | 78 | 0.631405 | import random
from PIL import Image, ImageFilter
import numpy as np
def blur(img, blur_radius=0.2):
img = Image.fromarray(img)
blurred = img.copy().filter(ImageFilter.GaussianBlur(radius=blur_radius))
blurred = np.asarray(blurred)
return blurred
def randomize(img, noise_level=.03):
""" given an ... | 0 | 0 | 0 | 0 | 0 | 173 | 0 | 13 | 46 |
16848704b5d0476b9c84f420eab888fd631f7c73 | 2,300 | py | Python | Mac/Modules/res/resedit.py | SaadBazaz/ChinesePython | 800955539dda912d4a1621bcf5a700aaaddc012f | [
"CNRI-Python-GPL-Compatible"
] | 3 | 2022-01-30T20:08:24.000Z | 2022-02-12T08:51:12.000Z | Mac/Modules/res/resedit.py | SaadBazaz/ChinesePython | 800955539dda912d4a1621bcf5a700aaaddc012f | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Mac/Modules/res/resedit.py | SaadBazaz/ChinesePython | 800955539dda912d4a1621bcf5a700aaaddc012f | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | resource_body = """
char *buf;
int len;
Handle h;
if (!PyArg_ParseTuple(_args, "s#", &buf, &len))
return NULL;
h = NewHandle(len);
if ( h == NULL ) {
PyErr_NoMemory();
return NULL;
}
HLock(h);
memcpy(*h, buf, len);
HUnlock(h);
return ResObj_New(h);
"""
f = ManualGenerator("Resource", resource_body)
f.docstring = l... | 23.232323 | 99 | 0.714783 | resource_body = """
char *buf;
int len;
Handle h;
if (!PyArg_ParseTuple(_args, "s#", &buf, &len))
return NULL;
h = NewHandle(len);
if ( h == NULL ) {
PyErr_NoMemory();
return NULL;
}
HLock(h);
memcpy(*h, buf, len);
HUnlock(h);
return ResObj_New(h);
"""
f = ManualGenerator("Resource", resource_body)
f.docstring = l... | 0 | 0 | 0 | 0 | 0 | 219 | 0 | 0 | 23 |
e589d9bea04a6cf2202d323d7fd59cef25e6476c | 8,848 | py | Python | rl4rs/env/base.py | fuxiAIlab/RL4RS | e26ee5d068eaffd0f04779067614e34e313b1200 | [
"Apache-2.0"
] | 77 | 2022-02-17T01:51:29.000Z | 2022-03-23T23:34:01.000Z | rl4rs/env/base.py | fuxiAIlab/RL4RS | e26ee5d068eaffd0f04779067614e34e313b1200 | [
"Apache-2.0"
] | 2 | 2022-03-15T11:38:50.000Z | 2022-03-29T08:12:46.000Z | rl4rs/env/base.py | fuxiAIlab/RL4RS | e26ee5d068eaffd0f04779067614e34e313b1200 | [
"Apache-2.0"
] | 11 | 2022-02-26T18:14:35.000Z | 2022-03-29T21:29:10.000Z | import numpy as np
def single_elem_support(func):
"""aop func"""
type_list = (type([]), type(()), type(np.array(1)))
def wrapper(*args, **kwargs):
"""wrapper func"""
res = func(*args, **kwargs)
if type(res) in type_list and len(res) == 1:
return res[0]
elif typ... | 32.291971 | 99 | 0.586347 | import numpy as np
import gym
from copy import deepcopy as copy
import tensorflow as tf
from abc import ABC, abstractmethod
import os
def single_elem_support(func):
"""aop func"""
type_list = (type([]), type(()), type(np.array(1)))
def wrapper(*args, **kwargs):
"""wrapper func"""
res = fu... | 0 | 970 | 0 | 7,206 | 0 | 0 | 0 | 5 | 202 |
4e22c52a583d7febd29087858fd4aadf02c15056 | 2,514 | py | Python | demo/media/Main.py | yuehaowang/pylash_engine | 338c1552ff55e1088534bc127cfc5aafbda61227 | [
"MIT"
] | 38 | 2015-09-12T15:09:51.000Z | 2021-08-12T10:49:28.000Z | demo/media/Main.py | yuehaowang/pylash_engine | 338c1552ff55e1088534bc127cfc5aafbda61227 | [
"MIT"
] | 2 | 2021-03-12T07:03:14.000Z | 2021-11-17T11:29:23.000Z | demo/media/Main.py | yuehaowang/pylash_engine | 338c1552ff55e1088534bc127cfc5aafbda61227 | [
"MIT"
] | 21 | 2016-03-15T02:18:37.000Z | 2021-03-02T06:41:16.000Z | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
from pylash.core import init
init(1000 / 60, "Media", 800, 400, main)
| 30.658537 | 108 | 0.752586 | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
from pylash.core import init, addChild
from pylash.loaders import MediaLoader, LoaderEvent
from pylash.events import MouseEvent
from pylash.media import Sound, Video, MediaEvent
from pylash.ui import ButtonSample
def initEffSound(e):
effSound = Sound(e.tar... | 0 | 0 | 0 | 0 | 0 | 2,104 | 0 | 86 | 203 |
3a740b91f47d67087f5aaa3868d8e47d94c1cff3 | 2,579 | py | Python | count_medicine_gui.py | efineshi/medicine_number_count | 2792b15b78c855fec2af4078b0b97d28e4d4d648 | [
"Apache-2.0"
] | null | null | null | count_medicine_gui.py | efineshi/medicine_number_count | 2792b15b78c855fec2af4078b0b97d28e4d4d648 | [
"Apache-2.0"
] | null | null | null | count_medicine_gui.py | efineshi/medicine_number_count | 2792b15b78c855fec2af4078b0b97d28e4d4d648 | [
"Apache-2.0"
] | null | null | null | import tkinter as tk
if __name__ == '__main__':
root = tk.Tk()
version = 'v2.0.1.3'
root.title(" %s" % version)
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
root_width = 300
root_height = 150
x = (screen_width - root_width) / 2
y = (screen_hei... | 29.306818 | 96 | 0.586274 | import tkinter as tk
from tkinter import filedialog
from tkinter import messagebox
from utils import utils
def choose_file():
old_file_path_length = len(entry1.get())
entry1.delete(0, old_file_path_length)
file_path = tk.filedialog.askopenfilename()
# askopenfilename 1次上传1个;askopenfilenames1次上传多个
... | 510 | 0 | 0 | 0 | 0 | 1,287 | 0 | 20 | 112 |
66b1e8b7f4eaf6bbb5b7b970df462c41a7293efd | 3,446 | py | Python | docs/scripts/rules_tables.py | cqr-cryeye-forks/regula | c39622512568da8ed17b85f43a23e7a066219db0 | [
"Apache-2.0"
] | 679 | 2020-01-09T03:31:34.000Z | 2022-03-27T13:14:47.000Z | docs/scripts/rules_tables.py | cqr-cryeye-forks/regula | c39622512568da8ed17b85f43a23e7a066219db0 | [
"Apache-2.0"
] | 97 | 2020-01-17T18:22:50.000Z | 2022-03-31T12:46:13.000Z | docs/scripts/rules_tables.py | cqr-cryeye-forks/regula | c39622512568da8ed17b85f43a23e7a066219db0 | [
"Apache-2.0"
] | 77 | 2020-01-20T14:20:23.000Z | 2022-03-19T21:05:50.000Z | import argparse
from typing import Dict
parser = argparse.ArgumentParser(
description="Generate Regula Rules Documentation",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
"--provider",
default="k8s",
help="Rule provider",
)
provider_name_map: Dict[str, str] ... | 26.921875 | 78 | 0.588508 | import argparse
from dataclasses import dataclass
import json
import os
from typing import Dict, List, Optional, Tuple
from pytablewriter import MarkdownTableWriter
parser = argparse.ArgumentParser(
description="Generate Regula Rules Documentation",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
pa... | 0 | 288 | 0 | 0 | 0 | 2,437 | 0 | 37 | 226 |
6600bd17531612cebfb483a02894ce373ee2f1d5 | 1,911 | py | Python | fetch_hubble.py | dej-e/space-instagram | 623d3eec8c6a6705ec79b05695c433519a70266e | [
"MIT"
] | null | null | null | fetch_hubble.py | dej-e/space-instagram | 623d3eec8c6a6705ec79b05695c433519a70266e | [
"MIT"
] | null | null | null | fetch_hubble.py | dej-e/space-instagram | 623d3eec8c6a6705ec79b05695c433519a70266e | [
"MIT"
] | null | null | null | from dotenv import load_dotenv
import requests
import os
if __name__ == '__main__':
load_dotenv()
collection_name = os.getenv('HUBBLE_COLLECTION')
try:
fetch_images_from_hubble_collection(collection_name=collection_name)
except requests.exceptions.HTTPError as error:
print(error)
... | 29.4 | 79 | 0.698587 | from dotenv import load_dotenv
from urllib.parse import urlparse, urljoin
import requests
import os
def download_file(url, filename):
image_dir = os.getenv('IMAGE_DIR')
os.makedirs(image_dir, exist_ok=True)
response = requests.get(url, verify=False)
response.raise_for_status()
save_path = os.path... | 0 | 0 | 0 | 0 | 0 | 1,441 | 0 | 21 | 114 |
fa6b1238a5ba7e4d02a3ff5efb6321c323bb85c0 | 176,430 | py | Python | pylayers/antprop/channel.py | usmanwardag/pylayers | 2e8a9bdc993b2aacc92610a9c7edf875c6c7b24a | [
"MIT"
] | 143 | 2015-01-09T07:50:20.000Z | 2022-03-02T11:26:53.000Z | pylayers/antprop/channel.py | usmanwardag/pylayers | 2e8a9bdc993b2aacc92610a9c7edf875c6c7b24a | [
"MIT"
] | 148 | 2015-01-13T04:19:34.000Z | 2022-03-11T23:48:25.000Z | pylayers/antprop/channel.py | usmanwardag/pylayers | 2e8a9bdc993b2aacc92610a9c7edf875c6c7b24a | [
"MIT"
] | 95 | 2015-05-01T13:22:42.000Z | 2022-03-15T11:22:28.000Z | # -*t coding:Utf-8 -*-
"""
.. currentmodule:: pylayers.antprop.channel
.. autosummary::
:members:
"""
from __future__ import print_function
import doctest
import numpy.ma as ma
import pylab as plt
import scipy.optimize as optimize
import numpy.fft as fft
try:
except:
print('h5py is not installed: Ctilde(obje... | 28.215257 | 175 | 0.469342 | # -*t coding:Utf-8 -*-
"""
.. currentmodule:: pylayers.antprop.channel
.. autosummary::
:members:
"""
from __future__ import print_function
import doctest
import pdb
import numpy as np
import numpy.ma as ma
import numpy.linalg as la
import scipy as sp
import scipy.signal as si
import pylab as plt
import struct as... | 2 | 0 | 0 | 175,317 | 0 | 0 | 0 | 117 | 584 |
60e4747ce043df3edf30292c398db18b958bddee | 4,096 | py | Python | cdk/cdk/cdk_stack.py | aws-samples/aws-lambda-python-oracle-connection | b2cb48ef721d788bd50b8e4668d09b90e538e1bb | [
"Apache-2.0",
"MIT-0"
] | 1 | 2022-03-11T17:58:21.000Z | 2022-03-11T17:58:21.000Z | cdk/cdk/cdk_stack.py | aws-samples/aws-lambda-python-oracle-connection | b2cb48ef721d788bd50b8e4668d09b90e538e1bb | [
"Apache-2.0",
"MIT-0"
] | null | null | null | cdk/cdk/cdk_stack.py | aws-samples/aws-lambda-python-oracle-connection | b2cb48ef721d788bd50b8e4668d09b90e538e1bb | [
"Apache-2.0",
"MIT-0"
] | null | null | null | ########################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
########################################################################
| 34.133333 | 99 | 0.583984 | ########################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
########################################################################
import json
import os
from typing import Any, Dict
from aws_cdk import ... | 0 | 0 | 0 | 3,382 | 0 | 0 | 0 | 199 | 266 |
0c662d41ca7657be1653ea221e2020d08967e45b | 171 | py | Python | Content/Python/StartWebClient.bat.py | denfrost/UnrealPyClient | 523921a50ae43a430ce06e8a4436f37a5acae058 | [
"MIT"
] | 1 | 2022-03-24T10:03:53.000Z | 2022-03-24T10:03:53.000Z | Content/Python/StartWebClient.bat.py | denfrost/UnrealPyClient | 523921a50ae43a430ce06e8a4436f37a5acae058 | [
"MIT"
] | null | null | null | Content/Python/StartWebClient.bat.py | denfrost/UnrealPyClient | 523921a50ae43a430ce06e8a4436f37a5acae058 | [
"MIT"
] | null | null | null | #import unreal
import os
print("Start script web client")
os.system("C:/GIT/ProjectOazis/Plugins/UnrealPythonScripting/Content/Python/start.bat")
print("start_client.bat") | 34.2 | 87 | 0.807018 | #import unreal
import os
print("Start script web client")
os.system("C:/GIT/ProjectOazis/Plugins/UnrealPythonScripting/Content/Python/start.bat")
print("start_client.bat") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
72d73bdd084f1766c8f801651fb7321bd0ad9703 | 17,039 | py | Python | cvpods/engine/runner.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | cvpods/engine/runner.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | cvpods/engine/runner.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
# This file has been modified by Megvii ("Megvii Modifications").
# All Megvii Modifications are Copyright (C) 2019-2021 Megvii Inc. All rights reserved.
| 38.118568 | 99 | 0.628206 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
# This file has been modified by Megvii ("Megvii Modifications").
# All Megvii Modifications are Copyright (C) 2019-2021 Megvii Inc. All rights reserved.
import math
import os
from collections import Orde... | 0 | 14,585 | 0 | 0 | 0 | 1,211 | 0 | 502 | 469 |
37d2212a4ca872407fe0a2073722ec5b66d36c66 | 1,554 | py | Python | notes/2018-04-19-polarizer-otf/calculations/psf-min.py | talonchandler/polharmonic | 2aa3ca984e11050f901579b8eaa45a3a61d07957 | [
"MIT"
] | null | null | null | notes/2018-04-19-polarizer-otf/calculations/psf-min.py | talonchandler/polharmonic | 2aa3ca984e11050f901579b8eaa45a3a61d07957 | [
"MIT"
] | null | null | null | notes/2018-04-19-polarizer-otf/calculations/psf-min.py | talonchandler/polharmonic | 2aa3ca984e11050f901579b8eaa45a3a61d07957 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
f, axs = plt.subplots(1, 2, figsize=(6,4),
gridspec_kw={'width_ratios':[1,1], 'hspace':0.1, 'wspace':0.1})
w = 1.5
h = 4.5
NA = 1.0
x = np.linspace(-w, w, 2**10)
pols = [None, 0]
s = 0.65*NA
for i, pol in enumerate(pols):
print(pol)
ce... | 33.782609 | 117 | 0.559202 | import numpy as np
from util import *
import matplotlib.pyplot as plt
import matplotlib
f, axs = plt.subplots(1, 2, figsize=(6,4),
gridspec_kw={'width_ratios':[1,1], 'hspace':0.1, 'wspace':0.1})
w = 1.5
h = 4.5
NA = 1.0
x = np.linspace(-w, w, 2**10)
pols = [None, 0]
s = 0.65*NA
for i, pol in e... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -7 | 44 |
72d5cd918b21fd9f23e3b938bdbb7750737b542d | 6,090 | py | Python | elementpath/xpath_selectors.py | sthagen/sissaschool-elementpath | fbb07c03451790e7896d354a57120d6c4bedcc18 | [
"MIT"
] | 1 | 2021-09-16T14:44:42.000Z | 2021-09-16T14:44:42.000Z | elementpath/xpath_selectors.py | sthagen/elementpath | fbb07c03451790e7896d354a57120d6c4bedcc18 | [
"MIT"
] | null | null | null | elementpath/xpath_selectors.py | sthagen/elementpath | fbb07c03451790e7896d354a57120d6c4bedcc18 | [
"MIT"
] | null | null | null | #
# Copyright (c), 2018, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@sissa... | 39.803922 | 92 | 0.666338 | #
# Copyright (c), 2018, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@sissa... | 0 | 145 | 0 | 2,549 | 0 | 0 | 0 | 6 | 23 |
6aa86766d87e3f077d9f8518a4d18996a17aba14 | 6,932 | py | Python | Lib/test/test_joverload.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 577 | 2020-06-04T16:34:44.000Z | 2022-03-31T11:46:07.000Z | Lib/test/test_joverload.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 174 | 2015-01-08T20:37:09.000Z | 2020-06-03T16:48:59.000Z | Lib/test/test_joverload.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 162 | 2015-02-07T02:14:38.000Z | 2020-05-30T16:42:03.000Z | # test overloaded java methods dispatch logic in PyReflectedFunction
# needs to grow more tests. Uses javatests.JOverload as a bag of overloaded methods.
# (can be adapted to test alternative re-implemations even while they are developed
# write a *Envl class and change/add to to_test for that)
import sys
import unitt... | 31.509091 | 105 | 0.565205 | # test overloaded java methods dispatch logic in PyReflectedFunction
# needs to grow more tests. Uses javatests.JOverload as a bag of overloaded methods.
# (can be adapted to test alternative re-implemations even while they are developed
# write a *Envl class and change/add to to_test for that)
import sys
import unitt... | 0 | 0 | 0 | 5,578 | 0 | 409 | 0 | 38 | 205 |
d85f86de6ef8a8c683fd6f569e3f3594443070ce | 1,669 | py | Python | demo/evaluate_results.py | marcusdaly/decentralized-multiarm | eec8058682e6fedd7627719a92cfa15bc62d671e | [
"Apache-2.0"
] | 34 | 2021-04-06T18:14:11.000Z | 2022-03-23T09:18:20.000Z | demo/evaluate_results.py | marcusdaly/decentralized-multiarm | eec8058682e6fedd7627719a92cfa15bc62d671e | [
"Apache-2.0"
] | 2 | 2021-07-07T14:50:17.000Z | 2021-07-30T19:00:57.000Z | demo/evaluate_results.py | marcusdaly/decentralized-multiarm | eec8058682e6fedd7627719a92cfa15bc62d671e | [
"Apache-2.0"
] | 12 | 2021-04-28T10:47:00.000Z | 2022-03-09T06:50:00.000Z | import pandas as pd
import json
import os
if __name__ == "__main__":
args = get_args()
result_filepath = os.path.join(args.result_dir, 'results.csv')
df = pd.read_csv(result_filepath, index_col=0)
stats = evaluate_results(df)
print(json.dumps(stats, indent=4)) | 31.490566 | 86 | 0.645297 | import numpy as np
import pandas as pd
import json
import argparse
import os
def get_args():
parser = argparse.ArgumentParser(description='')
parser.add_argument('--result_dir', required=True, type=str)
args = parser.parse_args()
return args
def evaluate_results(df):
stats = {}
df_timeout = ... | 0 | 0 | 0 | 0 | 0 | 1,305 | 0 | -9 | 90 |
f7415d927e7d3eb2ec7f283d966d29eb5bd75775 | 15,150 | py | Python | kirppu/models.py | Glowieh/kirppu | 95f3e98c594ca7f02ed4ec311da3e558d76ea5b3 | [
"MIT"
] | null | null | null | kirppu/models.py | Glowieh/kirppu | 95f3e98c594ca7f02ed4ec311da3e558d76ea5b3 | [
"MIT"
] | null | null | null | kirppu/models.py | Glowieh/kirppu | 95f3e98c594ca7f02ed4ec311da3e558d76ea5b3 | [
"MIT"
] | null | null | null | from django.utils.module_loading import import_by_path
from django.conf import settings
User = settings.AUTH_USER_MODEL
# The actual class is found by string in settings.
UserAdapter = import_by_path(settings.KIRPPU_USER_ADAPTER)
| 29.078695 | 106 | 0.59736 | import random
from decimal import Decimal
from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator
from django.db import models
from django.db.models import Sum
from django.utils.translation import ugettext_lazy as _
from django.utils.module_loading import import_by_path
from... | 0 | 4,662 | 0 | 9,506 | 0 | 90 | 0 | 245 | 406 |
54e8749c76b8e966871c605c0ef2876596dc3de8 | 2,122 | py | Python | app/models.py | TrueOctopus/classifierBack | 5ebe20b8bd18aa74bbeb229403963b331c5013c2 | [
"MIT"
] | null | null | null | app/models.py | TrueOctopus/classifierBack | 5ebe20b8bd18aa74bbeb229403963b331c5013c2 | [
"MIT"
] | null | null | null | app/models.py | TrueOctopus/classifierBack | 5ebe20b8bd18aa74bbeb229403963b331c5013c2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 32.646154 | 73 | 0.614986 | # -*- coding: utf-8 -*-
from flask import current_app
from . import db
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
class User(UserMixin, db.Model):
__tablename__ = 'users'
id ... | 75 | 136 | 0 | 1,687 | 0 | 0 | 0 | 116 | 133 |
58477aa174a36f8ac648f77b3d3b1b75d21ecc0b | 1,515 | py | Python | documents/migrations/0007_auto_20201012_0501.py | brandonrobertz/foia-pdf-processing-system | 025516b5e2234df16741237c4208cd484f577370 | [
"MIT"
] | null | null | null | documents/migrations/0007_auto_20201012_0501.py | brandonrobertz/foia-pdf-processing-system | 025516b5e2234df16741237c4208cd484f577370 | [
"MIT"
] | null | null | null | documents/migrations/0007_auto_20201012_0501.py | brandonrobertz/foia-pdf-processing-system | 025516b5e2234df16741237c4208cd484f577370 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-12 05:01
| 35.232558 | 114 | 0.573597 | # Generated by Django 3.1.2 on 2020-10-12 05:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('documents', '0006_auto_20201011_0007'),
]
operations = [
migrations.CreateModel(
name='FieldCategory',
fields=[
... | 0 | 0 | 0 | 1,401 | 0 | 0 | 0 | 19 | 46 |
74908fbdd0513c9fe589faafc28d482f71e271b3 | 359 | py | Python | photo.py | HemantJajoo/USB-security | 0f21ca523ff506e9d10dfe8333621502e8002aa1 | [
"Apache-2.0"
] | 1 | 2020-08-08T11:46:50.000Z | 2020-08-08T11:46:50.000Z | photo.py | HemantJajoo/USB-security | 0f21ca523ff506e9d10dfe8333621502e8002aa1 | [
"Apache-2.0"
] | null | null | null | photo.py | HemantJajoo/USB-security | 0f21ca523ff506e9d10dfe8333621502e8002aa1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python36
import subprocess
import cv2
cap = cv2.VideoCapture(0)
ret, image = cap.read()
cv2.imwrite('/root/Udev_automation/defaulter.jpg' , image)
#cv2.imshow('hi' , image)
#cv2.waitKey()
cv2.destroyAllWindows()
subprocess.getoutput("ansible-playbook /root/Udev_automation/security.yml --vault-password... | 23.933333 | 129 | 0.760446 | #!/usr/bin/python36
import subprocess
import cv2
cap = cv2.VideoCapture(0)
ret, image = cap.read()
cv2.imwrite('/root/Udev_automation/defaulter.jpg' , image)
#cv2.imshow('hi' , image)
#cv2.waitKey()
cv2.destroyAllWindows()
subprocess.getoutput("ansible-playbook /root/Udev_automation/security.yml --vault-password... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
78bbd52a4b4f34631aa03747452abd005a5aeca6 | 1,393 | py | Python | src/pywriter/yw/ansi_tree_reader.py | peter88213/PyWriter | 9d0cb2304f29f40fb305c35c547bf6f4f5adbea7 | [
"MIT"
] | 1 | 2020-09-04T08:20:38.000Z | 2020-09-04T08:20:38.000Z | src/pywriter/yw/ansi_tree_reader.py | peter88213/PyWriter | 9d0cb2304f29f40fb305c35c547bf6f4f5adbea7 | [
"MIT"
] | 19 | 2020-01-04T10:43:27.000Z | 2022-03-30T19:03:44.000Z | src/pywriter/yw/ansi_tree_reader.py | peter88213/PyWriter | 9d0cb2304f29f40fb305c35c547bf6f4f5adbea7 | [
"MIT"
] | null | null | null | """Provide a strategy class to read ANSI encoded yWriter projects.
Copyright (c) 2021 Peter Triesberger
For further information see https://github.com/peter88213/PyWriter
Published under the MIT License (https://opensource.org/licenses/mit-license.php)
"""
| 33.166667 | 92 | 0.612347 | """Provide a strategy class to read ANSI encoded yWriter projects.
Copyright (c) 2021 Peter Triesberger
For further information see https://github.com/peter88213/PyWriter
Published under the MIT License (https://opensource.org/licenses/mit-license.php)
"""
import os
import xml.etree.ElementTree as ET
from py... | 0 | 0 | 0 | 996 | 0 | 0 | 0 | 35 | 96 |
b1272c7a05f08ab35e8727a105ea7287e459c3ac | 10,217 | py | Python | cupcake2/ice2/IceInit2.py | fanglu01/cDNA_Cupcake | 60f56dc291661a2b84e40b64d469fba658889c34 | [
"BSD-3-Clause-Clear"
] | 1 | 2018-09-21T06:20:50.000Z | 2018-09-21T06:20:50.000Z | cupcake2/ice2/IceInit2.py | fanglu01/cDNA_Cupcake | 60f56dc291661a2b84e40b64d469fba658889c34 | [
"BSD-3-Clause-Clear"
] | null | null | null | cupcake2/ice2/IceInit2.py | fanglu01/cDNA_Cupcake | 60f56dc291661a2b84e40b64d469fba658889c34 | [
"BSD-3-Clause-Clear"
] | null | null | null | #!/usr/bin/env python
"""
Find initial mutual exclusive cliques by aligning
input reads against itself.
This is for ICE2 --- it uses either DALIGNER (default) or BLASR.
Several differences with the old IceInit:
1. It can be run in a standalone manner! Does not have to tie with the whole ICE2 framework.
2. It does N... | 42.748954 | 112 | 0.612704 | #!/usr/bin/env python
"""
Find initial mutual exclusive cliques by aligning
input reads against itself.
This is for ICE2 --- it uses either DALIGNER (default) or BLASR.
Several differences with the old IceInit:
1. It can be run in a standalone manner! Does not have to tie with the whole ICE2 framework.
2. It does N... | 0 | 2,314 | 0 | 6,927 | 0 | 0 | 0 | 117 | 289 |
1220fe162654ca58e65291732556bb105e3ead8a | 1,406 | py | Python | detector/listener/api.py | gleseur/room-status | f6804618b83a96d85dbc6bf92e4a8f4efa48003e | [
"MIT"
] | null | null | null | detector/listener/api.py | gleseur/room-status | f6804618b83a96d85dbc6bf92e4a8f4efa48003e | [
"MIT"
] | null | null | null | detector/listener/api.py | gleseur/room-status | f6804618b83a96d85dbc6bf92e4a8f4efa48003e | [
"MIT"
] | null | null | null | u"""
This listens to room status update and sends relevant HTTP
calls to the meteor app.
"""
from __future__ import unicode_literals
import requests
SUBSCRIBED_LISTENERS = {}
retriable_adapter = requests.adapters.HTTPAdapter(max_retries=5)
session = requests.Session()
session.mount("http://wc-status.meteor.com", re... | 29.291667 | 116 | 0.711949 | u"""
This listens to room status update and sends relevant HTTP
calls to the meteor app.
"""
from __future__ import unicode_literals
import requests
import signals
import settings
SUBSCRIBED_LISTENERS = {}
def send_busy_to_api(sender):
SUBSCRIBED_LISTENERS[sender.name].send_to_api("busy")
def send_freed_to_api... | 0 | 0 | 0 | 835 | 0 | 133 | 0 | -13 | 114 |
d4fb90bd1e635ef0eff824669bf3374ac1248776 | 3,025 | py | Python | sympy/printing/tests/test_mathematica.py | tachycline/sympy | abf6fec12012852c7e6fae38461da9723cadc8b9 | [
"BSD-3-Clause"
] | 1 | 2017-04-27T15:45:41.000Z | 2017-04-27T15:45:41.000Z | sympy/printing/tests/test_mathematica.py | tachycline/sympy | abf6fec12012852c7e6fae38461da9723cadc8b9 | [
"BSD-3-Clause"
] | 1 | 2015-11-01T17:20:32.000Z | 2015-11-01T17:20:32.000Z | sympy/printing/tests/test_mathematica.py | tachycline/sympy | abf6fec12012852c7e6fae38461da9723cadc8b9 | [
"BSD-3-Clause"
] | 1 | 2021-04-07T12:37:06.000Z | 2021-04-07T12:37:06.000Z | from sympy.core import (symbols, Function)
x, y, z = symbols('x,y,z')
f = Function('f')
| 32.880435 | 93 | 0.509091 | from sympy.core import (S, pi, oo, symbols, Function,
Rational, Integer, Tuple, Derivative)
from sympy.integrals import Integral
from sympy.concrete import Sum
from sympy.functions import exp, sin, cos
from sympy import mathematica_code as mcode
x, y, z = symbols('x,y,z')
f = Function('f')
d... | 0 | 0 | 0 | 0 | 0 | 2,468 | 0 | 139 | 319 |
08c6eb00d70797349604e7028c8b2c0c8987f306 | 899 | py | Python | leetcode/2.py | ZymHedy/code_practice | add07e8c964004f95da3be5311e54283e2b87d36 | [
"MIT"
] | null | null | null | leetcode/2.py | ZymHedy/code_practice | add07e8c964004f95da3be5311e54283e2b87d36 | [
"MIT"
] | null | null | null | leetcode/2.py | ZymHedy/code_practice | add07e8c964004f95da3be5311e54283e2b87d36 | [
"MIT"
] | null | null | null | #
while 1:
n = int(input())
nums = list(map(int, input().split()))
n_bin = []
while n > 0:
temp = n % 2
n_bin.append(temp)
n = n // 2
print(n_bin)
nums_bin = dict()
for i in range(len(nums)):
nums_bin[i] = []
while nums[i] > 0:
temp = nu... | 21.926829 | 43 | 0.422692 | # 汉明距离
while 1:
n = int(input())
nums = list(map(int, input().split()))
n_bin = []
while n > 0:
temp = n % 2
n_bin.append(temp)
n = n // 2
print(n_bin)
nums_bin = dict()
for i in range(len(nums)):
nums_bin[i] = []
while nums[i] > 0:
temp ... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c20650393dc2f4ecdc818953517772614aa5b427 | 548 | py | Python | utilities/prepend/prepend.py | oneapi-account/DPCPP_Reference | 6ef0b40fe4c4b6f0883ab8eb02f40613bc86c533 | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | utilities/prepend/prepend.py | oneapi-account/DPCPP_Reference | 6ef0b40fe4c4b6f0883ab8eb02f40613bc86c533 | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | utilities/prepend/prepend.py | oneapi-account/DPCPP_Reference | 6ef0b40fe4c4b6f0883ab8eb02f40613bc86c533 | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # Copyright 2020 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
main()
| 23.826087 | 45 | 0.666058 | # Copyright 2020 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
import argparse
def prepend(prefix_lines, file):
with open(file, 'r') as fin:
lines = fin.readlines()
with open(file, 'w') as fout:
fout.writelines(prefix_lines + lines)
def main():
parser = argparse.ArgumentPar... | 0 | 0 | 0 | 0 | 0 | 398 | 0 | -6 | 69 |
22d1d1f0a1ce2528c8b0290b82a96db0aa8f6dec | 4,747 | py | Python | cgi-bin/paint_x2_unet/unet.py | ohong/pretty-whale | 9435d2a04dea7509f10cfd17e44ab8d146c1eb5f | [
"MIT"
] | 2,990 | 2017-01-31T04:36:11.000Z | 2022-03-23T08:54:30.000Z | cgi-bin/paint_x2_unet/unet.py | ececleon/PaintsChainer | 3c812be0616733328c61fb95c401b0c80a2b8537 | [
"MIT"
] | 103 | 2017-01-31T04:42:44.000Z | 2021-11-22T04:42:37.000Z | cgi-bin/paint_x2_unet/unet.py | ececleon/PaintsChainer | 3c812be0616733328c61fb95c401b0c80a2b8537 | [
"MIT"
] | 516 | 2017-01-31T04:58:35.000Z | 2022-02-14T09:18:50.000Z | #!/usr/bin/env python
| 33.907143 | 76 | 0.532336 | #!/usr/bin/env python
import numpy as np
import math
import chainer
import chainer.functions as F
import chainer.links as L
from chainer import cuda, optimizers, serializers, Variable
from chainer import function
from chainer.utils import type_check
class UNET(chainer.Chain):
def __init__(self):
super... | 0 | 0 | 0 | 4,446 | 0 | 0 | 0 | 52 | 224 |
d3fc7a658a57be520ad8be50aae810de19f82f2a | 1,877 | py | Python | db_job/migrations/0001_initial.py | bopopescu/ops-django | 3244fbe4eb782ea07ac38606e5c63b9d2e5525da | [
"MIT"
] | 21 | 2019-02-19T02:15:49.000Z | 2021-07-28T13:15:16.000Z | db_job/migrations/0001_initial.py | bopopescu/ops-django | 3244fbe4eb782ea07ac38606e5c63b9d2e5525da | [
"MIT"
] | null | null | null | db_job/migrations/0001_initial.py | bopopescu/ops-django | 3244fbe4eb782ea07ac38606e5c63b9d2e5525da | [
"MIT"
] | 6 | 2019-01-09T13:42:45.000Z | 2020-07-20T04:02:15.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2018-12-16 08:55
from __future__ import unicode_literals
| 48.128205 | 127 | 0.627064 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2018-12-16 08:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='DbJob... | 0 | 0 | 0 | 1,697 | 0 | 0 | 0 | 19 | 46 |
f16a0250627de0f4a77f17e3e10debd5f3a4eac5 | 441 | py | Python | iam_structure/__init__.py | pswapnesh/iam-essentials | b3aa4c5cd10c5ad585d7a25400e58d24f1c292cf | [
"MIT"
] | null | null | null | iam_structure/__init__.py | pswapnesh/iam-essentials | b3aa4c5cd10c5ad585d7a25400e58d24f1c292cf | [
"MIT"
] | null | null | null | iam_structure/__init__.py | pswapnesh/iam-essentials | b3aa4c5cd10c5ad585d7a25400e58d24f1c292cf | [
"MIT"
] | null | null | null |
import sys
sys.path.append('./utils')
from inspect import getmembers, isfunction
from iam_structure import iam_structure
function_list = getmembers(iam_structure, isfunction)
magic_function_list = prepare_functions(function_list) | 25.941176 | 59 | 0.854875 |
import sys
sys.path.append('./utils')
from napari_plugin_engine import napari_hook_implementation
from inspect import getmembers, isfunction
import inspect
from utils.utils import *
from iam_structure import iam_structure
function_list = getmembers(iam_structure, isfunction)
magic_function_list = prepare_functions(... | 0 | 84 | 0 | 0 | 0 | 0 | 0 | 35 | 90 |
59e8390a8f2c4a1ca442240ec364f9d44cc642e0 | 3,743 | py | Python | quantnn/examples/simple.py | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | null | null | null | quantnn/examples/simple.py | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | 3 | 2020-12-09T09:29:29.000Z | 2022-02-04T16:49:49.000Z | quantnn/examples/simple.py | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | 5 | 2020-12-11T03:18:32.000Z | 2022-02-14T10:32:09.000Z | """
quantnn.examples.simple
=======================
This module provides a simple toy example to illustrate the basic
functionality of quantile regression neural networks. The task is a simple
1-dimensional regression problem of a signal with heteroscedastic noise:
.. math::
y = \sin(x) + \cdot \cos(x) \cdot \mat... | 30.680328 | 85 | 0.621961 | """
quantnn.examples.simple
=======================
This module provides a simple toy example to illustrate the basic
functionality of quantile regression neural networks. The task is a simple
1-dimensional regression problem of a signal with heteroscedastic noise:
.. math::
y = \sin(x) + \cdot \cos(x) \cdot \mat... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 22 |
3d210f72ac74a0555d2bc9670020fd81fef8239f | 9,253 | py | Python | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/dec.py | changeworld/mu_basecore | 1a883ec85d8d2f49663c76e1a1bc5068333f5508 | [
"BSD-2-Clause"
] | 1 | 2019-03-19T04:11:31.000Z | 2019-03-19T04:11:31.000Z | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/dec.py | HouQiming/edk2 | ba07eef98ec49068d6453aba2aed73f6e7d7f600 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/dec.py | HouQiming/edk2 | ba07eef98ec49068d6453aba2aed73f6e7d7f600 | [
"BSD-2-Clause"
] | 1 | 2021-11-01T19:33:11.000Z | 2021-11-01T19:33:11.000Z | ## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
# distribution. The full text of the license may be found at
# http://open... | 28.915625 | 100 | 0.588782 | ## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
# distribution. The full text of the license may be found at
# http://open... | 0 | 280 | 0 | 8,128 | 0 | 0 | 0 | 12 | 316 |
3f4e035abfa607f5cd0305dadf1a9e85716b000d | 645 | py | Python | questionary/prompts/__init__.py | joaquingx/questionary | 34a5022603eecf49b28c871eb5772dc0a076943a | [
"MIT"
] | 1 | 2019-11-30T15:07:21.000Z | 2019-11-30T15:07:21.000Z | questionary/prompts/__init__.py | crypticterminal/questionary | 6bd84003002447e8906fb1e8f3144e658daa7892 | [
"MIT"
] | null | null | null | questionary/prompts/__init__.py | crypticterminal/questionary | 6bd84003002447e8906fb1e8f3144e658daa7892 | [
"MIT"
] | null | null | null | from questionary.prompts import confirm
from questionary.prompts import text
from questionary.prompts import select
from questionary.prompts import rawselect
from questionary.prompts import password
from questionary.prompts import checkbox
AVAILABLE_PROMPTS = {
"confirm": confirm.confirm,
"text": text.text,
... | 25.8 | 41 | 0.747287 | from questionary.prompts import confirm
from questionary.prompts import text
from questionary.prompts import select
from questionary.prompts import rawselect
from questionary.prompts import password
from questionary.prompts import checkbox
AVAILABLE_PROMPTS = {
"confirm": confirm.confirm,
"text": text.text,
... | 0 | 0 | 0 | 0 | 0 | 43 | 0 | 0 | 23 |
ef7997eb53086a40d3db165417e66ed876a1cefd | 25 | py | Python | index.py | MrSu1990/python21 | 5ec18de6af7c22d24c4712bc1f500f06e680e1e0 | [
"MIT"
] | null | null | null | index.py | MrSu1990/python21 | 5ec18de6af7c22d24c4712bc1f500f06e680e1e0 | [
"MIT"
] | null | null | null | index.py | MrSu1990/python21 | 5ec18de6af7c22d24c4712bc1f500f06e680e1e0 | [
"MIT"
] | null | null | null | m=1
n=2
e=4
d=8
key=20
| 3.125 | 6 | 0.52 | m=1
n=2
e=4
d=8
key=20
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2df0b18662a4b68a36f2550519981a9b1644175c | 3,837 | py | Python | tests/test_data.py | kiwicom/pg2avro | 51c309de90cf3d9bb71c7744c98b87de5c3393e6 | [
"MIT"
] | 11 | 2020-02-12T01:05:56.000Z | 2022-03-24T06:58:49.000Z | tests/test_data.py | kiwicom/pg2avro | 51c309de90cf3d9bb71c7744c98b87de5c3393e6 | [
"MIT"
] | 4 | 2019-07-30T12:29:42.000Z | 2020-04-16T13:28:38.000Z | tests/test_data.py | kiwicom/pg2avro | 51c309de90cf3d9bb71c7744c98b87de5c3393e6 | [
"MIT"
] | 1 | 2020-09-04T19:51:39.000Z | 2020-09-04T19:51:39.000Z | from collections import OrderedDict
from pg2avro import get_avro_schema, get_avro_row_dict
import json
def test_get_avro_row_row_types():
"""
Test generating Avro rows from different source row data.
TODO: Cover more than the simplest golden path.
"""
columns = [
{"name": "name", "type": ... | 28.213235 | 88 | 0.473286 | from collections import OrderedDict
from typing import List
from pg2avro import get_avro_schema, get_avro_row_dict
import json
def test_get_avro_row_row_types():
"""
Test generating Avro rows from different source row data.
TODO: Cover more than the simplest golden path.
"""
columns = [
{... | 0 | 0 | 0 | 210 | 0 | 0 | 0 | 2 | 49 |
b3befa59154d7b7488ac6c31d875247801f0c00b | 1,812 | py | Python | game/level_title.py | astrofra/game-mediecross-harfang | f4d944b22e6cda7348eb8b3dea4281adf8b8452b | [
"MIT"
] | null | null | null | game/level_title.py | astrofra/game-mediecross-harfang | f4d944b22e6cda7348eb8b3dea4281adf8b8452b | [
"MIT"
] | null | null | null | game/level_title.py | astrofra/game-mediecross-harfang | f4d944b22e6cda7348eb8b3dea4281adf8b8452b | [
"MIT"
] | null | null | null | import gs.plus.render as render
import gs.plus.input as input
import gs.plus.scene as scene
import gs.plus.clock as clock
import gs.plus.audio as audio
scn = None
dt_sec = 1.0 / 60.0
screen_clock = 0.0
title_music = None
| 31.789474 | 152 | 0.704194 | import math
import gs
import gs.plus.render as render
import gs.plus.input as input
import gs.plus.scene as scene
import gs.plus.clock as clock
import gs.plus.audio as audio
import globals
import level_game
scn = None
dt_sec = 1.0 / 60.0
screen_clock = 0.0
title_music = None
def setup():
global s... | 0 | 0 | 0 | 0 | 0 | 1,414 | 0 | -33 | 194 |
0fdfb5fbac5f08633ad8e272a4c4cc7c86f4c4f3 | 524 | py | Python | scripts/migration/set_challenge_slug_field.py | yaskh/EvalAI | 2a47ec998010a48f8d04d5ee700326ddd0a11a94 | [
"BSD-3-Clause"
] | 3 | 2019-02-24T10:57:09.000Z | 2019-02-24T16:49:32.000Z | scripts/migration/set_challenge_slug_field.py | yaskh/EvalAI | 2a47ec998010a48f8d04d5ee700326ddd0a11a94 | [
"BSD-3-Clause"
] | 388 | 2020-01-21T23:34:10.000Z | 2021-08-02T23:39:21.000Z | scripts/migration/set_challenge_slug_field.py | yaskh/EvalAI | 2a47ec998010a48f8d04d5ee700326ddd0a11a94 | [
"BSD-3-Clause"
] | 1 | 2020-03-13T19:41:18.000Z | 2020-03-13T19:41:18.000Z | # Command to run: python manage.py shell < scripts/migration/set_challenge_slug_field.py
# TODO: Run the code using a function based approach
import traceback
from challenges.models import Challenge
challenges = Challenge.objects.all()
try:
for challenge in challenges:
challenge_title = challenge.title.... | 27.578947 | 88 | 0.723282 | # Command to run: python manage.py shell < scripts/migration/set_challenge_slug_field.py
# TODO: Run the code using a function based approach
import traceback
from challenges.models import Challenge
challenges = Challenge.objects.all()
try:
for challenge in challenges:
challenge_title = challenge.title.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ce98b5e43587d36bf4c6112d82cd7b7a601d42db | 1,327 | py | Python | beehve/apps/honey/urls.py | Code4Maine/beehve | de4dece5d0c4e4fbe97c6249f105a387095bbaf0 | [
"BSD-3-Clause"
] | 1 | 2015-05-22T15:18:46.000Z | 2015-05-22T15:18:46.000Z | beehve/apps/honey/urls.py | Code4Maine/beehve | de4dece5d0c4e4fbe97c6249f105a387095bbaf0 | [
"BSD-3-Clause"
] | 24 | 2015-02-09T17:11:57.000Z | 2018-02-22T14:44:33.000Z | beehve/apps/honey/urls.py | Code4Maine/beehve | de4dece5d0c4e4fbe97c6249f105a387095bbaf0 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import include, url
from honey import views as honey_views
# custom views
urlpatterns = [
url(r'^', include('honey.project_urls')),
url(r'^', include('honey.idea_urls')),
url(r'^events/add/',
view=honey_views.EventCreateView.as_view(),
name="event-create"),
url(r... | 27.081633 | 56 | 0.607385 | from django.conf.urls import include, url
from honey import views as honey_views
# custom views
urlpatterns = [
url(r'^', include('honey.project_urls')),
url(r'^', include('honey.idea_urls')),
url(r'^events/add/',
view=honey_views.EventCreateView.as_view(),
name="event-create"),
url(r... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b94770a4e6e459d332db76459079715912c20ffb | 9,724 | py | Python | tensorflow/contrib/tensor_forest/hybrid/python/layers/decisions_to_data.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Lib/site-packages/tensorflow/contrib/tensor_forest/hybrid/python/layers/decisions_to_data.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2021-05-20T00:58:04.000Z | 2021-05-20T00:58:04.000Z | Lib/site-packages/tensorflow/contrib/tensor_forest/hybrid/python/layers/decisions_to_data.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 40.348548 | 81 | 0.687577 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 0 | 0 | 0 | 8,105 | 0 | 0 | 0 | 247 | 288 |
bc7c3883669153754cedbf0c6db3ee21a60168bf | 1,521 | py | Python | test.py | ucimeshardverom/ucimeshardverom-website-old | 8552c9ae5aab842cdd29a3f5024de8f3e7a3d3cc | [
"MIT"
] | 1 | 2018-10-01T20:42:06.000Z | 2018-10-01T20:42:06.000Z | test.py | ucimeshardverom/ucimeshardverom-website | e13dc074a258c3ba7d282f2432bda5faf6c74d5e | [
"MIT"
] | 2 | 2021-06-08T22:32:56.000Z | 2022-01-13T03:24:11.000Z | test.py | ucimeshardverom/ucimeshardverom-website-old | 8552c9ae5aab842cdd29a3f5024de8f3e7a3d3cc | [
"MIT"
] | 1 | 2019-04-26T09:41:00.000Z | 2019-04-26T09:41:00.000Z | #!/usr/bin/python
# -*- coding: utf8 -*-
import os
from flask import Flask
app = Flask(__name__, static_url_path='/static')
app.config['FREEZER_DESTINATION'] = 'docs'
app.jinja_options = {'extensions': ['jinja2.ext.with_', 'jinja2.ext.i18n']}
CNAME = 'www.ucimeshardverom.sk'
SRC_DIR = os.path.abspath(os.path.join(os... | 25.779661 | 101 | 0.717949 | #!/usr/bin/python
# -*- coding: utf8 -*-
import codecs
import os
from time import sleep
from flask import Flask, request, render_template, redirect, url_for, send_from_directory
from markdown_to_html import markdown_to_html, markdown_meta
from utils import get_tutorial_settings
from selenium import webdriver
import ... | 6 | 318 | 0 | 0 | 0 | 277 | 0 | 115 | 224 |
541e3ee0e1f3d5a53c8e504846d7ff07f66a3088 | 18,036 | py | Python | pypipet/core/shop_conn/spf.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/core/shop_conn/spf.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | null | null | null | pypipet/core/shop_conn/spf.py | pypipet/pypipet | 8c489e4a7992281fbb68b12e2627decf24f2facb | [
"MIT"
] | 1 | 2021-12-10T22:36:34.000Z | 2021-12-10T22:36:34.000Z | import logging
logger = logging.getLogger('__default__')
_ignore_status = ('cancelled', 'error', 'failure')
# @update_request_handler
# def update_inventory(inv_item_id, data,**kwargs):
# inv_item = shopify.InventoryItem.find(inv_item_id)
# inv_item._update(data)
# inv_item.save()
# update_invent... | 31.58669 | 92 | 0.617099 | from dataclasses import fields
from email import message
from turtle import up
import shopify
from shopify.resources import fulfillment_service
from pyactiveresource.activeresource import ActiveResource
from shopify.resources.custom_collection import CustomCollection
import logging
logger = logging.getLogger('__default... | 0 | 9,465 | 0 | 0 | 0 | 6,807 | 0 | 114 | 1,267 |
25eb761d7954aa8e5b6b1dd7a02082a3df60db91 | 2,398 | py | Python | hodos/10_folds_their_data.py | umarov90/DeepFake | e65c72f255817532e8a8a3afe2138ae270477601 | [
"Apache-2.0"
] | 3 | 2021-01-28T08:08:20.000Z | 2021-10-30T02:15:54.000Z | hodos/10_folds_their_data.py | umarov90/DeepFake | e65c72f255817532e8a8a3afe2138ae270477601 | [
"Apache-2.0"
] | null | null | null | hodos/10_folds_their_data.py | umarov90/DeepFake | e65c72f255817532e8a8a3afe2138ae270477601 | [
"Apache-2.0"
] | 1 | 2020-12-21T13:15:43.000Z | 2020-12-21T13:15:43.000Z | import os
import pandas as pd
import numpy as np
import random
from pathlib import Path
from CellData import CellData
from random import shuffle
# For reproducibility
random.seed(0)
np.random.seed(0)
os.chdir(open("../data_dir").read().strip())
# Load fixed order of perts and cell types
perts = pd.read_csv("Hodos/the... | 38.677419 | 150 | 0.652627 | import os
import pandas as pd
import numpy as np
import random
from pathlib import Path
from CellData import CellData
from random import shuffle
# For reproducibility
random.seed(0)
np.random.seed(0)
os.chdir(open("../data_dir").read().strip())
# Load fixed order of perts and cell types
perts = pd.read_csv("Hodos/the... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bc8ed6929ef64a247be4cdf84f837a585c594368 | 457 | py | Python | app/core/migrations/0002_user_phonenumber.py | andrewrusu/recipe-app-api | 7eb5a351a2ef3aced1b54cc3a0aaed21f8873613 | [
"MIT"
] | null | null | null | app/core/migrations/0002_user_phonenumber.py | andrewrusu/recipe-app-api | 7eb5a351a2ef3aced1b54cc3a0aaed21f8873613 | [
"MIT"
] | null | null | null | app/core/migrations/0002_user_phonenumber.py | andrewrusu/recipe-app-api | 7eb5a351a2ef3aced1b54cc3a0aaed21f8873613 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.8 on 2019-04-18 18:16
| 22.85 | 105 | 0.643326 | # Generated by Django 2.1.8 on 2019-04-18 18:16
from django.db import migrations
import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='user',
name='... | 0 | 0 | 0 | 314 | 0 | 0 | 0 | 26 | 68 |
e053b035f88996cba1261f50e6068d9e13e6650c | 2,070 | py | Python | src/model/gui.py | rondinellimorais/chess_recognition | 1553acf148e9dfa6a5a6e028b9567d3e0563014e | [
"MIT"
] | 4 | 2022-01-11T20:00:08.000Z | 2022-03-03T03:33:53.000Z | src/model/gui.py | rondinellimorais/chess_recognition | 1553acf148e9dfa6a5a6e028b9567d3e0563014e | [
"MIT"
] | null | null | null | src/model/gui.py | rondinellimorais/chess_recognition | 1553acf148e9dfa6a5a6e028b9567d3e0563014e | [
"MIT"
] | 1 | 2021-09-19T02:39:19.000Z | 2021-09-19T02:39:19.000Z |
# Aviso: Toda parte de interface est aqui
# - console log
# - main grid
#
# Eu poderia ter separado em classes mas no fiz :( | 28.356164 | 89 | 0.700966 | from typing import Optional
from pyqtgraph.Qt import QtGui
import pyqtgraph as pg
# Aviso: Toda parte de interface está aqui
# - console log
# - main grid
#
# Eu poderia ter separado em classes mas não fiz :(
class GUI(QtGui.QMainWindow):
__canvas: pg.GraphicsLayoutWidget = None
__layout: pg.GraphicsLayout =... | 4 | 0 | 0 | 1,833 | 0 | 0 | 0 | 16 | 90 |
40f9aa8abe24903997552e55156f992b0d186c47 | 42,971 | py | Python | statsmodels/stats/oneway.py | barryquinn1/statsmodels | 305258f5245e76409f6deab24d217ffbbc352ba0 | [
"BSD-3-Clause"
] | 1 | 2021-08-05T13:30:46.000Z | 2021-08-05T13:30:46.000Z | statsmodels/stats/oneway.py | barryquinn1/statsmodels | 305258f5245e76409f6deab24d217ffbbc352ba0 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/stats/oneway.py | barryquinn1/statsmodels | 305258f5245e76409f6deab24d217ffbbc352ba0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 18 10:33:38 2020
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
from scipy import stats
from scipy.special import ncfdtrinc
from statsmodels.stats.robust_compare import TrimmedMean, scale_transform
from statsmodels.tools.testing import Holder
from statsmo... | 37.043966 | 79 | 0.630751 | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 18 10:33:38 2020
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
from scipy import stats
from scipy.special import ncfdtrinc
from statsmodels.stats.robust_compare import TrimmedMean, scale_transform
from statsmodels.tools.testing import Holder
from statsmo... | 45 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
02e870867bc75d4dd515500af2173f663848d3cb | 1,062 | py | Python | picarro_merge_avg.py | saurabh-annadate/Useful-scripts-in-atmospheric-science-research | d4a3b748c7d875f4aa2b1ae40df6566e49dfcd43 | [
"CC0-1.0"
] | null | null | null | picarro_merge_avg.py | saurabh-annadate/Useful-scripts-in-atmospheric-science-research | d4a3b748c7d875f4aa2b1ae40df6566e49dfcd43 | [
"CC0-1.0"
] | null | null | null | picarro_merge_avg.py | saurabh-annadate/Useful-scripts-in-atmospheric-science-research | d4a3b748c7d875f4aa2b1ae40df6566e49dfcd43 | [
"CC0-1.0"
] | null | null | null | #author: SAURABH ANNADATE
import pandas as pd
import glob
import os
path = '/home/PICARRO/July/' #path to the folder consisting daywise folders of the PICARRO data
arr = os.listdir(path)
all_files = [] # list of all the data files need to merged
for i in arr:
all_files = all_files + glob.glob(path+i ... | 36.62069 | 105 | 0.715631 | #author: SAURABH ANNADATE
import pandas as pd
import glob
import os
path = '/home/PICARRO/July/' #path to the folder consisting daywise folders of the PICARRO data
arr = os.listdir(path)
all_files = [] # list of all the data files need to merged
for i in arr:
all_files = all_files + glob.glob(path+i ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
54c41563188989f30bd881074b16602b13923c65 | 7,370 | py | Python | src/main/python/gp/gp_tfp.py | ssoudan/pyGP | 57385b6ed4dc1b2ef18e16abb4793e9f1a05c79c | [
"MIT"
] | null | null | null | src/main/python/gp/gp_tfp.py | ssoudan/pyGP | 57385b6ed4dc1b2ef18e16abb4793e9f1a05c79c | [
"MIT"
] | 1 | 2020-09-28T04:33:05.000Z | 2020-09-28T04:33:07.000Z | src/main/python/gp/gp_tfp.py | ssoudan/pyGP | 57385b6ed4dc1b2ef18e16abb4793e9f1a05c79c | [
"MIT"
] | null | null | null | import tensorflow_probability as tfp
import os
import warnings
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
warnings.filterwarnings("ignore", category=DeprecationWarning)
n_cpus = 6
#
# see https://github.com/tensorflow/probability/blob/master/tensorflow_probability/
# g3doc/api_docs/python/tfp/distributio... | 35.095238 | 114 | 0.644776 | import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
import matplotlib.pylab as plt
import os
import warnings
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
warnings.filterwarnings("ignore", category=DeprecationWarning)
n_cpus = 6
#
# see https://github.com/tensorflow/probability/blob/master/t... | 0 | 0 | 0 | 0 | 0 | 6,793 | 0 | 8 | 135 |
8dac12b7bcf3ed28b1e63b27cb54e88a5b77a6ea | 5,629 | py | Python | compiler/lever_parser/lang_pyllisp.py | cheery/lever | 6fa8cd6afec440b32232f87236b0457fb8bfb8b1 | [
"MIT"
] | 136 | 2015-12-18T21:11:59.000Z | 2022-02-21T19:47:36.000Z | compiler/lever_parser/lang_pyllisp.py | cheery/lever | 6fa8cd6afec440b32232f87236b0457fb8bfb8b1 | [
"MIT"
] | 1 | 2021-05-07T11:17:02.000Z | 2021-05-07T18:15:07.000Z | compiler/lever_parser/lang_pyllisp.py | cheery/lever | 6fa8cd6afec440b32232f87236b0457fb8bfb8b1 | [
"MIT"
] | 13 | 2016-03-06T18:27:17.000Z | 2020-06-18T14:27:32.000Z | from earley import Rule
from reader import CStream, L2, Literal
import earley
import sys
import pprint
table = {
u'(': u'leftparen', u')': u'rightparen',
u'+': u'plus',
u'if': u'if',
u'elif': u'elif',
u'else': u'else',
# u'[': u'lb', u']': u'rb',
# u'{': u'lc', u'}': u'rc',
# u'and': u'and... | 30.263441 | 95 | 0.554983 | from earley import Rule
from reader import CStream, L2, Literal
import earley
import sys
import pprint
table = {
u'(': u'leftparen', u')': u'rightparen',
u'+': u'plus',
u'if': u'if',
u'elif': u'elif',
u'else': u'else',
# u'[': u'lb', u']': u'rb',
# u'{': u'lc', u'}': u'rc',
# u'and': u'and... | 0 | 0 | 0 | 0 | 0 | 1,501 | 0 | 0 | 322 |
6371e5ac43b812e2a38c3cc26b2a6532ce65c247 | 1,208 | py | Python | IDocExtractor.py | FrankRogalski/IDocExtractor | 27c9dd3bd32e4af57b7eea721ec912a200a1fa0f | [
"MIT"
] | null | null | null | IDocExtractor.py | FrankRogalski/IDocExtractor | 27c9dd3bd32e4af57b7eea721ec912a200a1fa0f | [
"MIT"
] | null | null | null | IDocExtractor.py | FrankRogalski/IDocExtractor | 27c9dd3bd32e4af57b7eea721ec912a200a1fa0f | [
"MIT"
] | null | null | null | import argparse
parser = argparse.ArgumentParser(description='Create a file of changed Customers from three unfiltered xls files')
parser.add_argument("-s","--source", dest="source_path", help="The Datahub log from which this programm will retrieve the IDocs", required=True)
parser.add_argument("-t", "--target", dest... | 43.142857 | 144 | 0.644868 | import argparse
import re
parser = argparse.ArgumentParser(description='Create a file of changed Customers from three unfiltered xls files')
parser.add_argument("-s","--source", dest="source_path", help="The Datahub log from which this programm will retrieve the IDocs", required=True)
parser.add_argument("-t", "--tar... | 0 | 0 | 0 | 0 | 0 | 579 | 0 | -12 | 45 |
efa7861f5f5c51ffec5406523519917dc39899cd | 2,703 | py | Python | src/bitcaster/otp.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 4 | 2018-03-01T10:22:30.000Z | 2020-04-04T16:31:11.000Z | src/bitcaster/otp.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 60 | 2018-05-20T04:42:32.000Z | 2022-02-10T17:03:37.000Z | src/bitcaster/otp.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 1 | 2018-08-04T05:06:45.000Z | 2018-08-04T05:06:45.000Z | import logging
logger = logging.getLogger(__name__)
totp = TOTP('base32secret3232', interval=1)
| 34.21519 | 109 | 0.660007 | import base64
import logging
import random
import re
import string
import time
import pyotp
import six
from cryptography.fernet import Fernet
from django.conf import settings
from bitcaster.config.environ import env
logger = logging.getLogger(__name__)
class TOTP(pyotp.TOTP):
def verify(self, otp, for_time=No... | 0 | 0 | 0 | 2,353 | 0 | 0 | 0 | -19 | 268 |
8e18e57ab417d25114d87c02c4458adc6893c1cf | 11,164 | py | Python | app/app/models.py | airladon/ThisIGet | e54058056ed593ff1097ef4505a5ce97ea09d94b | [
"BSD-3-Clause"
] | 5 | 2020-06-19T22:06:16.000Z | 2022-02-06T17:13:14.000Z | app/app/models.py | airladon/ThisIGet | e54058056ed593ff1097ef4505a5ce97ea09d94b | [
"BSD-3-Clause"
] | 3 | 2021-03-09T00:43:58.000Z | 2021-06-15T17:44:22.000Z | app/app/models.py | airladon/ThisIGet | e54058056ed593ff1097ef4505a5ce97ea09d94b | [
"BSD-3-Clause"
] | null | null | null | # import bcrypt
# import hashlib
# import base64
# import os
# from Crypto.Cipher import AES
# Database entries have three tiers of security
# 1. Plain Text
# - Entries that cannot be used to identify someone
# - Entries that might be valudes and might need to be queried en masse
# - Example: Time ... | 37.089701 | 79 | 0.622805 | from app import db
from app import login
from datetime import datetime
# import bcrypt
# import hashlib
# import base64
from flask_login import UserMixin
from time import time
import jwt
from app import app
# import os
# from Crypto.Cipher import AES
from app.tools import encrypt, decrypt, hash_str, check_hash
from app... | 0 | 2,715 | 0 | 4,668 | 0 | 12 | 0 | 78 | 358 |
af608f706c1b4046077d3a8a0a6e780e9df97da4 | 3,209 | py | Python | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spynnaker/pyNN/models/common/eieio_spike_recorder.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | 2 | 2020-11-01T13:22:11.000Z | 2020-11-01T13:22:20.000Z | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spynnaker/pyNN/models/common/eieio_spike_recorder.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spynnaker/pyNN/models/common/eieio_spike_recorder.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null |
import logging
logger = logging.getLogger(__name__)
| 33.778947 | 75 | 0.585852 | from spinn_machine.utilities.progress_bar import ProgressBar
from spinnman.messages.eieio.data_messages.eieio_data_header \
import EIEIODataHeader
import numpy
import logging
logger = logging.getLogger(__name__)
class EIEIOSpikeRecorder(object):
""" Records spikes using EIEIO format
"""
def __init... | 0 | 91 | 0 | 2,875 | 0 | 0 | 0 | 98 | 90 |
e75f7161b43d9267fd2e29e639ec2161c9080049 | 3,098 | py | Python | matplotlib/plotter.py | minister19/Python_snippets | 69accc4278443271aefc7e354161eac7df2fa283 | [
"MIT"
] | null | null | null | matplotlib/plotter.py | minister19/Python_snippets | 69accc4278443271aefc7e354161eac7df2fa283 | [
"MIT"
] | null | null | null | matplotlib/plotter.py | minister19/Python_snippets | 69accc4278443271aefc7e354161eac7df2fa283 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
p = Plotter()
line = p.plot_single({
'id': 1,
'title': 'single_line',
'xlabel': 't',
'ylabel': 'l1',
'x_data': range(4),
'y_data': [1, 2, 3, 4]
})
plt.pause(1)
p.plot_single({
'id': 1,
'title': 'single_line',
'xlabel': 't',
'ylabel': 'l1',
'... | 28.163636 | 98 | 0.450291 | import matplotlib
import matplotlib.pyplot as plt
class Plotter():
def __init__(self):
plt.ion() # set up matplotlib
def plot_single(self, config):
'''
config: {
id: unique identifier,
title: '',
xlabel: '',
ylabel: '',
x_da... | 0 | 0 | 0 | 2,252 | 0 | 0 | 0 | -4 | 45 |
31983914e9c541740e41d360f8f89852b8ecafda | 3,055 | py | Python | simpleGUI/decontaminationGUI.py | redsnic/WGA-LP | 1d8f4a85843b4220559e3e5cccaaee8c78e1b452 | [
"MIT"
] | 5 | 2021-08-03T17:09:19.000Z | 2021-12-14T18:11:02.000Z | simpleGUI/decontaminationGUI.py | redsnic/WGA-LP | 1d8f4a85843b4220559e3e5cccaaee8c78e1b452 | [
"MIT"
] | null | null | null | simpleGUI/decontaminationGUI.py | redsnic/WGA-LP | 1d8f4a85843b4220559e3e5cccaaee8c78e1b452 | [
"MIT"
] | null | null | null | import PySimpleGUI as sg
import traceback
import os
import subprocess
from mini_programs.decontamination_workflow import run_decontaminationPE
from mini_programs.decontamination_workflow import run_decontamination
# Minimal GUI to run decontamination using BWA
if __name__ == "__main__":
layout = [
[sg.Te... | 40.197368 | 131 | 0.583306 | import PySimpleGUI as sg
import traceback
import os
import subprocess
from mini_programs.decontamination_workflow import run_decontaminationPE
from mini_programs.decontamination_workflow import run_decontamination
# Minimal GUI to run decontamination using BWA
if __name__ == "__main__":
layout = [
[sg.Te... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1f16da942851efffe582f08e1537a8ef82867297 | 16,326 | py | Python | Manuscript-figures/map_xcorr-example-plot.py | ehultee/helheim-fiesta | ed4e3f4ceac58137c1a4066941783a5c38d29c9b | [
"MIT"
] | null | null | null | Manuscript-figures/map_xcorr-example-plot.py | ehultee/helheim-fiesta | ed4e3f4ceac58137c1a4066941783a5c38d29c9b | [
"MIT"
] | null | null | null | Manuscript-figures/map_xcorr-example-plot.py | ehultee/helheim-fiesta | ed4e3f4ceac58137c1a4066941783a5c38d29c9b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Pub-quality figures: maps of xcorr and lag for different variables
See Jupyter notebook for full guided analysis
Created on Fri Dec 18 13:59:51 2020
Updated Mon Feb 22 2021
@author: lizz
"""
from netCDF4 import Dataset
from scipy import interpolate
import pyproj as ... | 42.295337 | 372 | 0.701397 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Pub-quality figures: maps of xcorr and lag for different variables
See Jupyter notebook for full guided analysis
Created on Fri Dec 18 13:59:51 2020
Updated Mon Feb 22 2021
@author: lizz
"""
from netCDF4 import Dataset
from scipy import interpolate
import pyproj as ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eef86c1f68173af87b8869e8ba6783b89cb47b37 | 301 | py | Python | packages/syft/src/syft/core/node/common/node_table/pdf.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | 8,428 | 2017-08-10T09:17:49.000Z | 2022-03-31T08:20:14.000Z | packages/syft/src/syft/core/node/common/node_table/pdf.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | 4,779 | 2017-08-09T23:19:00.000Z | 2022-03-29T11:49:36.000Z | packages/syft/src/syft/core/node/common/node_table/pdf.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | 2,307 | 2017-08-10T08:52:12.000Z | 2022-03-30T05:36:07.000Z | # third party
# relative
| 20.066667 | 64 | 0.757475 | # third party
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import LargeBinary
# relative
from . import Base
class PDFObject(Base):
__tablename__ = "daa_pdf"
id = Column(Integer(), primary_key=True, autoincrement=True)
binary = Column(LargeBinary(3072))
| 0 | 0 | 0 | 136 | 0 | 0 | 0 | 27 | 111 |
9d23b1aef160d8ec1de7e3c1988148efc00d0b97 | 713 | py | Python | server/app/views/services.py | SheetWithoutShit/sws | 1217891fcc00c1d2ea840586e31bbd038fdce42e | [
"MIT"
] | null | null | null | server/app/views/services.py | SheetWithoutShit/sws | 1217891fcc00c1d2ea840586e31bbd038fdce42e | [
"MIT"
] | 51 | 2020-04-30T13:08:37.000Z | 2020-08-28T12:16:26.000Z | server/app/views/services.py | SheetWithoutShit/SheetWithoutShit | 1217891fcc00c1d2ea840586e31bbd038fdce42e | [
"MIT"
] | null | null | null | """This module provides services views for server app."""
from aiohttp import web
services_routes = web.RouteTableDef()
| 26.407407 | 63 | 0.622721 | """This module provides services views for server app."""
from aiohttp import web
services_routes = web.RouteTableDef()
@services_routes.view('/spreadsheet')
class SpreadsheetView(web.View):
"""View to interact with spreadsheet`s data"""
async def get(self):
"""
Return formatted authorizat... | 0 | 566 | 0 | 0 | 0 | 0 | 0 | 0 | 23 |
9a8ab222526264276b09abc89e356e419738f77e | 2,110 | py | Python | tests/test_raw.py | lymanepp/pynws | 92eff6484f680217d90acca3f5711d71dbf0ab3e | [
"MIT"
] | 1 | 2022-02-04T19:55:00.000Z | 2022-02-04T19:55:00.000Z | tests/test_raw.py | lymanepp/pynws | 92eff6484f680217d90acca3f5711d71dbf0ab3e | [
"MIT"
] | null | null | null | tests/test_raw.py | lymanepp/pynws | 92eff6484f680217d90acca3f5711d71dbf0ab3e | [
"MIT"
] | null | null | null |
LATLON = (0, 0)
STATION = "ABC"
USERID = "test"
WFO = "ABC"
X = 0
Y = 0
ZONE = "test"
| 30.142857 | 86 | 0.754976 | from datetime import datetime, timezone
from pynws import raw_data
import pytest
from tests.helpers import setup_app
LATLON = (0, 0)
STATION = "ABC"
USERID = "test"
WFO = "ABC"
X = 0
Y = 0
ZONE = "test"
async def test_points_stations(aiohttp_client, event_loop, mock_urls):
app = setup_app()
client = await ... | 0 | 0 | 1,712 | 0 | 0 | 0 | 0 | 29 | 274 |
98de908a7751768ac013e1814957421ce25458b8 | 695 | py | Python | project/selection_sort.py | josebrwn/python-interview | 15a31a2c20ec93d46573b1fb018e37c2ef598830 | [
"MIT"
] | null | null | null | project/selection_sort.py | josebrwn/python-interview | 15a31a2c20ec93d46573b1fb018e37c2ef598830 | [
"MIT"
] | null | null | null | project/selection_sort.py | josebrwn/python-interview | 15a31a2c20ec93d46573b1fb018e37c2ef598830 | [
"MIT"
] | null | null | null | # selection sort
# pylint: disable=import-error
from random_list import random_list as rl
# [x,x,x] [x,x,x,x,x,x,x,x,x,x]
# loop over the len of numbers
# result = [x]
# search ahead in numbers for the smallest (mark ith as smallest, loop til end)
array = rl(10)
print(selection_sort(array))
| 28.958333 | 80 | 0.634532 | # selection sort
# pylint: disable=import-error
from random_list import random_list as rl
# [x,x,x] [x,x,x,x,x,x,x,x,x,x]
# loop over the len of numbers
# result = [x]
# search ahead in numbers for the smallest (mark ith as smallest, loop til end)
def selection_sort(numbers: [int]) -> [int]:
print(numbe... | 0 | 0 | 0 | 0 | 0 | 363 | 0 | 0 | 25 |
69749aad9f3d860943ab052e3e679f493f670493 | 406 | py | Python | config.py | weissmeister/fb_scraper | fc4ecdaca90360b75044faf026913972a95a75ca | [
"Unlicense"
] | 1 | 2019-02-12T13:54:01.000Z | 2019-02-12T13:54:01.000Z | config.py | weissmeister/fb_scraper | fc4ecdaca90360b75044faf026913972a95a75ca | [
"Unlicense"
] | null | null | null | config.py | weissmeister/fb_scraper | fc4ecdaca90360b75044faf026913972a95a75ca | [
"Unlicense"
] | 2 | 2019-03-09T14:03:51.000Z | 2021-12-03T11:53:42.000Z | # Configuration file, type values between ''
# Put Facebook login here
config_email = ''
config_password = ''
# Put link to your friend page here. (from your browser)
# Either: https://www.facebook.com/xxx/friends
# Or: https://www.facebook.com/profile.php?id=xxx&%2Ffriends&sk=friends&source_ref=pb_friends_tl
config_... | 29 | 96 | 0.746305 | # Configuration file, type values between ''
# Put Facebook login here
config_email = ''
config_password = ''
# Put link to your friend page here. (from your browser)
# Either: https://www.facebook.com/xxx/friends
# Or: https://www.facebook.com/profile.php?id=xxx&%2Ffriends&sk=friends&source_ref=pb_friends_tl
config_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
13697bc6ba2fb3060f4a22a68574e43fe7161313 | 4,156 | py | Python | test/units/LambdaApiUserSignUp_test.py | praktikos/praktikos-template-python | 324c7640ee05469fba87a7ec64d6ac61675b259e | [
"MIT"
] | null | null | null | test/units/LambdaApiUserSignUp_test.py | praktikos/praktikos-template-python | 324c7640ee05469fba87a7ec64d6ac61675b259e | [
"MIT"
] | null | null | null | test/units/LambdaApiUserSignUp_test.py | praktikos/praktikos-template-python | 324c7640ee05469fba87a7ec64d6ac61675b259e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# noinspection PyUnusedLocal
| 45.67033 | 96 | 0.665303 | # -*- coding: utf-8 -*-
import json
import boto3
import requests
from api.rdb.config import is_test, is_production
from api.rdb.utils.apigateway import get_api_url
from api.rdb.utils.service_framework import STATUS_OK, STATUS_BAD_REQUEST
from ..utilities import invoke, get_lambda_test_data, get_lambda_fullpath
# n... | 0 | 0 | 0 | 0 | 0 | 3,788 | 0 | 134 | 179 |
2a06cb71a8ec5c180c033c62d8ac71575c22f31a | 288 | py | Python | Desafios/desafio 012.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio 012.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | Desafios/desafio 012.py | VanessaCML/python | 56133b9000ba89154f37038e11a3c2d1aa6d1094 | [
"MIT"
] | null | null | null | print('Hipermercado Preo Bo - Confira abaixo o desconto do bo que a gente preparou pra voc!'
'\n')
p = float(input('Qual o preo original do produto? '))
print(f'\nAproveite! Agora este produto est custando R${p*0.95:.2f} no saldo da quinta verde!'
'\nBoas compras!')
| 41.142857 | 97 | 0.694444 | print('Hipermercado Preço Bão - Confira abaixo o descontão do bão que a gente preparou pra você!'
'\n')
p = float(input('Qual o preço original do produto? '))
print(f'\nAproveite! Agora este produto está custando R${p*0.95:.2f} no saldão da quinta verde!'
'\nBoas compras!')
| 16 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c29114139592afcde0652997367d8e86429d2ab1 | 716 | py | Python | OnlineCourseRegistration/users/migrations/0007_auto_20181025_0529.py | raghug16/Online-Course-Registration | 811748c034f73ad2df21e148bfbdcec2e0a507d5 | [
"MIT"
] | null | null | null | OnlineCourseRegistration/users/migrations/0007_auto_20181025_0529.py | raghug16/Online-Course-Registration | 811748c034f73ad2df21e148bfbdcec2e0a507d5 | [
"MIT"
] | null | null | null | OnlineCourseRegistration/users/migrations/0007_auto_20181025_0529.py | raghug16/Online-Course-Registration | 811748c034f73ad2df21e148bfbdcec2e0a507d5 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.2 on 2018-10-25 05:29
| 24.689655 | 61 | 0.561453 | # Generated by Django 2.1.2 on 2018-10-25 05:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0006_grade'),
]
operations = [
migrations.AlterField(
model_name='grade',
name='course',
field=... | 0 | 0 | 0 | 602 | 0 | 0 | 0 | 19 | 46 |
dcaf04376020483bc9e353687b6bfc36887db94e | 2,846 | py | Python | custom_components/uponor/config_flow.py | kng/homeassistant-uponor | dcf0a995edc81c9861e7b699a50aa3879d3f85f8 | [
"MIT"
] | 17 | 2020-05-20T11:28:09.000Z | 2022-02-15T10:23:22.000Z | custom_components/uponor/config_flow.py | kng/homeassistant-uponor | dcf0a995edc81c9861e7b699a50aa3879d3f85f8 | [
"MIT"
] | 30 | 2020-04-23T10:39:03.000Z | 2022-03-03T06:26:59.000Z | custom_components/uponor/config_flow.py | kng/homeassistant-uponor | dcf0a995edc81c9861e7b699a50aa3879d3f85f8 | [
"MIT"
] | 9 | 2020-05-28T20:46:22.000Z | 2022-01-13T23:23:46.000Z | import logging
_LOGGER = logging.getLogger(__name__)
| 30.934783 | 92 | 0.590302 | from homeassistant import config_entries
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
import logging
from UponorJnap import UponorJnap
from homeassistant.const import (
CONF_HOST,
CONF_NAME
)
from .const import (
DOMAIN,
SIGNAL_UPONOR_STATE_UPDATE,
DEVICE_MANUFACT... | 0 | 196 | 1,094 | 1,166 | 0 | 0 | 0 | 177 | 158 |
3723efd2ea01d05b3a65e6dff850b28d55f8966b | 4,624 | py | Python | app/auth/routes.py | candicecz/conp-portal | 1685a833195b1a4755203a482cebd81644c94a6e | [
"MIT"
] | null | null | null | app/auth/routes.py | candicecz/conp-portal | 1685a833195b1a4755203a482cebd81644c94a6e | [
"MIT"
] | null | null | null | app/auth/routes.py | candicecz/conp-portal | 1685a833195b1a4755203a482cebd81644c94a6e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Routes Module
Currently this module contains all of the routes for the auth blueprint
"""
# This is the first step in the login process: the 'login with X' buttons
# should direct users here with the provider name filled in
# This is step two. The OAuth provider then sends its re... | 28.54321 | 93 | 0.647708 | # -*- coding: utf-8 -*-
""" Routes Module
Currently this module contains all of the routes for the auth blueprint
"""
from app import db
from app.models import User
from app.oauth import OAuthSignIn
from app.forms import SignInForm
from app.forms import SignUpForm
from sqlalchemy import func, or_
from flask import... | 0 | 3,737 | 0 | 0 | 0 | 0 | 0 | 214 | 334 |
9f57dc161a4c2f57109ec9b96b98cf65e6091f2e | 6,203 | py | Python | tests/binding/test_binders_errors.py | jimcarreer/dinao | ab9514d81ffff2d3e8717f26403c3b73f388739d | [
"MIT"
] | 1 | 2021-01-27T08:09:31.000Z | 2021-01-27T08:09:31.000Z | tests/binding/test_binders_errors.py | jimcarreer/dinao | ab9514d81ffff2d3e8717f26403c3b73f388739d | [
"MIT"
] | 34 | 2020-12-18T19:40:26.000Z | 2022-03-05T13:06:37.000Z | tests/binding/test_binders_errors.py | jimcarreer/dinao | ab9514d81ffff2d3e8717f26403c3b73f388739d | [
"MIT"
] | 1 | 2021-01-27T08:12:15.000Z | 2021-01-27T08:12:15.000Z | """Tests various errors that can be thrown by binding."""
from typing import Generator, List, Tuple, Union
from dinao.backend import Connection
from dinao.binding import FunctionBinder
from dinao.binding.binders import BoundedGeneratingQuery
from dinao.binding.errors import (BadReturnTypeError, CannotInferMappingErro... | 38.055215 | 114 | 0.715138 | """Tests various errors that can be thrown by binding."""
from typing import Generator, List, Tuple, Union
from dinao.backend import Connection
from dinao.binding import FunctionBinder
from dinao.binding.binders import BoundedGeneratingQuery
from dinao.binding.errors import (
BadReturnTypeError,
CannotInferMa... | 0 | 1,331 | 0 | 0 | 0 | 41 | 0 | 35 | 364 |