hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 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 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
987f2a18af77876b45016b94da9344933923b583 | 4,834 | py | Python | fsod.py | JeyesHan/DeFRCN_Custom | 6a536408a61bb10a5ef84ce6683b6278e6e01f43 | [
"MIT"
] | null | null | null | fsod.py | JeyesHan/DeFRCN_Custom | 6a536408a61bb10a5ef84ce6683b6278e6e01f43 | [
"MIT"
] | null | null | null | fsod.py | JeyesHan/DeFRCN_Custom | 6a536408a61bb10a5ef84ce6683b6278e6e01f43 | [
"MIT"
] | null | null | null | import torch, torchvision
# Some basic setup:
# Setup detectron2 logger
import detectron2
from detectron2.utils.logger import setup_logger
setup_logger()
# import some common libraries
import sys
import shutil
import numpy
import numpy as np
import os, json, cv2, random
from sklearn.metrics.pairwise import cosine_sim... | 38.672 | 147 | 0.661771 |
fe433ddf75766217881499a905738cbc9fef522a | 4,089 | py | Python | ecco_v4_py/resample_to_latlon.py | jetesdal/ECCOv4-py | 266b0fb6642a6686905e70ec0c80c7b670e07734 | [
"MIT"
] | null | null | null | ecco_v4_py/resample_to_latlon.py | jetesdal/ECCOv4-py | 266b0fb6642a6686905e70ec0c80c7b670e07734 | [
"MIT"
] | null | null | null | ecco_v4_py/resample_to_latlon.py | jetesdal/ECCOv4-py | 266b0fb6642a6686905e70ec0c80c7b670e07734 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import division,print_function
import numpy as np
import matplotlib.pylab as plt
import xarray as xr
# The Proj class can convert from geographic (longitude,latitude) to native
# map projection (x,y) coordinates and vice versa, or from one map projection
... | 44.934066 | 98 | 0.578626 |
aeaadfcde8948c0b99aed34ff034995a34b448d7 | 470 | py | Python | captain_hook/services/docker/events/push.py | brantje/captain_hook | dde076a96afffa2235b7d8d01d47c4e61099c6b6 | [
"Apache-2.0"
] | 2 | 2017-11-11T22:25:42.000Z | 2017-12-11T20:56:10.000Z | captain_hook/services/docker/events/push.py | brantje/captain_hook | dde076a96afffa2235b7d8d01d47c4e61099c6b6 | [
"Apache-2.0"
] | 3 | 2017-02-27T00:34:19.000Z | 2017-02-27T14:25:44.000Z | captain_hook/services/docker/events/push.py | brantje/telegram-github-bot | dde076a96afffa2235b7d8d01d47c4e61099c6b6 | [
"Apache-2.0"
] | 1 | 2018-01-04T16:18:02.000Z | 2018-01-04T16:18:02.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from ...base.events import BaseEvent
class PushEvent(BaseEvent):
def process(self, request, body):
repo = body.get('repository', {}).get('repo_name', '')
tag = body.get('push_data', {}).get('tag', '')
if tag:
tag = ... | 29.375 | 65 | 0.565957 |
9f12b2f2d3fe37451abf71c129c55e45e9c085ec | 12,161 | py | Python | lexicon/providers/rackspace.py | quinncomendant/lexicon | 5cc7e261a661cb18d079c92c1eafd8c6eeda228f | [
"MIT"
] | null | null | null | lexicon/providers/rackspace.py | quinncomendant/lexicon | 5cc7e261a661cb18d079c92c1eafd8c6eeda228f | [
"MIT"
] | 142 | 2021-11-01T13:26:51.000Z | 2022-03-30T13:26:58.000Z | lexicon/providers/rackspace.py | quinncomendant/lexicon | 5cc7e261a661cb18d079c92c1eafd8c6eeda228f | [
"MIT"
] | null | null | null | """Rackspace provider implementation"""
import json
import logging
import time
import requests
from lexicon.exceptions import AuthenticationError
from lexicon.providers.base import Provider as BaseProvider
LOGGER = logging.getLogger(__name__)
NAMESERVER_DOMAINS = ["rackspacecloud.com"]
def _async_request_complete... | 35.767647 | 120 | 0.592632 |
3af8cf2e8eff72c4ba7bc813bbde469124289c30 | 185 | py | Python | ditto/writers/ephasor/__init__.py | daniel-thom/ditto | 9ba2d4cfa5e96eeda811f419c18c70b8a548747e | [
"BSD-3-Clause"
] | 44 | 2018-04-02T16:48:53.000Z | 2022-02-24T03:49:06.000Z | ditto/writers/ephasor/__init__.py | dpinney/ditto | 41dbba80e4990ed9949370fff809e4a68382e213 | [
"BSD-3-Clause"
] | 267 | 2018-04-17T22:40:14.000Z | 2022-02-04T15:59:32.000Z | ditto/writers/ephasor/__init__.py | dpinney/ditto | 41dbba80e4990ed9949370fff809e4a68382e213 | [
"BSD-3-Clause"
] | 29 | 2018-05-11T22:55:09.000Z | 2022-02-10T17:35:27.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from builtins import super, range, zip, round, map
from .write import Writer as EphasorWriter
| 26.428571 | 64 | 0.767568 |
9ebb9320546933c8a6175bd5a8f5fac07e047e48 | 1,858 | py | Python | USocket.py | shiye1999/CS305A_RDT | a3c2240c4c37a849e16f53babe07cf6f6d047dd8 | [
"MIT"
] | null | null | null | USocket.py | shiye1999/CS305A_RDT | a3c2240c4c37a849e16f53babe07cf6f6d047dd8 | [
"MIT"
] | null | null | null | USocket.py | shiye1999/CS305A_RDT | a3c2240c4c37a849e16f53babe07cf6f6d047dd8 | [
"MIT"
] | null | null | null | from socket import socket, AF_INET, SOCK_DGRAM, inet_aton, inet_ntoa
import time
sockets = {}
network = ('127.0.0.1', 12345)
def bytes_to_addr(bytes):
return inet_ntoa(bytes[:4]), int.from_bytes(bytes[4:8], 'big')
def addr_to_bytes(addr):
return inet_aton(addr[0]) + addr[1].to_bytes(4, 'big')
... | 27.731343 | 76 | 0.584499 |
c981bfbb7b250ecbceed58f1f98570a1dadcbf32 | 1,254 | py | Python | Probability-of-Loan-Defaulters/code.py | Namrata-NM/ga-learner-dst-repo | e3f86900ceaf6b3bcc824be831373691491d3405 | [
"MIT"
] | null | null | null | Probability-of-Loan-Defaulters/code.py | Namrata-NM/ga-learner-dst-repo | e3f86900ceaf6b3bcc824be831373691491d3405 | [
"MIT"
] | null | null | null | Probability-of-Loan-Defaulters/code.py | Namrata-NM/ga-learner-dst-repo | e3f86900ceaf6b3bcc824be831373691491d3405 | [
"MIT"
] | null | null | null | # --------------
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Load the dataframe
df = pd.read_csv(path)
#Code starts here
#probability p(A)for the event that fico credit score is greater than 700
p_a= len(df[df['fico']>700])/len(df['fico'])
print(p_a)
#probabilityp(B) for the ev... | 29.162791 | 77 | 0.679426 |
e7cd412d37be57e53d869c212533109e3bf60df5 | 4,095 | py | Python | __main__.py | steven1096-godaddy/awskit | 0faa7b5563aa6359e194d5de5d16d900a48db82d | [
"MIT"
] | null | null | null | __main__.py | steven1096-godaddy/awskit | 0faa7b5563aa6359e194d5de5d16d900a48db82d | [
"MIT"
] | null | null | null | __main__.py | steven1096-godaddy/awskit | 0faa7b5563aa6359e194d5de5d16d900a48db82d | [
"MIT"
] | null | null | null | from awskit import __app_name__, __version__
from typing import Optional
import typer
from awskit.commands import (
investigate,
databases,
domains,
servers,
ssl,
keys
)
# from awskit.lib.common import eval_expression, add_command
app = typer.Typer(add_completion=False)
def version_callb... | 27.857143 | 107 | 0.626374 |
3f975faf9c9bf1f29bdb9b3e272165c89618c0e7 | 1,367 | py | Python | view/positionview.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | view/positionview.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | view/positionview.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | # @date 2019-06-28
# @author Frederic Scherma, All rights reserved without prejudices.
# @license Copyright (c) 2019 Dream Overflow
# Position view.
from view.tableview import TableView
from trader.helpers.positionstatstable import positions_stats_table
import logging
error_logger = logging.getLogger('siis.view.posit... | 27.897959 | 114 | 0.631309 |
d2162057ff17f1b02559cf55e5e3d9351b78b870 | 621 | py | Python | frontend/api/management/commands/load_tweetcounts.py | den1den/web-inf-ret-ml | 3530a60905769f504207702d91d540d4ac610fb3 | [
"MIT"
] | null | null | null | frontend/api/management/commands/load_tweetcounts.py | den1den/web-inf-ret-ml | 3530a60905769f504207702d91d540d4ac610fb3 | [
"MIT"
] | null | null | null | frontend/api/management/commands/load_tweetcounts.py | den1den/web-inf-ret-ml | 3530a60905769f504207702d91d540d4ac610fb3 | [
"MIT"
] | null | null | null | import datetime
import json
import os
from django.core.management.base import BaseCommand
from frontend.api.models import TweetCountCache
class Command(BaseCommand):
help = 'Load all tweet counts'
def handle(self, *args, **options):
start = datetime.datetime(2016, 1, 1)
end = datetime.datet... | 24.84 | 103 | 0.639291 |
413d3c844236d01a44cd2048035da6d6ef520718 | 7,407 | py | Python | ai2thor/platform.py | dangiankit/ai2thor | ce4dab30ee78f58ecef462b15590f8db6bd02fd1 | [
"Apache-2.0"
] | null | null | null | ai2thor/platform.py | dangiankit/ai2thor | ce4dab30ee78f58ecef462b15590f8db6bd02fd1 | [
"Apache-2.0"
] | null | null | null | ai2thor/platform.py | dangiankit/ai2thor | ce4dab30ee78f58ecef462b15590f8db6bd02fd1 | [
"Apache-2.0"
] | null | null | null | import Xlib.display
import glob
import warnings
import os
import ctypes.util
import xml.etree.ElementTree
class Request:
def __init__(self, system, width, height, x_display, headless):
self.system = system
self.width = width
self.height = height
self.x_display = x_display
s... | 30.991632 | 115 | 0.587012 |
1200a6298bb4b13030b7734c0fec36b056cce70b | 4,530 | py | Python | bucci_diet_lotka_volterra_comparison.py | tyjo/clv | c184cd5f98a8f471f9e6131c88e7c9cf7717cf47 | [
"MIT"
] | 7 | 2020-07-14T19:25:16.000Z | 2022-03-07T15:56:52.000Z | bucci_diet_lotka_volterra_comparison.py | tyjo/clv | c184cd5f98a8f471f9e6131c88e7c9cf7717cf47 | [
"MIT"
] | 3 | 2021-05-25T09:20:27.000Z | 2022-03-09T21:37:11.000Z | bucci_diet_lotka_volterra_comparison.py | tyjo/clv | c184cd5f98a8f471f9e6131c88e7c9cf7717cf47 | [
"MIT"
] | 2 | 2020-12-11T07:50:57.000Z | 2020-12-28T07:01:03.000Z | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pickle as pkl
from scipy.special import logsumexp
from scipy.stats import entropy
from scipy.stats import pearsonr
from scipy.stats import norm
from compositional_lotka_volterra import CompositionalLotkaVolterra
from generalized_lotka_volte... | 33.065693 | 122 | 0.597792 |
c1d57ae6d51350175a619fdb26d6550d1d10cd0f | 2,640 | py | Python | IGC/VectorCompiler/lib/BiF/Utils/emulation_divrem_boilerplate.py | bader/intel-graphics-compiler | 04f51dc2f3d5047f334da5cb5eebe568480622f5 | [
"MIT"
] | null | null | null | IGC/VectorCompiler/lib/BiF/Utils/emulation_divrem_boilerplate.py | bader/intel-graphics-compiler | 04f51dc2f3d5047f334da5cb5eebe568480622f5 | [
"MIT"
] | null | null | null | IGC/VectorCompiler/lib/BiF/Utils/emulation_divrem_boilerplate.py | bader/intel-graphics-compiler | 04f51dc2f3d5047f334da5cb5eebe568480622f5 | [
"MIT"
] | null | null | null | #=========================== begin_copyright_notice ============================
#
# Copyright (c) 2021-2021 Intel Corporation
#
# 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 restri... | 37.183099 | 80 | 0.593939 |
bcad5a1188ffb34a7717ad09790faba0f40694f4 | 5,666 | py | Python | screws/miscellaneous/generalized_piecewise_function.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | 1 | 2020-10-14T12:48:35.000Z | 2020-10-14T12:48:35.000Z | screws/miscellaneous/generalized_piecewise_function.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | screws/miscellaneous/generalized_piecewise_function.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Taken from:
http://numpy-discussion.10968.n7.nabble.com/Any-interest-in-a-generalized-piecewise-function-td38808.html
By Per.Brodtkorb
Published on Oct 10, 2014; 11:33am
"""
import numpy as np
from collections.abc import Callable
def genpiecewise(xi, condlist, funclist, fillvalue=0, args... | 36.792208 | 105 | 0.580657 |
4e4c8d421b2cf696f3ff802e107b48f59d9778ca | 992 | py | Python | python_modules/libraries/dagster-airflow/dagster_airflow_tests/test_compile.py | shasha79/dagster | b138d2454eb4a7f7e19a9d1763fa6c06bbb239e6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-airflow/dagster_airflow_tests/test_compile.py | shasha79/dagster | b138d2454eb4a7f7e19a9d1763fa6c06bbb239e6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-airflow/dagster_airflow_tests/test_compile.py | shasha79/dagster | b138d2454eb4a7f7e19a9d1763fa6c06bbb239e6 | [
"Apache-2.0"
] | null | null | null | from dagster_airflow.compile import coalesce_execution_steps
from dagster_examples.toys.composition import composition
from dagster.core.definitions.executable import InMemoryExecutablePipeline
from dagster.core.execution.plan.plan import ExecutionPlan
from dagster.core.system_config.objects import EnvironmentConfig
... | 34.206897 | 91 | 0.726815 |
635b33ba3aebccab355c577de26eda3b7ae961e0 | 13,726 | py | Python | python/cudf/cudf/core/reshape.py | jakirkham/cudf | a8d129e357c996a1ed9201964f4ca93d0e35456b | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/core/reshape.py | jakirkham/cudf | a8d129e357c996a1ed9201964f4ca93d0e35456b | [
"Apache-2.0"
] | null | null | null | python/cudf/cudf/core/reshape.py | jakirkham/cudf | a8d129e357c996a1ed9201964f4ca93d0e35456b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, NVIDIA CORPORATION.
import numpy as np
import pandas as pd
import cudf
from cudf.core import DataFrame, Index, RangeIndex, Series
from cudf.core.column import as_column, build_categorical_column
from cudf.core.index import as_index
from cudf.utils import cudautils
from cudf.utils.dtypes import i... | 30.914414 | 79 | 0.596459 |
a01334539dbdb4e1f1bdd7ad6de4fd1fb3ff5864 | 86 | py | Python | E2Yaml/__init__.py | josephp27/env2yml | aa0c5d04d4b0d3dba39d6f7a6841d333e05c0910 | [
"MIT"
] | 1 | 2019-10-22T02:26:23.000Z | 2019-10-22T02:26:23.000Z | E2Yaml/__init__.py | josephp27/env2yml | aa0c5d04d4b0d3dba39d6f7a6841d333e05c0910 | [
"MIT"
] | null | null | null | E2Yaml/__init__.py | josephp27/env2yml | aa0c5d04d4b0d3dba39d6f7a6841d333e05c0910 | [
"MIT"
] | 1 | 2020-08-18T11:53:08.000Z | 2020-08-18T11:53:08.000Z | from E2Yaml.E2Yaml import EyConverter, load_file, from_clipboard
from E2Yaml import *
| 28.666667 | 64 | 0.837209 |
cd5592d2a401625700b011483fa21d3727d3f943 | 9,855 | py | Python | nova/policy.py | gmannos/nova-rbac-policy-new-defaults | 7c61b4bd19b97011d7581866c0262065e52d7865 | [
"Apache-2.0"
] | null | null | null | nova/policy.py | gmannos/nova-rbac-policy-new-defaults | 7c61b4bd19b97011d7581866c0262065e52d7865 | [
"Apache-2.0"
] | 1 | 2021-03-31T19:29:01.000Z | 2021-03-31T19:29:01.000Z | nova/policy.py | gmannos/nova-rbac-policy-new-defaults | 7c61b4bd19b97011d7581866c0262065e52d7865 | [
"Apache-2.0"
] | 1 | 2020-07-22T22:14:40.000Z | 2020-07-22T22:14:40.000Z | # Copyright (c) 2011 OpenStack Foundation
# 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 ... | 36.910112 | 79 | 0.65723 |
4a37be64fea1472db19177749b517b2aba1d61fa | 3,668 | py | Python | src/6.Hangman/hangman.py | omelianlevkovych/learn-python | 35d7c761634ea13bb4a17944ff1eb0764327f07d | [
"MIT"
] | null | null | null | src/6.Hangman/hangman.py | omelianlevkovych/learn-python | 35d7c761634ea13bb4a17944ff1eb0764327f07d | [
"MIT"
] | 2 | 2021-07-02T22:05:12.000Z | 2022-03-22T20:28:44.000Z | src/6.Hangman/hangman.py | omelianlevkovych/learn-python | 35d7c761634ea13bb4a17944ff1eb0764327f07d | [
"MIT"
] | null | null | null | # libraries
import random
# Assert ASCII art
HANGMAN_PICTURES = ['''
+---+
|
|
|
===''', '''
+---+
0 |
|
|
===''', '''
+---+
0 |
| |
|
===''', '''
+---+
0 |
/| |
|
===''', '''
+---+
0 |
/|\ |
|
===''', '''
+---+
0 |
/|\ |
/ |
===''', '''
+---+
0 |
/|\ ... | 26.014184 | 81 | 0.562704 |
01d1b3224776cb4d5c61635c78b1f8dd999a15c2 | 4,548 | py | Python | organise_desktop/Clean.py | kashishlubana/OrganiseDesktop | 033d2e4e375fe37e5fb11f63da4f391ea48f6a9f | [
"MIT"
] | null | null | null | organise_desktop/Clean.py | kashishlubana/OrganiseDesktop | 033d2e4e375fe37e5fb11f63da4f391ea48f6a9f | [
"MIT"
] | null | null | null | organise_desktop/Clean.py | kashishlubana/OrganiseDesktop | 033d2e4e375fe37e5fb11f63da4f391ea48f6a9f | [
"MIT"
] | null | null | null | import sys
import json
import os
from cronController import schedule_end, schedule_start
from organiseDesktop import undo, organise_desktop
from os import path, mkdir, listdir, rename, environ, rmdir
if sys.version_info >= (3,):
from tkinter import *
from tkinter import messagebox as tkMessageBox
else:
fr... | 33.688889 | 175 | 0.601583 |
5daccefc63233feb6080effcb6346fba77a11cf2 | 3,577 | py | Python | src/cosmic_ray/worker.py | Alcolo47/cosmic-ray | 6cc9c6bda9af6e5063758aca452b775b2ac1613c | [
"MIT"
] | null | null | null | src/cosmic_ray/worker.py | Alcolo47/cosmic-ray | 6cc9c6bda9af6e5063758aca452b775b2ac1613c | [
"MIT"
] | null | null | null | src/cosmic_ray/worker.py | Alcolo47/cosmic-ray | 6cc9c6bda9af6e5063758aca452b775b2ac1613c | [
"MIT"
] | 1 | 2021-11-10T10:42:57.000Z | 2021-11-10T10:42:57.000Z | """This is the body of the low-level worker tool.
"""
import difflib
import traceback
import cosmic_ray.mutating
import cosmic_ray.plugins
from cosmic_ray.testing import run_tests
from cosmic_ray.work_item import TestOutcome, WorkerOutcome, WorkResult
# pylint: disable=R0913
def worker(module_path,
pytho... | 38.462366 | 97 | 0.66676 |
558b81afc646079636608d8e8e83771146b13e92 | 4,050 | py | Python | tests/data/generators/test_waveform_generator.py | lckr/scikit-multiflow | 5b9737792707511d9596d7f414830499fd4ca2eb | [
"BSD-3-Clause"
] | null | null | null | tests/data/generators/test_waveform_generator.py | lckr/scikit-multiflow | 5b9737792707511d9596d7f414830499fd4ca2eb | [
"BSD-3-Clause"
] | null | null | null | tests/data/generators/test_waveform_generator.py | lckr/scikit-multiflow | 5b9737792707511d9596d7f414830499fd4ca2eb | [
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
from skmultiflow.data.generators.waveform_generator import WaveformGenerator
def test_waveform_generator(test_path):
stream = WaveformGenerator(random_state=23, has_noise=False)
stream.prepare_for_use()
assert stream.n_remaining_samples() == -1
expected_names = ['att_num... | 33.471074 | 93 | 0.645185 |
8b6e0f71b94c585359e47bc75ef66a46408b7c94 | 719 | py | Python | pac_test.py | jotaro-sama/PacEnv | 30cf5523e53ddce3e41990e51f2aa3864c8a3fab | [
"MIT"
] | 1 | 2018-12-29T21:00:12.000Z | 2018-12-29T21:00:12.000Z | pac_test.py | jotaro-sama/PacEnv | 30cf5523e53ddce3e41990e51f2aa3864c8a3fab | [
"MIT"
] | null | null | null | pac_test.py | jotaro-sama/PacEnv | 30cf5523e53ddce3e41990e51f2aa3864c8a3fab | [
"MIT"
] | null | null | null | import pac_env
def printMatrix(mat):
for row in mat:
for elem in row:
print(str(elem), end=" ")
print("")
env = pac_env.PacEnv()
(screen, score, power) = env.reset()
done = False
info = ""
print("Score: " + str(score))
printMatrix(screen)
for i in range(100):
action = env.act... | 25.678571 | 95 | 0.550765 |
9f2f8a74ac45a2e78f48340cf08ebd3bf6c98347 | 305 | py | Python | src/creational_patterns/prototype/prototype.py | EldanGS/patterns | 1d888bcbbfb8c8ad35c282a3a090b89eac795d92 | [
"MIT"
] | 1 | 2021-02-08T05:42:21.000Z | 2021-02-08T05:42:21.000Z | src/creational_patterns/prototype/prototype.py | EldanGS/patterns | 1d888bcbbfb8c8ad35c282a3a090b89eac795d92 | [
"MIT"
] | null | null | null | src/creational_patterns/prototype/prototype.py | EldanGS/patterns | 1d888bcbbfb8c8ad35c282a3a090b89eac795d92 | [
"MIT"
] | null | null | null | import copy
class Prototype:
prototype_field = "some field"
def main():
prototype = Prototype()
prototype_copy = copy.deepcopy(prototype)
assert prototype is not prototype_copy, "Something went wrong."
print(prototype_copy.prototype_field)
if __name__ == "__main__":
main()
| 16.944444 | 67 | 0.708197 |
354d299f658836688c41f0623773c356a9f50484 | 2,361 | py | Python | COVID Deaths Sample Pandas.py | saroushjaved/allmycode | fa62ad0bb1b55823b4aa42c344039d4eb89edf23 | [
"MIT"
] | 1 | 2020-05-31T20:14:13.000Z | 2020-05-31T20:14:13.000Z | COVID Deaths Sample Pandas.py | saroushjaved/allmycode | fa62ad0bb1b55823b4aa42c344039d4eb89edf23 | [
"MIT"
] | null | null | null | COVID Deaths Sample Pandas.py | saroushjaved/allmycode | fa62ad0bb1b55823b4aa42c344039d4eb89edf23 | [
"MIT"
] | null | null | null | # Sample COVID Analysis with Pandas
# Level : Beginner
import pandas as pd
df = pd.read_csv(r'/home/soroush/Downloads/owid-covid-data.csv')
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
# Start by Looking for the colums in the data set
##p... | 34.720588 | 189 | 0.720457 |
a38d9e1fed979af6eec843dcdad68cc6070a48bf | 6,464 | py | Python | examples/cont_schaanning_2017.py | vishalbelsare/resilience | 596a9b8224fc6168bd6ee5718ea6c57425b7f273 | [
"Apache-2.0"
] | 7 | 2020-04-04T20:55:21.000Z | 2021-11-15T10:42:44.000Z | examples/cont_schaanning_2017.py | vishalbelsare/resilience | 596a9b8224fc6168bd6ee5718ea6c57425b7f273 | [
"Apache-2.0"
] | 1 | 2020-06-19T04:26:35.000Z | 2020-09-25T04:50:00.000Z | examples/cont_schaanning_2017.py | vishalbelsare/resilience | 596a9b8224fc6168bd6ee5718ea6c57425b7f273 | [
"Apache-2.0"
] | 4 | 2020-04-16T19:10:33.000Z | 2020-09-24T17:54:21.000Z | import random
from collections import defaultdict
from economicsl import Simulation
from resilience.markets import AssetMarket
from resilience.agents import Bank
from resilience.contracts import Deposit, Other, AssetCollateral
from resilience.parameters import Parameters as defaultparam
NBANKS = 48
def get_extent_of_... | 37.149425 | 95 | 0.624845 |
12be11e8cfc78fbf8377eb8fa7746d316e6f9adf | 5,642 | py | Python | win_user_hook/my_hook.py | shooshx/lessons | 29eeeaf8d9f71f8c5fdf46b9dfd243a6fed675f1 | [
"MIT"
] | 4 | 2021-02-23T22:23:45.000Z | 2021-03-08T06:45:25.000Z | win_user_hook/my_hook.py | shooshx/lessons | 29eeeaf8d9f71f8c5fdf46b9dfd243a6fed675f1 | [
"MIT"
] | null | null | null | win_user_hook/my_hook.py | shooshx/lessons | 29eeeaf8d9f71f8c5fdf46b9dfd243a6fed675f1 | [
"MIT"
] | 1 | 2021-02-23T22:23:48.000Z | 2021-02-23T22:23:48.000Z | import win32api #activestate
import sys
from ctypes import *
class DOS_HEADER(Structure):
_fields_ = [("e_magic", c_ushort),
("e_cblp", c_ushort),
("e_cp", c_ushort),
("e_crlc", c_ushort),
("e_cparhdr", c_ushort),
("e_minalloc", c_us... | 32.612717 | 100 | 0.542893 |
a1487365ede7090be9df8a36301100737162a7ee | 625 | py | Python | tests/fixtures/defxmlschema/chapter06/example0611.py | nimish/xsdata | 7afe2781b66982428cc1731f53c065086acd35c1 | [
"MIT"
] | null | null | null | tests/fixtures/defxmlschema/chapter06/example0611.py | nimish/xsdata | 7afe2781b66982428cc1731f53c065086acd35c1 | [
"MIT"
] | null | null | null | tests/fixtures/defxmlschema/chapter06/example0611.py | nimish/xsdata | 7afe2781b66982428cc1731f53c065086acd35c1 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List
@dataclass
class Product:
"""
:ivar name:
:ivar size:
"""
class Meta:
name = "product"
name: List[str] = field(
default_factory=list,
metadata=dict(
type="Element",
namespace="",
... | 19.53125 | 42 | 0.5216 |
c5280f5f93ab1e75b484405a5ccc142be6516c17 | 1,044 | py | Python | isi_sdk_8_0_1/test/test_cluster_node_state_extended_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0_1/test/test_cluster_node_state_extended_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0_1/test/test_cluster_node_state_extended_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_0_1
from i... | 25.463415 | 124 | 0.745211 |
7652b3f8e1eca8c3ce78f9023be96057d750f810 | 31,422 | py | Python | data/templates/secure_erase.py | AlaricChan/on-taskgraph | 854d652e9594a7c1279d2f449517141294a89eff | [
"Apache-2.0"
] | null | null | null | data/templates/secure_erase.py | AlaricChan/on-taskgraph | 854d652e9594a7c1279d2f449517141294a89eff | [
"Apache-2.0"
] | 1 | 2017-09-11T03:45:52.000Z | 2017-09-11T03:45:52.000Z | data/templates/secure_erase.py | AlaricChan/on-taskgraph | 854d652e9594a7c1279d2f449517141294a89eff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016, EMC, Inc.
# -*- coding: UTF-8 -*-
"""
This script is to do Secure Erase (SE) on a compute node
Four methods/tools are integrated in this scripts
A log file will be created for each disk to be erased named after disk name, like sdx.log
"""
import os
import sys
import re
import... | 40.860858 | 100 | 0.598402 |
bc980fe7f26f74aa58a581a60d8b81a63393a689 | 1,763 | py | Python | docs/conf.py | readthedocs-assistant/glum | d6c114df9b860cf73b201d846b7965cb15fc7720 | [
"BSD-3-Clause"
] | 68 | 2021-10-08T09:05:29.000Z | 2022-03-28T14:40:58.000Z | docs/conf.py | readthedocs-assistant/glum | d6c114df9b860cf73b201d846b7965cb15fc7720 | [
"BSD-3-Clause"
] | 49 | 2021-10-08T01:44:18.000Z | 2022-03-08T08:53:00.000Z | docs/conf.py | readthedocs-assistant/glum | d6c114df9b860cf73b201d846b7965cb15fc7720 | [
"BSD-3-Clause"
] | 11 | 2021-10-14T10:34:53.000Z | 2022-03-09T11:38:29.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 29.881356 | 79 | 0.668179 |
c26cf1bfff5e94c9f962d1132a17e4c003987683 | 3,657 | py | Python | ledyba/ledyba/__init__.py | cstorm125/ladybug | 0d7c303651f22737cee9036823c34a5da74d5ae9 | [
"MIT"
] | 9 | 2017-10-11T17:16:25.000Z | 2020-07-20T19:42:09.000Z | ledyba/ledyba/__init__.py | cstorm125/ladybug | 0d7c303651f22737cee9036823c34a5da74d5ae9 | [
"MIT"
] | null | null | null | ledyba/ledyba/__init__.py | cstorm125/ladybug | 0d7c303651f22737cee9036823c34a5da74d5ae9 | [
"MIT"
] | 6 | 2017-10-09T08:27:23.000Z | 2020-09-07T13:08:23.000Z | import numpy as np
import os
from keras.models import Model
from keras.layers import Input, Conv2D, ZeroPadding2D, MaxPooling2D
from keras.layers import Flatten, Dense, Dropout, Activation, BatchNormalization
def vgg_face():
img = Input(shape=(224, 224,3))
#convolution layers
conv1_1 = Conv2D(64, (3,3), a... | 41.089888 | 91 | 0.657916 |
0d2987a0d78ad7e8525843a81790498dadc70b02 | 7,204 | py | Python | gameon/submissions/migrations/0002_auto__add_field_entry_team_name__add_field_entry_team_members__add_fie.py | Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f | d124c26bb50f8d78c032802bee1a7a5213cee762 | [
"BSD-3-Clause"
] | null | null | null | gameon/submissions/migrations/0002_auto__add_field_entry_team_name__add_field_entry_team_members__add_fie.py | Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f | d124c26bb50f8d78c032802bee1a7a5213cee762 | [
"BSD-3-Clause"
] | null | null | null | gameon/submissions/migrations/0002_auto__add_field_entry_team_name__add_field_entry_team_members__add_fie.py | Mozilla-GitHub-Standards/d1f672f1bcefb364864bc3fcece0e1461840e6ed1ade1fe7f67552d85c28621f | d124c26bb50f8d78c032802bee1a7a5213cee762 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Entry.team_name'
db.add_column('submissions_entry', 'team_name',
self.... | 64.321429 | 182 | 0.562743 |
063c3a1f8827ff5ac1e4c2f97595c6369c56eae4 | 62 | py | Python | src/python/twitter/common/python/util.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 1,143 | 2015-01-05T04:19:24.000Z | 2019-12-11T12:02:23.000Z | src/python/twitter/common/python/util.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 144 | 2015-01-06T05:05:07.000Z | 2019-12-12T18:02:37.000Z | src/python/twitter/common/python/util.py | zhouyijiaren/commons | 10df6fb63547baa9047782aa7ad4edf354914b10 | [
"Apache-2.0"
] | 426 | 2015-01-08T08:33:41.000Z | 2019-12-09T13:15:40.000Z | from __future__ import absolute_import
from pex.util import *
| 20.666667 | 38 | 0.83871 |
51462c9be35cb570287c573f5e27e91d63162440 | 11,624 | py | Python | dpark/utils/beansdb.py | timgates42/dpark | 17e83f696cfc550077c51bf42517b2201c8fd14c | [
"BSD-3-Clause"
] | 1,928 | 2015-01-02T01:47:07.000Z | 2022-03-29T08:43:26.000Z | dpark/utils/beansdb.py | timgates42/dpark | 17e83f696cfc550077c51bf42517b2201c8fd14c | [
"BSD-3-Clause"
] | 40 | 2015-03-18T06:28:30.000Z | 2021-11-02T06:35:37.000Z | dpark/utils/beansdb.py | timgates42/dpark | 17e83f696cfc550077c51bf42517b2201c8fd14c | [
"BSD-3-Clause"
] | 478 | 2015-01-03T03:50:20.000Z | 2021-09-06T02:06:32.000Z | from __future__ import absolute_import
from __future__ import print_function
import marshal
import binascii
import os
import socket
import time
import struct
import zlib
from dpark.utils.log import get_logger
from dpark.file_manager import open_file
from dpark.serialize import load_func, dump_func
from contextlib impor... | 30.036176 | 88 | 0.514797 |
f320d58822ce08ce6b9f6d239a2860cb32fea2c1 | 32 | py | Python | Demos/Demo25/MyModule.py | imiara/python4delphi | 2c84d57987f15522f151c4d717911d7f138156b1 | [
"MIT"
] | 685 | 2015-08-28T02:12:06.000Z | 2022-03-28T19:44:07.000Z | Demos/Demo25/MyModule.py | imiara/python4delphi | 2c84d57987f15522f151c4d717911d7f138156b1 | [
"MIT"
] | 248 | 2015-11-17T16:39:48.000Z | 2022-03-29T18:44:53.000Z | Demos/Demo25/MyModule.py | imiara/python4delphi | 2c84d57987f15522f151c4d717911d7f138156b1 | [
"MIT"
] | 259 | 2015-10-03T04:53:26.000Z | 2022-03-31T18:23:06.000Z | def Add(a, b):
return a + b
| 10.666667 | 15 | 0.5 |
2766be33c0b91198a51657315f76b4d409253fbc | 851 | py | Python | sites/demo/apps/shipping/repository.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | 1 | 2015-11-07T12:37:50.000Z | 2015-11-07T12:37:50.000Z | sites/demo/apps/shipping/repository.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | sites/demo/apps/shipping/repository.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | from oscar.apps.shipping.methods import NoShippingRequired
from oscar.apps.shipping.repository import Repository as CoreRepository
from . import methods
METHODS = (
methods.Standard(),
methods.Express(),
)
class Repository(CoreRepository):
def get_shipping_methods(self, user, basket, shipping_addr=None... | 29.344828 | 79 | 0.627497 |
e4a6e0d1a48eddb24673a56a38cfeb8b67b6ce19 | 126 | py | Python | version.py | swb19/uncertainty-wizard | 5ba9bfc6ee967eb5f226abbedb6f9d5452b3cfea | [
"MIT"
] | 1 | 2021-12-25T16:45:44.000Z | 2021-12-25T16:45:44.000Z | version.py | swb19/uncertainty-wizard | 5ba9bfc6ee967eb5f226abbedb6f9d5452b3cfea | [
"MIT"
] | null | null | null | version.py | swb19/uncertainty-wizard | 5ba9bfc6ee967eb5f226abbedb6f9d5452b3cfea | [
"MIT"
] | null | null | null | VERSION = "0.2"
# RELEASE = VERSION + "-alpha2"
# RELEASE = VERSION + "-beta1"
# RELEASE = VERSION + "-rc1"
RELEASE = VERSION
| 21 | 31 | 0.626984 |
4cbc158a28c459e01a5edd1cbe68a82d28dd8d88 | 12,158 | py | Python | cumulus/management/commands/syncstatic.py | bennylope/django-cumulus | 3e84cfbf519beea9154ca4e3f8578dc5113b3be2 | [
"BSD-3-Clause"
] | null | null | null | cumulus/management/commands/syncstatic.py | bennylope/django-cumulus | 3e84cfbf519beea9154ca4e3f8578dc5113b3be2 | [
"BSD-3-Clause"
] | null | null | null | cumulus/management/commands/syncstatic.py | bennylope/django-cumulus | 3e84cfbf519beea9154ca4e3f8578dc5113b3be2 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import fnmatch
import mimetypes
import optparse
import os
import pyrax
import re
import swiftclient
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import CommandError, NoArgsCommand
from cumulus.settings import CUMULUS
from cumulus.st... | 42.659649 | 90 | 0.564896 |
fe7cf19e0d0c2eab649f021cd5e6b4a30e1912ad | 9,265 | py | Python | finetune/src/lightning.py | affjljoo3581/Samsung-AI-Challenge-for-Scientific-Discovery | 717f1d95f9f504fa1e3a463349a373f88acf39ce | [
"Apache-2.0"
] | 35 | 2021-11-12T15:16:09.000Z | 2022-03-10T01:57:57.000Z | finetune/src/lightning.py | affjljoo3581/Samsung-AI-Challenge-for-Scientific-Discovery | 717f1d95f9f504fa1e3a463349a373f88acf39ce | [
"Apache-2.0"
] | null | null | null | finetune/src/lightning.py | affjljoo3581/Samsung-AI-Challenge-for-Scientific-Discovery | 717f1d95f9f504fa1e3a463349a373f88acf39ce | [
"Apache-2.0"
] | 2 | 2021-11-16T10:29:06.000Z | 2021-12-25T14:17:50.000Z | import os
from typing import Any, Dict, List, Optional, Tuple
import pandas as pd
import pytorch_lightning as pl
import torch
import torch.nn as nn
from omegaconf import DictConfig
from sklearn.model_selection import KFold
from torch.nn import functional as F
from torch.optim import Optimizer
from torch.optim.lr_sched... | 39.425532 | 88 | 0.660443 |
e50c5bace70cbdbed7be697e0ce3f1946ae11de1 | 17,913 | py | Python | code/lib/bst.py | nchikkam/hk | d2229298d2bb5fa9e1cc2cedd40d9ff29dd0a91b | [
"MIT"
] | null | null | null | code/lib/bst.py | nchikkam/hk | d2229298d2bb5fa9e1cc2cedd40d9ff29dd0a91b | [
"MIT"
] | null | null | null | code/lib/bst.py | nchikkam/hk | d2229298d2bb5fa9e1cc2cedd40d9ff29dd0a91b | [
"MIT"
] | null | null | null | class BinaryTree:
def __init__(self, data = None):
self.data = data
self.left = None
self.right = None
def create(self, l):
q = []
data = l.pop(0)
self.data = data
q.append(self)
while len(l) > 0:
current = q.pop(0)
ldata... | 28.985437 | 127 | 0.490649 |
92c0412b7f99fcfbf259247abfb284c46319f09e | 41,227 | py | Python | app/views_lxd.py | Miso-K/lxd-api-gateway | d1eb6798635749c4440dfb8916b2f9185f6efe35 | [
"MIT"
] | 16 | 2019-11-28T03:24:51.000Z | 2021-12-30T07:07:24.000Z | app/views_lxd.py | Miso-K/lxd-api-gateway | d1eb6798635749c4440dfb8916b2f9185f6efe35 | [
"MIT"
] | 1 | 2020-04-30T21:34:30.000Z | 2020-04-30T21:34:30.000Z | app/views_lxd.py | Miso-K/lxd-api-gateway | d1eb6798635749c4440dfb8916b2f9185f6efe35 | [
"MIT"
] | 3 | 2019-08-24T17:15:18.000Z | 2021-12-30T07:07:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import request
from flask_restplus import Resource
from flask_jwt_extended import jwt_required
from .decorators import *
from .fields.instances import *
from .fields.snapshots import *
from .fields.lxdservers import *
from app import redis_store, app
import lgw
i... | 36.484071 | 172 | 0.56446 |
cdcbb75bf417ecafb7fdc5941f122b28b5b289d1 | 45,252 | py | Python | edk2basetools/UPT/GenMetaFile/GenInfFile.py | matthewfcarlson/edk2-pytool-base | ddf78ca6e2110f03e020a5bd0ca32b2a463fecff | [
"BSD-2-Clause-Patent"
] | null | null | null | edk2basetools/UPT/GenMetaFile/GenInfFile.py | matthewfcarlson/edk2-pytool-base | ddf78ca6e2110f03e020a5bd0ca32b2a463fecff | [
"BSD-2-Clause-Patent"
] | 1 | 2020-04-14T22:23:01.000Z | 2020-04-15T06:47:53.000Z | edk2basetools/UPT/GenMetaFile/GenInfFile.py | matthewfcarlson/edk2-pytool-base | ddf78ca6e2110f03e020a5bd0ca32b2a463fecff | [
"BSD-2-Clause-Patent"
] | null | null | null | ## @file GenInfFile.py
#
# This file contained the logical of transfer package object to INF files.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenInf
'''
import os
import stat
import codecs
from hashlib import md5
from Core.FileHook ... | 40.295637 | 120 | 0.605653 |
9e986e29484aed76a5a963e66d7a8a3159b64cbb | 6,404 | py | Python | kubernetes/client/models/v1_http_get_action.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_http_get_action.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_http_get_action.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.9.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | 26.683333 | 133 | 0.56371 |
3d2de704c16d9e21c0cb937ce264e37acc3e6c6b | 11,442 | py | Python | pads/lca.py | thisiscam/PADS | 13eb364e3b248cffd03ec796d9bd93747e6afffb | [
"MIT"
] | 9 | 2018-03-15T12:40:29.000Z | 2022-03-07T03:05:22.000Z | pads/lca.py | thisiscam/PADS | 13eb364e3b248cffd03ec796d9bd93747e6afffb | [
"MIT"
] | null | null | null | pads/lca.py | thisiscam/PADS | 13eb364e3b248cffd03ec796d9bd93747e6afffb | [
"MIT"
] | 7 | 2015-12-19T14:11:30.000Z | 2022-02-15T23:42:12.000Z | """LCA.py
Range minimization and tree least common ancestor data structures
with linear space and preprocessing time, and constant query time,
from Bender and Farach-Colton, "The LCA Problem Revisited",
Proc. LATIN 2000 (pp.88-94), http://www.cs.sunysb.edu/~bender/pub/lca.ps
Some experimentation would be needed to de... | 36.094637 | 76 | 0.611257 |
c873107a2af94122bfb889209ff7c0ec2da93ed9 | 1,218 | py | Python | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oget_model.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | 1 | 2017-03-28T09:10:12.000Z | 2017-03-28T09:10:12.000Z | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oget_model.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oget_model.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h2o.utils.typechecks import assert_is_type
def h2oget_model():
"""
Python API test: h2o.get_model(model_id)
"""
try... | 35.823529 | 117 | 0.695402 |
a1b7161acd0acbc872edede02b2e536ba7d69142 | 1,046 | py | Python | tests/build/conftest.py | zyfra/ebonite | b01b662c43709d152940f488574d78ff25f89ecf | [
"Apache-2.0"
] | 270 | 2019-11-14T15:46:08.000Z | 2021-09-17T16:43:03.000Z | tests/build/conftest.py | leepand/ebonite | b01b662c43709d152940f488574d78ff25f89ecf | [
"Apache-2.0"
] | 14 | 2019-11-29T11:49:39.000Z | 2022-02-10T00:23:59.000Z | tests/build/conftest.py | leepand/ebonite | b01b662c43709d152940f488574d78ff25f89ecf | [
"Apache-2.0"
] | 18 | 2019-11-22T13:15:14.000Z | 2021-09-01T13:36:12.000Z | import socket
import pytest
from ebonite.core.objects.core import Model, Pipeline, PipelineStep
from ebonite.runtime.server import HTTPServerConfig
from tests.client.test_func import func
from ebonite.repository.metadata.local import LocalMetadataRepository
@pytest.fixture
def metadata_repo():
meta = LocalMetad... | 26.820513 | 105 | 0.721797 |
a3c956f751247ad84c2080bba71309b1b5d88896 | 4,246 | py | Python | nblog/post/api/views.py | NestorMonroy/BlogTemplate | 82dfc7eb26e8a8ff0d51f29176c3b4d537092be7 | [
"MIT"
] | null | null | null | nblog/post/api/views.py | NestorMonroy/BlogTemplate | 82dfc7eb26e8a8ff0d51f29176c3b4d537092be7 | [
"MIT"
] | 8 | 2020-07-22T02:06:35.000Z | 2021-09-22T19:22:27.000Z | nblog/post/api/views.py | NestorMonroy/BlogTemplate | 82dfc7eb26e8a8ff0d51f29176c3b4d537092be7 | [
"MIT"
] | null | null | null | import random
from django.conf import settings
from django.contrib.auth import get_user_model
from django.http import HttpResponse, Http404, JsonResponse
from django.shortcuts import render, redirect
from django.utils.http import is_safe_url
from rest_framework.decorators import action
from rest_framework import views... | 38.252252 | 90 | 0.678285 |
a0427420bdc6688282e6b2f9468682033e1bf5ce | 4,582 | py | Python | apps/core/encrypt/handlers.py | Chace-wang/bk-nodeman | ee49cd5105f0c97ef33f81e8bbf2d5eecd236c40 | [
"MIT"
] | 31 | 2021-07-28T13:06:11.000Z | 2022-03-10T12:16:44.000Z | apps/core/encrypt/handlers.py | Chace-wang/bk-nodeman | ee49cd5105f0c97ef33f81e8bbf2d5eecd236c40 | [
"MIT"
] | 483 | 2021-07-29T03:17:44.000Z | 2022-03-31T13:03:04.000Z | apps/core/encrypt/handlers.py | Chace-wang/bk-nodeman | ee49cd5105f0c97ef33f81e8bbf2d5eecd236c40 | [
"MIT"
] | 29 | 2021-07-28T13:06:21.000Z | 2022-03-25T06:18:18.000Z | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance ... | 44.485437 | 120 | 0.672196 |
4d11ca9940ca4499c47f8d22a1062595c7c7edba | 423 | py | Python | backend/tonytest0709c_dev_22737/wsgi.py | crowdbotics-apps/tonytest0709c-dev-22737 | b28cb5139e0d52c9be7ecb4dbb8eb2bb8da911f0 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/tonytest0709c_dev_22737/wsgi.py | crowdbotics-apps/tonytest0709c-dev-22737 | b28cb5139e0d52c9be7ecb4dbb8eb2bb8da911f0 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/tonytest0709c_dev_22737/wsgi.py | crowdbotics-apps/tonytest0709c-dev-22737 | b28cb5139e0d52c9be7ecb4dbb8eb2bb8da911f0 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for tonytest0709c_dev_22737 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.setdefau... | 24.882353 | 83 | 0.801418 |
b6bc3e24e1ac96329fe13229bd01bfe3a8d7edc6 | 5,816 | py | Python | tests/components/heos/test_init.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | null | null | null | tests/components/heos/test_init.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:34:57.000Z | 2022-03-12T00:59:48.000Z | tests/components/heos/test_init.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | null | null | null | """Tests for the init module."""
import asyncio
from asynctest import patch
from pyheos import CommandError, const
import pytest
from homeassistant.components.heos import (
SourceManager, async_setup_entry, async_unload_entry)
from homeassistant.components.heos.const import (
DATA_CONTROLLER, DATA_SOURCE_MANA... | 40.957746 | 78 | 0.733666 |
716ddfc28f395ed318f28699520263df1f23491d | 23,699 | py | Python | app.py | ohteedee/COVID-19_diagnosing_app | 4baf78adeed46b23afd31988e1c3c6306290bfb0 | [
"MIT"
] | null | null | null | app.py | ohteedee/COVID-19_diagnosing_app | 4baf78adeed46b23afd31988e1c3c6306290bfb0 | [
"MIT"
] | null | null | null | app.py | ohteedee/COVID-19_diagnosing_app | 4baf78adeed46b23afd31988e1c3c6306290bfb0 | [
"MIT"
] | 1 | 2021-12-22T02:13:26.000Z | 2021-12-22T02:13:26.000Z |
import matplotlib.pyplot as plt
import seaborn as sns
import streamlit as st
from processor.symptoms import ProcessSymptomsData
from processor.imagedata import ProcessImageData
from processor.decisions import optional_recommendations_when_positive_outcome, decision_for_covid_dual_model, decision_for_normal_dual_model,... | 68.892442 | 241 | 0.613148 |
34e63fc83f8792ee28286034ab519b1621af383f | 1,204 | py | Python | src/lpconnector/commands/lastpassusers.py | bwallis42/lpconnector | 8e2f918ad0487e7160c9470191239c6fa4a7f6e5 | [
"Apache-2.0"
] | 13 | 2018-04-16T19:15:53.000Z | 2020-04-07T12:09:51.000Z | src/lpconnector/commands/lastpassusers.py | bwallis42/lpconnector | 8e2f918ad0487e7160c9470191239c6fa4a7f6e5 | [
"Apache-2.0"
] | 5 | 2018-04-16T23:02:42.000Z | 2021-06-01T22:10:10.000Z | src/lpconnector/commands/lastpassusers.py | bwallis42/lpconnector | 8e2f918ad0487e7160c9470191239c6fa4a7f6e5 | [
"Apache-2.0"
] | 3 | 2019-06-03T15:21:54.000Z | 2021-12-13T13:17:41.000Z | from __future__ import print_function
from distutils.util import strtobool
from .basecommand import BaseCommand
class LastPassUsers(BaseCommand): # pylint: disable=too-few-public-methods
"""
Get users in LastPass
Usage:
lastpassusers [options]
-n --dry-run Display API reques... | 33.444444 | 98 | 0.576412 |
02246c2ea34d28a45df0024048dc9c176c3a641e | 5,430 | py | Python | data/p3BR/R1/benchmark/startQiskit_QC253.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startQiskit_QC253.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startQiskit_QC253.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=46
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 29.037433 | 140 | 0.629282 |
e7144b4a723d49f3c063139ac078ef2a8eca1fde | 3,518 | py | Python | BookATable/pdf/reportlab/lib/fonts.py | raghavnaphade16/TYPro | 61785f01f956ce2bbf397f5cb674fc408b5840b3 | [
"MIT"
] | 55 | 2019-09-21T02:45:18.000Z | 2021-12-10T13:38:51.000Z | BookATable/pdf/reportlab/lib/fonts.py | raghavnaphade16/TYPro | 61785f01f956ce2bbf397f5cb674fc408b5840b3 | [
"MIT"
] | 123 | 2019-09-10T14:48:01.000Z | 2019-11-28T21:24:06.000Z | BookATable/pdf/reportlab/lib/fonts.py | raghavnaphade16/TYPro | 61785f01f956ce2bbf397f5cb674fc408b5840b3 | [
"MIT"
] | 26 | 2019-09-25T03:54:30.000Z | 2022-03-21T14:03:12.000Z | #!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
#history https://hg.reportlab.com/hg-public/reportlab/log/tip/src/reportlab/lib/fonts.py
__version__='3.3.0'
__doc__='''Utilities to associate bold and italic versions of fonts into families
Bold, italic and plain fonts a... | 35.897959 | 95 | 0.568505 |
eb701e6b70da496fbcfcbe0ffec9f0d6306eeb48 | 50,623 | py | Python | Projects/ABM_DA/experiments/ukf_experiments/ukf_old/stationsim/ukf_aggregate.py | RobertClay/DUST-RC | 09f7ec9d8d093021d068dff8a7a48c15ea318b86 | [
"MIT"
] | 15 | 2018-11-21T14:57:24.000Z | 2022-03-04T15:42:09.000Z | Projects/ABM_DA/experiments/ukf_experiments/ukf_old/stationsim/ukf_aggregate.py | RobertClay/DUST-RC | 09f7ec9d8d093021d068dff8a7a48c15ea318b86 | [
"MIT"
] | 125 | 2019-11-06T13:03:35.000Z | 2022-03-07T13:38:33.000Z | Projects/ABM_DA/experiments/ukf_experiments/ukf_old/stationsim/ukf_aggregate.py | RobertClay/DUST-RC | 09f7ec9d8d093021d068dff8a7a48c15ea318b86 | [
"MIT"
] | 6 | 2018-11-20T15:56:49.000Z | 2021-10-08T10:21:06.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu May 23 11:13:26 2019
@author: RC
first attempt at a square root UKF class
class built into 5 steps
-init
-Prediction SP generation
-Predictions
-Update SP generation
-Update
UKF filter using own function rather than filterpys
based on
citeseerx.ist.psu.edu... | 38.005255 | 152 | 0.553484 |
16aa2fde3fcc985bf058bb033b8a5b6b33d629db | 2,210 | py | Python | notebooks/explore/load_years_data.py | ziranfeng/quandl | 5a8f779975d17856f44d33790cc5cea66ea46bd7 | [
"MIT"
] | null | null | null | notebooks/explore/load_years_data.py | ziranfeng/quandl | 5a8f779975d17856f44d33790cc5cea66ea46bd7 | [
"MIT"
] | 3 | 2020-11-13T18:42:56.000Z | 2022-02-10T01:32:38.000Z | notebooks/explore/load_years_data.py | ziranfeng/quant | 5a8f779975d17856f44d33790cc5cea66ea46bd7 | [
"MIT"
] | null | null | null | from datetime import datetime as dt
import pickle
from yitian.datasource import load, preprocess, EQUITY
from yitian.datasource.file_utils import create_data_path, list_bucket_year_path, \
bucket_to_local, list_bucket_path
# required parameters
# | parameter | example | description ... | 35.645161 | 120 | 0.631222 |
21f53f7c3be33caa4282dd4b6695e5f0b61d64e4 | 12,027 | py | Python | tests/engine/test_state.py | dazzag24/prefect | 9d36c989c95cbbed091b071932553286edf25bb6 | [
"Apache-2.0"
] | null | null | null | tests/engine/test_state.py | dazzag24/prefect | 9d36c989c95cbbed091b071932553286edf25bb6 | [
"Apache-2.0"
] | null | null | null | tests/engine/test_state.py | dazzag24/prefect | 9d36c989c95cbbed091b071932553286edf25bb6 | [
"Apache-2.0"
] | null | null | null | import datetime
import tempfile
import uuid
from collections import defaultdict
import cloudpickle
import pendulum
import pytest
import prefect
from prefect.engine.result import NoResult, Result, SafeResult
from prefect.engine.result_handlers import JSONResultHandler, LocalResultHandler
from prefect.engine.state impo... | 32.243968 | 89 | 0.700923 |
e0f42e0baa0117c79daf470c9f28a46595c71a10 | 3,817 | py | Python | tests/tests_during_development/multi_param_tests.py | bsierieb1/SCDCdm_public | 4cd3460a598fad01cb556dc1fb86f63d805ee052 | [
"BSD-3-Clause"
] | 1 | 2021-03-31T10:44:48.000Z | 2021-03-31T10:44:48.000Z | tests/tests_during_development/multi_param_tests.py | neurogenomics/scCODA | db610c1bda904f79a8142da767cf8e62d1cd8d32 | [
"BSD-3-Clause"
] | null | null | null | tests/tests_during_development/multi_param_tests.py | neurogenomics/scCODA | db610c1bda904f79a8142da767cf8e62d1cd8d32 | [
"BSD-3-Clause"
] | null | null | null | import arviz as az
import pandas as pd
import numpy as np
import importlib
from scdcdm.util import result_classes as res
from scdcdm.util import comp_ana as mod
from scdcdm.util import data_generation as gen
from scdcdm.util import multi_parameter_sampling as mult
from scdcdm.model import dirichlet_models as dm
from sc... | 21.936782 | 128 | 0.661252 |
91ecf09b647ba934ad595b54c6c9b8909b7e4a7a | 4,128 | py | Python | Bot/utils/functions.py | No1IrishStig/Watchdog_Public | 3eed73642e7ee86b898aa4f01630197e7ffefd8b | [
"MIT"
] | 8 | 2020-08-02T17:14:21.000Z | 2022-02-22T20:21:47.000Z | Bot/utils/functions.py | No1IrishStig/Watchdog_Public | 3eed73642e7ee86b898aa4f01630197e7ffefd8b | [
"MIT"
] | null | null | null | Bot/utils/functions.py | No1IrishStig/Watchdog_Public | 3eed73642e7ee86b898aa4f01630197e7ffefd8b | [
"MIT"
] | 3 | 2020-10-04T09:34:24.000Z | 2022-03-23T01:27:13.000Z | import datetime
import discord
import random
import json
import os
from discord.ext import commands
from collections import namedtuple
from cogs.Core.Language import Language
def fetch(file):
try:
with open(file, encoding="utf8") as data:
return json.load(data, object_hook=lambda d: namedtuple... | 37.527273 | 193 | 0.611919 |
d56ad1695f42cbdcd69debdf5ad9f2f4db12d3dd | 1,742 | py | Python | clone.py | mike-k0/wikidata-toolkit | 2c2c77473ca3bc86a0b16d164d1037883428823f | [
"MIT"
] | 5 | 2019-07-29T15:05:14.000Z | 2020-10-15T03:02:50.000Z | clone.py | mike-k0/wikidata-toolkit | 2c2c77473ca3bc86a0b16d164d1037883428823f | [
"MIT"
] | 16 | 2019-07-29T05:59:14.000Z | 2021-12-13T20:06:09.000Z | clone.py | mike-k0/wikidata-toolkit | 2c2c77473ca3bc86a0b16d164d1037883428823f | [
"MIT"
] | 8 | 2019-12-20T02:27:11.000Z | 2020-10-15T05:25:40.000Z | from typing import Iterable
import click
from pywikibot import Site, ItemPage
import properties.wikidata_properties as wp
from utils import RepoUtils
def _clone(src: str, dest: str, props: Iterable[wp.WikidataProperty]):
"""Copy all specified properties from the src ID to the dest ID"""
repoutil = RepoUtils... | 24.885714 | 81 | 0.660735 |
6e4335d8cab19d2711c68306de0afc3a0960d99a | 2,265 | py | Python | capriqorn/preproc/filter/dummy.py | bio-phys/capriqorn | 8f514deaf301643a38a4d101e3ada1ae10a1abc6 | [
"CC-BY-4.0"
] | 8 | 2018-03-29T09:48:20.000Z | 2021-04-14T10:12:49.000Z | capriqorn/preproc/filter/dummy.py | bio-phys/capriqorn | 8f514deaf301643a38a4d101e3ada1ae10a1abc6 | [
"CC-BY-4.0"
] | 5 | 2018-05-28T11:29:17.000Z | 2018-06-15T04:54:10.000Z | capriqorn/preproc/filter/dummy.py | bio-phys/capriqorn | 8f514deaf301643a38a4d101e3ada1ae10a1abc6 | [
"CC-BY-4.0"
] | 1 | 2021-03-10T12:25:31.000Z | 2021-03-10T12:25:31.000Z | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# Capriqorn --- CAlculation of P(R) and I(Q) Of macRomolcules in solutioN
#
# Copyright (c) Juergen Koefinger, Klaus Reuter, and contributors.
# See the file AUTHORS.rst f... | 34.318182 | 92 | 0.629581 |
9c5527df03c84e9021e11e89bbd6df4d035203ee | 957 | py | Python | var/spack/repos/builtin/packages/py-quaternionic/package.py | graeme-a-stewart/spack | 8106983ddb417e6b1ae6d3536bf68f07e0b00131 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-quaternionic/package.py | graeme-a-stewart/spack | 8106983ddb417e6b1ae6d3536bf68f07e0b00131 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2022-03-01T02:28:01.000Z | 2022-03-01T02:28:04.000Z | var/spack/repos/builtin/packages/py-quaternionic/package.py | graeme-a-stewart/spack | 8106983ddb417e6b1ae6d3536bf68f07e0b00131 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyQuaternionic(PythonPackage):
"""Interpret numpy arrays as quaternionic arrays with numba... | 38.28 | 95 | 0.691745 |
19e934acf889fb4a1c64edc8dca31c726baf5da9 | 222 | py | Python | profiles/views.py | todaatsushi/profiles_crud_app | 769d1a196d54d54c20cc6a7bf1539b4dab0f91dd | [
"MIT"
] | null | null | null | profiles/views.py | todaatsushi/profiles_crud_app | 769d1a196d54d54c20cc6a7bf1539b4dab0f91dd | [
"MIT"
] | null | null | null | profiles/views.py | todaatsushi/profiles_crud_app | 769d1a196d54d54c20cc6a7bf1539b4dab0f91dd | [
"MIT"
] | null | null | null | """
Home page view.
Redirects to user list view in the users app.
"""
from django.urls import reverse
from django.http import HttpResponseRedirect
def home(request):
return HttpResponseRedirect(reverse('user-list'))
| 20.181818 | 53 | 0.765766 |
f03009de4d03f712be6df8ab1d8dfb7d3dc51ea9 | 17,651 | py | Python | third_party_license_file_generator/licenses/gpl_2_0.py | j-b-d/python-third-party-license-file-generator | 0415b88ea7650782619a5228d2af14a7cade0629 | [
"MIT"
] | 6 | 2018-04-19T05:33:53.000Z | 2021-02-10T16:23:53.000Z | third_party_license_file_generator/licenses/gpl_2_0.py | j-b-d/python-third-party-license-file-generator | 0415b88ea7650782619a5228d2af14a7cade0629 | [
"MIT"
] | 11 | 2019-10-22T14:50:29.000Z | 2022-03-01T02:38:04.000Z | third_party_license_file_generator/licenses/gpl_2_0.py | j-b-d/python-third-party-license-file-generator | 0415b88ea7650782619a5228d2af14a7cade0629 | [
"MIT"
] | 4 | 2019-10-24T16:57:23.000Z | 2022-02-22T07:50:10.000Z | # -*- coding: utf-8 -*-
data = u"""GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
... | 138.984252 | 803 | 0.804544 |
43a7984730056073872e2b20303afc7473a60666 | 11,697 | py | Python | cms/tests/frontend.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | cms/tests/frontend.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | cms/tests/frontend.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.core.cache import cache
import os
import time
from cms.models import Page
from cms.api import create_page, create_title, add_plugin
from cms.test_utils.testcases import SettingsOverrideTestCase
from cms.test_utils.util.context_managers import SettingsOverride
from django.utils impo... | 37.133333 | 126 | 0.649996 |
c20dde15901d9dc835d6a7683d55d5d4ed91f926 | 1,092 | py | Python | aalh_iit_peopleportraits_009/cleanup-description-pipes.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_peopleportraits_009/cleanup-description-pipes.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_peopleportraits_009/cleanup-description-pipes.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | from openpyxl import load_workbook
filename = 'aalh_iit_peopleportraits_009.xlsx'
wb = load_workbook(filename)
ws = wb['Metadata Template']
minimumcol = 8
maximumcol = 8
minimumrow = 7
maximumrow = 507
iterationrow = 7
targetcol = 13
titlecol = 2
desccol = 8
for row in ws.iter_rows(min_row=minimumro... | 31.2 | 105 | 0.619963 |
e39a10e4651bc64af7b6eadb496d949c5122be76 | 1,723 | py | Python | fpiweb/management/commands/createadmingroup.py | HarlandWHansen/Food-Pantry-Inventory | 21cf34fcc6bac36b5fd18a6090dcda3fa08ae261 | [
"MIT"
] | 22 | 2019-02-19T23:31:08.000Z | 2022-01-18T11:35:45.000Z | fpiweb/management/commands/createadmingroup.py | HarlandWHansen/Food-Pantry-Inventory | 21cf34fcc6bac36b5fd18a6090dcda3fa08ae261 | [
"MIT"
] | 149 | 2019-02-20T21:20:22.000Z | 2022-03-11T23:49:08.000Z | fpiweb/management/commands/createadmingroup.py | deeppunster/Food-Pantry-Inventory | 3f264e1109776059bb84a82eda808a513b3c7907 | [
"MIT"
] | 28 | 2019-02-19T21:33:24.000Z | 2021-05-28T22:44:39.000Z |
from django.contrib.auth.models import Group, Permission
from django.core.management.base import BaseCommand, CommandError
# Custom django-admin / manage.py command as per
# https://docs.djangoproject.com/en/2.2/howto/custom-management-commands/
class Command(BaseCommand):
help = """Create an admin group for t... | 32.509434 | 98 | 0.59141 |
78fe4545c1a8ee166781c343819f7bac7da1f58c | 1,948 | py | Python | FY/MatricesConverter.py | sr-lab/quantum-hoare-logic | 57d4b6b120bda9c72a202e772592809edf529ca6 | [
"Apache-2.0"
] | null | null | null | FY/MatricesConverter.py | sr-lab/quantum-hoare-logic | 57d4b6b120bda9c72a202e772592809edf529ca6 | [
"Apache-2.0"
] | null | null | null | FY/MatricesConverter.py | sr-lab/quantum-hoare-logic | 57d4b6b120bda9c72a202e772592809edf529ca6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from fractions import Fraction
st = input("expression: ")
name = input("name: ")
I = np.eye(2)
CNOT = np.array([[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 0, 1],
[0, 0, 1, 0]])
X = np.array([[0, 1],
[1, 0]])
H = (1 / np.sqrt(2)) * np.array([[... | 24.974359 | 57 | 0.481006 |
70c7e955fc205d43c69f960523452a5c398b7c2e | 4,331 | py | Python | toontown/battle/BattlePlace.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | null | null | null | toontown/battle/BattlePlace.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 1 | 2021-06-08T17:16:48.000Z | 2021-06-08T17:16:48.000Z | toontown/battle/BattlePlace.py | SuperM0use24/TT-CL-Edition | fdad8394f0656ae122b687d603f72afafd220c65 | [
"MIT"
] | 3 | 2021-06-03T05:36:36.000Z | 2021-06-22T15:07:31.000Z | from panda3d.core import *
from toontown.toon import Toon
from toontown.hood import Place
from toontown.hood import ZoneUtil
from toontown.toonbase import ToontownGlobals
class BattlePlace(Place.Place):
def __init__(self, loader, doneEvent):
Place.Place.__init__(self, loader, doneEvent)
def load(self... | 36.70339 | 152 | 0.649042 |
f3ead5c31cdfd4cbd648a87bc63be579a6d7cfcb | 393 | py | Python | organify/organify/wsgi.py | xmedinavei/organify | 2b819f058e8f169cdad5324218d54009d2b937d0 | [
"MIT"
] | null | null | null | organify/organify/wsgi.py | xmedinavei/organify | 2b819f058e8f169cdad5324218d54009d2b937d0 | [
"MIT"
] | null | null | null | organify/organify/wsgi.py | xmedinavei/organify | 2b819f058e8f169cdad5324218d54009d2b937d0 | [
"MIT"
] | null | null | null | """
WSGI config for organify 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/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
b3e0bb97c7bbf235fb6711e1836da0f2273fb23b | 184 | py | Python | src/jwtlib/types.py | novopl/jwtlib | 095d7de0f3d357db17cf295895797baa94540901 | [
"Apache-2.0"
] | null | null | null | src/jwtlib/types.py | novopl/jwtlib | 095d7de0f3d357db17cf295895797baa94540901 | [
"Apache-2.0"
] | null | null | null | src/jwtlib/types.py | novopl/jwtlib | 095d7de0f3d357db17cf295895797baa94540901 | [
"Apache-2.0"
] | null | null | null | """ Common types used in jwtlib. """
from typing import Any, Callable, Dict, Union
JsonDict = Dict[str, Any]
PlainType = Union[str, int, float, bool]
Decorator = Callable[..., Any]
| 20.444444 | 45 | 0.684783 |
2390274e2e7d11772e9e9377f52ff9f9c7eaff77 | 209 | py | Python | app/__init__.py | pdufter/simalign-demo | d435c2f714c12e4c8ec88e2c2572429e09fba40e | [
"MIT"
] | 1 | 2022-03-24T06:29:23.000Z | 2022-03-24T06:29:23.000Z | app/__init__.py | pdufter/simalign-demo | d435c2f714c12e4c8ec88e2c2572429e09fba40e | [
"MIT"
] | null | null | null | app/__init__.py | pdufter/simalign-demo | d435c2f714c12e4c8ec88e2c2572429e09fba40e | [
"MIT"
] | null | null | null | from flask import Flask
from flask_compress import Compress
from config import Config
app = Flask(__name__)
app._static_folder = "../static"
app.config.from_object(Config)
Compress(app)
from app import align
| 20.9 | 35 | 0.803828 |
ce0295e97e952a85d365ca023104300f3135cb8d | 95 | py | Python | setup.py | Soobrakay/downloader | 937bdb5d4841f0d3140c0b2bc902724e6147b8d5 | [
"MIT"
] | null | null | null | setup.py | Soobrakay/downloader | 937bdb5d4841f0d3140c0b2bc902724e6147b8d5 | [
"MIT"
] | null | null | null | setup.py | Soobrakay/downloader | 937bdb5d4841f0d3140c0b2bc902724e6147b8d5 | [
"MIT"
] | null | null | null | """Required for ``pip install --editable .`` to work."""
import setuptools
setuptools.setup()
| 19 | 56 | 0.694737 |
4699d1a136afb7f81cb3bced40832f69654636ee | 7,812 | py | Python | Ground_truth_spiketrains.py | nielsleadholm/PolyNetwork_PyTools | 7a05c2fe004f27e6a9cba24a17f94a684bfd4f19 | [
"MIT"
] | null | null | null | Ground_truth_spiketrains.py | nielsleadholm/PolyNetwork_PyTools | 7a05c2fe004f27e6a9cba24a17f94a684bfd4f19 | [
"MIT"
] | null | null | null | Ground_truth_spiketrains.py | nielsleadholm/PolyNetwork_PyTools | 7a05c2fe004f27e6a9cba24a17f94a684bfd4f19 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
import math
import matplotlib.pyplot as plt
import matplotlib
#Generates ground-truth data that can be used to perform integration tests on the analysis code used in Polychrony Pytools, and the Matlab 'Russo algorithm'
#Inserts the activation of several hand-crafted assemblie... | 44.64 | 163 | 0.764721 |
ccc538896e26b3b304efbf693741c3c0e4f2eb0b | 13,335 | py | Python | airflow/providers/google/cloud/hooks/compute_ssh.py | jkugiya/airflow | 1dfbb8d2031cb8a3e95e4bf91aa478857c5c3a85 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-07-30T17:28:40.000Z | 2021-08-03T13:51:07.000Z | airflow/providers/google/cloud/hooks/compute_ssh.py | jkugiya/airflow | 1dfbb8d2031cb8a3e95e4bf91aa478857c5c3a85 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 6 | 2019-03-16T02:09:30.000Z | 2019-06-27T03:27:34.000Z | airflow/providers/google/cloud/hooks/compute_ssh.py | jkugiya/airflow | 1dfbb8d2031cb8a3e95e4bf91aa478857c5c3a85 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-05-05T07:36:36.000Z | 2021-11-10T17:32:39.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 u... | 41.030769 | 108 | 0.632546 |
35e0c7aba4aafdae8b98d4fa224d2851ffa86eaf | 11,747 | py | Python | convert/operations.py | Robust-Robots/onnx2pytorch | 147a6de5fe3648a409abc62b95f8866695112897 | [
"Apache-2.0"
] | null | null | null | convert/operations.py | Robust-Robots/onnx2pytorch | 147a6de5fe3648a409abc62b95f8866695112897 | [
"Apache-2.0"
] | null | null | null | convert/operations.py | Robust-Robots/onnx2pytorch | 147a6de5fe3648a409abc62b95f8866695112897 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from functools import partial
import numpy as np
import onnx
import torch
from torch import nn
from torch.nn import functional as F
from onnx import numpy_helper
from torch.nn.modules.linear import Identity
from onnx2pytorch.convert.attribute import extract_attributes
from onnx2pyt... | 39.552189 | 86 | 0.583979 |
2e4328008ad9e2b0e6738943243f60d07dae6baf | 18,049 | py | Python | scripts/modules.py | wijnandb/CodeCult-Scratch | 9bbbfd3b4b2f147bfac75cb1b704f08c63a11969 | [
"Apache-2.0"
] | null | null | null | scripts/modules.py | wijnandb/CodeCult-Scratch | 9bbbfd3b4b2f147bfac75cb1b704f08c63a11969 | [
"Apache-2.0"
] | null | null | null | scripts/modules.py | wijnandb/CodeCult-Scratch | 9bbbfd3b4b2f147bfac75cb1b704f08c63a11969 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2014 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 by... | 40.378076 | 80 | 0.667461 |
75080a84fa882514bfba597e48e40b14ace97610 | 5,042 | py | Python | pytype/pyi/types.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | 3,882 | 2015-03-22T12:17:15.000Z | 2022-03-31T17:13:20.000Z | pytype/pyi/types.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | 638 | 2015-11-03T06:34:44.000Z | 2022-03-31T23:41:48.000Z | pytype/pyi/types.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | 301 | 2015-08-14T10:21:17.000Z | 2022-03-08T11:03:40.000Z | """Common datatypes and pytd utilities."""
import dataclasses
from typing import Any, Tuple
from pytype import utils
from pytype.pytd import pytd
from pytype.pytd.codegen import pytdgen
from pytype.pytd.parse import node as pytd_node
from typed_ast import ast3
_STRING_TYPES = ("str", "bytes", "unicode")
class Pa... | 25.989691 | 79 | 0.645775 |
93a43d96470bb596ecf785aa8baaa96df4ead2c2 | 317 | py | Python | tests/test_skeleton.py | Metatab/psurl | d906e2a0ef85c822c903ebbe2c517b5b71f4800d | [
"MIT"
] | null | null | null | tests/test_skeleton.py | Metatab/psurl | d906e2a0ef85c822c903ebbe2c517b5b71f4800d | [
"MIT"
] | null | null | null | tests/test_skeleton.py | Metatab/psurl | d906e2a0ef85c822c903ebbe2c517b5b71f4800d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from psurl.skeleton import fib
__author__ = "Eric Busboom"
__copyright__ = "Eric Busboom"
__license__ = "mit"
def test_fib():
assert fib(1) == 1
assert fib(2) == 1
assert fib(7) == 13
with pytest.raises(AssertionError):
fib(-10)
| 17.611111 | 39 | 0.637224 |
c606ca4ddaf30a025a6a2e68981cefd831c41687 | 28,650 | py | Python | opencga-app/app/cloud/docker/opencga-init/test/test_override_yaml.py | j-coll/opencga | 5afbf9d7d958df71a3219144b851fdb73f02d50d | [
"Apache-2.0"
] | null | null | null | opencga-app/app/cloud/docker/opencga-init/test/test_override_yaml.py | j-coll/opencga | 5afbf9d7d958df71a3219144b851fdb73f02d50d | [
"Apache-2.0"
] | null | null | null | opencga-app/app/cloud/docker/opencga-init/test/test_override_yaml.py | j-coll/opencga | 5afbf9d7d958df71a3219144b851fdb73f02d50d | [
"Apache-2.0"
] | null | null | null | import subprocess
from shutil import copyfile
import unittest
import yaml
from io import StringIO
import sys
import os
os.chdir(sys.path[0])
class Test_init_script(unittest.TestCase):
def setUp(self):
if "OPENCGA_CONFIG_DIR" in os.environ:
config_dir = os.environ["OPENCGA_CONFIG_DIR"]
... | 39.139344 | 134 | 0.496161 |
1a06f6d1584c9f7ccc478d11c9a20a659e08766d | 458 | py | Python | ros/build/dbw_mkz_msgs/catkin_generated/pkg.installspace.context.pc.py | naubergois/selfdrivingcarscapstone | 87b076489e3d6167477fe83fbfa249de997ffd36 | [
"MIT"
] | 3 | 2020-10-05T17:17:20.000Z | 2020-10-19T02:10:22.000Z | ros/build/dbw_mkz_msgs/catkin_generated/pkg.installspace.context.pc.py | naubergois/selfdrivingcarscapstone | 87b076489e3d6167477fe83fbfa249de997ffd36 | [
"MIT"
] | null | null | null | ros/build/dbw_mkz_msgs/catkin_generated/pkg.installspace.context.pc.py | naubergois/selfdrivingcarscapstone | 87b076489e3d6167477fe83fbfa249de997ffd36 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "${prefix}/include".split(';') if "${prefix}/include" != "" else []
PROJECT_CATKIN_DEPENDS = "message_runtime;std_msgs;geometry_msgs".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') i... | 50.888889 | 101 | 0.733624 |
065e432f4fa20271d1a6024ca8e3aa928264a65a | 16,611 | py | Python | fastai_transformers_utils/generated_lm.py | cwza/fastai_transformers_utils | 31d90aa788cee1f870f66fae77cba741c3f8c162 | [
"Apache-2.0"
] | 1 | 2020-03-11T11:38:48.000Z | 2020-03-11T11:38:48.000Z | fastai_transformers_utils/generated_lm.py | cwza/fastai_transformers_utils | 31d90aa788cee1f870f66fae77cba741c3f8c162 | [
"Apache-2.0"
] | 1 | 2022-02-26T06:22:26.000Z | 2022-02-26T06:22:26.000Z | fastai_transformers_utils/generated_lm.py | cwza/fastai_transformers_utils | 31d90aa788cee1f870f66fae77cba741c3f8c162 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/05_GeneratedLM.ipynb (unless otherwise specified).
__all__ = ['GeneratedLM', 'GenerateArgs', 'generate']
# Cell
#export
from typing import *
from dataclasses import asdict
import torch
import torch.nn as nn
from fastai2.basics import *
from fastcore.test import *
from... | 40.514634 | 210 | 0.62278 |
cafbf738c93f4b239194f41113369b2739cb1dc8 | 3,293 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_paged_models.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_paged_models.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-04T18:12:16.000Z | 2019-06-04T18:12:16.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_paged_models.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.408602 | 158 | 0.627999 |
27ea567d4db4a80e5192e4256f0598532aff34e2 | 750 | py | Python | 0350_Intersection_of_Two_Arrays_II.py | coldmanck/leetcode-python | f644b8a0711c96f312326b4d025e9be3340fec42 | [
"MIT"
] | 4 | 2021-01-11T09:53:58.000Z | 2022-01-18T13:11:54.000Z | 0350_Intersection_of_Two_Arrays_II.py | coldmanck/leetcode-python | f644b8a0711c96f312326b4d025e9be3340fec42 | [
"MIT"
] | null | null | null | 0350_Intersection_of_Two_Arrays_II.py | coldmanck/leetcode-python | f644b8a0711c96f312326b4d025e9be3340fec42 | [
"MIT"
] | 2 | 2020-04-13T13:55:48.000Z | 2020-08-25T16:16:11.000Z | # Runtime: 44 ms, faster than 81.14% of Python3 online submissions for Intersection of Two Arrays II.
# Memory Usage: 13.1 MB, less than 88.57% of Python3 online submissions for Intersection of Two Arrays II.
from collections import defaultdict, Counter
class Solution:
def intersect(self, nums1: List[int], nums2: ... | 39.473684 | 106 | 0.568 |
10e735232eb313644f50a322217b68cf7edd68fd | 4,555 | py | Python | data_linter_utils.py | justincohler/data-linter | ef62043ae1a2022d48b3c1e83171cfd500a11524 | [
"Apache-2.0"
] | 82 | 2017-12-01T21:59:10.000Z | 2021-12-12T20:57:51.000Z | data_linter_utils.py | justincohler/data-linter | ef62043ae1a2022d48b3c1e83171cfd500a11524 | [
"Apache-2.0"
] | null | null | null | data_linter_utils.py | justincohler/data-linter | ef62043ae1a2022d48b3c1e83171cfd500a11524 | [
"Apache-2.0"
] | 10 | 2017-12-08T21:04:43.000Z | 2021-05-14T07:52:51.000Z | # Copyright 2017 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 by applicable law or a... | 31.19863 | 80 | 0.714819 |
09420beb2fdc2b86cb8389d83e7b63bb7d5a9deb | 571 | py | Python | tests/test_buffer_compat.py | Infinidat/infi.instruct | 69dfd8a35d17f8687581e838ea13e7554f7e5034 | [
"BSD-3-Clause"
] | 2 | 2015-01-12T21:16:06.000Z | 2019-12-12T05:59:56.000Z | tests/test_buffer_compat.py | Infinidat/infi.instruct | 69dfd8a35d17f8687581e838ea13e7554f7e5034 | [
"BSD-3-Clause"
] | 4 | 2015-02-24T09:18:00.000Z | 2021-06-16T12:55:19.000Z | tests/test_buffer_compat.py | Infinidat/infi.instruct | 69dfd8a35d17f8687581e838ea13e7554f7e5034 | [
"BSD-3-Clause"
] | 4 | 2015-01-07T12:37:54.000Z | 2018-02-08T15:07:17.000Z | import unittest
from infi.instruct.buffer.compat import buffer_to_struct_adapter
from infi.instruct.buffer import Buffer, int_field, bytes_ref
class CompatTestCase(unittest.TestCase):
def test_buffer_to_struct_adapter__create_from_string(self):
class MyBuffer(Buffer):
a = int_field(where=bytes... | 35.6875 | 69 | 0.714536 |
970661fa9c808944ad0fca5506a9540cb9d9d495 | 11,112 | py | Python | Code/AMLNotebooks/scripts/pipeline_library.py | KaHenrik/microsoft-Azure-Synapse-Customer-Insights-Customer360-Solution-Accelerator | 90e17e7b0b8cf85f8818dbfee15beddbe30eaee3 | [
"MIT"
] | 8 | 2021-11-04T14:51:31.000Z | 2022-03-17T02:35:05.000Z | Code/AMLNotebooks/scripts/pipeline_library.py | KaHenrik/microsoft-Azure-Synapse-Customer-Insights-Customer360-Solution-Accelerator | 90e17e7b0b8cf85f8818dbfee15beddbe30eaee3 | [
"MIT"
] | 1 | 2022-02-07T08:40:08.000Z | 2022-02-07T08:40:08.000Z | Code/AMLNotebooks/scripts/pipeline_library.py | KaHenrik/microsoft-Azure-Synapse-Customer-Insights-Customer360-Solution-Accelerator | 90e17e7b0b8cf85f8818dbfee15beddbe30eaee3 | [
"MIT"
] | 6 | 2022-01-13T18:49:57.000Z | 2022-03-17T02:35:07.000Z | # +
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license.
import argparse
import os
import tempfile
from azureml.core import Dataset, Run, Datastore
import pandas as pd
import numpy as np
import sys
import joblib
from azureml.core.model import Model
from azureml.core import Workspace
from s... | 50.280543 | 185 | 0.707073 |
ba2ce05bfeabc083644553c08b0be91b686c38c2 | 17,577 | py | Python | hc/accounts/views.py | berez23/healthchecks | ae55a960322cb61ea69d2478b52e260ba3e1651f | [
"BSD-3-Clause"
] | 2 | 2020-07-20T18:27:22.000Z | 2020-08-14T01:58:30.000Z | hc/accounts/views.py | berez23/healthchecks | ae55a960322cb61ea69d2478b52e260ba3e1651f | [
"BSD-3-Clause"
] | null | null | null | hc/accounts/views.py | berez23/healthchecks | ae55a960322cb61ea69d2478b52e260ba3e1651f | [
"BSD-3-Clause"
] | 1 | 2022-01-28T10:43:26.000Z | 2022-01-28T10:43:26.000Z | from datetime import timedelta as td
from urllib.parse import urlparse
import uuid
from django.db import transaction
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import login as auth_login
from django.contrib.auth import logout as auth_logout
from django.contrib.auth im... | 32.192308 | 83 | 0.625704 |
590d2e3dccc5897abbd119b24cbc0af54031ce34 | 4,899 | py | Python | ProjectApplication/comments/migrations/0020_proposalevaluationattachment_proposalevaluationattachmentcategory_proposalevaluationcomment_proposal.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-07-29T10:00:11.000Z | 2022-02-19T11:00:34.000Z | ProjectApplication/comments/migrations/0020_proposalevaluationattachment_proposalevaluationattachmentcategory_proposalevaluationcomment_proposal.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 471 | 2019-09-20T14:37:28.000Z | 2022-03-25T14:16:34.000Z | ProjectApplication/comments/migrations/0020_proposalevaluationattachment_proposalevaluationattachmentcategory_proposalevaluationcomment_proposal.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-03-15T12:42:47.000Z | 2022-02-15T18:06:52.000Z | # Generated by Django 3.0.3 on 2020-03-04 12:46
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import storages.backends.s3boto3
class Migration(migrations.Migration):
dependencies = [
('evaluation', '0010_file_name_processed_on_save'),
... | 65.32 | 269 | 0.66238 |
3e086fe4868e7f3a5ba73090a570490dcd1cf466 | 770 | py | Python | setup.py | clearcare/django-rest-framework-drilldown | 7e95c430adb902c673e9ca2a6f398635cce20601 | [
"MIT"
] | 13 | 2015-08-28T08:45:25.000Z | 2020-01-06T16:12:17.000Z | setup.py | clearcare/django-rest-framework-drilldown | 7e95c430adb902c673e9ca2a6f398635cce20601 | [
"MIT"
] | 1 | 2018-01-03T15:18:37.000Z | 2018-01-03T17:13:13.000Z | setup.py | clearcare/django-rest-framework-drilldown | 7e95c430adb902c673e9ca2a6f398635cce20601 | [
"MIT"
] | 2 | 2015-09-29T09:04:48.000Z | 2016-03-22T22:57:21.000Z | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='djangorestframework-drilldown',
version='0.1.1',
url='htt... | 35 | 137 | 0.732468 |
2e2434bf18262d4f0431af82fc7ddab213ebd443 | 11,746 | py | Python | bin/beta_lactamase_ncbi.py | PingPongPaladin/viral-mutation | 75973912239109a1bc5b939e3737c1ef1d449515 | [
"MIT"
] | null | null | null | bin/beta_lactamase_ncbi.py | PingPongPaladin/viral-mutation | 75973912239109a1bc5b939e3737c1ef1d449515 | [
"MIT"
] | null | null | null | bin/beta_lactamase_ncbi.py | PingPongPaladin/viral-mutation | 75973912239109a1bc5b939e3737c1ef1d449515 | [
"MIT"
] | null | null | null | from mutation import *
np.random.seed(1)
random.seed(1)
def parse_args():
import argparse
parser = argparse.ArgumentParser(description='Beta-Lactamase sequence analysis')
parser.add_argument('model_name', type=str,
help='Type of language model (e.g., hmm, lstm)')
parser.add_arg... | 36.141538 | 104 | 0.570066 |
2fc6108102b1ea5fae072e3340420f018583ec0d | 753 | py | Python | demo/bert/test_tf_bert.py | yuanzexi/Forward | 7dac71842853a2da581819c34c026b19364c944a | [
"BSD-3-Clause"
] | null | null | null | demo/bert/test_tf_bert.py | yuanzexi/Forward | 7dac71842853a2da581819c34c026b19364c944a | [
"BSD-3-Clause"
] | null | null | null | demo/bert/test_tf_bert.py | yuanzexi/Forward | 7dac71842853a2da581819c34c026b19364c944a | [
"BSD-3-Clause"
] | 1 | 2021-07-23T04:27:22.000Z | 2021-07-23T04:27:22.000Z | import forward
import numpy as np
# 1. Build Engine
model_path='frozen_bert.pb'
engine_path='bert.engine'
batch_size = 16
seq_len = 128
infer_mode = 'float32'
builder = forward.TfBuilder()
dummy_input = {"input_ids" : np.ones([batch_size , seq_len], dtype='int32'),
"input_mask" : np.ones([batch_size , ... | 25.1 | 78 | 0.706507 |
39fb603500cee5e684e749f5e5e3319632d37c13 | 968 | py | Python | lighthouse.py | abhishekm47/python-lighthouse | 245b2a27adb53f2bdb880c64c8dee87f44cda6da | [
"MIT"
] | 1 | 2020-12-10T08:39:29.000Z | 2020-12-10T08:39:29.000Z | lighthouse.py | abhishekm47/python-lighthouse | 245b2a27adb53f2bdb880c64c8dee87f44cda6da | [
"MIT"
] | null | null | null | lighthouse.py | abhishekm47/python-lighthouse | 245b2a27adb53f2bdb880c64c8dee87f44cda6da | [
"MIT"
] | null | null | null |
# importing the requests library
import requests
import json
import sys
import os
from dotenv import load_dotenv
load_dotenv()
from urllib_parse_urlencode import set_query_parameter
API_KEY=os.getenv("API_KEY")
HTTP_request = "https://www.googleapis.com/pagespeedonline/v5/runPagespeed"
def lighthouse_seo(test_url... | 27.657143 | 78 | 0.69938 |
e7b21577ce48f28d54c20b796c449a0e79f06f46 | 7,572 | py | Python | maskrcnn_benchmark/modeling/rrpn/loss.py | clw5180/remote_sensing_object_detection_2019 | 7b348cc237238397798b41e536e212d2471d6da9 | [
"MIT"
] | 62 | 2019-08-23T02:01:22.000Z | 2021-12-19T03:35:49.000Z | model/maskrcnn_benchmark_architecture/maskrcnn_benchmark/modeling/rrpn/loss.py | dun933/FudanOCR | fd79b679044ea23fd9eb30691453ed0805d2e98b | [
"MIT"
] | 33 | 2020-12-10T19:15:39.000Z | 2022-03-12T00:17:30.000Z | model/maskrcnn_benchmark_architecture/maskrcnn_benchmark/modeling/rrpn/loss.py | dun933/FudanOCR | fd79b679044ea23fd9eb30691453ed0805d2e98b | [
"MIT"
] | 21 | 2019-08-23T02:21:59.000Z | 2022-02-13T04:08:26.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""
This file contains specific functions for computing losses on the RPN
file
"""
import torch
from torch.nn import functional as F
import numpy as np
from ..balanced_positive_negative_sampler import BalancedPositiveNegativeSampler
from... | 43.268571 | 143 | 0.661912 |
2f3112a19576ba247ed9d816b6dfc2ad2caf03bc | 1,050 | py | Python | setup.py | marcy-terui/kflog | bddd8231d7f80a99b547ddbb67cc2c749c6f8581 | [
"MIT"
] | 9 | 2017-09-13T07:04:31.000Z | 2021-09-14T15:03:47.000Z | setup.py | pattem86/kflogs | bddd8231d7f80a99b547ddbb67cc2c749c6f8581 | [
"MIT"
] | null | null | null | setup.py | pattem86/kflogs | bddd8231d7f80a99b547ddbb67cc2c749c6f8581 | [
"MIT"
] | 4 | 2018-03-15T13:33:15.000Z | 2020-02-19T22:49:42.000Z | #!/usr/bin/env python
import os
import kflogs
from setuptools import setup, find_packages
description = 'Amazon Kinesis Firehose logging handler and utilities'
long_description = description
if os.path.exists('README.txt'):
long_description = open('README.txt').read()
setup_options = dict(
name='kflogs',
... | 27.631579 | 69 | 0.668571 |
86cebd9c3164fab295fc0b14a9566db49b3ed2cf | 1,759 | py | Python | krogon_gocd/either.py | enamrik/krogon-gocd | fa4d836691f8fb4882c3385ec1fd41c2cb9a98f2 | [
"MIT"
] | null | null | null | krogon_gocd/either.py | enamrik/krogon-gocd | fa4d836691f8fb4882c3385ec1fd41c2cb9a98f2 | [
"MIT"
] | null | null | null | krogon_gocd/either.py | enamrik/krogon-gocd | fa4d836691f8fb4882c3385ec1fd41c2cb9a98f2 | [
"MIT"
] | null | null | null | from typing import Callable, TypeVar, Tuple, Union
A = TypeVar('A')
Ap = TypeVar('Ap')
E = TypeVar('E')
Ep = TypeVar('Ep')
Either = Union[Tuple['success', A], Tuple['failure', E]]
def success(value=None):
return "success", value
def failure(error):
return "failure", error
def on(either: Either[A, E], di... | 29.316667 | 100 | 0.62365 |
df856bd5453c2b8eda2a507ec008bd0cbfb51fd0 | 172 | py | Python | DiRT AI/DiRT NeuralNetworks/functions/settings.py | gustasvs/AI | 23360a8865e8211568594c2b2ced11dcdc9b0006 | [
"MIT"
] | 1 | 2022-02-03T18:21:28.000Z | 2022-02-03T18:21:28.000Z | DiRT AI/DiRT NeuralNetworks/functions/settings.py | gustasvs/AI | 23360a8865e8211568594c2b2ced11dcdc9b0006 | [
"MIT"
] | null | null | null | DiRT AI/DiRT NeuralNetworks/functions/settings.py | gustasvs/AI | 23360a8865e8211568594c2b2ced11dcdc9b0006 | [
"MIT"
] | null | null | null | ekplat = 1024
ekgar = 768
resize_dala = 6
buttons = 7
file_name = 'RALLYCROSS_hellnorway' #bigger_model
t1 = 'sweden_hamra'
t2 = 'wales_bronfelen'
t3 = 'finland_kakaristo'
| 19.111111 | 49 | 0.755814 |
6317a003d1efe1de2cfa1ba11dde799dc4f63d17 | 178 | py | Python | atcoder/corp/yahoo2019_b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | atcoder/corp/yahoo2019_b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | atcoder/corp/yahoo2019_b.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | deg = [0] * 4
for _ in range(3):
a, b = map(int, input().split())
deg[a - 1] += 1
deg[b - 1] += 1
if all(x <= 2 for x in deg):
print("YES")
else:
print("NO")
| 17.8 | 36 | 0.460674 |
2524e19fbdd149c1a10707a64d58a892373c9806 | 25 | py | Python | tests/conftest.py | azg1966/myfreecams | c3a7de3dd409f2393a4fda15a3d4bc8a21fed2a8 | [
"WTFPL"
] | null | null | null | tests/conftest.py | azg1966/myfreecams | c3a7de3dd409f2393a4fda15a3d4bc8a21fed2a8 | [
"WTFPL"
] | null | null | null | tests/conftest.py | azg1966/myfreecams | c3a7de3dd409f2393a4fda15a3d4bc8a21fed2a8 | [
"WTFPL"
] | null | null | null | from server import server | 25 | 25 | 0.88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.