hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
343da5b91378057f161c004985b01334546ca671 | 1,797 | py | Python | tf_euler/python/mp_utils/base_graph.py | HuangLED/euler | a56b5fe3fe56123af062317ca0b4160ce3b3ace9 | [
"Apache-2.0"
] | 2,829 | 2019-01-12T09:16:03.000Z | 2022-03-29T14:00:58.000Z | tf_euler/python/mp_utils/base_graph.py | HuangLED/euler | a56b5fe3fe56123af062317ca0b4160ce3b3ace9 | [
"Apache-2.0"
] | 331 | 2019-01-17T21:07:49.000Z | 2022-03-30T06:38:17.000Z | tf_euler/python/mp_utils/base_graph.py | HuangLED/euler | a56b5fe3fe56123af062317ca0b4160ce3b3ace9 | [
"Apache-2.0"
] | 578 | 2019-01-16T10:48:53.000Z | 2022-03-21T13:41:34.000Z | # Copyright 2020 Alibaba Group Holding Limited. 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 ... | 37.4375 | 80 | 0.667223 | # Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 0 | 0 | 0 | 926 | 0 | 0 | 0 | -4 | 68 |
6207f84e420fd57cd794ff61f6fc13dfd92252c3 | 3,344 | py | Python | gloss_score/wordnet.py | gmichalo/LexSubCon | 7c5b3fec90520add2b032cb1277cab8e7bf0f07e | [
"Apache-2.0"
] | null | null | null | gloss_score/wordnet.py | gmichalo/LexSubCon | 7c5b3fec90520add2b032cb1277cab8e7bf0f07e | [
"Apache-2.0"
] | null | null | null | gloss_score/wordnet.py | gmichalo/LexSubCon | 7c5b3fec90520add2b032cb1277cab8e7bf0f07e | [
"Apache-2.0"
] | null | null | null |
import warnings
warnings.filterwarnings("ignore") | 35.574468 | 103 | 0.561304 | from nltk.corpus import wordnet as wn
from nltk.stem import WordNetLemmatizer
from nltk.corpus import wordnet
import re
import warnings
warnings.filterwarnings("ignore")
class Wordnet:
def __init__(self):
# Init the Wordnet Lemmatizer
self.lemmatizer = WordNetLemmatizer()
self.final = ... | 0 | 0 | 0 | 3,148 | 0 | 0 | 0 | 32 | 113 |
06a8701b13c1d5cf85841d0416e1e718cdcbef48 | 1,011 | py | Python | utils.py | cxy1997/DARENet | d69fd5f845a29e2ed0309d07dfe3b00de14d5f77 | [
"MIT"
] | null | null | null | utils.py | cxy1997/DARENet | d69fd5f845a29e2ed0309d07dfe3b00de14d5f77 | [
"MIT"
] | null | null | null | utils.py | cxy1997/DARENet | d69fd5f845a29e2ed0309d07dfe3b00de14d5f77 | [
"MIT"
] | null | null | null |
# Handle state dict from early PyTorch versions
| 26.605263 | 141 | 0.661721 | import os
from shutil import which
from collections import OrderedDict
def update_key(s):
for prefix in ["conv", "norm", "relu"]:
for suffix in ["1", "2"]:
s = s.replace(f"{prefix}.{suffix}", f"{prefix}{suffix}")
return s
# Handle state dict from early PyTorch versions
def update_state_d... | 0 | 0 | 0 | 0 | 0 | 772 | 0 | 5 | 180 |
a1d63c8f0379b72b214ab82cc9c559da34e5a030 | 99,894 | py | Python | Florence/VariationalPrinciple/FBasedDisplacementFormulation.py | romeric/florence | 6af96f2590adb776f74efc6fed96737a4edc4582 | [
"MIT"
] | 65 | 2017-08-04T10:21:13.000Z | 2022-02-21T21:45:09.000Z | Florence/VariationalPrinciple/FBasedDisplacementFormulation.py | romeric/florence | 6af96f2590adb776f74efc6fed96737a4edc4582 | [
"MIT"
] | 6 | 2018-06-03T02:29:20.000Z | 2022-01-18T02:30:22.000Z | Florence/VariationalPrinciple/FBasedDisplacementFormulation.py | romeric/florence | 6af96f2590adb776f74efc6fed96737a4edc4582 | [
"MIT"
] | 10 | 2018-05-30T09:44:10.000Z | 2021-05-18T08:06:51.000Z | import numpy as np
norm = np.linalg.norm
# from numba import jit
# np.set_printoptions(precision=16)
# @jit(nopython=True)
# svd = np.linalg.svd
svd = svd_rv
# delta = 1e-3
# def Jr(J):
# return 0.5 * (J + np.sqrt(J**2 + delta**2))
# def dJrdF(F):
# J = np.linalg.det(F)
# return 0.5 * (1. + J / np.sq... | 43.188067 | 4,359 | 0.459367 | import numpy as np
from numpy import einsum
import scipy as sp
from Florence.VariationalPrinciple import VariationalPrinciple
from Florence import QuadratureRule, FunctionSpace
from Florence.FiniteElements.LocalAssembly.KinematicMeasures import *
from Florence.FiniteElements.LocalAssembly._KinematicMeasures_ import _Ki... | 0 | 0 | 0 | 93,495 | 0 | 4,790 | 0 | 264 | 589 |
0f05372226d1764f70ed81666265ca0f3c66912a | 1,945 | py | Python | management/management_api/schemas/endpoints.py | poussa/inference-model-manager | 33e487be32b8487290a296daaf90529263a09801 | [
"Apache-2.0"
] | null | null | null | management/management_api/schemas/endpoints.py | poussa/inference-model-manager | 33e487be32b8487290a296daaf90529263a09801 | [
"Apache-2.0"
] | null | null | null | management/management_api/schemas/endpoints.py | poussa/inference-model-manager | 33e487be32b8487290a296daaf90529263a09801 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018 Intel 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... | 25.592105 | 77 | 0.624679 | #
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
edcf9ec0402c2635bc877f0f95e0e14da0b2813f | 1,182 | py | Python | import_tool/analysis/name_schemes/__init__.py | craig8196/topicalguide | 8d8a2add7ca5125d6571d66d82235e52be81613f | [
"PostgreSQL"
] | 12 | 2015-03-12T15:33:44.000Z | 2021-01-11T07:57:48.000Z | import_tool/analysis/name_schemes/__init__.py | craig8196/topicalguide | 8d8a2add7ca5125d6571d66d82235e52be81613f | [
"PostgreSQL"
] | 49 | 2015-02-05T12:14:28.000Z | 2016-06-14T22:35:32.000Z | import_tool/analysis/name_schemes/__init__.py | craig8196/topicalguide | 8d8a2add7ca5125d6571d66d82235e52be81613f | [
"PostgreSQL"
] | 11 | 2015-03-25T23:24:12.000Z | 2017-08-02T00:03:10.000Z |
# The Topical Guide
# Copyright 2010-2011 Brigham Young University
#
# This file is part of the Topical Guide <http://nlp.cs.byu.edu/topic_browser>.
#
# The Topical Guide is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by the
# Free Sof... | 43.777778 | 79 | 0.774112 |
# The Topical Guide
# Copyright 2010-2011 Brigham Young University
#
# This file is part of the Topical Guide <http://nlp.cs.byu.edu/topic_browser>.
#
# The Topical Guide is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by the
# Free Sof... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7faa874861f7e30519e25d400098cacdc1a80feb | 19,250 | py | Python | hn2016_falwa/oopinterface.py | veredsil/hn2016_falwa | 53035ac838860dd8a8d85619f16cc9785dee8655 | [
"MIT"
] | null | null | null | hn2016_falwa/oopinterface.py | veredsil/hn2016_falwa | 53035ac838860dd8a8d85619f16cc9785dee8655 | [
"MIT"
] | null | null | null | hn2016_falwa/oopinterface.py | veredsil/hn2016_falwa | 53035ac838860dd8a8d85619f16cc9785dee8655 | [
"MIT"
] | null | null | null | # This is the api for object oriented interface
import numpy as np
# The function assumes uniform field
def curl_2D(ufield, vfield, clat, dlambda, dphi, planet_radius=6.378e+6):
"""
Assuming regular latitude and longitude [in degree] grid, compute the curl
of velocity on a pressure level in spherical coo... | 37.968442 | 211 | 0.587013 | # This is the api for object oriented interface
import numpy as np
from math import pi
from scipy import interpolate
# The function assumes uniform field
def curl_2D(ufield, vfield, clat, dlambda, dphi, planet_radius=6.378e+6):
"""
Assuming regular latitude and longitude [in degree] grid, compute the curl
... | 0 | 0 | 0 | 14,099 | 0 | 3,844 | 0 | 6 | 112 |
c12f5425aad3eac2b7c38a1ff1c924d94308beb8 | 224 | py | Python | x.py | efe3535/pythonexamples | 676aeb5d730dc0fc364083fccbd8c241de5bdc0a | [
"CC0-1.0"
] | 1 | 2020-11-30T06:53:06.000Z | 2020-11-30T06:53:06.000Z | x.py | efeduino/pythonexamples | 676aeb5d730dc0fc364083fccbd8c241de5bdc0a | [
"CC0-1.0"
] | 2 | 2021-05-16T06:34:36.000Z | 2021-06-05T16:44:15.000Z | x.py | efeduino/pythonexamples | 676aeb5d730dc0fc364083fccbd8c241de5bdc0a | [
"CC0-1.0"
] | 1 | 2021-06-04T12:17:31.000Z | 2021-06-04T12:17:31.000Z | token = 'VdINGcwGZsIvUTbuZl3PRTvX2MhkdieXFk9cnNRA4J8hP-jw1obnY6KCfXpRJFTA'
import lyricsgenius
genius = lyricsgenius.Genius(token)
muzik = input("ark sz ara:")
song = genius.search_song(muzik)
print(song.lyrics) | 28 | 75 | 0.794643 | token = 'VdINGcwGZsIvUTbuZl3PRTvX2MhkdieXFk9cnNRA4J8hP-jw1obnY6KCfXpRJFTA'
import lyricsgenius
genius = lyricsgenius.Genius(token)
muzik = input("Şarkı sözü ara:")
song = genius.search_song(muzik)
print(song.lyrics) | 8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
172931b7a3ebfa7f2a1ac2027b66bb699d214442 | 113 | py | Python | bandmerge/__init__.py | lewyh/vphas-bandmerge-standalone | efbf797b51439f336cbcf0d64a65645b47a6fc49 | [
"MIT"
] | 1 | 2015-04-10T08:52:57.000Z | 2015-04-10T08:52:57.000Z | bandmerge/__init__.py | lewyh/vphas-bandmerge-standalone | efbf797b51439f336cbcf0d64a65645b47a6fc49 | [
"MIT"
] | null | null | null | bandmerge/__init__.py | lewyh/vphas-bandmerge-standalone | efbf797b51439f336cbcf0d64a65645b47a6fc49 | [
"MIT"
] | null | null | null | from pkg_resources import get_distribution
__version__ = get_distribution('vphas-bandmerge-standalone').version
| 28.25 | 68 | 0.858407 | from pkg_resources import get_distribution
__version__ = get_distribution('vphas-bandmerge-standalone').version
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46f87eddf2c2d50f6bf2edab0920f4e976ed7593 | 3,615 | py | Python | visualizations.py | aapeebles/mod3_project | 5a6babf4b59d0ee303d38d88253613b089460e4d | [
"MIT"
] | 1 | 2021-03-19T14:43:15.000Z | 2021-03-19T14:43:15.000Z | visualizations.py | AmmarAli118/mod3_project | 19922ab7a9f952ea14ae568284af1883fca14a27 | [
"MIT"
] | 2 | 2019-08-22T18:19:08.000Z | 2019-08-23T16:58:07.000Z | visualizations.py | AmmarAli118/mod3_project | 19922ab7a9f952ea14ae568284af1883fca14a27 | [
"MIT"
] | 11 | 2019-08-20T13:09:44.000Z | 2019-08-22T21:33:09.000Z | """
This module is for your final visualization code.
One visualization per hypothesis question is required.
A framework for each type of visualization is provided.
"""
import matplotlib.pyplot as plt
import seaborn as sns
# Set specific parameters for the visualizations
large = 22; med = 16; small = 12
params = {'ax... | 32.567568 | 111 | 0.698755 | """
This module is for your final visualization code.
One visualization per hypothesis question is required.
A framework for each type of visualization is provided.
"""
import matplotlib.pyplot as plt
import seaborn as sns
# Set specific parameters for the visualizations
large = 22; med = 16; small = 12
params = {'ax... | 0 | 0 | 0 | 0 | 0 | 90 | 0 | 0 | 69 |
9453a179a772164e6573e79860949370f455b65d | 21,238 | py | Python | magicwand-data-generator/magicwand/magicwand_components/mw_runner.py | gregpaton08/magicwand-datatool | c1352d8ea6da23a619a7107ab04dc3ff62212228 | [
"MIT"
] | 22 | 2020-11-30T18:27:55.000Z | 2022-03-02T12:13:29.000Z | magicwand-data-generator/magicwand/magicwand_components/mw_runner.py | gregpaton08/magicwand-datatool | c1352d8ea6da23a619a7107ab04dc3ff62212228 | [
"MIT"
] | 7 | 2020-11-30T18:34:10.000Z | 2021-02-11T13:52:49.000Z | magicwand-data-generator/magicwand/magicwand_components/mw_runner.py | gregpaton08/magicwand-datatool | c1352d8ea6da23a619a7107ab04dc3ff62212228 | [
"MIT"
] | 2 | 2021-01-26T20:25:22.000Z | 2021-05-30T07:32:31.000Z | """
Purpose:
This file contains the logic to run magicwand experiments.
Copyright:
This research was developed with funding from the Defense Advanced Research Projects
Agency (DARPA) under Contract #HR0011-16-C-0060. This document was cleared for
release under Distribution Statement A (Approved for Pub... | 32.927132 | 286 | 0.593417 | """
Purpose:
This file contains the logic to run magicwand experiments.
Copyright:
This research was developed with funding from the Defense Advanced Research Projects
Agency (DARPA) under Contract #HR0011-16-C-0060. This document was cleared for
release under Distribution Statement” A” (Approved for P... | 6 | 0 | 0 | 12,352 | 0 | 0 | 0 | 249 | 266 |
b25ed656a0ce41d4b6441305853882f3f7672fad | 9,279 | py | Python | code/decision.py | tkxiong/RoboND-Rover-Project | a6fddaf36e81ca32a570de7d08b20be884143c95 | [
"MIT"
] | null | null | null | code/decision.py | tkxiong/RoboND-Rover-Project | a6fddaf36e81ca32a570de7d08b20be884143c95 | [
"MIT"
] | null | null | null | code/decision.py | tkxiong/RoboND-Rover-Project | a6fddaf36e81ca32a570de7d08b20be884143c95 | [
"MIT"
] | null | null | null |
# List of states
# - forward
# - stop
# - recovery
# - steering_to_rock
# - slow_forward_to_rock
# - pick_up_rock
# Implemention of left wall following method
# This is where you can build a decision tree for determining throttle, brake and steer
# commands based on the output of the perception_step() function
| 40.519651 | 147 | 0.5423 | import numpy as np
# List of states
# - forward
# - stop
# - recovery
# - steering_to_rock
# - slow_forward_to_rock
# - pick_up_rock
# Implemention of left wall following method
# This is where you can build a decision tree for determining throttle, brake and steer
# commands based on the output of the perception_... | 0 | 0 | 0 | 0 | 0 | 8,920 | 0 | -3 | 44 |
80b17a8268e5553f7f35d9df249a6b0fa099b4e9 | 421 | py | Python | openapi_client/api/__init__.py | bcgov/namex-payment-api-py-client | e6e354eb0e70c4789a1ffb1553779ed8c91fd37c | [
"Apache-2.0"
] | null | null | null | openapi_client/api/__init__.py | bcgov/namex-payment-api-py-client | e6e354eb0e70c4789a1ffb1553779ed8c91fd37c | [
"Apache-2.0"
] | 6 | 2020-10-02T21:21:31.000Z | 2022-02-13T21:22:46.000Z | openapi_client/api/__init__.py | bcgov/namex-payment-api-py-client | e6e354eb0e70c4789a1ffb1553779ed8c91fd37c | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
# flake8: noqa
# import apis into api package
| 35.083333 | 63 | 0.871734 | from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from openapi_client.api.fees_api import FeesApi
from openapi_client.api.invoices_api import InvoicesApi
from openapi_client.api.payments_api import PaymentsApi
from openapi_client.api.receipts_api import ReceiptsApi
from openapi_clie... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 132 |
36c6b6af302541827b1d55eb5de6ae116e6858a3 | 21,731 | py | Python | mighty/trainer/trainer.py | dizcza/pytorch-mighty | 942c53b529377c9100bffc2f7f20ec740763e6ae | [
"BSD-3-Clause"
] | 1 | 2020-11-14T20:15:07.000Z | 2020-11-14T20:15:07.000Z | mighty/trainer/trainer.py | dizcza/pytorch-mighty | 942c53b529377c9100bffc2f7f20ec740763e6ae | [
"BSD-3-Clause"
] | null | null | null | mighty/trainer/trainer.py | dizcza/pytorch-mighty | 942c53b529377c9100bffc2f7f20ec740763e6ae | [
"BSD-3-Clause"
] | 2 | 2021-01-15T05:52:53.000Z | 2021-03-26T17:41:17.000Z |
import torch
import torch.nn as nn
__all__ = [
"Trainer"
]
| 34.658692 | 83 | 0.577102 | import subprocess
import sys
import time
import warnings
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Dict
import torch
import torch.nn as nn
import torch.utils.data
from tqdm import tqdm, trange
from mighty.loss import PairLossSampler, LossPenalty
from mighty.models import Autoenco... | 0 | 523 | 0 | 20,178 | 0 | 0 | 0 | 456 | 508 |
619f12a2b461d20fa7af890598c1e9792edb34f2 | 882 | py | Python | setup.py | EricFalkenberg/packson | 09687f72bcafeea0fba2a8554a674c6f4e661e2b | [
"MIT"
] | 5 | 2020-02-27T06:21:03.000Z | 2020-03-06T18:46:43.000Z | setup.py | EricFalkenberg/packson | 09687f72bcafeea0fba2a8554a674c6f4e661e2b | [
"MIT"
] | 3 | 2020-03-09T19:33:42.000Z | 2020-03-09T19:35:27.000Z | setup.py | EricFalkenberg/packson | 09687f72bcafeea0fba2a8554a674c6f4e661e2b | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name = 'packson',
packages = ['packson'],
version = '0.4.0',
license='MIT',
description = 'Easily bind JSON to user defined class instances.',
author = 'Eric Falkenberg',
author_email = 'ericsfalkenberg@gmail.com',
url = 'https://github.com/EricFalkenberg/packson'... | 36.75 | 83 | 0.655329 | from distutils.core import setup
setup(
name = 'packson',
packages = ['packson'],
version = '0.4.0',
license='MIT',
description = 'Easily bind JSON to user defined class instances.',
author = 'Eric Falkenberg',
author_email = 'ericsfalkenberg@gmail.com',
url = 'https://github.com/EricFalkenberg/packson'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f1739ac45cf10833306350a96a231d5cfe0f1809 | 8,048 | py | Python | bag8/project.py | peopledoc/bag8 | 6bd8a00ac258297b94eac6c71f4efe275c416203 | [
"MIT"
] | 4 | 2015-05-27T13:59:00.000Z | 2016-12-11T20:34:00.000Z | bag8/project.py | peopledoc/bag8 | 6bd8a00ac258297b94eac6c71f4efe275c416203 | [
"MIT"
] | 64 | 2015-04-27T08:33:14.000Z | 2016-07-15T13:33:11.000Z | bag8/project.py | peopledoc/bag8 | 6bd8a00ac258297b94eac6c71f4efe275c416203 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
| 33.256198 | 92 | 0.588593 | from __future__ import absolute_import, division, print_function
import os
import yaml
import click
from compose.cli.docker_client import docker_client
from compose.const import LABEL_PROJECT
from compose.project import Project as ComposeProject
from compose.project import sort_service_dicts
from compose.project imp... | 0 | 3,923 | 0 | 3,469 | 0 | 0 | 0 | 211 | 379 |
073934fa549a9716bda2b766393e5450064e1fbf | 2,410 | py | Python | run-celery-loaders-tests.py | jay-johnson/celery-loaders | aca8169c774582af42a377c27cb3980020080814 | [
"Apache-2.0"
] | 3 | 2018-02-25T04:27:38.000Z | 2019-07-19T14:23:10.000Z | run-celery-loaders-tests.py | jay-johnson/celery-loaders | aca8169c774582af42a377c27cb3980020080814 | [
"Apache-2.0"
] | null | null | null | run-celery-loaders-tests.py | jay-johnson/celery-loaders | aca8169c774582af42a377c27cb3980020080814 | [
"Apache-2.0"
] | 1 | 2019-07-19T14:23:11.000Z | 2019-07-19T14:23:11.000Z | #!/usr/bin/env python
import os
import datetime
from spylunking.log.setup_logging import build_colorized_logger
from celery_loaders.work_tasks.get_celery_app import get_celery_app
# Disable celery log hijacking
# https://github.com/celery/celery/issues/2509
name = "run-tests"
log = build_colorized_logger(name=name... | 25.368421 | 67 | 0.662241 | #!/usr/bin/env python
import os
import datetime
from celery import signals
from spylunking.log.setup_logging import build_colorized_logger
from celery_loaders.work_tasks.get_celery_app import get_celery_app
# Disable celery log hijacking
# https://github.com/celery/celery/issues/2509
@signals.setup_logging.connect
d... | 0 | 54 | 0 | 0 | 0 | 0 | 0 | 5 | 44 |
29db4efa3284c28b0c1c92cb49b166962360eb73 | 2,295 | py | Python | var_misuse/runall.py | nadiinchi/dynamic_embeddings | c99bd052a53f8176b119694b29f28de0cbdd36c9 | [
"MIT"
] | 2 | 2021-07-07T14:43:54.000Z | 2021-08-16T02:55:41.000Z | var_misuse/runall.py | nadiinchi/dynamic_embeddings | c99bd052a53f8176b119694b29f28de0cbdd36c9 | [
"MIT"
] | null | null | null | var_misuse/runall.py | nadiinchi/dynamic_embeddings | c99bd052a53f8176b119694b29f28de0cbdd36c9 | [
"MIT"
] | null | null | null | import argparse
import os
parser = argparse.ArgumentParser(description='Managing experiments')
parser.add_argument('--num_runs', type=int, default=1, metavar='MODEL', \
required=False, help='number of runs of each model')
parser.add_argument('--test', action='store_true',
he... | 51 | 420 | 0.64793 | import argparse
import os
import numpy as np
import pandas as pd
import datetime
import time
parser = argparse.ArgumentParser(description='Managing experiments')
parser.add_argument('--num_runs', type=int, default=1, metavar='MODEL', \
required=False, help='number of runs of each model')
parser.add... | 0 | 0 | 0 | 0 | 0 | 134 | 0 | -21 | 119 |
d69011b5b0e476555f3c1962dc871e1a1b516922 | 1,207 | py | Python | script/main.py | briglx/provision_analytics_workspaces | 652ab2d22cf636aee6743a3bbfc602b4d96ce2eb | [
"MIT"
] | null | null | null | script/main.py | briglx/provision_analytics_workspaces | 652ab2d22cf636aee6743a3bbfc602b4d96ce2eb | [
"MIT"
] | null | null | null | script/main.py | briglx/provision_analytics_workspaces | 652ab2d22cf636aee6743a3bbfc602b4d96ce2eb | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""Main script for provision analytics workspaces."""
import argparse
import logging
import os
import sys
from azure.storage.filedatalake import FileSystemClient
# pylint: disable=W0621
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
def create_directories(connection_string, file_syst... | 24.14 | 68 | 0.71831 | #!/usr/bin/python
"""Main script for provision analytics workspaces."""
import argparse
import logging
import os
import sys
from azure.storage.filedatalake import FileSystemClient
# pylint: disable=W0621
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
def create_directories(connection_string, file_syst... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de977bc54c061f58feb6d1140415fe33a12d4f35 | 1,542 | py | Python | examples/demo.py | scout-cool/Bubbletea | f0312d6f1c7fde4098d500e811f0503796973d07 | [
"Apache-2.0"
] | 10 | 2021-08-29T14:58:09.000Z | 2022-02-07T21:03:07.000Z | examples/demo.py | scout-cool/Bubbletea | f0312d6f1c7fde4098d500e811f0503796973d07 | [
"Apache-2.0"
] | null | null | null | examples/demo.py | scout-cool/Bubbletea | f0312d6f1c7fde4098d500e811f0503796973d07 | [
"Apache-2.0"
] | null | null | null | import streamlit as st
from streamlit.errors import StreamlitAPIException
import bubbletea
import os
from dotenv import load_dotenv
load_dotenv()
try:
st.set_page_config(page_title='bubbletea Demos', page_icon=':coin:', layout='wide', initial_sidebar_state='collapsed')
except StreamlitAPIException:
pass
file... | 27.052632 | 122 | 0.661479 | import streamlit as st
from streamlit.errors import StreamlitAPIException
import bubbletea
import os
from dotenv import load_dotenv
load_dotenv()
try:
st.set_page_config(page_title='bubbletea Demos', page_icon=':coin:', layout='wide', initial_sidebar_state='collapsed')
except StreamlitAPIException:
pass
file... | 4 | 0 | 0 | 0 | 0 | 101 | 0 | 0 | 23 |
4af0add0fe69a83ac5ec6923adcbdc422143ba80 | 87 | py | Python | kailearn/numpy_examples/numpy_dprod.py | caelanhadley/NNFSIP | da048af5ded549db7464b206b255104900b40ab8 | [
"MIT"
] | null | null | null | kailearn/numpy_examples/numpy_dprod.py | caelanhadley/NNFSIP | da048af5ded549db7464b206b255104900b40ab8 | [
"MIT"
] | null | null | null | kailearn/numpy_examples/numpy_dprod.py | caelanhadley/NNFSIP | da048af5ded549db7464b206b255104900b40ab8 | [
"MIT"
] | null | null | null | import numpy as np
a = [1,2,3]
b = [2,3,4]
dot_product = np.dot(a,b)
print(dot_product) | 17.4 | 25 | 0.655172 | import numpy as np
a = [1,2,3]
b = [2,3,4]
dot_product = np.dot(a,b)
print(dot_product) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
134800df01f0cd73d8f40c6388ecc3c8530fc27e | 604 | py | Python | 08-recursion-dp/8.5-recursiveMultiply.py | harrisonlingren/ctci-solutions | 75e162c1df695ffda645837a45d9f16e8363ff1b | [
"MIT"
] | null | null | null | 08-recursion-dp/8.5-recursiveMultiply.py | harrisonlingren/ctci-solutions | 75e162c1df695ffda645837a45d9f16e8363ff1b | [
"MIT"
] | null | null | null | 08-recursion-dp/8.5-recursiveMultiply.py | harrisonlingren/ctci-solutions | 75e162c1df695ffda645837a45d9f16e8363ff1b | [
"MIT"
] | null | null | null |
testnum1 = int(input('number 1: '))
testnum2 = int(input('number 2: '))
print(recursiveMultiply(testnum1, testnum2))
| 25.166667 | 85 | 0.524834 | def recursiveMultiply(num1, num2):
def doMultiply(n1, n2, last):
print(n1, n2)
if n2 == 1:
return n1
# TODO: does not work for odd quotients
if n2 % 2 != 0:
n2 -= 1
#n1 += n2
key = '%s, %s' % (n1, n2)
if key not in last:
... | 0 | 0 | 0 | 0 | 0 | 461 | 0 | 0 | 22 |
be8ef343ffcc7c728466722b1d8b65b322093213 | 67,170 | py | Python | lib/tool_shed/util/shed_util_common.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | lib/tool_shed/util/shed_util_common.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | lib/tool_shed/util/shed_util_common.py | blankenberg/galaxy-data-resource | ca32a1aafd64948f489a4e5cf88096f32391b1d9 | [
"CC-BY-3.0"
] | null | null | null | import json
import logging
import os
import re
import shutil
import string
import sqlalchemy.orm.exc
from galaxy import util
from galaxy.web import url_for
from galaxy.datatypes import checkers
from galaxy.model.orm import and_
from galaxy.model.orm import or_
from tool_shed.util import basic_util
from tool_shed.util... | 59.38992 | 151 | 0.637413 | import json
import logging
import os
import re
import shutil
import string
import sqlalchemy.orm.exc
from galaxy import util
from galaxy.web import url_for
from galaxy.datatypes import checkers
from galaxy.model.orm import and_
from galaxy.model.orm import or_
from tool_shed.util import basic_util
from tool_shed.util... | 0 | 0 | 0 | 0 | 0 | 6,224 | 0 | 0 | 184 |
a8ae140a75c802d11b2430c5a4319be7ebae3af4 | 3,162 | py | Python | mycv/camera_push.py | byscut/exercise | 6a30f8bcc5211a4af503d07fc3de322b8505ccda | [
"WTFPL"
] | null | null | null | mycv/camera_push.py | byscut/exercise | 6a30f8bcc5211a4af503d07fc3de322b8505ccda | [
"WTFPL"
] | null | null | null | mycv/camera_push.py | byscut/exercise | 6a30f8bcc5211a4af503d07fc3de322b8505ccda | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2022/3/7 5:12
# @File : stream_push.py
# @author : Akaya
# @Software: PyCharm
# stream_push : SIGABRT error
import cv2 as cv
import multiprocessing
import platform
if __name__ == '__main__':
#
cap = None
if platform.system() == 'Linux': ... | 31.306931 | 83 | 0.538267 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2022/3/7 5:12 下午
# @File : stream_push.py
# @author : Akaya
# @Software: PyCharm
# stream_push : SIGABRT error
import cv2 as cv
import time
import subprocess as sp
import multiprocessing
import platform
import psutil
class stream_pusher(object):
de... | 1,170 | 0 | 0 | 1,667 | 0 | 0 | 0 | -16 | 89 |
665c57ade9684e61b7901a40b1aad304432a6831 | 10,197 | py | Python | ironic_inspector/main.py | mail2nsrajesh/ironic-inspector | 7fa31ac6be2c1a03a0b2303b01e363cab14794a5 | [
"Apache-2.0"
] | null | null | null | ironic_inspector/main.py | mail2nsrajesh/ironic-inspector | 7fa31ac6be2c1a03a0b2303b01e363cab14794a5 | [
"Apache-2.0"
] | null | null | null | ironic_inspector/main.py | mail2nsrajesh/ironic-inspector | 7fa31ac6be2c1a03a0b2303b01e363cab14794a5 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 31.375385 | 78 | 0.638129 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 0 | 6,425 | 0 | 0 | 0 | 1,206 | 0 | 143 | 777 |
2651a81ef009bbf2f1add8a6ec4ff129cb279878 | 924 | py | Python | advanced_algs/get_longest_increasing_subsequence/get_longest_increasing_subsequence.py | angelusualle/algorithms | 86286a49db2a755bc57330cb455bcbd8241ea6be | [
"Apache-2.0"
] | null | null | null | advanced_algs/get_longest_increasing_subsequence/get_longest_increasing_subsequence.py | angelusualle/algorithms | 86286a49db2a755bc57330cb455bcbd8241ea6be | [
"Apache-2.0"
] | null | null | null | advanced_algs/get_longest_increasing_subsequence/get_longest_increasing_subsequence.py | angelusualle/algorithms | 86286a49db2a755bc57330cb455bcbd8241ea6be | [
"Apache-2.0"
] | null | null | null | # O(n^2) overall | 28.875 | 50 | 0.501082 | # O(n^2) overall
def get_longest_increasing_subsequence(nums):
l = len(nums)
# reverse adjacency list O(n^2)
reverse_adjacency = {i:set() for i in range(l)}
for i,n in enumerate(nums):
for j,e in enumerate(nums[i+1:], i +1):
if n < e:
reverse_adjacency[j].add(i)
# dynam... | 0 | 0 | 0 | 0 | 0 | 886 | 0 | 0 | 22 |
28538112ab20aec6139916251e830837548a335d | 4,076 | py | Python | Assignment 2/data_splitter.py | anishvaidya/CSCI-544---Applied-Natural-Language-Processing | c2a96f25d99e9dc664f6b4e81a12acb5e43a7d36 | [
"MIT"
] | 1 | 2020-05-10T04:08:20.000Z | 2020-05-10T04:08:20.000Z | Assignment 2/data_splitter.py | anishvaidya/CSCI-544---Applied-Natural-Language-Processing | c2a96f25d99e9dc664f6b4e81a12acb5e43a7d36 | [
"MIT"
] | null | null | null | Assignment 2/data_splitter.py | anishvaidya/CSCI-544---Applied-Natural-Language-Processing | c2a96f25d99e9dc664f6b4e81a12acb5e43a7d36 | [
"MIT"
] | null | null | null | import shutil
import glob
import os
k = 4
os.chdir("all")
all_files = glob.glob("*.csv")
# random.shuffle(all_files)
# test_files = random.sample(all_files, len(all_files)//k)
# train_files = list(set(all_files) - set(test_files))
os.chdir("..")
test_files = ['0914.csv', '0480.csv', '0362.csv', '0140.cs... | 119.882353 | 3,243 | 0.598381 | import random
import sys
import shutil
import glob
import os
import subprocess
k = 4
os.chdir("all")
all_files = glob.glob("*.csv")
# random.shuffle(all_files)
# test_files = random.sample(all_files, len(all_files)//k)
# train_files = list(set(all_files) - set(test_files))
os.chdir("..")
test_files =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -23 | 69 |
97dec73ab4f83264ac0caac7d77af15ee90d5adc | 3,301 | py | Python | spnet/multi_gpu.py | drscotthawley/SPNet | 94f1195c91e2373bee1f36bc7d834c4e07388369 | [
"MIT"
] | 1 | 2021-02-02T16:06:23.000Z | 2021-02-02T16:06:23.000Z | spnet/multi_gpu.py | drscotthawley/SPNet | 94f1195c91e2373bee1f36bc7d834c4e07388369 | [
"MIT"
] | 8 | 2021-01-25T15:53:26.000Z | 2022-03-12T00:54:07.000Z | spnet/multi_gpu.py | drscotthawley/SPNet | 94f1195c91e2373bee1f36bc7d834c4e07388369 | [
"MIT"
] | 1 | 2022-02-03T10:35:21.000Z | 2022-02-03T10:35:21.000Z |
# Originally from https://github.com/kuza55/keras-extras/blob/master/utils/multi_gpu.py
# SHHawley updated to Keras 2, added get_serial_part & get_available_gpus, and gpu_count=-1 flag
from keras.layers import concatenate
from keras.layers.core import Lambda
import keras.backend as K
from keras.models import Model
i... | 37.089888 | 120 | 0.64435 |
# Originally from https://github.com/kuza55/keras-extras/blob/master/utils/multi_gpu.py
# SHHawley updated to Keras 2, added get_serial_part & get_available_gpus, and gpu_count=-1 flag
from keras.layers import concatenate
from keras.layers.core import Lambda
import keras.backend as K
from keras.models import Model
f... | 0 | 0 | 0 | 0 | 0 | 252 | 0 | 41 | 71 |
d0ad38f294c7ec870270ca6a62657f73ba589806 | 127 | py | Python | test_data_struct.py | pzyyll/python_study | 4960188c31afbe9dd59ca69c1eae55413e64678f | [
"Apache-2.0"
] | null | null | null | test_data_struct.py | pzyyll/python_study | 4960188c31afbe9dd59ca69c1eae55413e64678f | [
"Apache-2.0"
] | null | null | null | test_data_struct.py | pzyyll/python_study | 4960188c31afbe9dd59ca69c1eae55413e64678f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf_8 -*-
dict_test = {"a": 10, "e": 1, "b": 3}
print(dict_test)
sorted(dict_test)
print(dict_test)
| 12.7 | 38 | 0.551181 | # -*- coding: utf_8 -*-
dict_test = {"a": 10, "e": 1, "b": 3}
print(dict_test)
sorted(dict_test)
print(dict_test)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d74629553f8a5f901bc290a5357517c368c09093 | 177 | py | Python | challenge48.py | xingexu/littleAlgo2 | abeee34e19d9be6503ee2704b47efde8402c238c | [
"MIT"
] | null | null | null | challenge48.py | xingexu/littleAlgo2 | abeee34e19d9be6503ee2704b47efde8402c238c | [
"MIT"
] | null | null | null | challenge48.py | xingexu/littleAlgo2 | abeee34e19d9be6503ee2704b47efde8402c238c | [
"MIT"
] | null | null | null | s_rate= int(input("what is sample rate? "))
b_depth= int(input("what is depth? "))
duration = int(input("what is sample rate? "))
f_size = s_rate*b_depth*duration
print(f_size) | 29.5 | 46 | 0.711864 | s_rate= int(input("what is sample rate? "))
b_depth= int(input("what is depth? "))
duration = int(input("what is sample rate? "))
f_size = s_rate*b_depth*duration
print(f_size) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
994d3da14f5f6fd073cae8e43f4f511067f6720c | 1,985 | py | Python | src/server/flaskr/app/__init__.py | data2health/maturity-model | 1c45efe282780a0a36f2bc39c58589182b8d4832 | [
"BSD-3-Clause"
] | 4 | 2019-02-22T23:38:02.000Z | 2021-08-30T19:36:32.000Z | src/server/flaskr/app/__init__.py | data2health/maturity-model | 1c45efe282780a0a36f2bc39c58589182b8d4832 | [
"BSD-3-Clause"
] | 73 | 2019-02-14T21:13:17.000Z | 2021-12-07T18:10:30.000Z | src/server/flaskr/app/__init__.py | data2health/maturity-model | 1c45efe282780a0a36f2bc39c58589182b8d4832 | [
"BSD-3-Clause"
] | null | null | null | #!flask/bin/python
from flask import Flask
from .modules.manager import Manager
app = Flask(__name__)
mgr = Manager()
#########################################
# Routes
######################################### | 26.466667 | 81 | 0.582872 | #!flask/bin/python
import os
import sys
import uuid
from flask import Flask, Request, request, jsonify
from .modules.response import ok, bad_request, forbidden, not_found, server_error
from .modules.manager import Manager
app = Flask(__name__)
mgr = Manager()
#########################################
# Routes
#####... | 0 | 1,556 | 0 | 0 | 0 | 0 | 0 | 54 | 162 |
e00261a18a57fc8292a5bc6367a5690c3de3289d | 41 | py | Python | back-end data/api/app/__init__.py | shaoyu0966/dorm-alloc-sys | 2b3772fafe663d30f21364008f7b2d52a9539d8f | [
"Apache-2.0"
] | null | null | null | back-end data/api/app/__init__.py | shaoyu0966/dorm-alloc-sys | 2b3772fafe663d30f21364008f7b2d52a9539d8f | [
"Apache-2.0"
] | null | null | null | back-end data/api/app/__init__.py | shaoyu0966/dorm-alloc-sys | 2b3772fafe663d30f21364008f7b2d52a9539d8f | [
"Apache-2.0"
] | null | null | null | import flask
app = flask.Flask(__name__) | 13.666667 | 27 | 0.780488 | import flask
app = flask.Flask(__name__) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
abec704caa0b600a2041cef7e06f44a1af854a0f | 2,373 | py | Python | tests/test_tab.py | superzazu/pylibui | 2e74db787bfea533f3ae465670963daedcaec344 | [
"MIT"
] | 222 | 2016-05-20T19:12:05.000Z | 2022-03-09T14:59:48.000Z | tests/test_tab.py | superzazu/pylibui | 2e74db787bfea533f3ae465670963daedcaec344 | [
"MIT"
] | 66 | 2016-05-29T00:11:53.000Z | 2018-10-14T20:01:38.000Z | tests/test_tab.py | superzazu/pylibui | 2e74db787bfea533f3ae465670963daedcaec344 | [
"MIT"
] | 32 | 2016-06-03T07:08:29.000Z | 2021-05-12T07:41:41.000Z | """
Pylibui test suite.
"""
| 32.958333 | 79 | 0.620312 | """
Pylibui test suite.
"""
from pylibui.controls import Tab, Button
from tests.utils import WindowTestCase
class TabTest(WindowTestCase):
def setUp(self):
super().setUp()
self.tab = Tab()
def test_append_pages(self):
"""Tests that pages can be appended to a tab."""
button... | 0 | 0 | 0 | 2,238 | 0 | 0 | 0 | 36 | 68 |
0dd43c4b9b282fe6a32cc13d470309faa15aa87e | 787 | py | Python | virtual_bird/CameraCalibration/takePhotos.py | birdmandayum0131/virtual-bird | bf52b326df0a8ee12018434d98bde1ebb06548a8 | [
"MIT"
] | 5 | 2022-01-07T10:24:56.000Z | 2022-02-18T07:13:57.000Z | virtual_bird/CameraCalibration/takePhotos.py | birdmandayum0131/virtual-bird | bf52b326df0a8ee12018434d98bde1ebb06548a8 | [
"MIT"
] | null | null | null | virtual_bird/CameraCalibration/takePhotos.py | birdmandayum0131/virtual-bird | bf52b326df0a8ee12018434d98bde1ebb06548a8 | [
"MIT"
] | 2 | 2022-01-10T07:51:11.000Z | 2022-02-18T07:10:52.000Z |
resolution = res_720p
if __name__ == '__main__':
main()
| 24.59375 | 69 | 0.557814 | import os
import cv2
from ..utils.Camera import *
resolution = res_720p
def main():
cap = cv2.VideoCapture(0)
change_resolution(cap, resolution["width"], resolution["height"])
if not os.path.isdir(resolution["path"]):
os.mkdir(resolution["path"])
imageCount = 0
while True:
_, fram... | 0 | 0 | 0 | 0 | 0 | 650 | 0 | -16 | 89 |
77bfb7eda313a0e0178a8979ce165950023b7f1b | 4,568 | py | Python | Twitter-Bot/main.py | abhinavsp0730/Forged-APP | aa10cc72c9136180e57767309730b0354ce0b1f5 | [
"BSD-3-Clause"
] | 1 | 2021-03-30T17:29:39.000Z | 2021-03-30T17:29:39.000Z | Twitter-Bot/main.py | abhinavsp0730/Forged-APP | aa10cc72c9136180e57767309730b0354ce0b1f5 | [
"BSD-3-Clause"
] | null | null | null | Twitter-Bot/main.py | abhinavsp0730/Forged-APP | aa10cc72c9136180e57767309730b0354ce0b1f5 | [
"BSD-3-Clause"
] | null | null | null |
import time
if __name__ == "__main__":
try:
followStream()
except Exception:
time.sleep(10)
logging.exception("Fatal exception. Consult logs.")
followStream()
finally:
time.sleep(10)
logging.exception("IN FINALLY")
print("IN FINALL... | 28.911392 | 118 | 0.614711 | from credentials import API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET, ACCOUNT_ID, ACCOUNT_NAME
import tweepy
from tweepy import Stream
from tweepy.streaming import StreamListener
import json
import time
from logger import *
import requests
import os
def respondToTweet(tweet_text, tweeted_by, tweeted_at... | 4 | 0 | 0 | 1,738 | 0 | 2,070 | 0 | 72 | 341 |
0808fab8ed6b26f423355d29008dbd0aefe4bb62 | 15,468 | py | Python | ocellaris/simulation/input.py | TormodLandet/Ocellaris | 6b4b2515fb881b1ed8d8fd8d8c23a8e1990ada58 | [
"Apache-2.0"
] | 1 | 2017-11-07T12:19:44.000Z | 2017-11-07T12:19:44.000Z | ocellaris/simulation/input.py | TormodLandet/Ocellaris | 6b4b2515fb881b1ed8d8fd8d8c23a8e1990ada58 | [
"Apache-2.0"
] | null | null | null | ocellaris/simulation/input.py | TormodLandet/Ocellaris | 6b4b2515fb881b1ed8d8fd8d8c23a8e1990ada58 | [
"Apache-2.0"
] | 2 | 2018-05-02T17:17:01.000Z | 2019-03-11T13:09:40.000Z | # Copyright (C) 2015-2019 Tormod Landet
# SPDX-License-Identifier: Apache-2.0
from ocellaris.utils import ocellaris_error
UNDEFINED = UndefinedParameter()
# Some things that could be better in this implementation
# TODO: do not subclass OrderedDict! This makes it hard to get read/write
# sub-Input views of ... | 33.772926 | 98 | 0.570662 | # Copyright (C) 2015-2019 Tormod Landet
# SPDX-License-Identifier: Apache-2.0
import os
import collections
from ocellaris.utils import ocellaris_error, OcellarisError, get_root_value
from ocellaris_post import read_yaml_input_file
import yaml
class UndefinedParameter(object):
def __repr__(self):
"For Sph... | 0 | 0 | 0 | 13,121 | 0 | 0 | 0 | 33 | 158 |
c7f39ce99bc81ffbe6b270e19566fd4398236ece | 5,255 | py | Python | dev.py | enfold/buildout | 005b02455f60240585b661bd86dde7577a177548 | [
"ZPL-2.1"
] | null | null | null | dev.py | enfold/buildout | 005b02455f60240585b661bd86dde7577a177548 | [
"ZPL-2.1"
] | null | null | null | dev.py | enfold/buildout | 005b02455f60240585b661bd86dde7577a177548 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 30.201149 | 82 | 0.584396 | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 0 | 0 | 0 | 0 | 0 | 2,217 | 0 | -7 | 141 |
61fbd67a2fbc82e195cb18c29b6646a5f5c2253e | 206 | py | Python | AMazingTurtle/__init__.py | m1ch/AMazingTurtle | 653edf70250a535c036a506f44b2bc07267ca8d1 | [
"Apache-2.0"
] | null | null | null | AMazingTurtle/__init__.py | m1ch/AMazingTurtle | 653edf70250a535c036a506f44b2bc07267ca8d1 | [
"Apache-2.0"
] | 2 | 2019-11-20T12:36:38.000Z | 2019-11-20T12:45:23.000Z | AMazingTurtle/__init__.py | m1ch/AMazingTurtle | 653edf70250a535c036a506f44b2bc07267ca8d1 | [
"Apache-2.0"
] | null | null | null | """
Lorem ipsum
"""
__version__ = '0.1.0'
__name__ = 'AMazingTurtle'
__author__ = 'Michael K. - m1ch'
__email__ = 'my@email'
__github__ = 'https://github.com/m1ch/AMazingTurtle'
__readthedocs__ = 'no idea' | 20.6 | 52 | 0.703883 | """
Lorem ipsum
"""
__version__ = '0.1.0'
__name__ = 'AMazingTurtle'
__author__ = 'Michael K. - m1ch'
__email__ = 'my@email'
__github__ = 'https://github.com/m1ch/AMazingTurtle'
__readthedocs__ = 'no idea' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7af73aa1f06782586d5e001d3fb62f8f90240864 | 4,470 | py | Python | neuralpp/inference/graphical_model/representation/random/random_dataset.py | horizon-blue/neuralpp | 54fd6d938ea15680437e407f8b676f825df8597e | [
"MIT"
] | 2 | 2021-04-13T18:01:54.000Z | 2021-06-02T18:59:36.000Z | neuralpp/inference/graphical_model/representation/random/random_dataset.py | horizon-blue/neuralpp | 54fd6d938ea15680437e407f8b676f825df8597e | [
"MIT"
] | null | null | null | neuralpp/inference/graphical_model/representation/random/random_dataset.py | horizon-blue/neuralpp | 54fd6d938ea15680437e407f8b676f825df8597e | [
"MIT"
] | 2 | 2021-10-22T01:19:13.000Z | 2022-01-11T05:12:03.000Z | import random
from neuralpp.inference.graphical_model.representation.random.random_model import (generate_model)
from neuralpp.util.util import join
if __name__ == "__main__":
model = generate_model(number_of_factors=6, number_of_variables=4, cardinality=3)
print("Model:")
print(join(model, "\n"))
... | 34.384615 | 92 | 0.747875 | import random
from neuralpp.inference.graphical_model.representation.random.random_model import (
generate_model,
)
from neuralpp.inference.graphical_model.variable.integer_variable import IntegerVariable
from neuralpp.inference.graphical_model.variable_elimination import VariableElimination
from neuralpp.util.uti... | 0 | 0 | 0 | 0 | 0 | 3,409 | 0 | 148 | 182 |
9aa8464a35e3d65ec7e93a75069cdefd3d70836b | 25,181 | py | Python | SEG2020.py | hadrienmichel/pyBEL1D | 36b7adf8a0ad2abaccfd546f153c449392fc922e | [
"BSD-2-Clause"
] | 3 | 2022-02-14T10:33:14.000Z | 2022-03-03T15:18:48.000Z | SEG2020.py | hadrienmichel/pyBEL1D | 36b7adf8a0ad2abaccfd546f153c449392fc922e | [
"BSD-2-Clause"
] | null | null | null | SEG2020.py | hadrienmichel/pyBEL1D | 36b7adf8a0ad2abaccfd546f153c449392fc922e | [
"BSD-2-Clause"
] | 1 | 2022-01-14T09:00:56.000Z | 2022-01-14T09:00:56.000Z | '''
SEG2020 is a script that runs all the computations for the different results
presented at the SEG2020 conference (Houston, Texas).
***Improving BEL1D accuracy for geophysical imaging of the subsurface***
It runs at first the numerical benchmark for a dataset that is created directly.
- Creating the dataset
... | 56.586517 | 227 | 0.589452 | '''
SEG2020 is a script that runs all the computations for the different results
presented at the SEG2020 conference (Houston, Texas).
***Improving BEL1D accuracy for geophysical imaging of the subsurface***
It runs at first the numerical benchmark for a dataset that is created directly.
- Creating the dataset
... | 2 | 0 | 0 | 0 | 0 | 256 | 0 | 28 | 74 |
3b315f39bd03c0dfe70a383fcf3bb503a4df8e06 | 3,508 | py | Python | rsna/data_utils.py | lopuhin/kaggle-rsna-2019 | 25bfb81465d4a0b241e01dcfa2b4af84defa442c | [
"MIT"
] | 18 | 2019-10-18T08:48:26.000Z | 2020-01-25T18:57:06.000Z | rsna/data_utils.py | lopuhin/kaggle-rsna-2019 | 25bfb81465d4a0b241e01dcfa2b4af84defa442c | [
"MIT"
] | null | null | null | rsna/data_utils.py | lopuhin/kaggle-rsna-2019 | 25bfb81465d4a0b241e01dcfa2b4af84defa442c | [
"MIT"
] | null | null | null | """ Data manipulation utils, many based on
https://www.kaggle.com/dcstang/see-like-a-radiologist-with-systematic-windowing
"""
from pathlib import Path
ROOT = Path(__file__).parent.parent / 'data'
TRAIN_ROOT = ROOT / 'stage_1_train_images'
WINDOW_CONFIG = {
# center, width
'brain': (40, 80),
'blood': (80,... | 29.233333 | 79 | 0.613455 | """ Data manipulation utils, many based on
https://www.kaggle.com/dcstang/see-like-a-radiologist-with-systematic-windowing
"""
from pathlib import Path
from typing import List, Dict
import attr
import numpy as np
import pandas as pd
import pydicom
from sklearn.model_selection import GroupKFold
import tqdm
ROOT = Pat... | 0 | 84 | 0 | 0 | 0 | 2,566 | 0 | 1 | 347 |
47b846276c1560b5f900f1a88f7a82a341afad87 | 760 | py | Python | machine_learning_models/symptoms_covid_prediction/trained_model.py | anuragsinha18/covat | ac6c4d1d45131351a073b607ca7895a53b5161ad | [
"MIT"
] | 3 | 2021-02-15T08:13:22.000Z | 2021-04-02T07:07:35.000Z | machine_learning_models/symptoms_covid_prediction/trained_model.py | anuragsinha18/covat | ac6c4d1d45131351a073b607ca7895a53b5161ad | [
"MIT"
] | 4 | 2021-02-23T13:09:48.000Z | 2021-05-07T05:11:35.000Z | machine_learning_models/symptoms_covid_prediction/trained_model.py | anuragsinha18/covat | ac6c4d1d45131351a073b607ca7895a53b5161ad | [
"MIT"
] | 5 | 2021-02-15T07:15:02.000Z | 2021-07-23T21:07:27.000Z | import pickle
#import missingno as msno
import warnings
warnings.filterwarnings('ignore')
from sklearn.ensemble import RandomForestClassifier
rfc1=RandomForestClassifier(criterion= 'gini', max_depth= 4, max_features= 'sqrt', n_estimators= 100)
binary_file = open('data.obj', 'rb')
rfc1 = pickle.load(binary_file)
binar... | 23.75 | 101 | 0.780263 | import pickle
import pandas as pd
import numpy as np
#import missingno as msno
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler , Normalizer
from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
from scipy.stats import norm
from scipy import stats... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 243 |
84070e6d277298a9c19b5481541c47601c6394ab | 2,931 | py | Python | src/server.py | rcmelendez/devo-lapua-docker | e3d90d99e6e13f669139802a47e33335e68dd73b | [
"MIT"
] | null | null | null | src/server.py | rcmelendez/devo-lapua-docker | e3d90d99e6e13f669139802a47e33335e68dd73b | [
"MIT"
] | null | null | null | src/server.py | rcmelendez/devo-lapua-docker | e3d90d99e6e13f669139802a47e33335e68dd73b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import socket
import json
import os
import urllib3
import sys
import argparse
from .utils.constants import LAPUA_VERSION, STATUS
from .api.server import ApiServer
from .thread.jobs_manager import JobsManager
from .thread.command_handler import CommandHandler
from .utils.config import get_config
... | 30.53125 | 78 | 0.608325 | # -*- coding: utf-8 -*-
import socket
import json
import os
import urllib3
import sys
import argparse
from .utils.constants import LAPUA_VERSION, STATUS
from .api.server import ApiServer
from .thread.jobs_manager import JobsManager
from .thread.command_handler import CommandHandler
from .utils.config import get_config
... | 0 | 0 | 0 | 0 | 0 | 96 | 0 | 0 | 23 |
1943dbf75072a314a9658e016212d8c3451a122c | 9,095 | py | Python | news_popularity_prediction/features/user_graph.py | MKLab-ITI/news-popularity-prediction | 5f66982c659de017665116297bb4fd29ca13f835 | [
"Apache-2.0"
] | 33 | 2016-01-25T01:21:36.000Z | 2021-08-04T09:09:13.000Z | news_popularity_prediction/features/user_graph.py | twishmay/news-popularity-prediction | 5f66982c659de017665116297bb4fd29ca13f835 | [
"Apache-2.0"
] | 1 | 2018-03-06T16:30:08.000Z | 2018-03-06T16:30:08.000Z | news_popularity_prediction/features/user_graph.py | twishmay/news-popularity-prediction | 5f66982c659de017665116297bb4fd29ca13f835 | [
"Apache-2.0"
] | 15 | 2016-03-22T00:45:41.000Z | 2022-02-08T03:08:52.000Z | __author__ = 'Georgios Rizos (georgerizos@iti.gr)'
import numpy as np
def update_user_count_eponymous(set_of_contributors, anonymous_coward_comments_counter):
"""
Eponymous user count update.
Input: - set_of_contributors: A python set of user ids.
- anonymous_coward_comments_counter: The nu... | 43.725962 | 120 | 0.729082 | __author__ = 'Georgios Rizos (georgerizos@iti.gr)'
import numpy as np
def update_user_count_eponymous(set_of_contributors, anonymous_coward_comments_counter):
"""
Eponymous user count update.
Input: - set_of_contributors: A python set of user ids.
- anonymous_coward_comments_counter: The nu... | 0 | 0 | 0 | 0 | 0 | 2,651 | 0 | 0 | 46 |
9aa851e2f71567b7c30482b9e501f95a4a7f93ba | 186 | py | Python | Factorial_Digit_Sum_100.py | yrafalin/7thGrade | 959fd34b247757c82efabaa2739bf8b419152341 | [
"BSD-3-Clause"
] | null | null | null | Factorial_Digit_Sum_100.py | yrafalin/7thGrade | 959fd34b247757c82efabaa2739bf8b419152341 | [
"BSD-3-Clause"
] | null | null | null | Factorial_Digit_Sum_100.py | yrafalin/7thGrade | 959fd34b247757c82efabaa2739bf8b419152341 | [
"BSD-3-Clause"
] | null | null | null | numless = 1
total = 100
while numless <= 99:
total *= 100 - numless
numless += 1
total = str(total)
newtotal = 0
for letter in total:
newtotal += int(letter)
print(newtotal)
| 16.909091 | 27 | 0.650538 | numless = 1
total = 100
while numless <= 99:
total *= 100 - numless
numless += 1
total = str(total)
newtotal = 0
for letter in total:
newtotal += int(letter)
print(newtotal)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b9cee0d87e86c797f9c793975f4411b23273a079 | 1,705 | py | Python | drivers/multisteppercontrol.py | codetiger/GustroBot | 2996ad6588cb5eaedef2cebad9c9b3c143928c62 | [
"MIT"
] | 1 | 2020-03-27T08:38:08.000Z | 2020-03-27T08:38:08.000Z | drivers/multisteppercontrol.py | codetiger/GustroBot | 2996ad6588cb5eaedef2cebad9c9b3c143928c62 | [
"MIT"
] | null | null | null | drivers/multisteppercontrol.py | codetiger/GustroBot | 2996ad6588cb5eaedef2cebad9c9b3c143928c62 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
| 32.169811 | 77 | 0.564809 | import RPi.GPIO as GPIO
from time import sleep
class MultiStepperControl:
_microsteps = { 'Full' : 1.0,
'Half' : 2.0,
'1/4' : 4.0,
'1/8' : 8.0,
'1/16' : 16.0,
'1/32' : 32.0}
def __init__(se... | 0 | 0 | 0 | 1,635 | 0 | 0 | 0 | 1 | 45 |
f5c035226f5727d348c3b18be19bb5a1ae9aba8f | 214 | py | Python | routes/weather.py | ramoseh/wizeline-challenge | 3c4f2b3b50b948cc60e258daeaaef88a7b1f9f7f | [
"MIT"
] | null | null | null | routes/weather.py | ramoseh/wizeline-challenge | 3c4f2b3b50b948cc60e258daeaaef88a7b1f9f7f | [
"MIT"
] | null | null | null | routes/weather.py | ramoseh/wizeline-challenge | 3c4f2b3b50b948cc60e258daeaaef88a7b1f9f7f | [
"MIT"
] | null | null | null | # This file is just for organization purposes,
# normally there will be more functions and validation in a complex proect
# to justify the existance of routes and client
| 42.8 | 74 | 0.817757 | # This file is just for organization purposes,
# normally there will be more functions and validation in a complex proect
# to justify the existance of routes and client
from client.weather import get_gdl_wheather
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 22 |
36f124d36cc0a5d587e09dac11f378abb6c4fe49 | 188 | py | Python | .github/utils/generate_json_schema.py | OmniscienceAcademy/haystack | 46fa166c36d4b2fb0f428041fb048e50613553a9 | [
"Apache-2.0"
] | null | null | null | .github/utils/generate_json_schema.py | OmniscienceAcademy/haystack | 46fa166c36d4b2fb0f428041fb048e50613553a9 | [
"Apache-2.0"
] | null | null | null | .github/utils/generate_json_schema.py | OmniscienceAcademy/haystack | 46fa166c36d4b2fb0f428041fb048e50613553a9 | [
"Apache-2.0"
] | null | null | null | import sys
import logging
logging.basicConfig(level=logging.INFO)
sys.path.append(".")
from haystack.nodes._json_schema import update_json_schema
update_json_schema(update_index=True)
| 17.090909 | 58 | 0.829787 | import sys
import logging
logging.basicConfig(level=logging.INFO)
sys.path.append(".")
from haystack.nodes._json_schema import update_json_schema
update_json_schema(update_index=True)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ebce32018f702832a6eb900c35779b3131358ed3 | 12,398 | py | Python | simulation_reduction/histogram.py | fermiPy/haloanalysis | ac0e1263994abdedb716dff46da8a5bbbb7bcc00 | [
"BSD-3-Clause"
] | null | null | null | simulation_reduction/histogram.py | fermiPy/haloanalysis | ac0e1263994abdedb716dff46da8a5bbbb7bcc00 | [
"BSD-3-Clause"
] | null | null | null | simulation_reduction/histogram.py | fermiPy/haloanalysis | ac0e1263994abdedb716dff46da8a5bbbb7bcc00 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import numpy.random as rnd
import sys
import matplotlib.pyplot as plt
import scipy.interpolate as interp
from pixel import Pixel
import cProfile
import time
import pickle
#def test_radius():
# dist = Distribution()
# h = Histogram(*dist.values(10))
# assert ( h._radius(199,199) == h.... | 37.456193 | 140 | 0.592515 | import numpy as np
import numpy.random as rnd
import sys
import matplotlib.pyplot as plt
import scipy.interpolate as interp
from pixel import Pixel
import cProfile
import time
import pickle
class Histogram(object):
""" This is a wrapper class around the data from a fits image. It is
used to get precise contain... | 0 | 0 | 0 | 9,652 | 0 | 0 | 0 | 0 | 23 |
58b47fbd69550307f86254ace09d1d02c46c053e | 3,046 | py | Python | salt/states/keystone_service.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 19 | 2016-01-29T14:37:52.000Z | 2022-03-30T18:08:01.000Z | salt/states/keystone_service.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 223 | 2016-03-02T16:39:41.000Z | 2022-03-03T12:26:35.000Z | salt/states/keystone_service.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 64 | 2016-02-04T19:45:26.000Z | 2021-12-15T02:02:31.000Z | # -*- coding: utf-8 -*-
"""
Management of OpenStack Keystone Services
=========================================
.. versionadded:: 2018.3.0
:depends: shade
:configuration: see :py:mod:`salt.modules.keystoneng` for setup instructions
Example States
.. code-block:: yaml
create service:
keystone_service.pres... | 24.368 | 95 | 0.592252 | # -*- coding: utf-8 -*-
"""
Management of OpenStack Keystone Services
=========================================
.. versionadded:: 2018.3.0
:depends: shade
:configuration: see :py:mod:`salt.modules.keystoneng` for setup instructions
Example States
.. code-block:: yaml
create service:
keystone_service.pres... | 0 | 0 | 0 | 0 | 0 | 203 | 0 | 0 | 23 |
8ac4dbc627f60b34423148929293e27f85b0b88a | 629 | py | Python | tk/stdout-redirect.py | kooi/python-examples | 839d93d37fb8d995baa760d99a49728a47211518 | [
"MIT"
] | null | null | null | tk/stdout-redirect.py | kooi/python-examples | 839d93d37fb8d995baa760d99a49728a47211518 | [
"MIT"
] | null | null | null | tk/stdout-redirect.py | kooi/python-examples | 839d93d37fb8d995baa760d99a49728a47211518 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
root = Tk()
gui = CoreGUI(root)
root.mainloop()
| 28.590909 | 90 | 0.621622 | from tkinter import *
class CoreGUI(object):
def __init__(self,parent):
self.parent = parent
self.InitUI()
button = Button(self.parent, text="Start", command=self.main)
button.grid(column=0, row=1, columnspan=2)
def main(self):
print('whatever')
def InitUI(self):
... | 0 | 0 | 0 | 496 | 0 | 0 | 0 | 0 | 45 |
67eaf3974a5cbc080cd119426be697f52ccacc45 | 2,349 | py | Python | examples/dataflow/write_to_relational_db.py | shashanksen/beam-nuggets | accc738801d89329ff55e1716cd42b068e1f5237 | [
"MIT"
] | null | null | null | examples/dataflow/write_to_relational_db.py | shashanksen/beam-nuggets | accc738801d89329ff55e1716cd42b068e1f5237 | [
"MIT"
] | null | null | null | examples/dataflow/write_to_relational_db.py | shashanksen/beam-nuggets | accc738801d89329ff55e1716cd42b068e1f5237 | [
"MIT"
] | null | null | null | from __future__ import division, print_function
if __name__ == '__main__':
main()
| 30.907895 | 78 | 0.65347 | from __future__ import division, print_function
import argparse
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions, SetupOptions
from beam_nuggets.io import relational_db
def main():
# get the cmd args
db_args, pipeline_args = get_args()
# Target database instan... | 0 | 0 | 0 | 0 | 0 | 2,047 | 0 | 76 | 136 |
fc826a5bb4da370dc6134758c3e1128ede34c2b2 | 3,264 | py | Python | Day-7/Twitter_Sentiment_Analysis/twitter_sentiment_analysis_code.py | Blazer-007/10-Days-ML-Challenege | f9ba5776aa60528d2c314b23c8330b4a38fbe063 | [
"MIT"
] | null | null | null | Day-7/Twitter_Sentiment_Analysis/twitter_sentiment_analysis_code.py | Blazer-007/10-Days-ML-Challenege | f9ba5776aa60528d2c314b23c8330b4a38fbe063 | [
"MIT"
] | null | null | null | Day-7/Twitter_Sentiment_Analysis/twitter_sentiment_analysis_code.py | Blazer-007/10-Days-ML-Challenege | f9ba5776aa60528d2c314b23c8330b4a38fbe063 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Twitter_Sentiment_Analysis_Code.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1WDOG_nS5eB8wzeVHRijPP4XEhobAgptY
"""
import pandas as pd
import numpy as np
import nltk
pwd
cd '/content/drive/My Drive/Deep_Learning /T... | 24.727273 | 90 | 0.759804 | # -*- coding: utf-8 -*-
"""Twitter_Sentiment_Analysis_Code.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1WDOG_nS5eB8wzeVHRijPP4XEhobAgptY
"""
import pandas as pd
import numpy as np
import nltk
pwd
cd '/content/drive/My Drive/Deep_Learning /T... | 0 | 0 | 0 | 0 | 0 | 324 | 0 | -2 | 23 |
b0201320dac34aee3c4a450a686f4d9c5696def2 | 5,604 | py | Python | src/knn.py | nestordemeure/chromosomes | ff8d5073170752ad184e5f9d03704e46a158e829 | [
"MIT"
] | 3 | 2019-02-26T03:06:48.000Z | 2020-03-03T18:31:45.000Z | src/knn.py | nestordemeure/chromosomes | ff8d5073170752ad184e5f9d03704e46a158e829 | [
"MIT"
] | null | null | null | src/knn.py | nestordemeure/chromosomes | ff8d5073170752ad184e5f9d03704e46a158e829 | [
"MIT"
] | 1 | 2019-05-29T13:24:50.000Z | 2019-05-29T13:24:50.000Z | import pickle # saving and loading data
#import numpy as np # array manipulation
import random # for sampling
from sklearn.neighbors import KNeighborsClassifier
#--------------------------------------------------------------------------------------------------
# SAVING
def save_data(data, path):
"""save the da... | 40.608696 | 142 | 0.638116 | import pickle # saving and loading data
#import numpy as np # array manipulation
import random # for sampling
from sklearn.neighbors import KNeighborsClassifier
import os # folder creation
#--------------------------------------------------------------------------------------------------
# SAVING
def save_data(da... | 0 | 0 | 0 | 234 | 0 | 1,486 | 0 | 91 | 132 |
52a569fd8b7d249ee0b12d5e486c97d77007fefe | 6,668 | py | Python | espact/functions.py | luckboy/espact | 01b9480f633472de34cdcd14017b7522325b2174 | [
"MIT"
] | null | null | null | espact/functions.py | luckboy/espact | 01b9480f633472de34cdcd14017b7522325b2174 | [
"MIT"
] | null | null | null | espact/functions.py | luckboy/espact | 01b9480f633472de34cdcd14017b7522325b2174 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
# Copyright (c) 2015-2016 ukasz Szpakowski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, cop... | 39.223529 | 116 | 0.70081 | # -*- coding: UTF-8 -*-
# Copyright (c) 2015-2016 Łukasz Szpakowski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, co... | 2 | 0 | 0 | 0 | 0 | 3,966 | 0 | 23 | 599 |
27d19a2a30876a26b68f56d98598d3277952f6f1 | 281 | py | Python | sanic_crudvue/config/pro_config.py | hsir05/python-mysql-redis | 8119a7b537b6b23fb4f92fb3b6f4c75ae692bd4b | [
"MIT"
] | 3 | 2019-06-17T08:13:16.000Z | 2020-12-24T08:56:04.000Z | sanic_crudvue/config/pro_config.py | hsir05/python-mysql-redis | 8119a7b537b6b23fb4f92fb3b6f4c75ae692bd4b | [
"MIT"
] | 12 | 2020-03-24T17:15:34.000Z | 2022-03-11T23:50:34.000Z | sanic_crudvue/config/pro_config.py | hsir05/python-mysql-redis | 8119a7b537b6b23fb4f92fb3b6f4c75ae692bd4b | [
"MIT"
] | 1 | 2020-07-28T22:57:36.000Z | 2020-07-28T22:57:36.000Z | # pro_config
# !/usr/bin/env python
| 14.789474 | 26 | 0.604982 | # pro_config
# !/usr/bin/env python
from .config import Config
class ProConfig(Config):
"""
Pro config
"""
# Application config
DEBUG = False
DB_HOST = 'localhost'
DB_NAME = 'todoStu'
DB_USER = 'root'
DB_PASSWORD = 'root'
DB_PORT = 3306
| 0 | 0 | 0 | 193 | 0 | 0 | 0 | 5 | 45 |
e2e2c981ef370371518f2caa4db11b7f933b131d | 7,003 | py | Python | gpmp2_python/examples/WAMFactorGraphExample.py | mattking-smith/gpmp2 | 48c41c142df062832ffbe9792f0cbecdb36485cc | [
"BSD-3-Clause"
] | 219 | 2016-06-17T02:15:52.000Z | 2022-03-31T19:47:12.000Z | gpmp2_python/examples/WAMFactorGraphExample.py | mattking-smith/gpmp2 | 48c41c142df062832ffbe9792f0cbecdb36485cc | [
"BSD-3-Clause"
] | 37 | 2017-03-04T06:50:48.000Z | 2022-03-29T19:37:50.000Z | gpmp2_python/examples/WAMFactorGraphExample.py | mattking-smith/gpmp2 | 48c41c142df062832ffbe9792f0cbecdb36485cc | [
"BSD-3-Clause"
] | 94 | 2016-06-29T18:27:48.000Z | 2022-03-28T05:39:30.000Z | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from gpmp2_python.datasets.generate3Ddataset import generate3Ddataset
from gpmp2_python.robots.generateArm import generateArm
from gpmp2_python.utils.signedDistanceField3D import signedDistanceField3D
# dataset
dataset = gene... | 29.673729 | 80 | 0.656719 | import numpy as np
from gtsam import *
from gpmp2 import *
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d, Axes3D
from gpmp2_python.datasets.generate3Ddataset import generate3Ddataset
from gpmp2_python.robots.generateArm import generateArm
from gpmp2_python.utils.plot_utils import *
from gpmp... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 66 |
7305c1422e077e29d1544873402adc48591d3ebc | 6,332 | py | Python | ModelWrapper.py | irdanish11/AnomalyEventDetection | 4bffe9af26946e15e0a5b2105d7049a8688b9b9b | [
"MIT"
] | 19 | 2020-08-17T07:59:08.000Z | 2022-02-10T02:25:29.000Z | ModelWrapper.py | irdanish11/AnomalyEventDetection | 4bffe9af26946e15e0a5b2105d7049a8688b9b9b | [
"MIT"
] | 4 | 2020-04-03T04:59:12.000Z | 2022-02-05T11:18:35.000Z | ModelWrapper.py | irdanish11/AnomalyEventDetection | 4bffe9af26946e15e0a5b2105d7049a8688b9b9b | [
"MIT"
] | 6 | 2020-12-02T19:56:54.000Z | 2021-10-17T02:18:03.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 1 18:14:28 2020
@author: danish
"""
import tensorflow as tf
import numpy as np
import cv2
#from tensorflow.keras.models import load_model
def TF_GPUsetup(GB=4):
"""
Restrict TensorFlow to only allocate 1*X GB of memory on the first GPU. Often Needed
When GPU... | 33.151832 | 179 | 0.672299 | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 1 18:14:28 2020
@author: danish
"""
from tensorflow.keras.layers import Conv3D,ConvLSTM2D,Conv3DTranspose, Input
from tensorflow.keras.models import Model
from tensorflow.compat.v1.keras.backend import set_session
import tensorflow as tf
from PIL import ImageFont, Image... | 0 | 0 | 0 | 0 | 0 | 3,073 | 0 | 123 | 312 |
556ff8868255962718b3973ffc13c51f5f4a0d34 | 739 | py | Python | src/calculator_demo/op.py | DanielPei/calculator | 5aa56102f81cef31d9d43a082ecc60a0ee55344a | [
"MIT"
] | null | null | null | src/calculator_demo/op.py | DanielPei/calculator | 5aa56102f81cef31d9d43a082ecc60a0ee55344a | [
"MIT"
] | null | null | null | src/calculator_demo/op.py | DanielPei/calculator | 5aa56102f81cef31d9d43a082ecc60a0ee55344a | [
"MIT"
] | null | null | null | # !/bin/python
# -*- coding:utf-8 -*-
# @Author : Daniel.Pei
# @Email : peixq1222@icloud.com
# @Created : 2019/12/11 22:57
def hello_world(name: str = "World"):
"""
Say hello
:param name: Visit name.
"""
return "Hello, {name}!".format(name=name)
| 19.972973 | 101 | 0.564276 | # !/bin/python
# -*- coding:utf-8 -*-
# @Author : Daniel.Pei
# @Email : peixq1222@icloud.com
# @Created : 2019/12/11 22:57
def hello_world(name: str = "World"):
"""
Say hello
:param name: Visit name.
"""
return "Hello, {name}!".format(name=name)
class CalculatorUtil(object):
"""
Calc... | 0 | 307 | 0 | 136 | 0 | 0 | 0 | 0 | 23 |
30b2c544091b2d8fe542a389e9ecb55c98ff653b | 4,584 | py | Python | Kalman/main.py | Honglin20/Thesis | ec344f82d8200ce006082ad32d75a905314be77e | [
"MIT"
] | null | null | null | Kalman/main.py | Honglin20/Thesis | ec344f82d8200ce006082ad32d75a905314be77e | [
"MIT"
] | null | null | null | Kalman/main.py | Honglin20/Thesis | ec344f82d8200ce006082ad32d75a905314be77e | [
"MIT"
] | null | null | null |
#igore the warning messages. Cause the kal drawback is slower than normal process, keras
#will print some warning messages.
import warnings
warnings.warn = warn
#Plot the accuracy of test data
#Parameters:
# - name: the name of the model. It will be used in label
# - acc: list of accuracy
# - data_num: which data ... | 30.972973 | 97 | 0.696117 | from utils import create_permuted_mnist_task
from model import cnn_model
import matplotlib.pyplot as plt
#igore the warning messages. Cause the kal drawback is slower than normal process, keras
#will print some warning messages.
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
#Plot the acc... | 0 | 0 | 0 | 0 | 0 | 2,244 | 0 | 39 | 177 |
d7a14a346f812efc037979e063be1a244fc3c706 | 5,107 | py | Python | yuno/cursor.py | Animenosekai/yuno | bcc48f7ceda022e26392e653c03606d3f5f66806 | [
"MIT"
] | 1 | 2022-02-25T13:39:18.000Z | 2022-02-25T13:39:18.000Z | yuno/cursor.py | Animenosekai/yuno | bcc48f7ceda022e26392e653c03606d3f5f66806 | [
"MIT"
] | null | null | null | yuno/cursor.py | Animenosekai/yuno | bcc48f7ceda022e26392e653c03606d3f5f66806 | [
"MIT"
] | null | null | null | """
Cursor
A cursor is a lazy iterator.
"""
| 28.06044 | 152 | 0.566869 | """
Cursor
A cursor is a lazy iterator.
"""
import typing
import pymongo.cursor
from yuno.direction import SortDirectionType, SortDirection
class Cursor():
"""
A cursor is a lazy iterator.
Example
-------
>>> for document in collection.find(defered=True):
... print(document) # document... | 0 | 483 | 0 | 4,457 | 0 | 0 | 0 | 30 | 91 |
eadfb5c56ca6ca31151ed8c736c0703fa3a7ec57 | 2,107 | py | Python | test_suites/benchmarking/chemistry/kd_het_1d/run_amanzi_chem.py | fmyuan/amanzi | edb7b815ae6c22956c8519acb9d87b92a9915ed4 | [
"RSA-MD"
] | 37 | 2017-04-26T16:27:07.000Z | 2022-03-01T07:38:57.000Z | test_suites/benchmarking/chemistry/kd_het_1d/run_amanzi_chem.py | fmyuan/amanzi | edb7b815ae6c22956c8519acb9d87b92a9915ed4 | [
"RSA-MD"
] | 494 | 2016-09-14T02:31:13.000Z | 2022-03-13T18:57:05.000Z | test_suites/benchmarking/chemistry/kd_het_1d/run_amanzi_chem.py | fmyuan/amanzi | edb7b815ae6c22956c8519acb9d87b92a9915ed4 | [
"RSA-MD"
] | 43 | 2016-09-26T17:58:40.000Z | 2022-03-25T02:29:59.000Z | #### Running Amanzi to generate an output file ####
#### Takes in chemistry database for native Amanzi chemistry
| 33.983871 | 149 | 0.657807 | #### Running Amanzi to generate an output file ####
#### Takes in chemistry database for native Amanzi chemistry
import os, sys, subprocess, shutil
def run_amanzi_chem(xml_input_file, run_path=None, chemfiles=None, directory=None, isV2=False):
# get current directory
if directory is None:
directory = ... | 0 | 0 | 0 | 0 | 0 | 1,936 | 0 | 13 | 45 |
06af76f4f90d33ee09fdbb3df3304c99c155f21c | 1,170 | py | Python | day2/day2-part2.py | tknieza/advent-of-code-2019 | 2138f7feaf438df04fb23cb1e54968d85f00d195 | [
"MIT"
] | null | null | null | day2/day2-part2.py | tknieza/advent-of-code-2019 | 2138f7feaf438df04fb23cb1e54968d85f00d195 | [
"MIT"
] | null | null | null | day2/day2-part2.py | tknieza/advent-of-code-2019 | 2138f7feaf438df04fb23cb1e54968d85f00d195 | [
"MIT"
] | null | null | null | input = "1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,6,19,2,19,6,23,1,23,5,27,1,9,27,31,1,31,10,35,2,35,9,39,1,5,39,43,2,43,9,47,1,5,47,51,2,51,13,55,1,55,10,59,1,59,10,63,2,9,63,67,1,67,5,71,2,13,71,75,1,75,10,79,1,79,6,83,2,13,83,87,1,87,6,91,1,6,91,95,1,10,95,99,2,99,6,103,1,103,5,107,2,6,107,111,1,10,111,115,1,115,5,119,2,... | 37.741935 | 401 | 0.561538 | input = "1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,6,19,2,19,6,23,1,23,5,27,1,9,27,31,1,31,10,35,2,35,9,39,1,5,39,43,2,43,9,47,1,5,47,51,2,51,13,55,1,55,10,59,1,59,10,63,2,9,63,67,1,67,5,71,2,13,71,75,1,75,10,79,1,79,6,83,2,13,83,87,1,87,6,91,1,6,91,95,1,10,95,99,2,99,6,103,1,103,5,107,2,6,107,111,1,10,111,115,1,115,5,119,2,... | 0 | 0 | 0 | 0 | 0 | 546 | 0 | 0 | 23 |
7fbd6f32c754fb376b032c4f046745981db64f01 | 11,081 | py | Python | aceso/gravity.py | tetraptych/aceso | cbc977758e5904b8d5a2f483921df9e25e9a22d8 | [
"MIT"
] | 21 | 2018-04-20T18:48:50.000Z | 2022-01-26T13:51:23.000Z | aceso/gravity.py | tetraptych/aceso | cbc977758e5904b8d5a2f483921df9e25e9a22d8 | [
"MIT"
] | 18 | 2018-04-21T00:35:20.000Z | 2019-08-04T23:42:11.000Z | aceso/gravity.py | tetraptych/aceso | cbc977758e5904b8d5a2f483921df9e25e9a22d8 | [
"MIT"
] | 8 | 2018-09-12T23:08:44.000Z | 2021-09-08T18:43:06.000Z | """
Classes to calculate gravity-based measures of potential spatial accessibility.
These measures assign accessibility scores to demand locations based on their proximity to supply
locations. The main model used here is a gravitational model using non-standard decay functions.
References:
Luo, W. and Qi, Y. (200... | 42.783784 | 99 | 0.665102 | """
Classes to calculate gravity-based measures of potential spatial accessibility.
These measures assign accessibility scores to demand locations based on their proximity to supply
locations. The main model used here is a gravitational model using non-standard decay functions.
References:
Luo, W. and Qi, Y. (200... | 0 | 1,954 | 0 | 7,805 | 0 | 0 | 0 | -30 | 203 |
473c89a47bdb1b11af48ad25e177df9b8d2c7242 | 12,234 | py | Python | analyses/triangulation/study.py | dkogan/mrcal | ca4678e1171841fd9cd158b87ee460163647b495 | [
"Apache-2.0"
] | 80 | 2021-02-23T19:50:49.000Z | 2022-03-29T08:05:56.000Z | analyses/triangulation/study.py | dkogan/mrcal | ca4678e1171841fd9cd158b87ee460163647b495 | [
"Apache-2.0"
] | 2 | 2021-03-26T10:44:09.000Z | 2021-06-23T21:14:10.000Z | analyses/triangulation/study.py | dkogan/mrcal | ca4678e1171841fd9cd158b87ee460163647b495 | [
"Apache-2.0"
] | 8 | 2021-02-23T13:34:18.000Z | 2021-11-09T13:33:28.000Z | #!/usr/bin/python3
r'''Study the precision and accuracy of the various triangulation routines'''
import sys
import os
args = parse_args()
import numpy as np
import numpysane as nps
import gnuplotlib as gp
import pickle
import os.path
# I import the LOCAL mrcal
scriptdir = os.path.dirname(os.path.realpath(__f... | 40.376238 | 115 | 0.564656 | #!/usr/bin/python3
r'''Study the precision and accuracy of the various triangulation routines'''
import sys
import argparse
import re
import os
def parse_args():
parser = \
argparse.ArgumentParser(description = __doc__,
formatter_class=argparse.RawDescriptionHelpFormatt... | 0 | 0 | 0 | 0 | 0 | 3,639 | 0 | -18 | 67 |
0b71e0b58e9437d25f1e47fdfdb3ab0aa2330b0b | 12,571 | py | Python | uviewsd/core/sessionmanager.py | DanielSpringall/UViewSD | 9adb24be660496b28382aa4fdd0fbe596e696acc | [
"MIT"
] | null | null | null | uviewsd/core/sessionmanager.py | DanielSpringall/UViewSD | 9adb24be660496b28382aa4fdd0fbe596e696acc | [
"MIT"
] | null | null | null | uviewsd/core/sessionmanager.py | DanielSpringall/UViewSD | 9adb24be660496b28382aa4fdd0fbe596e696acc | [
"MIT"
] | null | null | null | # Copyright 2021 by Daniel Springall.
# This file is part of UViewSD, and is released under the "MIT License Agreement".
# Please see the LICENSE file that should have been included as part of this package.
import logging
logger = logging.getLogger(__name__)
| 36.437681 | 105 | 0.611487 | # Copyright 2021 by Daniel Springall.
# This file is part of UViewSD, and is released under the "MIT License Agreement".
# Please see the LICENSE file that should have been included as part of this package.
from uviewsd.core import usdextractor as uc_usdextractor
from uviewsd.gl import shape as gl_shape
import os
impo... | 0 | 735 | 0 | 11,443 | 0 | 0 | 0 | 42 | 90 |
6a919b2d737def02caed786fe6372cb468197e19 | 362 | py | Python | cnm/responsive/interfaces.py | cnm-web/cnm.responsive | 2aaec1e116aec593a06f19ed6714ded312ddce1e | [
"Apache-2.0"
] | null | null | null | cnm/responsive/interfaces.py | cnm-web/cnm.responsive | 2aaec1e116aec593a06f19ed6714ded312ddce1e | [
"Apache-2.0"
] | null | null | null | cnm/responsive/interfaces.py | cnm-web/cnm.responsive | 2aaec1e116aec593a06f19ed6714ded312ddce1e | [
"Apache-2.0"
] | null | null | null | """ Define interfaces for your add-on.
""" | 27.846154 | 69 | 0.732044 | """ Define interfaces for your add-on.
"""
import zope.interface
class IAddOnInstalled(zope.interface.Interface):
""" A layer specific for this add-on product.
This interface is referred in browserlayer.xml.
All views and viewlets register against this layer will appear on
your Plone site only when ... | 0 | 0 | 0 | 274 | 0 | 0 | 0 | 0 | 46 |
92cc3201158fafa056934cf5d7497f40b25cf9bd | 945 | py | Python | Programs_School/Schooltasks/headbutts/Movietask.py | Sedrowow/All-The-Projects | 115b55aefe2277e512b749416c1540c2004ebd06 | [
"FSFAP"
] | 1 | 2022-01-11T08:57:52.000Z | 2022-01-11T08:57:52.000Z | Programs_School/Schooltasks/headbutts/Movietask.py | Sedrowow/All-The-Projects | 115b55aefe2277e512b749416c1540c2004ebd06 | [
"FSFAP"
] | 2 | 2022-01-11T08:49:55.000Z | 2022-01-12T07:57:30.000Z | Programs_School/Schooltasks/headbutts/Movietask.py | Sedrowow/All-The-Projects | 115b55aefe2277e512b749416c1540c2004ebd06 | [
"FSFAP"
] | 1 | 2022-01-11T08:58:59.000Z | 2022-01-11T08:58:59.000Z |
import sys
print("each saved file is a sesion!")
newfile = int(input("do you want to: 1=make a new file, 2=read a file, 3=Add sth to a file or 4= delete a file?"))
if newfile == 1:
filename = input("What name should the file have?:\n")
DD = input("Which DAY (of the month) should the session be?:\n")
MM ... | 36.346154 | 114 | 0.596825 |
import sys
print("each saved file is a sesion!")
newfile = int(input("do you want to: 1=make a new file, 2=read a file, 3=Add sth to a file or 4= delete a file?"))
if newfile == 1:
filename = input("What name should the file have?:\n")
DD = input("Which DAY (of the month) should the session be?:\n")
MM ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9a5de6b92f035ebac83decb873449e8c3f31c541 | 670 | py | Python | Teme session 3.py | AdrianaMolete/session1 | b500d75e920b732b0e81283069ea679e4f56322e | [
"MIT"
] | null | null | null | Teme session 3.py | AdrianaMolete/session1 | b500d75e920b732b0e81283069ea679e4f56322e | [
"MIT"
] | null | null | null | Teme session 3.py | AdrianaMolete/session1 | b500d75e920b732b0e81283069ea679e4f56322e | [
"MIT"
] | null | null | null | print(split_pairs("abc"))
print (split_pairs("abcdef"))
a = "This is an example!"
words = a.split()
invers = ""
for word in words:
for c in reversed(word):
invers += c
invers += " "
print(invers)
x, y = rezolvare()
print(type(x))
print(type(y))
print(isinstance(x,Adam))
print(isinstance(x,Hu... | 14.255319 | 36 | 0.573134 | def split_pairs(a):
solutie = []
if len(a) % 2 != 0:
a += "_"
for i in range(0, len(a), 2):
solutie.append(a[i : i + 2])
return solutie
print(split_pairs("abc"))
print (split_pairs("abcdef"))
a = "This is an example!"
words = a.split()
invers = ""
for word in words:
for c in ... | 0 | 0 | 0 | 58 | 0 | 175 | 0 | 0 | 112 |
e04574d9d972e6f190419e0f1f046542c47d840f | 1,639 | py | Python | class5/exercise1/exercise1.py | papri-entropy/nornir-course | 122c5ecce19cca6c17a1eec0066be7c6b58e6eb5 | [
"MIT"
] | 1 | 2020-06-23T06:36:43.000Z | 2020-06-23T06:36:43.000Z | class5/exercise1/exercise1.py | papri-entropy/nornir-course | 122c5ecce19cca6c17a1eec0066be7c6b58e6eb5 | [
"MIT"
] | null | null | null | class5/exercise1/exercise1.py | papri-entropy/nornir-course | 122c5ecce19cca6c17a1eec0066be7c6b58e6eb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# import general use modules
# import nornir specifics
if __name__=="__main__":
main()
| 32.78 | 89 | 0.71568 | #!/usr/bin/env python
# import general use modules
import os
import re
from pprint import pprint as pp
# import nornir specifics
from nornir import InitNornir
from nornir.core.task import Result
from nornir.plugins.functions.text import print_result
from nornir.core.filter import F
from nornir.plugins.tasks import netw... | 0 | 0 | 0 | 0 | 0 | 1,031 | 0 | 203 | 289 |
8a69afdb4a9bcfa71f3b16b2652c48eddce31dbd | 1,916 | py | Python | nova/api/openstack/compute/plugins/v3/server_diagnostics.py | bopopescu/nova-35 | c32c01e08dccad921b4af6fc03d971d6e74c990f | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/server_diagnostics.py | bopopescu/nova-35 | c32c01e08dccad921b4af6fc03d971d6e74c990f | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/server_diagnostics.py | bopopescu/nova-35 | c32c01e08dccad921b4af6fc03d971d6e74c990f | [
"Apache-2.0"
] | 1 | 2020-07-24T09:13:22.000Z | 2020-07-24T09:13:22.000Z | # Copyright 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 requ... | 33.034483 | 78 | 0.679019 | # Copyright 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 requ... | 0 | 401 | 0 | 589 | 0 | 0 | 0 | 3 | 139 |
b64e23a1f095e56b1d8870076e7de4339e61b7ab | 2,123 | py | Python | pose/converting.py | Jacob-Lapkin/UCL_Thesis | 6c36cf3b1604deccdbdc9dda58f2aab5b42fa504 | [
"MIT"
] | null | null | null | pose/converting.py | Jacob-Lapkin/UCL_Thesis | 6c36cf3b1604deccdbdc9dda58f2aab5b42fa504 | [
"MIT"
] | null | null | null | pose/converting.py | Jacob-Lapkin/UCL_Thesis | 6c36cf3b1604deccdbdc9dda58f2aab5b42fa504 | [
"MIT"
] | null | null | null |
# Opens the Video file
#converter('pose/videos/serve/djok/djokserveside.mp4', 'djok', '1')
# Creating a directory with the name of id to store frame images
# def is_empty(id):
# path = '/Users/jacoblapkin/Documents/GitHub/UCL_Thesis/pose/user_serves'
# dir = os.path.join(path, str(id))
# if not os.pat... | 27.217949 | 86 | 0.60292 | import cv2
import os, time, uuid, shutil
def delete_user_video(user):
folder = f'pose/user_serves/{user}'
for filename in os.listdir(folder):
file_path = os.path.join(folder, filename)
try:
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_pa... | 0 | 0 | 0 | 0 | 0 | 1,590 | 0 | -3 | 180 |
78bcca66650d7c00bcf4921892684fdf5ef9500e | 2,332 | py | Python | Implicit/auth_server/Implicit_auth_server.py | YungYanix/auth-server-sample | fcd222365b170e5b95c38743e04b96c913c9114b | [
"Apache-2.0"
] | 63 | 2018-10-21T13:19:06.000Z | 2022-02-14T15:09:47.000Z | Implicit/auth_server/Implicit_auth_server.py | YungYanix/auth-server-sample | fcd222365b170e5b95c38743e04b96c913c9114b | [
"Apache-2.0"
] | 4 | 2018-08-21T05:12:22.000Z | 2021-04-29T05:58:27.000Z | Implicit/auth_server/Implicit_auth_server.py | YungYanix/auth-server-sample | fcd222365b170e5b95c38743e04b96c913c9114b | [
"Apache-2.0"
] | 39 | 2018-10-07T20:01:34.000Z | 2022-03-30T20:45:07.000Z | #import ssl
from flask import Flask
app = Flask(__name__)
if __name__ == '__main__':
#context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
#context.load_cert_chain('domain.crt', 'domain.key')
#app.run(port = 5000, debug = True, ssl_context = context)
app.run(port = 5001, debug = True) | 29.518987 | 73 | 0.698971 | import json
#import ssl
import urllib.parse as urlparse
from auth import (authenticate_user_credentials, generate_access_token,
verify_client_info, JWT_LIFE_SPAN)
from flask import Flask, redirect, render_template, request
from urllib.parse import urlencode
app = Flask(__name__)
@app.route('/auth... | 0 | 1,449 | 0 | 0 | 0 | 281 | 0 | 154 | 158 |
983386e549ade3c779b688c0f8aabfaee3a4ebbf | 106 | py | Python | src/pagic/types.py | abilian/pagic | 4d77ce4ca5321b3471433dc0c3f8d756211dc12a | [
"Apache-2.0"
] | null | null | null | src/pagic/types.py | abilian/pagic | 4d77ce4ca5321b3471433dc0c3f8d756211dc12a | [
"Apache-2.0"
] | null | null | null | src/pagic/types.py | abilian/pagic | 4d77ce4ca5321b3471433dc0c3f8d756211dc12a | [
"Apache-2.0"
] | null | null | null | from typing import Any, Union
JSON = Union[dict[str, Any], list[Any], int, str, float, bool, type[None]]
| 26.5 | 74 | 0.688679 | from typing import Any, Union
JSON = Union[dict[str, Any], list[Any], int, str, float, bool, type[None]]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e3dbd6d867c7c02f85243c4d96dfc54e8d467622 | 650 | py | Python | app/__init__.py | D516-lang/origin-website | 3281a7017cf695cd0eeaca1a641be6ab5014118b | [
"MIT"
] | 1 | 2020-05-21T04:44:45.000Z | 2020-05-21T04:44:45.000Z | app/__init__.py | D516-lang/origin-website | 3281a7017cf695cd0eeaca1a641be6ab5014118b | [
"MIT"
] | null | null | null | app/__init__.py | D516-lang/origin-website | 3281a7017cf695cd0eeaca1a641be6ab5014118b | [
"MIT"
] | null | null | null |
try:
import urllib.parse
quote = urllib.parse.quote
except:
import urllib
quote = urllib.quote_plus
from config import constants
app = MyFlask(__name__,
template_folder=constants.TEMPLATE_ROOT,
static_folder=constants.STATIC_ROOT)
# `.encode('utf8')` will not be needed for python 3
app.jinja... | 26 | 71 | 0.716923 | from flask import Flask
from flask_babel import Babel
try:
import urllib.parse
quote = urllib.parse.quote
except:
import urllib
quote = urllib.quote_plus
from config import constants
class MyFlask(Flask):
def get_send_file_max_age(self, name):
if name.startswith('js/') or name.startswith(... | 0 | 0 | 0 | 190 | 0 | 0 | 0 | 10 | 67 |
6c3db17c2d5bb19c73a37590054e9da0cf45de93 | 12,162 | py | Python | alphausblue/api/operation_pb2.py | alphauslabs/blue-sdk-python | 24120a60cd153a69080661a687938b417b32f947 | [
"Apache-2.0"
] | null | null | null | alphausblue/api/operation_pb2.py | alphauslabs/blue-sdk-python | 24120a60cd153a69080661a687938b417b32f947 | [
"Apache-2.0"
] | null | null | null | alphausblue/api/operation_pb2.py | alphauslabs/blue-sdk-python | 24120a60cd153a69080661a687938b417b32f947 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: api/operation.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.p... | 48.071146 | 1,024 | 0.768541 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: api/operation.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8659c7732b728a6b4fa1a6433c97d22d91d4208c | 3,972 | py | Python | dvwa/dvwa_rce/medium/dvwa_medium_rce.py | twseptian/python-exploits | adfa753d704b1864b7aff8769543e7e521c134e3 | [
"Unlicense"
] | null | null | null | dvwa/dvwa_rce/medium/dvwa_medium_rce.py | twseptian/python-exploits | adfa753d704b1864b7aff8769543e7e521c134e3 | [
"Unlicense"
] | null | null | null | dvwa/dvwa_rce/medium/dvwa_medium_rce.py | twseptian/python-exploits | adfa753d704b1864b7aff8769543e7e521c134e3 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
proxies = {'http':'http://127.0.0.1:8080','https':'https://127.0.0.1:8080'}
# Instantiate our interface class
global output
output = Interface()
output.header()
security_level = "medium"
target_ip = '172.17.0.2' #ch... | 32.826446 | 154 | 0.656344 | #!/usr/bin/python3
import requests
import re
import sys
import subprocess
import shlex
from bs4 import BeautifulSoup
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
proxies = {'http':'http://127.0.0.1:8080','https':'https://127.0.0.1:8080'}
class Interface ():
def __init__ (self):... | 3 | 0 | 0 | 602 | 0 | 2,554 | 0 | -34 | 248 |
2d01cc49fd8f6c20b9abe050f86b0b2056b729a1 | 6,736 | py | Python | Assignment 2/bot.py | billzhonggz/IEMS5780 | b192d302ce623d308bb18d086f9cc8b2170fb98e | [
"BSD-4-Clause-UC"
] | 1 | 2022-01-06T13:55:03.000Z | 2022-01-06T13:55:03.000Z | Assignment 2/bot.py | billzhonggz/IEMS5780 | b192d302ce623d308bb18d086f9cc8b2170fb98e | [
"BSD-4-Clause-UC"
] | null | null | null | Assignment 2/bot.py | billzhonggz/IEMS5780 | b192d302ce623d308bb18d086f9cc8b2170fb98e | [
"BSD-4-Clause-UC"
] | null | null | null | """bot.py
This script creates three threads to do the following,
Thread 1 (created by Telepot): Receiving messages from Telegram
Thread 2: Handle incoming message from queue, send to predict.
Thread 3: Send prediction results back to user.
This script is a part of a submission of Assignment 2, IEMS5780, S1 2019-2020, ... | 38.056497 | 122 | 0.612827 | """bot.py
This script creates three threads to do the following,
Thread 1 (created by Telepot): Receiving messages from Telegram
Thread 2: Handle incoming message from queue, send to predict.
Thread 3: Send prediction results back to user.
This script is a part of a submission of Assignment 2, IEMS5780, S1 2019-2020, ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dd7997cc31cbdd7acbedc70bff160e124de6ab77 | 2,540 | py | Python | src/tests/NumberTest.py | TheStarkor/Eye-Car | e0962cd36effa24cc90935b4364dadf47e1ef2d3 | [
"MIT"
] | null | null | null | src/tests/NumberTest.py | TheStarkor/Eye-Car | e0962cd36effa24cc90935b4364dadf47e1ef2d3 | [
"MIT"
] | 1 | 2019-12-20T15:18:12.000Z | 2019-12-20T15:27:27.000Z | src/tests/NumberTest.py | TheStarkor/Eye-Car | e0962cd36effa24cc90935b4364dadf47e1ef2d3 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
# for video
cap = cv2.VideoCapture(-1)
while (cap.isOpened()):
_, frame = cap.read()
load_image = np.copy(frame)
canny_image = canny(load_image)
cropped_image = region_of_interest(canny_image)
find_num(load_image, cropped_image)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
... | 30.60241 | 130 | 0.654331 | import tensorflow as tf
import cv2
import numpy as np
import math
import matplotlib.pyplot as plt
def canny(image):
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
blur = cv2.GaussianBlur(gray, (5, 5), 0)
canny = cv2.Canny(blur, 50, 150)
return canny
def contour(image, canny):
contours, _ = cv2.findContours(... | 0 | 0 | 0 | 0 | 0 | 1,998 | 0 | 2 | 181 |
12ea449c96f3304325e057e0869e19da66015940 | 16,157 | py | Python | src/platform_vision/scripts/trackMarker.py | ahmohamed1/activeStereoVisionPlatform | 6c928ca242e4de68c7b15a8748bff1d9f7fa1382 | [
"MIT"
] | null | null | null | src/platform_vision/scripts/trackMarker.py | ahmohamed1/activeStereoVisionPlatform | 6c928ca242e4de68c7b15a8748bff1d9f7fa1382 | [
"MIT"
] | null | null | null | src/platform_vision/scripts/trackMarker.py | ahmohamed1/activeStereoVisionPlatform | 6c928ca242e4de68c7b15a8748bff1d9f7fa1382 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import cv2.aruco as aruco
import sys
VERBOSE = True
DEBUG = True
if __name__ == '__main__':
main(sys.argv)
# saveData()
| 38.196217 | 155 | 0.595098 | #!/usr/bin/env python
import rospy
import cv2
import cv2.aruco as aruco
import sys
import numpy as np
import math
import time
from geometry_msgs.msg import Twist
from geometry_msgs.msg import Vector3
from sensor_msgs.msg import Image
from std_msgs.msg import Float64
from cv_bridge import CvBridge, CvBridgeError
from ... | 0 | 0 | 0 | 14,855 | 0 | 762 | 0 | 52 | 336 |
1d7900fbea2c64b2f705b31ecd2d3f759e806064 | 1,724 | py | Python | metasub_utils/hudson_alpha/metasub_utils/hudson_alpha/utils.py | MetaSUB/metasub_utils | c52c5dde816d710db5ac8dc6f8804bb795a992e4 | [
"MIT"
] | 8 | 2018-12-30T23:35:03.000Z | 2022-02-22T09:43:48.000Z | metasub_utils/hudson_alpha/metasub_utils/hudson_alpha/utils.py | MetaSUB/metasub_utils | c52c5dde816d710db5ac8dc6f8804bb795a992e4 | [
"MIT"
] | 5 | 2019-01-05T04:54:46.000Z | 2021-03-10T08:59:16.000Z | metasub_utils/hudson_alpha/metasub_utils/hudson_alpha/utils.py | MetaSUB/metasub_utils | c52c5dde816d710db5ac8dc6f8804bb795a992e4 | [
"MIT"
] | 2 | 2019-08-26T22:08:18.000Z | 2020-02-24T19:57:17.000Z | """Utilities for Hudson Alpha."""
import requests
from os.path import basename
def download_file(url, path, auth):
"""Download a file."""
r = requests.get(url, auth=auth)
open(path, 'wb').write(r.content)
def parse_flowcell_table():
"""Return a list representing all the flowcells in hudson_alpha_fl... | 30.245614 | 96 | 0.595128 | """Utilities for Hudson Alpha."""
import requests
from os.path import basename
from .constants import *
def download_file(url, path, auth):
"""Download a file."""
r = requests.get(url, auth=auth)
open(path, 'wb').write(r.content)
def parse_flowcell_table():
"""Return a list representing all the fl... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 23 |
bc8e00cc70c0b22a8eeb2ef4288ea9951b93304e | 6,219 | py | Python | sdk/packages/object_pose_estimation/apps/pose_cnn_decoder/evaluation/record_multicask_groundtruth_pose.py | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | null | null | null | sdk/packages/object_pose_estimation/apps/pose_cnn_decoder/evaluation/record_multicask_groundtruth_pose.py | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | null | null | null | sdk/packages/object_pose_estimation/apps/pose_cnn_decoder/evaluation/record_multicask_groundtruth_pose.py | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | 1 | 2022-01-28T16:37:51.000Z | 2022-01-28T16:37:51.000Z | '''
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docu... | 42.889655 | 97 | 0.643673 | '''
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docu... | 0 | 0 | 0 | 0 | 0 | 2,516 | 0 | 10 | 156 |
e5db6b2618f20a088cc633c934b30187098a04ae | 18,816 | py | Python | server/cc_core/sbml_modelcreator.py | RENCI/CellCycleBrowser | f1e84f7c529dbfb85a0cd36d66eb1c3ebefb93dd | [
"BSD-3-Clause"
] | 4 | 2017-12-15T20:46:50.000Z | 2021-09-14T17:23:01.000Z | server/cc_core/sbml_modelcreator.py | RENCI/CellCycleBrowser | f1e84f7c529dbfb85a0cd36d66eb1c3ebefb93dd | [
"BSD-3-Clause"
] | 35 | 2017-09-21T14:14:50.000Z | 2022-01-19T14:02:42.000Z | server/cc_core/sbml_modelcreator.py | RENCI/CellCycleBrowser | f1e84f7c529dbfb85a0cd36d66eb1c3ebefb93dd | [
"BSD-3-Clause"
] | null | null | null |
# This function will spit out an SBML model with the appropriate number of subphases
# Follwing a sequential model where each subphase follows over each other
# This function will spit out an SBML model with the appropriate number of subphases
# Follwing a parallel model where we wait for all subphases to finish in... | 47.157895 | 116 | 0.581739 | import simplesbml
# This function will spit out an SBML model with the appropriate number of subphases
# Follwing a sequential model where each subphase follows over each other
def createSBMLModel_CC_serial(num_G1, rate_G1, num_S, rate_S, num_G2M, rate_G2M, writesbmlfile):
# Creating basic model
model = simp... | 0 | 0 | 0 | 0 | 0 | 18,388 | 0 | -4 | 66 |
0c9e7558089c3565c9729b945f69474f5ad6f346 | 1,816 | py | Python | pastebot/cli.py | fate0/pastebot | 5d274af4ae5d3b75ed36f01b37c4a3e58a282e8e | [
"Apache-2.0"
] | 18 | 2017-09-10T14:46:21.000Z | 2020-11-30T06:48:40.000Z | pastebot/cli.py | fate0/pastebot | 5d274af4ae5d3b75ed36f01b37c4a3e58a282e8e | [
"Apache-2.0"
] | null | null | null | pastebot/cli.py | fate0/pastebot | 5d274af4ae5d3b75ed36f01b37c4a3e58a282e8e | [
"Apache-2.0"
] | 4 | 2019-05-13T08:56:37.000Z | 2021-12-22T07:05:44.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import click
click.disable_unicode_literals_warning = True
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
| 29.290323 | 74 | 0.678965 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import click
import pastebot
click.disable_unicode_literals_warning = True
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.group(context_settings=CONTEXT_SETTINGS)
@click.version_option(pastebot.__version__)
def main():
pass
@... | 150 | 1,492 | 0 | 0 | 0 | 0 | 0 | -6 | 91 |
b52ebeb8e118766b1be55b1129b594fa967948b8 | 1,025 | py | Python | map_db.py | kinisi/geoserver-python | a980f4c10c3cc946042d4b0e5e837e6ae05098fb | [
"MIT"
] | null | null | null | map_db.py | kinisi/geoserver-python | a980f4c10c3cc946042d4b0e5e837e6ae05098fb | [
"MIT"
] | null | null | null | map_db.py | kinisi/geoserver-python | a980f4c10c3cc946042d4b0e5e837e6ae05098fb | [
"MIT"
] | null | null | null | #!/usr/bin/python
import MySQLdb
db = None
db_upd2 = None
if __name__ == '__main__':
connect()
# you must create a Cursor object. It will let
# you execute all the query you need
cur = db.cursor()
# Use all the SQL you like
cur.execute("SELECT * FROM device_location")
# print all the first cell o... | 25 | 76 | 0.620488 | #!/usr/bin/python
import MySQLdb
db = None
db_upd2 = None
def connect():
global db
db = MySQLdb.connect(host="localhost", # your host, usually localhost
# user="tcarlson", # your username
# passwd="KCkApAG7Db9tnGcS", # your password
user = 'kuser0',
passwd = '9aad1... | 0 | 0 | 0 | 0 | 0 | 618 | 0 | 0 | 23 |
43379f3f6d004599b61445245100e8896bdb33d4 | 523 | py | Python | src/ds/reverse_the_string.py | megactrl/algo | 54dd5ddd86c7a8c6d74da7580194ce0f0d29fcf6 | [
"MIT"
] | 1 | 2020-09-15T16:32:31.000Z | 2020-09-15T16:32:31.000Z | src/ds/reverse_the_string.py | megactrl/algo | 54dd5ddd86c7a8c6d74da7580194ce0f0d29fcf6 | [
"MIT"
] | null | null | null | src/ds/reverse_the_string.py | megactrl/algo | 54dd5ddd86c7a8c6d74da7580194ce0f0d29fcf6 | [
"MIT"
] | null | null | null |
stack = Stack()
for c in "yesterday":
stack.push(c)
reversed_string = ""
for i in range(len(stack.items)):
reversed_string += stack.pop()
print(reversed_string)
| 15.848485 | 44 | 0.594646 | class Stack:
def __init__(self):
self.items = []
def is_empty(self):
return self.items == []
def push(self, item):
self.items.append(item)
def pop(self):
return self.items.pop()
def peek(self):
return self.items[len(self.items)-1]
def size(self):
... | 0 | 0 | 0 | 325 | 0 | 0 | 0 | 0 | 22 |
7a6066b17b7796f7b604ee214460c2c77f19981a | 920 | py | Python | backend/donation/migrations/0001_initial.py | daeisbae/PeerOrgan-HackNYU2022 | 3f11f80fe101800727743e348ccb4f9135198950 | [
"MIT"
] | null | null | null | backend/donation/migrations/0001_initial.py | daeisbae/PeerOrgan-HackNYU2022 | 3f11f80fe101800727743e348ccb4f9135198950 | [
"MIT"
] | null | null | null | backend/donation/migrations/0001_initial.py | daeisbae/PeerOrgan-HackNYU2022 | 3f11f80fe101800727743e348ccb4f9135198950 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2022-02-27 09:44
| 31.724138 | 118 | 0.53913 | # Generated by Django 4.0 on 2022-02-27 09:44
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Organ',
fields=[
('id', model... | 0 | 0 | 0 | 802 | 0 | 0 | 0 | 19 | 50 |
f417560b55407abdc41caf1efa7add2e4594079a | 147 | py | Python | apps/userprofile/urls.py | filipgorczynski/codingboard | 4ec17853e387bca36250bbe2255314d40f6c4e10 | [
"MIT"
] | null | null | null | apps/userprofile/urls.py | filipgorczynski/codingboard | 4ec17853e387bca36250bbe2255314d40f6c4e10 | [
"MIT"
] | null | null | null | apps/userprofile/urls.py | filipgorczynski/codingboard | 4ec17853e387bca36250bbe2255314d40f6c4e10 | [
"MIT"
] | null | null | null | from django.urls import path
from apps.userprofile.views import dashboard
urlpatterns = [
path('dashboard', dashboard, name='dashboard'),
]
| 16.333333 | 51 | 0.741497 | from django.urls import path
from apps.userprofile.views import dashboard
urlpatterns = [
path('dashboard', dashboard, name='dashboard'),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e16860f6c496fa0391763c33b2859fdb464799bf | 100 | py | Python | moocng/settings/__init__.py | OpenMOOC/moocng | 1e3dafb84aa1838c881df0c9bcca069e47c7f52d | [
"Apache-2.0"
] | 36 | 2015-01-10T06:00:36.000Z | 2020-03-19T10:06:59.000Z | moocng/settings/__init__.py | OpenMOOC/moocng | 1e3dafb84aa1838c881df0c9bcca069e47c7f52d | [
"Apache-2.0"
] | 3 | 2015-10-01T17:59:32.000Z | 2018-09-04T03:32:17.000Z | moocng/settings/__init__.py | OpenMOOC/moocng | 1e3dafb84aa1838c881df0c9bcca069e47c7f52d | [
"Apache-2.0"
] | 17 | 2015-01-13T03:46:58.000Z | 2020-07-05T06:29:51.000Z | # -*- coding: utf-8 -*-
try:
except ImportError:
| 14.285714 | 24 | 0.6 | # -*- coding: utf-8 -*-
try:
from .local import *
except ImportError:
from .devel import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 52 |
54d242e8a76d0442fa6f497a3a2d51ee549b3852 | 5,235 | py | Python | modules/dbnd/src/dbnd/_core/commands/metrics.py | FHoffmannCode/dbnd | 82beee1a8c752235bf21b4b0ceace5ab25410e52 | [
"Apache-2.0"
] | null | null | null | modules/dbnd/src/dbnd/_core/commands/metrics.py | FHoffmannCode/dbnd | 82beee1a8c752235bf21b4b0ceace5ab25410e52 | [
"Apache-2.0"
] | null | null | null | modules/dbnd/src/dbnd/_core/commands/metrics.py | FHoffmannCode/dbnd | 82beee1a8c752235bf21b4b0ceace5ab25410e52 | [
"Apache-2.0"
] | null | null | null | import logging
import typing
if typing.TYPE_CHECKING:
logger = logging.getLogger(__name__)
log_dataframe = log_data
| 29.24581 | 92 | 0.672588 | import logging
import time
import typing
from dbnd._core.constants import DbndTargetOperationType
from dbnd._core.plugin.dbnd_plugins import is_plugin_enabled
from dbnd._core.task_run.task_run_tracker import TaskRunTracker
from dbnd._core.tracking.log_data_reqeust import LogDataRequest
from dbnd._core.utils import sev... | 0 | 563 | 0 | 0 | 0 | 3,750 | 0 | 297 | 496 |
8d0775886db361fec78f300a972b5a6c4aa37a98 | 9,955 | py | Python | xfdnn/rt/xdnn_opt.py | Saums/ml-suite | 8a2b52763b0c1406abc4400302977d8354d74e11 | [
"Apache-2.0"
] | null | null | null | xfdnn/rt/xdnn_opt.py | Saums/ml-suite | 8a2b52763b0c1406abc4400302977d8354d74e11 | [
"Apache-2.0"
] | null | null | null | xfdnn/rt/xdnn_opt.py | Saums/ml-suite | 8a2b52763b0c1406abc4400302977d8354d74e11 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# // SPDX-License-Identifier: BSD-3-CLAUSE
#
# (C) Copyright 2018, Xilinx, Inc.
#
| 33.631757 | 105 | 0.654847 | #!/usr/bin/env python
#
# // SPDX-License-Identifier: BSD-3-CLAUSE
#
# (C) Copyright 2018, Xilinx, Inc.
#
import copy
import pydot
import json
import sys
from collections import defaultdict
import operator, pprint
import tensor_tools as tt
import keras_tools as kt
import layer
import xdnn_env
from factory import fact... | 0 | 0 | 0 | 8,965 | 0 | 0 | 0 | 236 | 647 |
b728590d108d36a77f82cea81476a721518d8539 | 2,041 | py | Python | tests/test_parser.py | transfluxus/jsonpath-ng | 3e2dd9ec404de61ed56ce4d8af99c2612fd540e6 | [
"Apache-2.0"
] | 339 | 2017-03-22T15:00:25.000Z | 2022-03-30T20:55:36.000Z | tests/test_parser.py | transfluxus/jsonpath-ng | 3e2dd9ec404de61ed56ce4d8af99c2612fd540e6 | [
"Apache-2.0"
] | 82 | 2017-06-11T07:13:09.000Z | 2022-03-22T19:48:03.000Z | tests/test_parser.py | transfluxus/jsonpath-ng | 3e2dd9ec404de61ed56ce4d8af99c2612fd540e6 | [
"Apache-2.0"
] | 65 | 2017-04-14T03:57:58.000Z | 2022-03-30T20:55:38.000Z | from __future__ import unicode_literals, print_function, absolute_import, division, generators, nested_scopes
| 49.780488 | 170 | 0.519353 | from __future__ import unicode_literals, print_function, absolute_import, division, generators, nested_scopes
import unittest
from jsonpath_ng.lexer import JsonPathLexer
from jsonpath_ng.parser import JsonPathParser
from jsonpath_ng.jsonpath import *
class TestParser(unittest.TestCase):
# TODO: This will be much ... | 0 | 47 | 0 | 1,719 | 0 | 0 | 0 | 53 | 112 |
c021a913a0361591cf6120ed6328e8f044df33da | 208 | py | Python | controller/pso_controller.py | christian-5-28/aimlx-demos | ba63edb80f37b1a8ced70d5e29038eafa3b48b91 | [
"MIT"
] | null | null | null | controller/pso_controller.py | christian-5-28/aimlx-demos | ba63edb80f37b1a8ced70d5e29038eafa3b48b91 | [
"MIT"
] | null | null | null | controller/pso_controller.py | christian-5-28/aimlx-demos | ba63edb80f37b1a8ced70d5e29038eafa3b48b91 | [
"MIT"
] | null | null | null | from flask import Blueprint
pso_api = Blueprint('pso_api', __name__)
| 17.333333 | 42 | 0.740385 | from flask import Blueprint
from flask import render_template
pso_api = Blueprint('pso_api', __name__)
@pso_api.route('', methods=['GET'])
def ask_for_image():
return render_template('pso/pso.html')
| 0 | 78 | 0 | 0 | 0 | 0 | 0 | 12 | 45 |
10cfdc8fde50b2d7b43306377f9881673ccfb52c | 4,023 | py | Python | document/urls.py | wilmerm/unolet-2022 | 18119a9381b763e38c888bafdb7f97028bd80ea1 | [
"BSD-3-Clause"
] | null | null | null | document/urls.py | wilmerm/unolet-2022 | 18119a9381b763e38c888bafdb7f97028bd80ea1 | [
"BSD-3-Clause"
] | null | null | null | document/urls.py | wilmerm/unolet-2022 | 18119a9381b763e38c888bafdb7f97028bd80ea1 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path
from document import views
from document.models import DocumentType
urlpatterns = [
path("", views.Index.as_view(), name="document-index"),
path("document/<str:generictype>/create/",
views.DocumentCreateView.as_view(), name="document-document-create"),
path("document/... | 35.289474 | 75 | 0.686304 | from django.urls import path
from document import views
from document.models import DocumentType
urlpatterns = [
path("", views.Index.as_view(), name="document-index"),
path("document/<str:generictype>/create/",
views.DocumentCreateView.as_view(), name="document-document-create"),
path("document/... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
101492f01ba20e95d17e2894bb28ccb82639d54e | 5,442 | py | Python | blaze/command/analyze.py | henry1jin/alohamora | e51e2488ecdf3e9692d5bb6b25ebc88622087c20 | [
"MIT"
] | 5 | 2020-12-16T03:13:59.000Z | 2022-03-06T07:16:39.000Z | blaze/command/analyze.py | henry1jin/alohamora | e51e2488ecdf3e9692d5bb6b25ebc88622087c20 | [
"MIT"
] | 9 | 2020-09-25T23:25:59.000Z | 2022-03-11T23:45:14.000Z | blaze/command/analyze.py | henry1jin/alohamora | e51e2488ecdf3e9692d5bb6b25ebc88622087c20 | [
"MIT"
] | 3 | 2019-10-16T21:22:07.000Z | 2020-07-21T13:38:22.000Z | """ Implements the commands for analyzing training progress """
| 40.917293 | 119 | 0.653436 | """ Implements the commands for analyzing training progress """
import json
import sys
from blaze.action import Policy
from blaze.config.client import get_client_environment_from_parameters, get_default_client_environment
from blaze.config.config import get_config
from blaze.config.environment import EnvironmentConfig... | 0 | 4,881 | 0 | 0 | 0 | 0 | 0 | 251 | 245 |
236fb5af0b31afa3afd531c55b848d3b83d63fbe | 301 | py | Python | djarvis/examples.py | gleb23/uni-python-tasks | 7cca02e77a347dd463691f8cfcce55d52f56b141 | [
"MIT"
] | null | null | null | djarvis/examples.py | gleb23/uni-python-tasks | 7cca02e77a347dd463691f8cfcce55d52f56b141 | [
"MIT"
] | null | null | null | djarvis/examples.py | gleb23/uni-python-tasks | 7cca02e77a347dd463691f8cfcce55d52f56b141 | [
"MIT"
] | null | null | null | from djarvis import demo
points = [[100, 100],
[200, 200],
[140, 210],
[90, 150],
[176, 50],
[130, 120],
[180, 180],
[130, 200],
[100, 200],
[200, 100],
[150, 150],
[120, 100]]
demo(points) | 18.8125 | 24 | 0.355482 | from djarvis import demo
points = [[100, 100],
[200, 200],
[140, 210],
[90, 150],
[176, 50],
[130, 120],
[180, 180],
[130, 200],
[100, 200],
[200, 100],
[150, 150],
[120, 100]]
demo(points) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
364c65afe6c7caae01583f5cff2257043bc7dba6 | 610 | py | Python | leetcode_python/124.py | GUTYL/algorithms | e1c956ff4823e1f9252b50d31893a5b2da930372 | [
"MIT"
] | 1 | 2021-11-06T15:19:06.000Z | 2021-11-06T15:19:06.000Z | leetcode_python/124.py | GUTYL/algorithms | e1c956ff4823e1f9252b50d31893a5b2da930372 | [
"MIT"
] | null | null | null | leetcode_python/124.py | GUTYL/algorithms | e1c956ff4823e1f9252b50d31893a5b2da930372 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
| 26.521739 | 65 | 0.591803 | # Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
max_sum = float('-inf')
def maxPathSum(self, root: TreeNode) -> int:
self.get_sum(root)
return ... | 0 | 0 | 0 | 527 | 0 | 0 | 0 | 0 | 45 |
efc510407f474c7de67c4df51fe5fc9157f419b7 | 81 | py | Python | django_structlog_demo_project/test_app/__init__.py | paulstuartparker/django-structlog | 22259f78ff72eaf2c030313b8134afba2380478e | [
"MIT"
] | 1 | 2019-09-04T01:35:26.000Z | 2019-09-04T01:35:26.000Z | django_structlog_demo_project/test_app/__init__.py | paulstuartparker/django-structlog | 22259f78ff72eaf2c030313b8134afba2380478e | [
"MIT"
] | null | null | null | django_structlog_demo_project/test_app/__init__.py | paulstuartparker/django-structlog | 22259f78ff72eaf2c030313b8134afba2380478e | [
"MIT"
] | null | null | null | default_app_config = "django_structlog_demo_project.test_app.apps.TestAppConfig"
| 40.5 | 80 | 0.888889 | default_app_config = "django_structlog_demo_project.test_app.apps.TestAppConfig"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6304dc48d93b47f5ecd42c76037d246a06a042a6 | 550 | py | Python | setup.py | PeterA182/diamond | 22c4c91db80d3752e4ef110a67f9effb2cb33edf | [
"MIT"
] | null | null | null | setup.py | PeterA182/diamond | 22c4c91db80d3752e4ef110a67f9effb2cb33edf | [
"MIT"
] | null | null | null | setup.py | PeterA182/diamond | 22c4c91db80d3752e4ef110a67f9effb2cb33edf | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r")as fh:
des = fh.read()
setuptools.setup(
name="diamond-pkg-PeterA182",
version="0.0.1",
author="Peter Altamura",
description="A class structure for manipulating Normalized MySportsFeed API baseball data",
url="https://github.com/PeterA182/diamond",
... | 26.190476 | 95 | 0.649091 | import setuptools
with open("README.md", "r")as fh:
des = fh.read()
setuptools.setup(
name="diamond-pkg-PeterA182",
version="0.0.1",
author="Peter Altamura",
description="A class structure for manipulating Normalized MySportsFeed API baseball data",
url="https://github.com/PeterA182/diamond",
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
16ed7625ba331973100195358b480e1defcd4b2d | 983 | py | Python | Easy/206_2.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 6 | 2017-09-25T18:05:50.000Z | 2019-03-27T00:23:15.000Z | Easy/206_2.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | 1 | 2017-10-29T12:04:41.000Z | 2018-08-16T18:00:37.000Z | Easy/206_2.py | Hellofafar/Leetcode | 7a459e9742958e63be8886874904e5ab2489411a | [
"CNRI-Python"
] | null | null | null | # ------------------------------
# 206. Reverse Linked List
#
# Description:
# Reverse a singly linked list.
#
# Version: 1.0
# 02/06/18 by Jianfa
# ------------------------------
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
# ... | 22.860465 | 94 | 0.537131 | # ------------------------------
# 206. Reverse Linked List
#
# Description:
# Reverse a singly linked list.
#
# Version: 1.0
# 02/06/18 by Jianfa
# ------------------------------
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
# ... | 0 | 0 | 0 | 300 | 0 | 0 | 0 | 0 | 23 |