hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ccaa59b85557e6cd6937ba78c43ff3110ce000e | 7,286 | py | Python | cosmosis/samplers/emcee/emcee_sampler.py | annis/cosmosis | 55efc1bc2260ca39298c584ae809fa2a8e72a38e | [
"BSD-2-Clause"
] | 2 | 2021-06-18T14:11:59.000Z | 2022-02-23T19:19:36.000Z | cosmosis/samplers/emcee/emcee_sampler.py | annis/cosmosis | 55efc1bc2260ca39298c584ae809fa2a8e72a38e | [
"BSD-2-Clause"
] | 2 | 2021-11-02T12:44:24.000Z | 2022-03-30T15:09:48.000Z | cosmosis/samplers/emcee/emcee_sampler.py | annis/cosmosis | 55efc1bc2260ca39298c584ae809fa2a8e72a38e | [
"BSD-2-Clause"
] | 2 | 2022-03-25T21:26:27.000Z | 2022-03-29T06:37:46.000Z | from .. import ParallelSampler, sample_ellipsoid
import numpy as np
import sys
def log_probability_function(p):
r = emcee_pipeline.run_results(p)
return r.post, (r.prior, r.extra)
class EmceeSampler(ParallelSampler):
parallel_output = False
supports_resume = True
sampler_outputs = [("prior", flo... | 43.891566 | 142 | 0.586467 |
6efb99d915ab6a098dca4c745c45e6e23b690ac7 | 18,146 | py | Python | src/graph_controls.py | TZebin/dashboard | 5a4f8acedb75a997eb68ef79e08e22dffdfd1973 | [
"MIT"
] | null | null | null | src/graph_controls.py | TZebin/dashboard | 5a4f8acedb75a997eb68ef79e08e22dffdfd1973 | [
"MIT"
] | null | null | null | src/graph_controls.py | TZebin/dashboard | 5a4f8acedb75a997eb68ef79e08e22dffdfd1973 | [
"MIT"
] | null | null | null | import streamlit as st
import plotly.express as px
from src.image_export import show_export_format
def graph_controls(chart_type, df, dropdown_options, template):
"""
Function which determines the widgets that would be shown for the different chart types
:param chart_type: str, name of chart
:param df... | 62.143836 | 126 | 0.58371 |
1e11bd4dfa7541910e40d11cd3ab1881e6e7c01f | 5,002 | py | Python | Cura/Uranium/tests/Math/TestQuaternion.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Uranium/tests/Math/TestQuaternion.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Uranium/tests/Math/TestQuaternion.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | # Copyright (c) 2019 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
import unittest
import numpy
import math
from UM.Math.Quaternion import Quaternion
from UM.Math.Vector import Vector
from UM.Math.Float import Float
from UM.Math.Matrix import Matrix
class TestQuaternion(unittest.TestC... | 32.907895 | 76 | 0.607757 |
71581345d39130f3b4c57058d909490fc6cca6aa | 1,381 | py | Python | flask_appconfig/middleware.py | edpaget/flask-appconfig | 5264719ac9229339070b219a4358a3203ffd05b0 | [
"MIT"
] | 61 | 2015-01-28T21:19:11.000Z | 2020-12-28T10:12:28.000Z | flask_appconfig/middleware.py | edpaget/flask-appconfig | 5264719ac9229339070b219a4358a3203ffd05b0 | [
"MIT"
] | 3 | 2016-01-25T00:09:55.000Z | 2017-09-25T11:36:19.000Z | flask_appconfig/middleware.py | edpaget/flask-appconfig | 5264719ac9229339070b219a4358a3203ffd05b0 | [
"MIT"
] | 14 | 2015-07-22T12:58:06.000Z | 2021-03-24T02:06:30.000Z | # from: http://flask.pocoo.org/snippets/35/
# written by Peter Hansen
class ReverseProxied(object):
'''Wrap the application in this middleware and configure the
front-end server to add these headers, to let you quietly bind
this to a URL other than / and to an HTTP scheme that is
different than what i... | 32.880952 | 68 | 0.649529 |
c2152eadda17f748511fc58a506053d39c52bb3a | 2,629 | py | Python | graph_weather/models/losses.py | openclimatefix/graph_weather | e00b75418d62181d213fede2925bb100b4091f57 | [
"MIT"
] | 6 | 2022-02-25T09:27:57.000Z | 2022-03-28T22:26:56.000Z | graph_weather/models/losses.py | openclimatefix/graph_weather | e00b75418d62181d213fede2925bb100b4091f57 | [
"MIT"
] | 11 | 2022-02-25T08:24:17.000Z | 2022-03-30T18:31:16.000Z | graph_weather/models/losses.py | openclimatefix/graph_weather | e00b75418d62181d213fede2925bb100b4091f57 | [
"MIT"
] | null | null | null | """Weather loss functions"""
import numpy as np
import torch
class NormalizedMSELoss(torch.nn.Module):
"""Loss function described in the paper"""
def __init__(self, feature_variance: list, lat_lons: list, device="cpu"):
"""
Normalized MSE Loss as described in the paper
This re-scales... | 38.661765 | 99 | 0.647014 |
620a7f12f271284fe3163035280055d0457bb334 | 810 | py | Python | tests/programs/package_code/some_package/SomeModule.py | juanfra684/Nuitka | 0e276895fadabefb598232f2ccf8cc7736c9a85b | [
"Apache-2.0"
] | 1 | 2019-09-09T19:27:43.000Z | 2019-09-09T19:27:43.000Z | tests/programs/package_code/some_package/SomeModule.py | juanfra684/Nuitka | 0e276895fadabefb598232f2ccf8cc7736c9a85b | [
"Apache-2.0"
] | 1 | 2021-06-10T06:47:04.000Z | 2021-06-10T06:47:04.000Z | tests/programs/package_code/some_package/SomeModule.py | juanfra684/Nuitka | 0e276895fadabefb598232f2ccf8cc7736c9a85b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python tests originally created or extracted from other peoples work. The
# parts were too small to be protected.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the ... | 42.631579 | 79 | 0.720988 |
c9ac41d1a06c343198123cd5a3878b6c76b613dd | 8,798 | py | Python | util.py | thecolorblue/bnn | d84964194f081c3bc825e702975b614c8a03e385 | [
"MIT"
] | null | null | null | util.py | thecolorblue/bnn | d84964194f081c3bc825e702975b614c8a03e385 | [
"MIT"
] | null | null | null | util.py | thecolorblue/bnn | d84964194f081c3bc825e702975b614c8a03e385 | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw
from skimage import measure
import io
import numpy as np
import tensorflow as tf
import math
import sys
def hms(secs):
if secs < 0:
return "<0" # clumsy
secs = int(secs)
mins, secs = divmod(secs, 60)
hrs, mins = divmod(mins, 60)
if hrs > 0:
return "%d:%02d:%02d" % (h... | 34.912698 | 101 | 0.662082 |
92f20e328815011b9c6bf3e4c2dcff1a438aebd5 | 8,568 | py | Python | preprocess.py | BaoWentz/AdvancedEAST-PyTorch | a835c8cedce4ada1bc9580754245183d9f4aaa17 | [
"MIT"
] | 29 | 2020-08-18T09:13:41.000Z | 2022-03-16T11:17:14.000Z | preprocess.py | BaoWentz/AdvancedEAST-PyTorch | a835c8cedce4ada1bc9580754245183d9f4aaa17 | [
"MIT"
] | 2 | 2020-09-04T16:16:57.000Z | 2021-12-01T14:15:45.000Z | preprocess.py | BaoWentz/AdvancedEAST-PyTorch | a835c8cedce4ada1bc9580754245183d9f4aaa17 | [
"MIT"
] | 5 | 2020-09-04T16:12:09.000Z | 2021-09-10T08:21:44.000Z | import numpy as np
from PIL import Image, ImageDraw
import os
import random
from tqdm import tqdm
import cfg
from label import shrink
def batch_reorder_vertexes(xy_list_array):
reorder_xy_list_array = np.zeros_like(xy_list_array)
for xy_list, i in zip(xy_list_array, range(len(xy_list_array))):
reorde... | 46.819672 | 121 | 0.593954 |
d568258e2179b97fa8417d30a105b44cfbd43270 | 1,336 | py | Python | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/DescribeFlowProjectClusterSettingRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/DescribeFlowProjectClusterSettingRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/DescribeFlowProjectClusterSettingRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.111111 | 86 | 0.771707 |
827af2ac0936c0557ee4487b41ff2a3182ff33eb | 38,506 | py | Python | tests/sparse_ops_test.py | isabella232/jax | 8f5a78404bb4b2533d8d8fb412def5241d4644af | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/sparse_ops_test.py | isabella232/jax | 8f5a78404bb4b2533d8d8fb412def5241d4644af | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-06-16T12:14:42.000Z | 2021-06-16T12:14:42.000Z | tests/sparse_ops_test.py | isabella232/jax | 8f5a78404bb4b2533d8d8fb412def5241d4644af | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 45.408019 | 147 | 0.646912 |
d1b65a846432a09c1b4b33837e25b4f5073d9e7d | 30,378 | py | Python | Km_NodeGraphEN/Ui_Settings.py | hkaramian/Km-NodeGraph-Easy-Navigate | 4a80474fe4567fd1cc9fc950963010a4c8fccc33 | [
"Apache-2.0"
] | 6 | 2022-01-14T01:46:24.000Z | 2022-03-07T04:00:40.000Z | Km_NodeGraphEN/Ui_Settings.py | hkaramian/Km-NodeGraph-Easy-Navigate | 4a80474fe4567fd1cc9fc950963010a4c8fccc33 | [
"Apache-2.0"
] | 1 | 2021-11-07T03:28:13.000Z | 2021-12-01T12:13:22.000Z | Km_NodeGraphEN/Ui_Settings.py | hkaramian/Km-NodeGraph-Easy-Navigate | 4a80474fe4567fd1cc9fc950963010a4c8fccc33 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'panel_v02 - SettingspHFwyN.ui'
##
## Created by: Qt User Interface Compiler version 5.15.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!... | 41.613699 | 144 | 0.679274 |
84f2533642de1f6c0fe13cb5e68345145fadfae5 | 2,953 | py | Python | examples/src/dbnd_examples/tracking/data_health.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | examples/src/dbnd_examples/tracking/data_health.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | examples/src/dbnd_examples/tracking/data_health.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | import os
from random import randint, randrange, uniform
from time import sleep
import numpy as np
import pandas as pd
from dbnd import dataset_op_logger, dbnd_tracking, log_dataset_op, task
from dbnd._core.constants import DbndDatasetOperationType
"""
run with `python dbnd-core/examples/src/dbnd_examples/tracking... | 25.025424 | 88 | 0.596004 |
51417c453b039ea95b7b7a0ccfca262078c331bb | 874 | py | Python | pydfs_lineup_optimizer/settings.py | raymondhuynh1988/pydfs-lineup-optimizer | 9cc00ecd84fccc7c685daac16cc27dd10ee15f2f | [
"MIT"
] | 1 | 2020-08-07T22:18:27.000Z | 2020-08-07T22:18:27.000Z | pydfs_lineup_optimizer/settings.py | raymondhuynh1988/pydfs-lineup-optimizer | 9cc00ecd84fccc7c685daac16cc27dd10ee15f2f | [
"MIT"
] | null | null | null | pydfs_lineup_optimizer/settings.py | raymondhuynh1988/pydfs-lineup-optimizer | 9cc00ecd84fccc7c685daac16cc27dd10ee15f2f | [
"MIT"
] | null | null | null | from collections import namedtuple
from typing import Optional, Type, List, TYPE_CHECKING
from pydfs_lineup_optimizer.lineup_printer import LineupPrinter, BaseLineupPrinter
if TYPE_CHECKING: # pragma: no cover
from pydfs_lineup_optimizer.rules import OptimizerRule
LineupPosition = namedtuple('LineupPosition', ... | 32.37037 | 82 | 0.716247 |
ed2b7aaf02a25113b530c467a5fe9ce6b36a8599 | 3,620 | py | Python | Germain Python/EM.py | simonalford42/Better | f1e310849fcb65bac9cd4309baa1fdf55efd50d4 | [
"MIT"
] | null | null | null | Germain Python/EM.py | simonalford42/Better | f1e310849fcb65bac9cd4309baa1fdf55efd50d4 | [
"MIT"
] | null | null | null | Germain Python/EM.py | simonalford42/Better | f1e310849fcb65bac9cd4309baa1fdf55efd50d4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 30 09:17:52 2017
@author: alfordsimon
"""
import numpy as np
import pandas as pd
import time
class CMM():
def __init__(self, k, ds):
"""d is a list containing the number of categories for each feature"""
self.k = k
self... | 33.211009 | 110 | 0.539227 |
aedcb79dc95fb55236dabbf6cd6ef4ff405bc82c | 2,935 | py | Python | tests/test_parsers.py | sscotts2004/linuxacademy-dl-master | ffb0a331632f6cc1ecfa0d24b80d75b0be60a027 | [
"BSD-3-Clause"
] | 1 | 2020-11-20T14:02:28.000Z | 2020-11-20T14:02:28.000Z | tests/test_parsers.py | sscotts2004/linuxacademy-dl-master | ffb0a331632f6cc1ecfa0d24b80d75b0be60a027 | [
"BSD-3-Clause"
] | 2 | 2019-02-06T14:30:09.000Z | 2019-02-06T14:30:34.000Z | tests/test_parsers.py | sscotts2004/linuxacademy-dl-master | ffb0a331632f6cc1ecfa0d24b80d75b0be60a027 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
#
# This file is a part of 'linuxacademy-dl' project.
#
# Copyright (c) 2016-2017, Vassim Shahir
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of... | 37.628205 | 79 | 0.738671 |
54e41c2f53e03e1abc2f76f645d9108e807bd005 | 1,936 | py | Python | scripts/tools/check_if_limited_dependencies.py | npodewitz/airflow | 511ea702d5f732582d018dad79754b54d5e53f9d | [
"Apache-2.0"
] | 8,092 | 2016-04-27T20:32:29.000Z | 2019-01-05T07:39:33.000Z | scripts/tools/check_if_limited_dependencies.py | npodewitz/airflow | 511ea702d5f732582d018dad79754b54d5e53f9d | [
"Apache-2.0"
] | 2,961 | 2016-05-05T07:16:16.000Z | 2019-01-05T08:47:59.000Z | scripts/tools/check_if_limited_dependencies.py | npodewitz/airflow | 511ea702d5f732582d018dad79754b54d5e53f9d | [
"Apache-2.0"
] | 3,546 | 2016-05-04T20:33:16.000Z | 2019-01-05T05:14:26.000Z | #!/usr/bin/env python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | 36.528302 | 108 | 0.730888 |
ce3d07fd763087cefb356ca6b362ee8a868c5437 | 511 | py | Python | powernad/Object/Label/LabelRefObject.py | devkingsejong/python---PowerNad | c308bba4cb31126ccd318e4574071f4057f5d23f | [
"CNRI-Python"
] | 34 | 2017-03-16T14:32:49.000Z | 2022-03-18T09:23:05.000Z | powernad/Object/Label/LabelRefObject.py | devkingsejong/python---PowerNad | c308bba4cb31126ccd318e4574071f4057f5d23f | [
"CNRI-Python"
] | 16 | 2018-02-08T02:37:56.000Z | 2022-03-15T13:45:34.000Z | powernad/Object/Label/LabelRefObject.py | devkingsejong/python---PowerNad | c308bba4cb31126ccd318e4574071f4057f5d23f | [
"CNRI-Python"
] | 19 | 2017-03-28T21:48:18.000Z | 2021-11-30T05:13:43.000Z | import json
class LabelRefObject:
def __init__(self, json_def):
if type(json_def) is str:
json_def = json.loads(json_def)
s = json_def
self.nccLabelId = None if 'nccLabelId' not in s else s['nccLabelId']
self.customerId = None if 'customerId' not in s else s['customerId... | 39.307692 | 76 | 0.622309 |
3a136d5165fb6ab87b999241e69ddecda4367410 | 1,910 | py | Python | profiles_api/models.py | spranshu1/profiles-rest-api | dfd9e51699f51eb0ca6ee8d9b27a517380f9407c | [
"MIT"
] | null | null | null | profiles_api/models.py | spranshu1/profiles-rest-api | dfd9e51699f51eb0ca6ee8d9b27a517380f9407c | [
"MIT"
] | null | null | null | profiles_api/models.py | spranshu1/profiles-rest-api | dfd9e51699f51eb0ca6ee8d9b27a517380f9407c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
from django.conf import settings
class UserProfileManager(B... | 26.164384 | 55 | 0.753403 |
ef8589b821b4243b5a9407b07c40eb2ff0d580bc | 807 | py | Python | manage.py | BensonMax/FruitShop | c4ef2b830bc45dd009a17f82f63a33739dcfdd46 | [
"MIT"
] | null | null | null | manage.py | BensonMax/FruitShop | c4ef2b830bc45dd009a17f82f63a33739dcfdd46 | [
"MIT"
] | null | null | null | manage.py | BensonMax/FruitShop | c4ef2b830bc45dd009a17f82f63a33739dcfdd46 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "FruitShop.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that th... | 35.086957 | 77 | 0.643123 |
1011fce6c8519f34e8734be8bae7f4a927e5113b | 810 | py | Python | moviepy/video/fx/fadein.py | va6996/moviepy | 60b95c37816413da6bf304e85f8c0ba8e2d2c6e7 | [
"MIT"
] | null | null | null | moviepy/video/fx/fadein.py | va6996/moviepy | 60b95c37816413da6bf304e85f8c0ba8e2d2c6e7 | [
"MIT"
] | null | null | null | moviepy/video/fx/fadein.py | va6996/moviepy | 60b95c37816413da6bf304e85f8c0ba8e2d2c6e7 | [
"MIT"
] | null | null | null | import cupy as np
def fadein(clip, duration, initial_color=None):
"""Makes the clip progressively appear from some color (black by default),
over ``duration`` seconds at the beginning of the clip. Can be used for
masks too, where the initial color must be a number between 0 and 1.
For cross-fading (p... | 32.4 | 78 | 0.65679 |
1aad57f413ebdd8ba664ac7fd4871e4f2dbbde76 | 814 | py | Python | indoorair/instrument/serializers.py | chaoxunzhou/indoorair-webapp-b | 673287df650a8dce17171163a72d8061d917aaab | [
"BSD-3-Clause"
] | null | null | null | indoorair/instrument/serializers.py | chaoxunzhou/indoorair-webapp-b | 673287df650a8dce17171163a72d8061d917aaab | [
"BSD-3-Clause"
] | null | null | null | indoorair/instrument/serializers.py | chaoxunzhou/indoorair-webapp-b | 673287df650a8dce17171163a72d8061d917aaab | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from foundation.models import Instrument, Sensor, TimeSeriesDatum
class InstrumentSerializer(serializers.Serializer):
id = serializers.IntegerField(read_only=True)
location = serializers.CharField(validators=[
... | 31.307692 | 65 | 0.739558 |
726207110bc055af439944bba20aae072c176fa7 | 80,130 | py | Python | tests/keras/backend/backend_test.py | joelthchao/keras | 4bcb8c95d8bba3147dd86446cd91be77051cef96 | [
"MIT"
] | 3 | 2019-10-23T01:35:40.000Z | 2020-06-03T10:28:34.000Z | tests/keras/backend/backend_test.py | joelthchao/keras | 4bcb8c95d8bba3147dd86446cd91be77051cef96 | [
"MIT"
] | null | null | null | tests/keras/backend/backend_test.py | joelthchao/keras | 4bcb8c95d8bba3147dd86446cd91be77051cef96 | [
"MIT"
] | 2 | 2016-06-29T12:05:22.000Z | 2019-02-23T15:43:30.000Z | import pytest
from numpy.testing import assert_allclose
import numpy as np
import scipy.sparse as sparse
import warnings
from keras.utils.test_utils import keras_test
from keras import backend as K
from keras.backend import floatx, set_floatx, variable
from keras.utils.conv_utils import convert_kernel
import reference... | 43.5963 | 108 | 0.553139 |
8a70cf801b901bc46b92363a891b3645d3123c52 | 1,886 | py | Python | config.py | cw1997/Tieba-Birthday-Spider | 1ecd942a2a6dace7bef0b49058d1484eed4a0eb3 | [
"Apache-2.0"
] | 36 | 2017-06-13T08:38:09.000Z | 2022-03-17T03:24:17.000Z | config.py | cw1997/Tieba-Birthday-Spider | 1ecd942a2a6dace7bef0b49058d1484eed4a0eb3 | [
"Apache-2.0"
] | 2 | 2017-06-14T09:47:02.000Z | 2017-06-21T05:30:16.000Z | config.py | cw1997/Tieba-Birthday-Spider | 1ecd942a2a6dace7bef0b49058d1484eed4a0eb3 | [
"Apache-2.0"
] | 9 | 2017-06-13T11:06:30.000Z | 2020-07-29T20:54:39.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# config 配置文件
# version 0.1.0
# author:changwei [867597730@qq.com]
# website: https://github.com/cw1997
# data:2017-06-12 23:39:45
# runtime env:windows 7 64bit + python 2.7.10
config = {}
# ---------- MongoDB ---------- #
# 暂时只支持mongodb进行持久化存储,爬虫使用pymongo库进行操作。
# 安全提... | 26.942857 | 79 | 0.707317 |
e419ab2d6325f914d71d7670383bf09156dcda8f | 3,635 | py | Python | save_as_proxy.py | woutervddn/blender_addon_save_by_proxy | 620f826cf03a4fb2916f86ce28ca11338f5ed9f5 | [
"Apache-2.0"
] | 2 | 2019-11-29T14:04:38.000Z | 2021-09-29T15:56:01.000Z | save_as_proxy.py | woutervddn/blender_addon_save_by_proxy | 620f826cf03a4fb2916f86ce28ca11338f5ed9f5 | [
"Apache-2.0"
] | 1 | 2019-11-29T14:38:15.000Z | 2019-11-29T14:38:15.000Z | save_as_proxy.py | woutervddn/blender_addon_save_by_proxy | 620f826cf03a4fb2916f86ce28ca11338f5ed9f5 | [
"Apache-2.0"
] | 2 | 2020-02-08T04:57:06.000Z | 2021-04-22T10:30:44.000Z | bl_info = {
"name": "Save File by proxy",
"author": "Wouter Vandenneucker",
"version": (1,1),
"blender": (2, 80, 0),
"location": "ctrl+s / cmd+s",
"description": "Saves the blendfile to a temporary location before copying to final location. Works by bypassing the ctrl+s or cmd+s command.",
"... | 34.951923 | 147 | 0.637689 |
c891847cbeedcb1d1c6bd57baad6dc27231c3137 | 912 | py | Python | search_by_id.py | WideEyesTech/grinder_load_tests | 9c12fdfef63eab3d08a25a1239d465d95d0f44ff | [
"Apache-2.0"
] | null | null | null | search_by_id.py | WideEyesTech/grinder_load_tests | 9c12fdfef63eab3d08a25a1239d465d95d0f44ff | [
"Apache-2.0"
] | null | null | null | search_by_id.py | WideEyesTech/grinder_load_tests | 9c12fdfef63eab3d08a25a1239d465d95d0f44ff | [
"Apache-2.0"
] | null | null | null | # SearchById gringer test
from net.grinder.script.Grinder import grinder
from net.grinder.script import Test
from net.grinder.plugin.http import HTTPRequest
from HTTPClient import NVPair
searchByIdTest = Test(1, "Test SearchById")
json1 = '''{"uid":"123","country":"es"}'''
static String convertStreamToString(jav... | 33.777778 | 147 | 0.673246 |
a6894c804231009061b26e285387753721c89f02 | 3,243 | py | Python | rpython/tool/runsubprocess.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | rpython/tool/runsubprocess.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | rpython/tool/runsubprocess.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | """Run a subprocess. Wrapper around the 'subprocess' module
with a hack to prevent bogus out-of-memory conditions in os.fork()
if the current process already grew very large.
"""
import sys
import gc
import os
from subprocess import PIPE, Popen
def run_subprocess(executable, args, env=None, cwd=None):
if isinsta... | 33.78125 | 103 | 0.617021 |
b973e53b297c50cfcf0c683f44106b934b92914c | 1,125 | py | Python | examples/rpc_server_side.py | marconfus/slixmpp | bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa | [
"BSD-3-Clause"
] | null | null | null | examples/rpc_server_side.py | marconfus/slixmpp | bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa | [
"BSD-3-Clause"
] | 1 | 2021-02-24T07:58:40.000Z | 2021-02-24T07:58:40.000Z | examples/rpc_server_side.py | marconfus/slixmpp | bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Slixmpp: The Slick XMPP Library
Copyright (C) 2011 Dann Martens
This file is part of Slixmpp.
See the file LICENSE for copying permission.
"""
from slixmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \
ANY_ALL
import threading
clas... | 20.089286 | 71 | 0.657778 |
3b2e041212aa8b64feb81a3a081f936114cd7f8a | 139,631 | py | Python | scapy/scapy/contrib/openflow3.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | scapy/scapy/contrib/openflow3.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | scapy/scapy/contrib/openflow3.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | null | null | null | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
# Copyright (C) 2014 Maxence Tury <maxence.tury@ssi.gouv.fr>
# OpenFlow is an open standard used in SDN deployments.
# Based o... | 38.646831 | 291 | 0.517206 |
0373c81cd8ae22f79e4c32223db5f5dafe902166 | 3,478 | py | Python | boards/tests/test_view_new_topic.py | lucaswilliamgomes/Beginner-django | db688cc1e2902d7fc0365c8b6d2f9b86f93a3dac | [
"MIT"
] | null | null | null | boards/tests/test_view_new_topic.py | lucaswilliamgomes/Beginner-django | db688cc1e2902d7fc0365c8b6d2f9b86f93a3dac | [
"MIT"
] | null | null | null | boards/tests/test_view_new_topic.py | lucaswilliamgomes/Beginner-django | db688cc1e2902d7fc0365c8b6d2f9b86f93a3dac | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.urls import resolve, reverse
from django.contrib.auth.models import User
from ..forms import NewTopicForm
from ..models import Board, Topic, Post
from ..views import BoardListView, new_topic, TopicListView
class NewTopicTests(TestCase):
def setUp(self):
self.b... | 40.44186 | 111 | 0.665037 |
b4db036dd25c2c3a64b6b7189151e1cbfcee6858 | 3,254 | py | Python | app/core/tests/test_models.py | mydjangoprojects/recipe-app-api | 95f402e825b3bd22d1f2c63bf3de113e8c9044d7 | [
"MIT"
] | 1 | 2020-04-28T00:11:09.000Z | 2020-04-28T00:11:09.000Z | app/core/tests/test_models.py | mydjangoprojects/recipe-app-api | 95f402e825b3bd22d1f2c63bf3de113e8c9044d7 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | mydjangoprojects/recipe-app-api | 95f402e825b3bd22d1f2c63bf3de113e8c9044d7 | [
"MIT"
] | null | null | null | from unittest.mock import patch
from core import models
from django.contrib.auth import get_user_model
from django.test import TestCase
def sample_user(email='test@psykweb.com', password='testpass123'):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModuleTest... | 31.288462 | 79 | 0.641057 |
6abb56dabf9310dfdb61c730a7bda8977f67b422 | 1,054 | py | Python | pookkalam.py | nithinputhenveettil/pookkalam-in-code | 70961fdb4415b354ab3635701a3324f0610c2517 | [
"MIT"
] | null | null | null | pookkalam.py | nithinputhenveettil/pookkalam-in-code | 70961fdb4415b354ab3635701a3324f0610c2517 | [
"MIT"
] | null | null | null | pookkalam.py | nithinputhenveettil/pookkalam-in-code | 70961fdb4415b354ab3635701a3324f0610c2517 | [
"MIT"
] | null | null | null | from turtle import *
def drawFirstType(f, r):
home()
forward(f)
right(r)
forward(f)
drawFlower(30, 45, 'purple')
def drawSecondType(forward1, forward2, ang):
home()
right(ang)
forward(forward1)
drawFlower(15, 45, 'red')
home()
right(ang)
forward(forward2)
drawFlowe... | 16.46875 | 44 | 0.575901 |
084c46869a33c91f6a298bc3e9c3d839dddfb364 | 11,170 | py | Python | hw5_release/segmentation.py | MrMorning/solutionOfCS131 | 36dc9f197335d70601973b024e3ad5cb816bd26e | [
"MIT"
] | 1 | 2021-11-05T09:55:14.000Z | 2021-11-05T09:55:14.000Z | hw5_release/segmentation.py | MrMorning/solutionOfCS131 | 36dc9f197335d70601973b024e3ad5cb816bd26e | [
"MIT"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | hw5_release/segmentation.py | MrMorning/solutionOfCS131 | 36dc9f197335d70601973b024e3ad5cb816bd26e | [
"MIT"
] | null | null | null | """
CS131 - Computer Vision: Foundations and Applications
Assignment 5
Author: Donsuk Lee (donlee90@stanford.edu)
Date created: 09/2017
Last modified: 09/25/2018
Python Version: 3.5+
"""
import numpy as np
import scipy
import random
from scipy.spatial.distance import squareform, pdist
from skimage.util import img_as_f... | 33.443114 | 104 | 0.629812 |
3c8f20c4a8be8b8f07ea2b9018e3ad3113d878b9 | 96,483 | py | Python | src/python/pants/engine/target.py | asherf/pants | e010b93c4123b4446a631cac5db0b7ea15634686 | [
"Apache-2.0"
] | null | null | null | src/python/pants/engine/target.py | asherf/pants | e010b93c4123b4446a631cac5db0b7ea15634686 | [
"Apache-2.0"
] | 14 | 2021-05-03T13:54:41.000Z | 2022-03-30T10:20:58.000Z | src/python/pants/engine/target.py | asherf/pants | e010b93c4123b4446a631cac5db0b7ea15634686 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import collections.abc
import enum
import itertools
import logging
import os.path
from abc import ABC, ABCMeta, abstractmethod
from collections import d... | 40.017835 | 102 | 0.647865 |
d17a594cb5e22b71813967faf458a6528fcfe219 | 116,706 | py | Python | tensorflow/python/distribute/distribute_lib.py | RedaRafi/tensorflow | 4ecbd73dab2a8c60d666fb26c26b2b17e96f1b39 | [
"Apache-2.0"
] | 1 | 2021-02-17T17:50:39.000Z | 2021-02-17T17:50:39.000Z | tensorflow/python/distribute/distribute_lib.py | RedaRafi/tensorflow | 4ecbd73dab2a8c60d666fb26c26b2b17e96f1b39 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/distribute/distribute_lib.py | RedaRafi/tensorflow | 4ecbd73dab2a8c60d666fb26c26b2b17e96f1b39 | [
"Apache-2.0"
] | 1 | 2018-09-05T14:48:36.000Z | 2018-09-05T14:48:36.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.650964 | 125 | 0.717787 |
7cd489d87ac64d2b0162f78763eb34139514b13c | 2,758 | py | Python | tests/kafkatest/version.py | 2020SnakeVenom/kafka-0.10.2.0-src | 8a5e85beeff075b7257085d4a0181fc5b6a4f0db | [
"Apache-2.0"
] | 6 | 2021-01-29T01:13:26.000Z | 2022-02-17T06:03:03.000Z | tests/kafkatest/version.py | 2020SnakeVenom/kafka-0.10.2.0-src | 8a5e85beeff075b7257085d4a0181fc5b6a4f0db | [
"Apache-2.0"
] | 1 | 2015-04-26T15:39:57.000Z | 2015-04-26T18:00:47.000Z | tests/kafkatest/version.py | 2020SnakeVenom/kafka-0.10.2.0-src | 8a5e85beeff075b7257085d4a0181fc5b6a4f0db | [
"Apache-2.0"
] | 5 | 2017-06-06T06:07:25.000Z | 2021-06-20T00:58:26.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 32.069767 | 96 | 0.699057 |
a3387bfd4aeb2f811db24b32856410dc0349a5c3 | 634 | py | Python | tests/classes/test_master.py | viswanc/eka | edb0aa373f74ec297d0e35e9cd6d564264322698 | [
"MIT"
] | 1 | 2019-11-03T16:03:59.000Z | 2019-11-03T16:03:59.000Z | tests/classes/test_master.py | viswanc/eka | edb0aa373f74ec297d0e35e9cd6d564264322698 | [
"MIT"
] | null | null | null | tests/classes/test_master.py | viswanc/eka | edb0aa373f74ec297d0e35e9cd6d564264322698 | [
"MIT"
] | null | null | null | r"""
Tests the class, master.
"""
from tests.helpers import BaseTestCase
from tests.data import TestData
from eka.classes.ymlParser import ymlParser
from eka.classes.master import master
# State
Buffer = {}
masterFile = '%s/master.yml' % TestData['projectRoot']
class TestClassMaster(BaseTestCase):
@classmethod
d... | 22.642857 | 56 | 0.736593 |
9118b6f6a87c1690f9f31ba4dac60ca25e3bc536 | 253 | py | Python | bmiva/bmi_va/doctype/va_setup/va_setup.py | mubarizun/bmiva | be9297da4215767741f613ee931a496150103727 | [
"MIT"
] | null | null | null | bmiva/bmi_va/doctype/va_setup/va_setup.py | mubarizun/bmiva | be9297da4215767741f613ee931a496150103727 | [
"MIT"
] | null | null | null | bmiva/bmi_va/doctype/va_setup/va_setup.py | mubarizun/bmiva | be9297da4215767741f613ee931a496150103727 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Mubarizun and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class VASetup(Document):
pass
| 23 | 49 | 0.778656 |
58eec6ded69f1f589d181ec5bb846ec10a39c417 | 1,282 | py | Python | python_bits/cleanup.py | ChenfuShi/hic_master_pipeline | dac7742d4e0a45c784d17be3cbeab4564e9f26c5 | [
"BSD-3-Clause"
] | null | null | null | python_bits/cleanup.py | ChenfuShi/hic_master_pipeline | dac7742d4e0a45c784d17be3cbeab4564e9f26c5 | [
"BSD-3-Clause"
] | null | null | null | python_bits/cleanup.py | ChenfuShi/hic_master_pipeline | dac7742d4e0a45c784d17be3cbeab4564e9f26c5 | [
"BSD-3-Clause"
] | null | null | null | ########################################
# script for cleaning up at the end
########################################
import os
import logging
import subprocess
import string
import random
def cleanup(Configuration, obj = "normal"):
logging.info(f"compressing un-needed files")
if obj == "n... | 44.206897 | 140 | 0.614665 |
2fdb46abe4e96431d4efa7dead94376c3046197b | 19,150 | py | Python | lib/models/efficientnet_pytorch/modelmul3.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 5 | 2020-12-04T05:50:09.000Z | 2022-01-14T12:37:44.000Z | lib/models/efficientnet_pytorch/modelmul3.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 1 | 2021-01-28T03:20:00.000Z | 2021-01-28T03:20:00.000Z | lib/models/efficientnet_pytorch/modelmul3.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 3 | 2020-12-02T03:18:59.000Z | 2021-09-12T11:29:19.000Z | '''
深加浅,加x1,加xd3
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
from torch import nn
from torch.nn import functional as F
from .utils import (
relu_fn,
round_filters,
round_repeats,
drop_connect,
get_same_padding_conv2d,... | 41.721133 | 109 | 0.603551 |
d7eb8494078f48cc7ce7eee5800c959140eb513c | 161 | py | Python | 04Aula16-09/ex03.py | danicon/Curso-IPE | 3b9e2a9d187492d6561a512363bd06156286df6a | [
"MIT"
] | 2 | 2020-09-09T12:50:57.000Z | 2020-09-09T12:56:02.000Z | 04Aula16-09/ex03.py | danicon/Curso-IPE | 3b9e2a9d187492d6561a512363bd06156286df6a | [
"MIT"
] | null | null | null | 04Aula16-09/ex03.py | danicon/Curso-IPE | 3b9e2a9d187492d6561a512363bd06156286df6a | [
"MIT"
] | null | null | null | fibona = 89
anterior = 34
while fibona > 0:
print(fibona)
fibona -= anterior
anterior = fibona - anterior
if fibona == 0:
print(fibona) | 16.1 | 32 | 0.602484 |
a65de682e471c7bd5d8c838725f805187076f123 | 5,306 | py | Python | mod_kvm/controller.py | aadibajpai/ccextractor-web | 5a779ce8ff184ef45aff2f3c2458c10eda28d651 | [
"MIT"
] | null | null | null | mod_kvm/controller.py | aadibajpai/ccextractor-web | 5a779ce8ff184ef45aff2f3c2458c10eda28d651 | [
"MIT"
] | null | null | null | mod_kvm/controller.py | aadibajpai/ccextractor-web | 5a779ce8ff184ef45aff2f3c2458c10eda28d651 | [
"MIT"
] | null | null | null | """
ccextractor-web | controller.py
Author : Saurabh Shrivastava
Email : saurabh.shrivastava54+ccextractorweb[at]gmail.com
Link : https://github.com/saurabhshri
"""
import datetime
import json
from flask import Blueprint, render_template, request, flash, redirect, url_for
from database import db
from mod... | 38.449275 | 144 | 0.585752 |
a474381e9a0324564771031bf02393805e7cce40 | 931 | py | Python | profiles_api/permissions.py | anirudhs1998/profiles-rest-api | 7daa435661ca9f76af96101dfe0cc2338a4eff8a | [
"MIT"
] | null | null | null | profiles_api/permissions.py | anirudhs1998/profiles-rest-api | 7daa435661ca9f76af96101dfe0cc2338a4eff8a | [
"MIT"
] | null | null | null | profiles_api/permissions.py | anirudhs1998/profiles-rest-api | 7daa435661ca9f76af96101dfe0cc2338a4eff8a | [
"MIT"
] | null | null | null | from rest_framework import permissions
class UpdateOwnProfile(permissions.BasePermission):
"""Allow user to edit their own profile"""
def has_object_permission(self, request, view, obj):
"""Check user is trying to edit their own profile"""
if request.method in permissions.SAFE_METHODS: #GET i... | 35.807692 | 129 | 0.671321 |
140aecc712738e4f9f808677ba7429774b8e2244 | 208,051 | py | Python | Lib/test/test_ssl.py | vladhoi/cpython | a4833883c9b81b6b272cc7c5b67fa1658b65304c | [
"0BSD"
] | 2 | 2021-05-06T15:50:56.000Z | 2021-05-06T15:51:01.000Z | Lib/test/test_ssl.py | WickTech/cpython | 2ab9781cba167cc8ffb0a886598a7bbc41f10a4c | [
"0BSD"
] | 10 | 2021-04-16T15:09:29.000Z | 2022-03-01T17:01:52.000Z | Lib/test/test_ssl.py | WickTech/cpython | 2ab9781cba167cc8ffb0a886598a7bbc41f10a4c | [
"0BSD"
] | null | null | null | # Test the support for SSL and sockets
import sys
import unittest
import unittest.mock
from test import support
from test.support import import_helper
from test.support import os_helper
from test.support import socket_helper
from test.support import threading_helper
from test.support import warnings_helper
import sock... | 42.897113 | 113 | 0.591615 |
de652d1f966f55d5efcad76c14c1ffb4d05cccd5 | 1,190 | py | Python | Tests/test_fvizeus_PyDEM.py | lomonosouv/rpsi | 64a9ce022d5309fac18fb3ff5ba31c9a3c6889a3 | [
"MIT"
] | 2 | 2022-03-22T10:59:41.000Z | 2022-03-27T17:36:36.000Z | Tests/test_fvizeus_PyDEM.py | lomonosouv/rpsi | 64a9ce022d5309fac18fb3ff5ba31c9a3c6889a3 | [
"MIT"
] | null | null | null | Tests/test_fvizeus_PyDEM.py | lomonosouv/rpsi | 64a9ce022d5309fac18fb3ff5ba31c9a3c6889a3 | [
"MIT"
] | 1 | 2021-08-05T12:32:29.000Z | 2021-08-05T12:32:29.000Z | import numpy as np
import matplotlib.pyplot as plt
# Cython implementation
# from cDEM import DEM
# Python implementation
from fmodeling.rock_physics.Mediums.DEM import DEM
from fmodeling.rock_physics.Mediums import Gassmann
# Matrix properties
Km = 77.0 # GPa
Gm = 32.0 # GPa
rhom = 2.71 # g/cm3
# Fluid properties
K... | 24.285714 | 97 | 0.691597 |
711f4e5297243957e07ff508f4eb723194503445 | 15,735 | py | Python | tg_bot/modules/bans.py | zinminlat/rose-upload-2 | b3784e9d3d1d61f40dd680f9910c58311280d38e | [
"Unlicense"
] | 1 | 2020-06-24T16:46:46.000Z | 2020-06-24T16:46:46.000Z | tg_bot/modules/bans.py | zinminlat/rose-upload-2 | b3784e9d3d1d61f40dd680f9910c58311280d38e | [
"Unlicense"
] | null | null | null | tg_bot/modules/bans.py | zinminlat/rose-upload-2 | b3784e9d3d1d61f40dd680f9910c58311280d38e | [
"Unlicense"
] | 1 | 2020-07-14T11:05:21.000Z | 2020-07-14T11:05:21.000Z | import html
from typing import Optional, List
from telegram import Message, Chat, Update, Bot, User
from telegram.error import BadRequest
from telegram.ext import run_async, CommandHandler, Filters
from telegram.utils.helpers import mention_html
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ParseMod... | 33.550107 | 114 | 0.630632 |
3d76f072ce8efbc9bd8c30900b76776c4c5fc61a | 35,994 | py | Python | thetis/forcing.py | pbrubeck/thetis | de86754bd9c1beb6cc452b81a1c0174491043989 | [
"MIT"
] | null | null | null | thetis/forcing.py | pbrubeck/thetis | de86754bd9c1beb6cc452b81a1c0174491043989 | [
"MIT"
] | null | null | null | thetis/forcing.py | pbrubeck/thetis | de86754bd9c1beb6cc452b81a1c0174491043989 | [
"MIT"
] | null | null | null | """
Routines for interpolating forcing fields for the 3D solver.
"""
from firedrake import *
import scipy.spatial.qhull as qhull
import thetis.timezone as timezone
import thetis.interpolation as interpolation
import thetis.coordsys as coordsys
from .log import *
import netCDF4
import thetis.physical_constants as physic... | 43.948718 | 167 | 0.636273 |
9043c211a9ada0bcfafc48b553ee8b529633134e | 4,013 | py | Python | laygo/generators/splash/BagModules/adc_sar_templates_fdsoi/salatch_pmos_bak170315.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | 26 | 2017-07-07T08:06:31.000Z | 2021-11-25T06:41:24.000Z | laygo/generators/splash/BagModules/adc_sar_templates_fdsoi/salatch_pmos_bak170315.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | 9 | 2016-12-28T03:08:29.000Z | 2019-01-30T16:00:28.000Z | laygo/generators/splash/BagModules/adc_sar_templates_fdsoi/salatch_pmos_bak170315.py | tinapiao/Software-IC-Automation | 74b23cd94aa6e4658b110e93b5deb635e014f3a6 | [
"BSD-3-Clause"
] | 10 | 2018-07-14T01:31:28.000Z | 2021-08-21T10:18:30.000Z | # -*- coding: utf-8 -*-
########################################################################################################################
#
# Copyright (c) 2014, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are... | 40.13 | 120 | 0.665587 |
36346f3ef5bf0c9b68d30f793a7c6164a7546ce1 | 327 | py | Python | core/migrations/0053_remove_user_department.py | CrownKira/digitalace-backend | 9489b3dc4b856688360b60a7dca040c945faab74 | [
"MIT"
] | 1 | 2021-05-28T05:22:54.000Z | 2021-05-28T05:22:54.000Z | core/migrations/0053_remove_user_department.py | CrownKira/digitalace-backend | 9489b3dc4b856688360b60a7dca040c945faab74 | [
"MIT"
] | 3 | 2021-05-31T15:44:14.000Z | 2021-06-29T07:48:13.000Z | core/migrations/0053_remove_user_department.py | CrownKira/digitalace-backend | 9489b3dc4b856688360b60a7dca040c945faab74 | [
"MIT"
] | 1 | 2021-05-30T07:42:54.000Z | 2021-05-30T07:42:54.000Z | # Generated by Django 3.2.3 on 2021-06-18 07:44
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0052_auto_20210618_0718'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='department',
),... | 18.166667 | 47 | 0.590214 |
1d5e7e50962f1daffcd06aa6c5aecf2e546e2048 | 415 | py | Python | algorithm_and_data_structure/week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.py | ftrihardjo/algorithm-projects | e540ca35f8f01a03e42ab75e9d04c258cb58bdfb | [
"MIT"
] | null | null | null | algorithm_and_data_structure/week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.py | ftrihardjo/algorithm-projects | e540ca35f8f01a03e42ab75e9d04c258cb58bdfb | [
"MIT"
] | null | null | null | algorithm_and_data_structure/week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.py | ftrihardjo/algorithm-projects | e540ca35f8f01a03e42ab75e9d04c258cb58bdfb | [
"MIT"
] | null | null | null | # Uses python3
def fibonacci_sum_naive(n):
if n <= 1:
return n
previous = 0
current = 1
F = 1
if n%60 == 0:
return 0
if n%60 == 1:
return 1
for _ in range(n%60-1):
previous, current = current%10, (previous + current)%10
F += current%10
re... | 17.291667 | 63 | 0.522892 |
bfc7a35c128bb3fcf14695e5bc7a8651e183409b | 1,454 | py | Python | Deployment/ConsumerServices/RecaptchaService.py | sterben25/Savior | 4ed14734158e3083386dc897405c2fc92838fb69 | [
"BSD-2-Clause"
] | 108 | 2021-03-19T03:45:48.000Z | 2022-03-29T12:19:38.000Z | Deployment/ConsumerServices/RecaptchaService.py | sterben25/Savior | 4ed14734158e3083386dc897405c2fc92838fb69 | [
"BSD-2-Clause"
] | 2 | 2021-05-12T07:26:21.000Z | 2021-07-16T12:53:52.000Z | Deployment/ConsumerServices/RecaptchaService.py | sterben25/Savior | 4ed14734158e3083386dc897405c2fc92838fb69 | [
"BSD-2-Clause"
] | 27 | 2021-03-19T05:50:26.000Z | 2021-12-28T07:13:09.000Z | from Deployment.ConsumerWorker import celery_worker_app
from Operators.ExampleImageStringParseOperator import ImageParseFromBase64
from Operators.ExampleTextRecognizeOperator import Captcha1RecognizeWithMaster
from Deployment.server_config import RECAPTCHA_TRITON_URL, RECAPTCHA_TRITON_PORT, IS_TEST
from Utils.ServiceUt... | 30.291667 | 89 | 0.755846 |
6ce35d36c62617bdb96e668e31aa9ca6fc648ea8 | 384 | py | Python | dash/migrations/0009_alter_person_birthday.py | marcocapozzoli/customers-register | d1dfaa1701ecee5567845638a6af1e5d0c4aa5f4 | [
"MIT"
] | null | null | null | dash/migrations/0009_alter_person_birthday.py | marcocapozzoli/customers-register | d1dfaa1701ecee5567845638a6af1e5d0c4aa5f4 | [
"MIT"
] | null | null | null | dash/migrations/0009_alter_person_birthday.py | marcocapozzoli/customers-register | d1dfaa1701ecee5567845638a6af1e5d0c4aa5f4 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-16 03:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dash', '0008_alter_person_birthday'),
]
operations = [
migrations.AlterField(
model_name='person',
name='birthday',
... | 20.210526 | 47 | 0.596354 |
8b16367ebb664d2a229b54c758a36e9539e9eb00 | 1,947 | py | Python | examples/mnist_cnn_fgsm.py | dohmatob/adversarial-robustness-toolbox | 7d3ba7d2d6690be69c08754fbc632947c2d10a97 | [
"MIT"
] | 2 | 2019-10-26T08:35:37.000Z | 2020-09-02T18:38:00.000Z | examples/mnist_cnn_fgsm.py | dohmatob/adversarial-robustness-toolbox | 7d3ba7d2d6690be69c08754fbc632947c2d10a97 | [
"MIT"
] | 1 | 2020-03-09T07:04:39.000Z | 2020-03-09T07:04:39.000Z | examples/mnist_cnn_fgsm.py | dohmatob/adversarial-robustness-toolbox | 7d3ba7d2d6690be69c08754fbc632947c2d10a97 | [
"MIT"
] | 1 | 2019-12-22T22:18:15.000Z | 2019-12-22T22:18:15.000Z | # -*- coding: utf-8 -*-
"""Trains a convolutional neural network on the MNIST dataset, then attacks it with the FGSM attack."""
from __future__ import absolute_import, division, print_function, unicode_literals
from keras.models import Sequential
from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout
i... | 41.425532 | 103 | 0.758603 |
4a54706e743e798f2b0932000431c25988416219 | 1,363 | py | Python | 02_Intermediate Python/2-dictionaries-and-pandas/13_loc-and-iloc[1].py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | 5 | 2021-02-03T14:36:58.000Z | 2022-01-01T10:29:26.000Z | 02_Intermediate Python/2-dictionaries-and-pandas/13_loc-and-iloc[1].py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | null | null | null | 02_Intermediate Python/2-dictionaries-and-pandas/13_loc-and-iloc[1].py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | 3 | 2021-02-08T00:31:16.000Z | 2022-03-17T13:52:32.000Z | '''
13-loc and iloc [1]
With loc and iloc you can do practically any data selection operation on DataFrames
you can think of. loc is label-based, which means that you have to specify rows and
columns based on their row and column labels. iloc is integer index based, so you have to specify rows and columns by their int... | 33.243902 | 176 | 0.749083 |
ac01ab1e3ca5e60e04a7541de2089d3bbfd12b25 | 7,284 | py | Python | oteltrace/utils/hook.py | ocelotl/opentelemetry-auto-instr-python-1 | f5c47bd1ee492ffde298794f283031c22891f60b | [
"BSD-3-Clause"
] | 2 | 2020-03-04T17:33:22.000Z | 2021-01-20T14:20:10.000Z | oteltrace/utils/hook.py | ocelotl/opentelemetry-auto-instr-python-1 | f5c47bd1ee492ffde298794f283031c22891f60b | [
"BSD-3-Clause"
] | 4 | 2019-11-25T00:11:16.000Z | 2021-05-13T20:43:50.000Z | oteltrace/utils/hook.py | ocelotl/opentelemetry-auto-instr-python-1 | f5c47bd1ee492ffde298794f283031c22891f60b | [
"BSD-3-Clause"
] | 3 | 2020-02-05T14:54:25.000Z | 2020-03-23T02:51:27.000Z | # Copyright 2019, OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 34.685714 | 118 | 0.674629 |
d128a0f410b53be8eac12ad07c58ba4e5abab2f4 | 10,452 | py | Python | test/unit/test_iterutils.py | Acidburn0zzz/bfg9000 | 5f9ed9940b87f23abe55cde745c46e7e2bc6eaee | [
"BSD-3-Clause"
] | 1 | 2020-05-15T07:24:43.000Z | 2020-05-15T07:24:43.000Z | test/unit/test_iterutils.py | Acidburn0zzz/bfg9000 | 5f9ed9940b87f23abe55cde745c46e7e2bc6eaee | [
"BSD-3-Clause"
] | null | null | null | test/unit/test_iterutils.py | Acidburn0zzz/bfg9000 | 5f9ed9940b87f23abe55cde745c46e7e2bc6eaee | [
"BSD-3-Clause"
] | null | null | null | from collections import namedtuple
from . import *
from bfg9000 import iterutils
from bfg9000.shell.list import shell_list
class TestIsIterable(TestCase):
def test_list(self):
self.assertTrue(iterutils.isiterable([]))
def test_dict(self):
self.assertTrue(iterutils.isiterable([]))
def t... | 33.716129 | 79 | 0.540184 |
a7942068b2ba6a837d9f72ced38606b32d2af732 | 1,197 | py | Python | pages/migrations/0012_auto_20171217_0245.py | paleocore/paleocore110 | 754f3248ab22a2996b43bd224bd4ba15462edf7d | [
"MIT"
] | null | null | null | pages/migrations/0012_auto_20171217_0245.py | paleocore/paleocore110 | 754f3248ab22a2996b43bd224bd4ba15462edf7d | [
"MIT"
] | 7 | 2020-02-05T20:54:24.000Z | 2021-12-13T20:13:20.000Z | pages/migrations/0012_auto_20171217_0245.py | paleocore/paleocore110 | 754f3248ab22a2996b43bd224bd4ba15462edf7d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-12-17 02:45
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pages', '0011_auto_20170105_1742'),
]
operations = [
migrations.AlterField(... | 57 | 783 | 0.719298 |
bffca728f1ef3f0bd0cd38d5f6ec74d56a47fb3f | 8,268 | py | Python | server/apps/streamfilter/api_views.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/streamfilter/api_views.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | server/apps/streamfilter/api_views.py | iotile/iotile_cloud | 9dc65ac86d3a730bba42108ed7d9bbb963d22ba6 | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404
import django_filters
from rest_framework import status, viewsets
from rest_framework.decorators import action
from rest_framework.exceptions import PermissionDenied
from rest_framework.response import Response
from apps.org.permissions import IsMemberOnly
from .cache_u... | 48.069767 | 137 | 0.650822 |
0bb5add854ff5ec173c30b76599d1f1fe816a751 | 9,283 | py | Python | tests/test_morse.py | sarahbeverton/morse_code | 150a0ec4291f6358a113bc44d59be7eddaaf450a | [
"MIT"
] | null | null | null | tests/test_morse.py | sarahbeverton/morse_code | 150a0ec4291f6358a113bc44d59be7eddaaf450a | [
"MIT"
] | null | null | null | tests/test_morse.py | sarahbeverton/morse_code | 150a0ec4291f6358a113bc44d59be7eddaaf450a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# flake8: noqa
"""
Unit tests for Morse Code Decoder.
Students should not modify this file.
"""
__author__ = 'madarp'
import sys
import unittest
import importlib
import subprocess
# Kenzie devs: change this to 'soln.morse' to test solution
PKG_NAME = 'morse'
# some ha... | 52.744318 | 654 | 0.695788 |
75fef179306c3d12a6309ac6ef74a69a9ab3fe9d | 16,858 | py | Python | Foot_Switch/foot_switch.py | pranjalchanda08/Blackstar_FootSwitch | 0ffab7236ed3d6f9a110d4a25c7731c2af40a595 | [
"MIT"
] | 1 | 2021-11-18T19:59:45.000Z | 2021-11-18T19:59:45.000Z | Foot_Switch/foot_switch.py | pranjalchanda08/Blackstar_FootSwitch | 0ffab7236ed3d6f9a110d4a25c7731c2af40a595 | [
"MIT"
] | 1 | 2021-11-20T16:41:24.000Z | 2021-11-20T16:41:24.000Z | Foot_Switch/foot_switch.py | pranjalchanda08/Blackstar_FootSwitch | 0ffab7236ed3d6f9a110d4a25c7731c2af40a595 | [
"MIT"
] | null | null | null | from blackstarid import BlackstarIDAmp, NoDataAvailable, NotConnectedError
import RPi.GPIO as GPIO
import logging
import threading, queue
import json
import signal
import os
import time
from numpy import interp
import paho.mqtt.client as mqtt
THREAD_EXIT = False
logging.basicConfig(level=logging.NOTSET)
logger = logg... | 40.524038 | 130 | 0.564539 |
c1031dc037a510bbc859c1afda3b847b02bfea4e | 18,747 | py | Python | src/model/efficient_el.py | dekelcohen/efficient-autoregressive-EL | 3ad361845995d2527b14e863c478ef152b21f4e5 | [
"MIT"
] | 35 | 2021-09-09T13:25:09.000Z | 2022-03-28T01:04:40.000Z | src/model/efficient_el.py | dekelcohen/efficient-autoregressive-EL | 3ad361845995d2527b14e863c478ef152b21f4e5 | [
"MIT"
] | 6 | 2021-09-13T12:38:27.000Z | 2022-03-22T07:14:22.000Z | src/model/efficient_el.py | dekelcohen/efficient-autoregressive-EL | 3ad361845995d2527b14e863c478ef152b21f4e5 | [
"MIT"
] | 8 | 2021-09-12T05:07:20.000Z | 2022-03-15T10:47:58.000Z | import csv
import json
from argparse import ArgumentParser
from collections import defaultdict
import pytorch_lightning as pl
import torch
from pytorch_lightning import LightningModule
from torch.utils.data import DataLoader
from tqdm.auto import tqdm
from transformers import (
AutoTokenizer,
LongformerForMask... | 34.147541 | 88 | 0.533685 |
a530339cbb2827879fb5a3a9e54a8d25113f51dd | 248 | py | Python | numpy-smallpt/core/rng.py | matt77hias/numpy-smallpt | d4670f8396b5a9c2b5fd6fb39e7148127978d969 | [
"MIT"
] | 9 | 2018-08-17T02:04:46.000Z | 2021-06-09T13:24:48.000Z | numpy-smallpt/core/rng.py | matt77hias/numpy-smallpt | d4670f8396b5a9c2b5fd6fb39e7148127978d969 | [
"MIT"
] | null | null | null | numpy-smallpt/core/rng.py | matt77hias/numpy-smallpt | d4670f8396b5a9c2b5fd6fb39e7148127978d969 | [
"MIT"
] | 2 | 2017-12-31T03:08:39.000Z | 2019-03-20T17:12:31.000Z | import numpy as np
class RNG(object):
def __init__(self, s = 606418532):
self.rnd = np.random
self.seed(s)
def seed(self, s):
self.rnd.seed(s)
def uniform_float(self):
return self.rnd.random() | 19.076923 | 38 | 0.568548 |
b968c823a38436ca1999362e86b8927350776cc6 | 11,458 | py | Python | hddcoin/wallet/wallet_puzzle_store.py | u4ma-hdd/hddcoin-blockchain | 4199d1f1d87e129ae9c08bf50dd48ec3b2c08727 | [
"Apache-2.0"
] | 37 | 2021-07-08T23:42:01.000Z | 2022-03-26T21:30:10.000Z | hddcoin/wallet/wallet_puzzle_store.py | u4ma-hdd/hddcoin-blockchain | 4199d1f1d87e129ae9c08bf50dd48ec3b2c08727 | [
"Apache-2.0"
] | 13 | 2021-07-11T15:12:01.000Z | 2022-03-15T08:36:18.000Z | hddcoin/wallet/wallet_puzzle_store.py | u4ma-hdd/hddcoin-blockchain | 4199d1f1d87e129ae9c08bf50dd48ec3b2c08727 | [
"Apache-2.0"
] | 19 | 2021-07-10T14:09:07.000Z | 2022-03-14T11:17:05.000Z | import asyncio
import logging
from typing import List, Optional, Set, Tuple
import aiosqlite
from blspy import G1Element
from hddcoin.types.blockchain_format.sized_bytes import bytes32
from hddcoin.util.db_wrapper import DBWrapper
from hddcoin.util.ints import uint32
from hddcoin.wallet.derivation_record import Deriv... | 32.925287 | 117 | 0.599494 |
fc9d0b45a399c31f474e88531e1ba093362822dd | 252 | py | Python | conf/__init__.py | galicea-em/api | 08f971b8da7c6ac7c564f837f7dfcf32dc227867 | [
"MIT"
] | null | null | null | conf/__init__.py | galicea-em/api | 08f971b8da7c6ac7c564f837f7dfcf32dc227867 | [
"MIT"
] | null | null | null | conf/__init__.py | galicea-em/api | 08f971b8da7c6ac7c564f837f7dfcf32dc227867 | [
"MIT"
] | null | null | null | __version__ = "0.0.1"
from flask import Flask
app=Flask(__name__,
static_folder='../static',
template_folder='../templates')
from .config import config
from .config import init
init(False)
from .endpoints import define
define()
| 16.8 | 41 | 0.694444 |
75543fe4c67582bde207dd38b4a963273b61f158 | 1,089 | py | Python | tests/mocklogin_duo.py | cloudposse/duo_unix | 55af7a94408c4da2b48dde365c7a6e8d412caa0d | [
"Apache-2.0"
] | 1 | 2019-06-06T01:03:27.000Z | 2019-06-06T01:03:27.000Z | tests/mocklogin_duo.py | cloudposse/duo_unix | 55af7a94408c4da2b48dde365c7a6e8d412caa0d | [
"Apache-2.0"
] | null | null | null | tests/mocklogin_duo.py | cloudposse/duo_unix | 55af7a94408c4da2b48dde365c7a6e8d412caa0d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import pexpect
import paths
PROMPT = '.* or option \(1-4\): $'
def _login_duo():
p = pexpect.spawn(paths.login_duo + ' -d -c confs/mockduo.conf ' + \
'-f foobar echo SUCCESS')
p.expect(PROMPT, timeout=2)
print '===> %r' % p.match.group(0)
return ... | 19.105263 | 72 | 0.532599 |
0610b1545d4b9f8aff1fac673919b3cc5cfb9c9f | 730 | py | Python | com/pac/cryptofx/timer/TimerManager.py | rcastellow/cryptoFX | 882fb54154847be45b8c621d24c2774b31be2aaa | [
"MIT"
] | null | null | null | com/pac/cryptofx/timer/TimerManager.py | rcastellow/cryptoFX | 882fb54154847be45b8c621d24c2774b31be2aaa | [
"MIT"
] | null | null | null | com/pac/cryptofx/timer/TimerManager.py | rcastellow/cryptoFX | 882fb54154847be45b8c621d24c2774b31be2aaa | [
"MIT"
] | null | null | null | from apscheduler.scheduler import Scheduler
'''
Created on Jan 26, 2014
@author: RobCastellow
'''
class TimerManager:
'''
classdocs
'''
def __init__(self,currentPlatform):
'''
Constructor
'''
self.currentPlatform = currentPlatform
def scheduledJ... | 21.470588 | 68 | 0.59589 |
1d77d90b9562744b0e75f82a8e38938dda48ae64 | 47,007 | py | Python | snakemake/jobs.py | mbhall88/snakemake | 30cec5a1504e0e6213f9d29e537d86e98539ea0c | [
"MIT"
] | null | null | null | snakemake/jobs.py | mbhall88/snakemake | 30cec5a1504e0e6213f9d29e537d86e98539ea0c | [
"MIT"
] | null | null | null | snakemake/jobs.py | mbhall88/snakemake | 30cec5a1504e0e6213f9d29e537d86e98539ea0c | [
"MIT"
] | null | null | null | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2021, Johannes Köster"
__email__ = "johannes.koester@uni-due.de"
__license__ = "MIT"
import os
import sys
import base64
import tempfile
import json
from collections import defaultdict
from itertools import chain, filterfalse
from operator import attrgetter
fro... | 31.027723 | 127 | 0.556598 |
46c49c748144590c55fedbd2d8921e351e65f6c9 | 1,000 | py | Python | advent_of_code/2018/12_plants/aoc_2018_12.py | thanosa/coding-challenges | a10b0de51da076a4bcc798b4a3d5a08e29c5af01 | [
"MIT"
] | null | null | null | advent_of_code/2018/12_plants/aoc_2018_12.py | thanosa/coding-challenges | a10b0de51da076a4bcc798b4a3d5a08e29c5af01 | [
"MIT"
] | null | null | null | advent_of_code/2018/12_plants/aoc_2018_12.py | thanosa/coding-challenges | a10b0de51da076a4bcc798b4a3d5a08e29c5af01 | [
"MIT"
] | null | null | null | import time
import fileinput
from collections import defaultdict
INPUT_FILE = "aoc_2018_12.dat"
start = time.time()
lines = list(fileinput.input(INPUT_FILE))
init_state = set(i for i, x in enumerate(lines[0].split()[-1]) if x == "#")
rules = dict(line.split()[::2] for line in lines[2:])
def step(s... | 21.276596 | 76 | 0.577 |
8ff44c3d4eae2bbed034a4a22243df0e3a2ac48f | 4,798 | py | Python | pyjsg/parser_impl/generate_python.py | hsolbrig/pyjsg | 5ef46d9af6a94a0cd0e91ebf8b22f61c17e78429 | [
"CC0-1.0"
] | 3 | 2017-07-23T11:11:23.000Z | 2020-11-30T15:36:51.000Z | pyjsg/parser_impl/generate_python.py | hsolbrig/pyjsg | 5ef46d9af6a94a0cd0e91ebf8b22f61c17e78429 | [
"CC0-1.0"
] | 15 | 2018-01-05T17:18:34.000Z | 2021-12-13T17:40:25.000Z | try2/lib/python3.9/site-packages/pyjsg/parser_impl/generate_python.py | diatomsRcool/eco-kg | 4251f42ca2ab353838a39b640cb97593db76d4f4 | [
"BSD-3-Clause"
] | 1 | 2021-01-18T10:32:56.000Z | 2021-01-18T10:32:56.000Z | import importlib.abc
import importlib.util
import os
from argparse import ArgumentParser
from typing import Optional, Union, List
import sys
from antlr4 import CommonTokenStream
from antlr4 import FileStream, InputStream
from antlr4.error.ErrorListener import ErrorListener
from pyjsg.parser.jsgParser import jsgParser
... | 35.279412 | 120 | 0.692789 |
090278488cbea0fc603337bb41c7187b236c8acb | 1,153 | py | Python | setup.py | vathes/canonical-full-ephys-pipeline | 1012bffca397a30041c638902548b30bc5b196c3 | [
"MIT"
] | null | null | null | setup.py | vathes/canonical-full-ephys-pipeline | 1012bffca397a30041c638902548b30bc5b196c3 | [
"MIT"
] | null | null | null | setup.py | vathes/canonical-full-ephys-pipeline | 1012bffca397a30041c638902548b30bc5b196c3 | [
"MIT"
] | 2 | 2020-05-28T15:51:04.000Z | 2020-11-21T23:18:01.000Z | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import sys
here = path.abspath(path.dirname(__file__))
long_description = """"
# Pipeline for extracellular electrophysiology using Neuropixels probe and kilosort clustering method
Build a full ephys pipeline using the canonical pi... | 34.939394 | 106 | 0.753686 |
0a888c442b4cded7929515330250fb1111197e21 | 3,980 | py | Python | riko/modules/urlparse.py | sottom/riko | 7898b850b45451420feab33380d252be18e77714 | [
"MIT"
] | null | null | null | riko/modules/urlparse.py | sottom/riko | 7898b850b45451420feab33380d252be18e77714 | [
"MIT"
] | null | null | null | riko/modules/urlparse.py | sottom/riko | 7898b850b45451420feab33380d252be18e77714 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
riko.modules.urlparse
~~~~~~~~~~~~~~~~~~~~~
Provides functions for parsing a URL into its six components.
Examples:
basic usage::
>>> from riko.modules.urlparse import pipe
>>>
>>> item = {'content': 'http://yahoo.com'}
>>> sch... | 29.481481 | 80 | 0.581407 |
35437d051d906a499c82a9b5735ddc004c70115f | 615 | py | Python | jeanne.py | ZaneRE544/NeroBot | 3635a53021b71afff76cad1b262e0b3088ab434a | [
"MIT"
] | 1 | 2021-08-31T09:12:48.000Z | 2021-08-31T09:12:48.000Z | jeanne.py | ZaneRE544/NeroBot | 3635a53021b71afff76cad1b262e0b3088ab434a | [
"MIT"
] | 6 | 2021-09-02T07:22:42.000Z | 2021-09-27T12:13:52.000Z | jeanne.py | ZaneRE544/NeroBot | c99f923c68d235f897e2f1d174c25f3e7f0557c5 | [
"MIT"
] | null | null | null | from os import listdir
from nextcord import Intents
from nextcord.ext.commands import Bot as Jeanne
from config import TOKEN
intents = Intents().all()
bot = Jeanne(command_prefix="/", intents=intents)
bot.remove_command('help')
#slash cog commands
for filename in listdir('./slashcog'):
if filename.endswith('.py'):... | 23.653846 | 55 | 0.700813 |
8882e2070910b8a6174960b7acc45686050b8191 | 568 | py | Python | app/models/activity.py | arxcdr/silverback | 212139cbc1a648d1f877d60f2d7c4d750eefc3da | [
"BSD-3-Clause"
] | null | null | null | app/models/activity.py | arxcdr/silverback | 212139cbc1a648d1f877d60f2d7c4d750eefc3da | [
"BSD-3-Clause"
] | null | null | null | app/models/activity.py | arxcdr/silverback | 212139cbc1a648d1f877d60f2d7c4d750eefc3da | [
"BSD-3-Clause"
] | null | null | null | """
Activity Model
"""
# Third Party Library
from django.db import models
from django.contrib.auth.models import User
class Activity(models.Model):
user = models.ForeignKey(
User,
on_delete=models.CASCADE,
db_index=True,
verbose_name="Related User"
)
activity = models.Te... | 22.72 | 83 | 0.697183 |
d112a4c5cdb26b853b26b0bfa81e2244d55a480a | 1,923 | py | Python | Typical DP Contest/TDPCr.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | Typical DP Contest/TDPCr.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | Typical DP Contest/TDPCr.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | # 最小費用流(minimum cost flow) O(F|V||E|)
class MinCostFlow:
def __init__(self, n):
self.n = n
self.G = [[] for i in range(n)]
def addEdge(self, f, t, cap, cost):
# [to, cap, cost, rev]
self.G[f].append([t, cap, cost, len(self.G[t])])
self.G[t].append([f, 0, -cost, len(self.... | 27.869565 | 65 | 0.367135 |
7f7733d309f4727a2470af67a2c7378d3498ae08 | 2,031 | py | Python | deep_learning/pytorch_dataset_dataloader.py | imohitmayank/python-snippets | 21027265a375316ffe7fa0d86be06739ab5c52c7 | [
"MIT"
] | null | null | null | deep_learning/pytorch_dataset_dataloader.py | imohitmayank/python-snippets | 21027265a375316ffe7fa0d86be06739ab5c52c7 | [
"MIT"
] | null | null | null | deep_learning/pytorch_dataset_dataloader.py | imohitmayank/python-snippets | 21027265a375316ffe7fa0d86be06739ab5c52c7 | [
"MIT"
] | null | null | null | """How to define handle datasets in Pytorch
Author: Mohit Mayank
Dataset: https://www.kaggle.com/lakshmi25npathi/imdb-dataset-of-50k-movie-reviews
"""
# Import
# -----------
import pandas as pd
from torch.utils.data import Dataset, DataLoader
from sklearn.model_selection import train_test_split
# Load and prepare IMD... | 35.017241 | 114 | 0.660266 |
ec1ab0f435a1141fe8a10ba268d05d1b5e2ee30c | 7,842 | py | Python | lale/lib/aif360/disparate_impact_remover.py | mfeffer/lale | 57b58843c7c14dc2e5658244280f2c1918bf030b | [
"Apache-2.0"
] | null | null | null | lale/lib/aif360/disparate_impact_remover.py | mfeffer/lale | 57b58843c7c14dc2e5658244280f2c1918bf030b | [
"Apache-2.0"
] | null | null | null | lale/lib/aif360/disparate_impact_remover.py | mfeffer/lale | 57b58843c7c14dc2e5658244280f2c1918bf030b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 41.057592 | 341 | 0.647411 |
31cb50458635b25e38d4b25bc49b61bb407c5d83 | 4,902 | py | Python | app/views/news.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 11 | 2015-04-23T21:57:56.000Z | 2019-04-28T12:48:58.000Z | app/views/news.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 1 | 2016-10-05T14:10:58.000Z | 2016-10-05T14:12:23.000Z | app/views/news.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 3 | 2016-10-05T14:00:42.000Z | 2019-01-16T14:33:43.000Z | from datetime import date, datetime
from flask import Blueprint, abort, render_template, request, flash, \
redirect, url_for
from flask_babel import _ # gettext
from flask_login import current_user
from sqlalchemy import desc
from werkzeug.contrib.atom import AtomFeed
from app import db
from app.decorators impor... | 34.765957 | 76 | 0.625051 |
fef78ccde3b81f5cbe5acd5176494fe0f46ed127 | 69 | py | Python | chinafund/cli/__init__.py | floatinghotpot/chinafund | 11bb446890c230d5b0c00199cd465ba0a8c1d267 | [
"MIT"
] | 1 | 2021-09-10T02:31:22.000Z | 2021-09-10T02:31:22.000Z | chinafund/cli/__init__.py | floatinghotpot/chinafund | 11bb446890c230d5b0c00199cd465ba0a8c1d267 | [
"MIT"
] | null | null | null | chinafund/cli/__init__.py | floatinghotpot/chinafund | 11bb446890c230d5b0c00199cd465ba0a8c1d267 | [
"MIT"
] | null | null | null | # -*- coding: utf-8; py-indent-offset:4 -*-
from .cli_main import *
| 17.25 | 43 | 0.623188 |
350452a95d6d72def9653a549b5034acb4b56b01 | 634 | py | Python | mmdet/utils/__init__.py | PhilippMarquardt/mmdetection | 5979e13f7faea90f4b80079320b93585300c6a4f | [
"Apache-2.0"
] | 1 | 2019-08-18T18:04:21.000Z | 2019-08-18T18:04:21.000Z | mmdet/utils/__init__.py | PhilippMarquardt/mmdetection | 5979e13f7faea90f4b80079320b93585300c6a4f | [
"Apache-2.0"
] | 1 | 2022-01-06T14:58:44.000Z | 2022-01-06T14:58:44.000Z | mmdet/utils/__init__.py | PhilippMarquardt/mmdetection | 5979e13f7faea90f4b80079320b93585300c6a4f | [
"Apache-2.0"
] | 1 | 2021-12-13T02:37:50.000Z | 2021-12-13T02:37:50.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from .collect_env import collect_env
from .compat_config import compat_cfg
from .logger import get_caller_name, get_root_logger, log_img_scale
from .misc import find_latest_checkpoint, update_data_root
from .setup_env import setup_multi_processes
from .split_batch import ... | 39.625 | 74 | 0.798107 |
e25a458a8d03f3df6c929dcbe97bb8bd9538157f | 1,283 | py | Python | teaser/logic/simulation/modelicainfo.py | Ja98/TEASER | 1bb782a01ce1b38c4abecb9c6ecc4d59f1ba21a3 | [
"MIT"
] | 1 | 2018-10-22T07:21:15.000Z | 2018-10-22T07:21:15.000Z | teaser/logic/simulation/modelicainfo.py | Ja98/TEASER | 1bb782a01ce1b38c4abecb9c6ecc4d59f1ba21a3 | [
"MIT"
] | null | null | null | teaser/logic/simulation/modelicainfo.py | Ja98/TEASER | 1bb782a01ce1b38c4abecb9c6ecc4d59f1ba21a3 | [
"MIT"
] | null | null | null | # created November 2015
# by TEASER4 Development Team
class ModelicaInfo():
"""ModelicaInfo Class
This class holds information specific for Modelica Simulation. Some of
these solver or flags might only be applicable to Dymola.
Attributes
----------
runtime_simulation : str [s]
Tota... | 29.837209 | 74 | 0.656274 |
38dd5ba9be70fb7efb891348a42e6f15547abeac | 12,295 | py | Python | pyvib/filter.py | andrek10/bearing-vibration-diagnostics-toolbox | 7af38e26b1c4fc340edf4f9a26519693816223cb | [
"MIT"
] | 23 | 2019-08-24T08:53:14.000Z | 2021-12-14T17:00:34.000Z | pyvib/filter.py | andrek10/bearing-vibration-diagnostics-toolbox | 7af38e26b1c4fc340edf4f9a26519693816223cb | [
"MIT"
] | null | null | null | pyvib/filter.py | andrek10/bearing-vibration-diagnostics-toolbox | 7af38e26b1c4fc340edf4f9a26519693816223cb | [
"MIT"
] | 6 | 2020-03-27T08:55:51.000Z | 2021-12-25T14:37:18.000Z | '''Filer design
'''
import numpy as np
from scipy.linalg import solve_toeplitz
from scipy.signal import decimate as scipydecimate
from scipy.signal import firwin
from .fft import rawfft, rawifft
from .misc import primefactors
from .plt import figure
from .signal import fftwconvolve
def get_filterbankfilters(N, fc=0.... | 26.104034 | 99 | 0.556649 |
e3f1df5380ddf7cb4664e2f9835d23d19331d585 | 141 | py | Python | excript/lista1/q7.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | excript/lista1/q7.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | excript/lista1/q7.py | victorers1/anotacoes_curso_python | c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e | [
"MIT"
] | null | null | null | num1 = int(input("Primeiro valor: "))
num2 = int(input("Segundo valor: "))
print("A soma entre %i e %i é igual à %i" %(num1,num2,num1+num2)) | 35.25 | 65 | 0.64539 |
f187bf4c85647928fc5f1ac7849d87c282faeda9 | 759 | py | Python | functions/calcVirtualElevation.py | TomBolton/aeroCode | 7e26ffb295cb76367a57993420fb93f976df9199 | [
"MIT"
] | 1 | 2016-12-18T18:36:47.000Z | 2016-12-18T18:36:47.000Z | functions/calcVirtualElevation.py | TomBolton/aeroCode | 7e26ffb295cb76367a57993420fb93f976df9199 | [
"MIT"
] | null | null | null | functions/calcVirtualElevation.py | TomBolton/aeroCode | 7e26ffb295cb76367a57993420fb93f976df9199 | [
"MIT"
] | null | null | null | # This script takes the speed and power data, and calculates the
# virtual elevation usings the input parameters.
from calcSlope import calcSlope
def calcVirtualElevation( CdA, m, g, Crr, rho, speed, power ) :
s = [0] * (len(power) - 2) # Pre-allocate for the slope and virtual elevation..
virtElev = [0] * ... | 39.947368 | 117 | 0.628458 |
145a4ff626e4bc172561887a1f66807abf33fbe1 | 523 | py | Python | setup.py | ranked-vote/ranked-vote-tools | f125dd7385c8d5689274cbbc0c56ea3b3f5a6f3e | [
"MIT"
] | 2 | 2018-12-30T16:03:58.000Z | 2019-11-15T17:59:54.000Z | setup.py | ranked-vote/ranked-vote-tools | f125dd7385c8d5689274cbbc0c56ea3b3f5a6f3e | [
"MIT"
] | null | null | null | setup.py | ranked-vote/ranked-vote-tools | f125dd7385c8d5689274cbbc0c56ea3b3f5a6f3e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
setup(name='ranked-vote',
version='0.0.1',
description='Tools for working with ranked-vote data',
author='Paul Butler',
author_email='rcv@paulbutler.org',
url='https://github.com/ranked-vote/ranked-vote-tools',
packages=['ranked_vo... | 27.526316 | 64 | 0.611855 |
2256e61054947f4ebd3e96ca807adbc704937227 | 5,480 | py | Python | elevenclock/lang/lang_nb.py | hlgsdx/ElevenClock | 76c77debd54384d16e773045a7d005419b562c30 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_nb.py | hlgsdx/ElevenClock | 76c77debd54384d16e773045a7d005419b562c30 | [
"Apache-2.0"
] | null | null | null | elevenclock/lang/lang_nb.py | hlgsdx/ElevenClock | 76c77debd54384d16e773045a7d005419b562c30 | [
"Apache-2.0"
] | null | null | null | # INSTRUCTIONS
# Translate the text and write it between the "
# EXAMPLE: original -> "This text is in english: value {0}"
# translation -> "Aquest text està en anglès: valor {0}"
# If you see sth like {0}, {1}, maintain it on the translated sentence
# Meke special attention to elements like "... | 64.470588 | 186 | 0.536131 |
af90671fcf092246c0fe9f5b0b672bac90ad4079 | 16,255 | py | Python | test/gmca_test.py | swagnercarena/HGMCA | d8643cfc0b6c3dadd815342731f589b5b9fa50e7 | [
"MIT"
] | 4 | 2020-10-16T17:47:19.000Z | 2022-02-21T22:01:02.000Z | test/gmca_test.py | swagnercarena/HGMCA | d8643cfc0b6c3dadd815342731f589b5b9fa50e7 | [
"MIT"
] | null | null | null | test/gmca_test.py | swagnercarena/HGMCA | d8643cfc0b6c3dadd815342731f589b5b9fa50e7 | [
"MIT"
] | null | null | null | from hgmca import gmca_core, helpers, wavelets_mgmca, wavelets_base
import numpy as np
import unittest
import warnings
import os
class GMCATests(unittest.TestCase):
# A set of tests to verify that the basic functionality of gmca is working
# as expected.
def setUp(self, *args, **kwargs):
self.root_path = os.pat... | 31.68616 | 77 | 0.70366 |
d581a9868c61f718bffed46723414d21e2d08473 | 334 | py | Python | light_off.py | tmopencell/diyincubator | f992209d757ea67f5faae9d76fb5a2a88794d1b0 | [
"MIT"
] | null | null | null | light_off.py | tmopencell/diyincubator | f992209d757ea67f5faae9d76fb5a2a88794d1b0 | [
"MIT"
] | null | null | null | light_off.py | tmopencell/diyincubator | f992209d757ea67f5faae9d76fb5a2a88794d1b0 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
GPIO.setwarnings(False)
# Set pin numbering can use BOARD or BCM
GPIO.setmode(GPIO.BCM)
# Pick your pins
GPIO.setup(16, GPIO.OUT, initial=GPIO.LOW)
# Turn the pin on by setting it HIGH:
#GPIO.output(17,GPIO.HIGH)
# Or if you want to turn it off set it LOW:
GPIO.output(16,GPIO.LOW)
#GPIO.output... | 23.857143 | 43 | 0.739521 |
d2eb4723c55f4aa7d0a866fa110e01d62f2da003 | 26,679 | py | Python | libcloud/test/loadbalancer/test_dimensiondata_v2_4.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,435 | 2015-01-07T05:32:51.000Z | 2022-03-25T19:39:34.000Z | libcloud/test/loadbalancer/test_dimensiondata_v2_4.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,158 | 2015-01-04T18:08:42.000Z | 2022-03-24T14:34:57.000Z | libcloud/test/loadbalancer/test_dimensiondata_v2_4.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 832 | 2015-01-05T09:20:21.000Z | 2022-03-24T19:22:19.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 42.961353 | 159 | 0.658458 |
1ae4a9f47a6ad296a49e65bcf6a22cbef2068be0 | 81,207 | py | Python | cctbx/geometry_restraints/manager.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | null | null | null | cctbx/geometry_restraints/manager.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-05-26T17:46:17.000Z | 2020-05-26T17:55:19.000Z | cctbx/geometry_restraints/manager.py | TiankunZhou/cctbx_project | 373f302f00c12d7239f8e37e3165e62bc1d852cc | [
"BSD-3-Clause-LBNL"
] | 1 | 2022-02-08T10:11:07.000Z | 2022-02-08T10:11:07.000Z | from __future__ import absolute_import, division, print_function
from cctbx import geometry_restraints
import cctbx.geometry_restraints.flags
import cctbx.geometry_restraints.energies
from cctbx import crystal
from cctbx.array_family import flex
from scitbx.python_utils.misc import store
from libtbx import introspectio... | 41.453292 | 130 | 0.694423 |
9329d1548830e427229001171897230699035d71 | 3,134 | py | Python | pyxlsb2/worksheet.py | davidtr1037/pyxlsb2 | 0dbf92d359dcd00eda504be251b52a74af9cbc26 | [
"Apache-2.0",
"MIT"
] | null | null | null | pyxlsb2/worksheet.py | davidtr1037/pyxlsb2 | 0dbf92d359dcd00eda504be251b52a74af9cbc26 | [
"Apache-2.0",
"MIT"
] | null | null | null | pyxlsb2/worksheet.py | davidtr1037/pyxlsb2 | 0dbf92d359dcd00eda504be251b52a74af9cbc26 | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import sys
import xml.etree.ElementTree as ElementTree
from . import recordtypes as rt
from .row import Row
from .recordreader import RecordReader
if sys.version_info > (3,):
xrange = range
class Worksheet(object):
"""A worksheet.
Attributes:
workbook (Workbook): The containing workboo... | 31.656566 | 94 | 0.54499 |
b410362334cf83f51a3576c2d184f114183694a5 | 5,769 | py | Python | oscar/lib/python2.7/site-packages/pygments/styles/paraiso_light.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pygments/styles/paraiso_light.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pygments/styles/paraiso_light.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.styles.paraiso_light
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paraíso (Light) by Jan T. Sott
Pygments template by Jan T. Sott (https://github.com/idleberg)
Created with Base16 Builder by Chris Kempson
(https://github.com/chriskempson/base16-builder).
:... | 45.785714 | 79 | 0.408736 |
a35e6f1e096e30604b3207e605e6c561df30a9fb | 9,749 | py | Python | warpseq/model/clip.py | simian-terminal/warpseq | f61e68d1e6a9ad15a5e0c899237be784bcff7093 | [
"Apache-2.0"
] | 3 | 2021-01-22T01:20:20.000Z | 2022-03-10T20:58:42.000Z | warpseq/model/clip.py | simianterminal/warpseq | f61e68d1e6a9ad15a5e0c899237be784bcff7093 | [
"Apache-2.0"
] | 1 | 2020-08-13T00:28:28.000Z | 2020-08-13T00:28:28.000Z | warpseq/model/clip.py | simianterminal/warpseq | f61e68d1e6a9ad15a5e0c899237be784bcff7093 | [
"Apache-2.0"
] | null | null | null | # ------------------------------------------------------------------
# Warp Sequencer
# (C) 2020 Michael DeHaan <michael@michaeldehaan.net> & contributors
# Apache2 Licensed
# ------------------------------------------------------------------
# a clip is a set of patterns and other details at the intersection
# of a s... | 33.850694 | 217 | 0.590522 |
42e91388042d7edc30983adf68fa1b6ebec0b1f7 | 201 | py | Python | 81-search-in-rotated-sorted-array-ii/81-search-in-rotated-sorted-array-ii.py | Atri10/Leet-code---Atri_Patel | 49fc59b9147a44ab04a66128fbb2ef259b5f7b7c | [
"MIT"
] | 1 | 2021-10-10T20:21:18.000Z | 2021-10-10T20:21:18.000Z | 81-search-in-rotated-sorted-array-ii/81-search-in-rotated-sorted-array-ii.py | Atri10/Leet-code---Atri_Patel | 49fc59b9147a44ab04a66128fbb2ef259b5f7b7c | [
"MIT"
] | null | null | null | 81-search-in-rotated-sorted-array-ii/81-search-in-rotated-sorted-array-ii.py | Atri10/Leet-code---Atri_Patel | 49fc59b9147a44ab04a66128fbb2ef259b5f7b7c | [
"MIT"
] | null | null | null | class Solution:
def search(self, nums: List[int], target: int) -> bool:
ans = False
for i in nums:
if i == target:ans = True
return ans | 25.125 | 59 | 0.462687 |
d2b2e3b6db86c86f3690f9c2618f2e218c948e16 | 3,393 | py | Python | checkin/migrations/0001_initial.py | mahoyen/web | 1d190a86e3277315804bfcc0b8f9abd4f9c1d780 | [
"MIT"
] | 10 | 2017-11-25T01:47:20.000Z | 2020-03-24T18:28:24.000Z | checkin/migrations/0001_initial.py | mahoyen/web | 1d190a86e3277315804bfcc0b8f9abd4f9c1d780 | [
"MIT"
] | 319 | 2017-11-16T09:56:03.000Z | 2022-03-28T00:24:37.000Z | checkin/migrations/0001_initial.py | mahoyen/web | 1d190a86e3277315804bfcc0b8f9abd4f9c1d780 | [
"MIT"
] | 6 | 2017-11-12T14:04:08.000Z | 2021-03-10T09:41:18.000Z | # Generated by Django 2.0.2 on 2018-05-02 14:37
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 47.788732 | 154 | 0.595049 |
80356c04d4bb5c78d852c2200f21d022f14312e0 | 423 | py | Python | Proyecto4patas1/wsgi.py | davidcardd1/proyecto-perros | cca0ba3f09584584907057b859569e5b930ff34f | [
"MIT"
] | null | null | null | Proyecto4patas1/wsgi.py | davidcardd1/proyecto-perros | cca0ba3f09584584907057b859569e5b930ff34f | [
"MIT"
] | 20 | 2020-02-12T02:51:53.000Z | 2022-03-12T00:06:21.000Z | Proyecto4patas1/wsgi.py | davidcardd1/proyecto-perros | cca0ba3f09584584907057b859569e5b930ff34f | [
"MIT"
] | null | null | null | """
WSGI config for Proyecto4patas1 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.set... | 24.882353 | 79 | 0.763593 |
7c8f2cfe8ed01f96265158326f8e49f1b24c1b7b | 8,461 | py | Python | docs/conf.py | opengeospatial/teamengine-monitor | 91e90443ffac0866fbb6a7786e1ad78dd215be79 | [
"MIT"
] | null | null | null | docs/conf.py | opengeospatial/teamengine-monitor | 91e90443ffac0866fbb6a7786e1ad78dd215be79 | [
"MIT"
] | null | null | null | docs/conf.py | opengeospatial/teamengine-monitor | 91e90443ffac0866fbb6a7786e1ad78dd215be79 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# GeoHealthCheck documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 26 23:43:53 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | 32.171103 | 80 | 0.719773 |
3cf8d2a15b62bbc847440cbf6c9c22e5e67e6d82 | 12,376 | py | Python | grr/client/grr_response_client/client_actions/searching.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | null | null | null | grr/client/grr_response_client/client_actions/searching.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | null | null | null | grr/client/grr_response_client/client_actions/searching.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | 2 | 2020-08-24T00:22:03.000Z | 2020-11-14T08:34:43.000Z | #!/usr/bin/env python
"""Client actions related to searching files and directories."""
from __future__ import absolute_import
from __future__ import unicode_literals
import functools
import logging
import stat
from grr_response_client import actions
from grr_response_client import vfs
from grr_response_core.lib impor... | 33.630435 | 79 | 0.653523 |
6c3ac2fbaac66c59ac6468540d1101d45f7a4f3e | 1,117 | py | Python | toolchains/install_bootstrap/vanilla/setup.py | karkhaz/tuscan | 52c78d0462a97b3ef9fde8e6856fed9925e13e70 | [
"Apache-2.0"
] | 16 | 2016-10-24T21:32:56.000Z | 2021-06-16T04:24:31.000Z | toolchains/install_bootstrap/vanilla/setup.py | karkhaz/tuscan | 52c78d0462a97b3ef9fde8e6856fed9925e13e70 | [
"Apache-2.0"
] | 50 | 2015-10-15T03:20:58.000Z | 2016-07-13T23:56:41.000Z | toolchains/install_bootstrap/vanilla/setup.py | karkhaz/tuscan | 52c78d0462a97b3ef9fde8e6856fed9925e13e70 | [
"Apache-2.0"
] | 1 | 2021-06-16T04:24:41.000Z | 2021-06-16T04:24:41.000Z | #!/usr/bin/python3
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 31.027778 | 70 | 0.710833 |
f9a08a7ad541ab0af740006793bbf83c40fd286d | 2,065 | py | Python | pydantic/__init__.py | sasano8/pydantic | be6e34dcd2069c649ad408a8cb2c1b073ccf804d | [
"MIT"
] | null | null | null | pydantic/__init__.py | sasano8/pydantic | be6e34dcd2069c649ad408a8cb2c1b073ccf804d | [
"MIT"
] | null | null | null | pydantic/__init__.py | sasano8/pydantic | be6e34dcd2069c649ad408a8cb2c1b073ccf804d | [
"MIT"
] | null | null | null | # flake8: noqa
from . import dataclasses
from .class_validators import root_validator, validator
from .decorator import validate_arguments
from .env_settings import BaseSettings
from .error_wrappers import ValidationError
from .errors import *
from .fields import Field, Required, Schema
from .main import *
from .networ... | 20.048544 | 95 | 0.623245 |
d2a21dd74ef562dab2c20880f47c0b2b1ce3667e | 1,668 | py | Python | Chapter38.ManagedAttributes/3-desc-computed.py | mindnhand/Learning-Python-5th | 3dc1b28d6e048d512bf851de6c7f6445edfe7b84 | [
"MIT"
] | null | null | null | Chapter38.ManagedAttributes/3-desc-computed.py | mindnhand/Learning-Python-5th | 3dc1b28d6e048d512bf851de6c7f6445edfe7b84 | [
"MIT"
] | null | null | null | Chapter38.ManagedAttributes/3-desc-computed.py | mindnhand/Learning-Python-5th | 3dc1b28d6e048d512bf851de6c7f6445edfe7b84 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#encoding=utf-8
#-----------------------------------------------
# Usage: python3 3-desc-computed.py
# Description: computed attribute with attribute descriptor
#-----------------------------------------------
# Implementation 1
class DescSquare:
def __init__(self, start):
self.va... | 23.166667 | 60 | 0.592326 |
1e5c1b07b820465a67572f933dd77acba2998947 | 3,235 | py | Python | profiles_project/settings.py | Angelin20/profiles-rest-api | eb01146190ab525a86193753679b180c1a5a5e6b | [
"MIT"
] | null | null | null | profiles_project/settings.py | Angelin20/profiles-rest-api | eb01146190ab525a86193753679b180c1a5a5e6b | [
"MIT"
] | 6 | 2020-02-12T03:16:56.000Z | 2021-06-10T19:36:00.000Z | profiles_project/settings.py | Angelin20/profiles-rest-api | eb01146190ab525a86193753679b180c1a5a5e6b | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... | 25.88 | 91 | 0.700464 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.