hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | 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 125 | 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 125 | 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.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
626e79d1097e3ee7dcfeaedcec4d5a17f8a45607 | 3,033 | py | Python | networkmonitor/monitor.py | luther38/NetworkMonitor | bd5e9336342e7af71c19ca484f8d386b6b79ad69 | [
"MIT"
] | null | null | null | networkmonitor/monitor.py | luther38/NetworkMonitor | bd5e9336342e7af71c19ca484f8d386b6b79ad69 | [
"MIT"
] | null | null | null | networkmonitor/monitor.py | luther38/NetworkMonitor | bd5e9336342e7af71c19ca484f8d386b6b79ad69 | [
"MIT"
] | null | null | null |
import datetime
import typing
from networkmonitor import OldConfig
from networkmonitor.src.configuration import IConfig, ContextConfig
from networkmonitor.src.protocols import IProtocols, ContextProtocols
from networkmonitor.src import Configuration
from networkmonitor.src import Nodes
from networkmonitor.src import I... | 35.267442 | 104 | 0.589186 |
import datetime
import typing
from networkmonitor import OldConfig
from networkmonitor.src.configuration import IConfig, ContextConfig
from networkmonitor.src.protocols import IProtocols, ContextProtocols
from networkmonitor.src import Configuration
from networkmonitor.src import Nodes
from networkmonitor.src import I... | 2,406 | 0 | 116 |
a43b1675c8e19994c0be2bd6717197a732815f09 | 336 | py | Python | welltory/admin.py | vasmedvedev/welltory_test | 9dd1ea35850916a2203241798d0acd9415d762b7 | [
"MIT"
] | null | null | null | welltory/admin.py | vasmedvedev/welltory_test | 9dd1ea35850916a2203241798d0acd9415d762b7 | [
"MIT"
] | null | null | null | welltory/admin.py | vasmedvedev/welltory_test | 9dd1ea35850916a2203241798d0acd9415d762b7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from welltory import models
admin.site.register(models.Sleep, SleepAdmin)
admin.site.register(models.Steps, StepsAdmin)
admin.site.register(models.Geo, GeoAdmin)
| 16.8 | 45 | 0.779762 | from django.contrib import admin
from welltory import models
class SleepAdmin(admin.ModelAdmin):
pass
class StepsAdmin(admin.ModelAdmin):
pass
class GeoAdmin(admin.ModelAdmin):
pass
admin.site.register(models.Sleep, SleepAdmin)
admin.site.register(models.Steps, StepsAdmin)
admin.site.register(models... | 0 | 67 | 69 |
b95fcac1f93d1bd02d1dcd14dd2453199e1bd50c | 394 | py | Python | pymmcore_plus/client/callbacks/basic.py | ianhi/pymmcore-remote | 54f93985ab73898b0cfc484e5ca43bf16d35c522 | [
"BSD-3-Clause"
] | 8 | 2021-07-15T10:35:08.000Z | 2022-03-02T23:36:34.000Z | pymmcore_plus/client/callbacks/basic.py | fdrgsp/pymmcore-remote | 929f62cca703a8a6437240d0c46446c0a524ed9a | [
"BSD-3-Clause"
] | 99 | 2021-07-03T02:16:14.000Z | 2022-03-29T16:11:59.000Z | pymmcore_plus/client/callbacks/basic.py | fdrgsp/pymmcore-remote | 929f62cca703a8a6437240d0c46446c0a524ed9a | [
"BSD-3-Clause"
] | 2 | 2021-05-19T19:59:27.000Z | 2021-07-01T19:08:35.000Z | from Pyro5 import api
from ...core._signals import _CMMCoreSignaler
| 28.142857 | 78 | 0.690355 | from Pyro5 import api
from ...core._signals import _CMMCoreSignaler
class SynchronousCallback(_CMMCoreSignaler):
def __init__(self) -> None:
super().__init__()
@api.expose
def receive_core_callback(self, signal_name: str, args: tuple) -> None:
"""Will be called by server with name of sig... | 33 | 268 | 23 |
14fe2fcea35b1656d97913ad5e54df7ffd928511 | 125 | py | Python | app/recipies/admin.py | sourabhsinha396/Rest-api-recipie | a9937d5119c706d1193654ece280ed46b599a344 | [
"MIT"
] | null | null | null | app/recipies/admin.py | sourabhsinha396/Rest-api-recipie | a9937d5119c706d1193654ece280ed46b599a344 | [
"MIT"
] | 9 | 2021-03-30T14:10:47.000Z | 2021-09-22T19:29:50.000Z | app/recipies/admin.py | sourabhsinha396/Rest-api-recipie | a9937d5119c706d1193654ece280ed46b599a344 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Tag,Ingredient
admin.site.register(Tag)
admin.site.register(Ingredient) | 25 | 34 | 0.832 | from django.contrib import admin
from .models import Tag,Ingredient
admin.site.register(Tag)
admin.site.register(Ingredient) | 0 | 0 | 0 |
1471e53db5b729dc1c33d31786115ca692ce7cf8 | 671 | py | Python | RunProject.py | badeaadi/Colorization | b18d4267aa611b7e87ddfe8a32fef834259e8a45 | [
"MIT"
] | null | null | null | RunProject.py | badeaadi/Colorization | b18d4267aa611b7e87ddfe8a32fef834259e8a45 | [
"MIT"
] | null | null | null | RunProject.py | badeaadi/Colorization | b18d4267aa611b7e87ddfe8a32fef834259e8a45 | [
"MIT"
] | null | null | null | """
PROIECT
Colorarea imaginilor folosind autoencoder si invatarea automata
Badea Adrian Catalin, grupa 334, anul III, FMI
"""
import pdb
from DataSet import *
from AeModel import *
data_set: DataSet = DataSet()
data_set.scene_name = 'forest'
ae_model: AeModel = AeModel(data_set)... | 19.735294 | 68 | 0.730253 | """
PROIECT
Colorarea imaginilor folosind autoencoder si invatarea automata
Badea Adrian Catalin, grupa 334, anul III, FMI
"""
import pdb
from DataSet import *
from AeModel import *
data_set: DataSet = DataSet()
data_set.scene_name = 'forest'
ae_model: AeModel = AeModel(data_set)... | 0 | 0 | 0 |
379ff9e7c9ab8025f20aee92eea805b694ff479d | 1,492 | py | Python | lib/nodes/net.py | velexi-corporation/rsi-2020-bemish | 3454ecdff66802494d5c3c1678767fddc42d72b6 | [
"Apache-2.0"
] | 1 | 2021-07-11T00:50:22.000Z | 2021-07-11T00:50:22.000Z | lib/nodes/net.py | velexi-corporation/rsi-2020-bemish | 3454ecdff66802494d5c3c1678767fddc42d72b6 | [
"Apache-2.0"
] | null | null | null | lib/nodes/net.py | velexi-corporation/rsi-2020-bemish | 3454ecdff66802494d5c3c1678767fddc42d72b6 | [
"Apache-2.0"
] | null | null | null | from nodes.core import *
from nodes.connect import *
from nodes.util import *
import numpy as np
import math | 27.62963 | 61 | 0.55563 | from nodes.core import *
from nodes.connect import *
from nodes.util import *
import numpy as np
import math
class FoldiakShapedNet(net):
def connect_foldiak(self, layerin, layerout):
cg1 = ShapedCGroup(layerin, layerout)
cg1.mkconnects(HebbianConnect)
cg1.normbiases()
... | 1,218 | 7 | 157 |
8f2f930b5a2dacd7576259cb4a0ce498b4941c73 | 359 | py | Python | ch02/similarity.py | YaGiNA/DLfS2 | 3dbaba7a62c198b50849de2e3b74d92897a4cae7 | [
"MIT"
] | 1 | 2019-05-15T09:17:23.000Z | 2019-05-15T09:17:23.000Z | ch02/similarity.py | YaGiNA/DLfS2 | 3dbaba7a62c198b50849de2e3b74d92897a4cae7 | [
"MIT"
] | null | null | null | ch02/similarity.py | YaGiNA/DLfS2 | 3dbaba7a62c198b50849de2e3b74d92897a4cae7 | [
"MIT"
] | null | null | null | import sys
sys.path.append("..")
from common.util import preprocess, create_co_matrix, cos_similarity
text = "You say goobye and I say hello."
corpus, word_to_id, id_to_word = preprocess(text)
vocab_size = len(word_to_id)
C = create_co_matrix(corpus, vocab_size)
c0 = C[word_to_id["you"]]
c1 = C[word_to_id... | 25.642857 | 69 | 0.721448 | import sys
sys.path.append("..")
from common.util import preprocess, create_co_matrix, cos_similarity
text = "You say goobye and I say hello."
corpus, word_to_id, id_to_word = preprocess(text)
vocab_size = len(word_to_id)
C = create_co_matrix(corpus, vocab_size)
c0 = C[word_to_id["you"]]
c1 = C[word_to_id... | 0 | 0 | 0 |
69b5c654c37a2e2d72fe9be3cc0958d62171dbd6 | 9,814 | py | Python | pydht/pydht.py | scottcunningham/pydht | 9a2ecfc8da3794b2dc6587d17b8d51337a8e7df4 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-01-04T07:02:54.000Z | 2015-01-04T07:02:54.000Z | pydht/pydht.py | scottcunningham/pydht | 9a2ecfc8da3794b2dc6587d17b8d51337a8e7df4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pydht/pydht.py | scottcunningham/pydht | 9a2ecfc8da3794b2dc6587d17b8d51337a8e7df4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import math
import json
import random
import uuid
import SocketServer
import threading
import time
import key_derivation
from .bucketset import BucketSet
from .hashing import hash_function, random_id
from .peer import Peer
from .shortlist import Shortlist
k = 20
alpha = 3
id_bits = 128
iteration_sleep = 1
keysize = 2... | 39.099602 | 151 | 0.635011 | import math
import json
import random
import uuid
import SocketServer
import threading
import time
import key_derivation
from .bucketset import BucketSet
from .hashing import hash_function, random_id
from .peer import Peer
from .shortlist import Shortlist
k = 20
alpha = 3
id_bits = 128
iteration_sleep = 1
keysize = 2... | 8,755 | 81 | 607 |
60baa5af0a80d786e5af5dc6c9b0c70a33113f15 | 913 | py | Python | mutability/mutability_exercise2.py | dipeshbabu/python-labs-codio | 40ec0f398dc239b41d4105a8f95b35a22024b63e | [
"MIT"
] | 2 | 2021-11-18T01:42:00.000Z | 2021-11-28T14:55:31.000Z | mutability/mutability_exercise2.py | dipeshbabu/python-labs-codio | 40ec0f398dc239b41d4105a8f95b35a22024b63e | [
"MIT"
] | null | null | null | mutability/mutability_exercise2.py | dipeshbabu/python-labs-codio | 40ec0f398dc239b41d4105a8f95b35a22024b63e | [
"MIT"
] | null | null | null | """
Exercise 2
Using the same CelestialBody class, write a static method closer_to_sun that compares
two CelectialBody objects and returns the name of the object that is closes to the sun.
Expected Output
If the objects mercury and venus are compared, then the method would return Mercury.
"""
class CelestialBody:
... | 27.666667 | 87 | 0.665936 | """
Exercise 2
Using the same CelestialBody class, write a static method closer_to_sun that compares
two CelectialBody objects and returns the name of the object that is closes to the sun.
Expected Output
If the objects mercury and venus are compared, then the method would return Mercury.
"""
class CelestialBody:
... | 149 | 0 | 27 |
4b6841333d077341a6f1d6dc8abf6907abc1a552 | 6,442 | py | Python | source/clusters/train_cluster.py | microsoft/Aura | d95ae0067bcd82e5952e8eed0e46b1a5eaaa7031 | [
"MIT"
] | 1 | 2022-03-02T00:21:33.000Z | 2022-03-02T00:21:33.000Z | source/clusters/train_cluster.py | microsoft/Aura | d95ae0067bcd82e5952e8eed0e46b1a5eaaa7031 | [
"MIT"
] | null | null | null | source/clusters/train_cluster.py | microsoft/Aura | d95ae0067bcd82e5952e8eed0e46b1a5eaaa7031 | [
"MIT"
] | 2 | 2022-03-15T03:12:02.000Z | 2022-03-20T20:49:02.000Z | import numpy as np
import os
from azureml.core.run import Run
from scipy.stats import entropy
from ..utils.tfrecords import resize, parse_tfrecord
from .kmeans import *
from ..models import *
run = Run.get_context()
class ClusterFeatureMap(tf.keras.Model):
""""
This is a clustering class with methods to all... | 34.084656 | 132 | 0.658025 | import numpy as np
import os
from azureml.core.run import Run
from scipy.stats import entropy
from ..utils.tfrecords import resize, parse_tfrecord
from .kmeans import *
from ..models import *
run = Run.get_context()
class ClusterFeatureMap(tf.keras.Model):
""""
This is a clustering class with methods to all... | 2,881 | 0 | 189 |
500a827b7b2d2907dc4668b184fb3c0816a2b1e1 | 4,987 | py | Python | curriculumBuilder/testDetails.py | code-dot-org/curriculumbuilder | e40330006145b8528f777a8aec2abff5b309d1c7 | [
"Apache-2.0"
] | 3 | 2019-10-22T20:21:15.000Z | 2022-01-12T19:38:48.000Z | curriculumBuilder/testDetails.py | code-dot-org/curriculumbuilder | e40330006145b8528f777a8aec2abff5b309d1c7 | [
"Apache-2.0"
] | 67 | 2019-09-27T17:04:52.000Z | 2022-03-21T22:16:23.000Z | curriculumBuilder/testDetails.py | code-dot-org/curriculumbuilder | e40330006145b8528f777a8aec2abff5b309d1c7 | [
"Apache-2.0"
] | 1 | 2019-10-18T16:06:31.000Z | 2019-10-18T16:06:31.000Z | # pylint: disable=missing-docstring,invalid-name,line-too-long
from django.test import TestCase
import markdown
class TestDetails(TestCase):
""" Test details extension. """
| 41.214876 | 166 | 0.600361 | # pylint: disable=missing-docstring,invalid-name,line-too-long
from django.test import TestCase
import markdown
class TestDetails(TestCase):
""" Test details extension. """
def setUp(self):
self.markdown = markdown.Markdown(extensions=['curriculumBuilder.details:DetailsExtension'])
def test_deta... | 4,511 | 0 | 297 |
88eef38159455835c84e3f2649e3a65d58cd13ef | 5,079 | py | Python | gtunrealdevice/config.py | Geeks-Trident-LLC/gtunrealdevice | a691f16ed031c342002472fd7c12c96c0e94be45 | [
"BSD-3-Clause"
] | null | null | null | gtunrealdevice/config.py | Geeks-Trident-LLC/gtunrealdevice | a691f16ed031c342002472fd7c12c96c0e94be45 | [
"BSD-3-Clause"
] | null | null | null | gtunrealdevice/config.py | Geeks-Trident-LLC/gtunrealdevice | a691f16ed031c342002472fd7c12c96c0e94be45 | [
"BSD-3-Clause"
] | null | null | null | """Module containing the attributes for gtunrealdevice."""
import yaml
from os import path
from textwrap import dedent
from gtunrealdevice.utils import File
__version__ = '0.2.8'
version = __version__
__edition__ = 'Community'
edition = __edition__
__all__ = [
'Data',
'version',
'edition'
]
| 35.027586 | 86 | 0.607403 | """Module containing the attributes for gtunrealdevice."""
import yaml
from os import path
from textwrap import dedent
from gtunrealdevice.utils import File
__version__ = '0.2.8'
version = __version__
__edition__ = 'Community'
edition = __edition__
__all__ = [
'Data',
'version',
'edition'
]
class Dat... | 794 | 3,952 | 23 |
260c878ed68bb23823d5096c9467185ce233fe09 | 2,117 | py | Python | semester5/num-methods/lab2/lab2.py | gardenappl/uni | 5bc7110946caf16aae2a0c1ddae4e88bfbb25aa8 | [
"WTFPL"
] | null | null | null | semester5/num-methods/lab2/lab2.py | gardenappl/uni | 5bc7110946caf16aae2a0c1ddae4e88bfbb25aa8 | [
"WTFPL"
] | null | null | null | semester5/num-methods/lab2/lab2.py | gardenappl/uni | 5bc7110946caf16aae2a0c1ddae4e88bfbb25aa8 | [
"WTFPL"
] | null | null | null | import numpy as np
a = np.array([
(1, 3, 5, 7),
(3, 5, 7, 1),
(5, 7, 1, 3),
(7, 1, 1, 5)
], dtype=np.float64)
b = np.array([12, 0, 4, 16], dtype=np.float64)
MAX_STEPS = 100
print("Gauss (with selection of main element):", solve_gauss_m(a, b))
print("numpy.linalg.solve:", np.linalg.solve(a, b))
... | 23.786517 | 76 | 0.505432 | import numpy as np
a = np.array([
(1, 3, 5, 7),
(3, 5, 7, 1),
(5, 7, 1, 3),
(7, 1, 1, 5)
], dtype=np.float64)
b = np.array([12, 0, 4, 16], dtype=np.float64)
def solve_gauss_m(a, b):
a = a.copy()
b = b.copy()
for i in range(0, a.shape[0]):
main_row_index = i + np.argmax(a[range(... | 1,511 | 0 | 46 |
ea9ab1b534d31c154176811f60556189131b810f | 51 | py | Python | haystack/modeling/training/__init__.py | kamilpz/haystack | 947549fcccc9dea79a621eea9703a1bb0897c009 | [
"Apache-2.0"
] | 1 | 2021-11-19T15:01:00.000Z | 2021-11-19T15:01:00.000Z | haystack/modeling/training/__init__.py | jaehyeongAN/haystack | b63669d1bc60b6c773b8b89d631afdd0ebbf4c4c | [
"Apache-2.0"
] | null | null | null | haystack/modeling/training/__init__.py | jaehyeongAN/haystack | b63669d1bc60b6c773b8b89d631afdd0ebbf4c4c | [
"Apache-2.0"
] | 1 | 2021-02-16T10:52:38.000Z | 2021-02-16T10:52:38.000Z | from haystack.modeling.training.base import Trainer | 51 | 51 | 0.882353 | from haystack.modeling.training.base import Trainer | 0 | 0 | 0 |
429b84c47c7bb1d0236a511a637bb935635a7405 | 8,460 | py | Python | ctseg/config.py | sandialabs/mcdn-3d-seg | 6b6a234719d37a11f3f997568c32ca04d62a4b18 | [
"MIT"
] | 4 | 2021-01-21T21:28:12.000Z | 2021-09-27T19:39:34.000Z | ctseg/config.py | sandialabs/mcdn-3d-seg | 6b6a234719d37a11f3f997568c32ca04d62a4b18 | [
"MIT"
] | null | null | null | ctseg/config.py | sandialabs/mcdn-3d-seg | 6b6a234719d37a11f3f997568c32ca04d62a4b18 | [
"MIT"
] | 2 | 2021-09-01T11:44:49.000Z | 2022-01-04T02:01:28.000Z | """
"""
import os
from sacred.observers import FileStorageObserver
from sacred import Experiment
from ctseg.ctutil.utils import read_json
def initialize_experiment():
"""Initialize the Sacred Experiment
This method reads a JSON config from mcdn-3d-seg/sacred_config.json with the
following entries:
... | 36.943231 | 89 | 0.610757 | """
"""
import os
from sacred.observers import FileStorageObserver
from sacred import Experiment
from ctseg.ctutil.utils import read_json
def initialize_experiment():
"""Initialize the Sacred Experiment
This method reads a JSON config from mcdn-3d-seg/sacred_config.json with the
following entries:
... | 215 | 0 | 88 |
f0b634f5ff4f75ca1711e6e717af315fda15fb61 | 1,290 | py | Python | src/sage/features/pdf2svg.py | kliem/sage-test-27122 | cc60cfebc4576fed8b01f0fc487271bdee3cefed | [
"BSL-1.0"
] | null | null | null | src/sage/features/pdf2svg.py | kliem/sage-test-27122 | cc60cfebc4576fed8b01f0fc487271bdee3cefed | [
"BSL-1.0"
] | null | null | null | src/sage/features/pdf2svg.py | kliem/sage-test-27122 | cc60cfebc4576fed8b01f0fc487271bdee3cefed | [
"BSL-1.0"
] | 1 | 2020-07-23T10:29:56.000Z | 2020-07-23T10:29:56.000Z | # -*- coding: utf-8 -*-
r"""
Check for pdf2svg
"""
# ****************************************************************************
# Copyright (C) 2021 Sebastien Labbe <slabqc@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | 33.947368 | 84 | 0.531008 | # -*- coding: utf-8 -*-
r"""
Check for pdf2svg
"""
# ****************************************************************************
# Copyright (C) 2021 Sebastien Labbe <slabqc@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | 0 | 0 | 0 |
81823ab9baefc07843a37683b2ffb1db1f4fa33b | 1,670 | py | Python | test.py | IrekPrzybylo/DogBreedDNN | 7c429694c648351cd23544b9b1321665c1866c7c | [
"MIT"
] | null | null | null | test.py | IrekPrzybylo/DogBreedDNN | 7c429694c648351cd23544b9b1321665c1866c7c | [
"MIT"
] | 12 | 2021-04-08T16:08:27.000Z | 2021-06-23T15:10:41.000Z | test.py | IrekPrzybylo/DogBreedDNN | 7c429694c648351cd23544b9b1321665c1866c7c | [
"MIT"
] | 2 | 2021-04-08T14:55:04.000Z | 2021-04-22T10:59:28.000Z | import os
import cv2
import numpy as np
import pandas as pd
import tensorflow as tf
def read_image(path, size):
"""
Load image from local storage
:param path: image path
:param size: image size
:return: loaded image
"""
image = cv2.imread(path, cv2.IMREAD_COLOR)
image = cv2.resize(ima... | 28.793103 | 69 | 0.649102 | import os
import cv2
import numpy as np
import pandas as pd
import tensorflow as tf
def read_image(path, size):
"""
Load image from local storage
:param path: image path
:param size: image size
:return: loaded image
"""
image = cv2.imread(path, cv2.IMREAD_COLOR)
image = cv2.resize(ima... | 0 | 0 | 0 |
52ace3880da10107b1f510d9ac03ca28cec40035 | 412 | py | Python | examples/animations/timer.py | colinmford/coldtype | 8462dbd5f65f3ef8f3cbc8662a866b7e20ec5985 | [
"Apache-2.0"
] | 142 | 2020-06-12T17:01:58.000Z | 2022-03-16T23:21:37.000Z | examples/animations/timer.py | colinmford/coldtype | 8462dbd5f65f3ef8f3cbc8662a866b7e20ec5985 | [
"Apache-2.0"
] | 35 | 2020-04-15T15:34:54.000Z | 2022-03-19T20:26:47.000Z | examples/animations/timer.py | colinmford/coldtype | 8462dbd5f65f3ef8f3cbc8662a866b7e20ec5985 | [
"Apache-2.0"
] | 14 | 2020-06-23T18:56:46.000Z | 2022-03-31T15:54:56.000Z | from coldtype import *
@animation((1080, 1080), timeline=Timeline(3500, 24))
| 34.333333 | 82 | 0.536408 | from coldtype import *
@animation((1080, 1080), timeline=Timeline(3500, 24))
def timer(f):
e = f.a.progress(f.i, easefn="linear").e
c = f.a.r.inset(50).take(d:=150, "mxx").take(d, "mny")
cpen = DP().oval(c)
return DPS([
(DP(f.a.r.inset(0)).f(None).s(hsl(0.6)).sw(10)),
(cpen.copy().f(hsl... | 312 | 0 | 22 |
0302eb3a4c90c0f51ea5fb46f2c400e93479d849 | 236 | py | Python | bitbots_misc/bitbots_bringup/scripts/launch_warning.py | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | null | null | null | bitbots_misc/bitbots_bringup/scripts/launch_warning.py | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 57 | 2019-03-02T10:59:05.000Z | 2021-12-09T18:57:34.000Z | bitbots_misc/bitbots_bringup/scripts/launch_warning.py | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 1 | 2019-07-28T11:26:47.000Z | 2019-07-28T11:26:47.000Z | #!/usr/bin/env python3
import rospy
rospy.logerr("###\n###\n###\n###\n###\nYou didn't specifiy which robot you want to start!\nPlease add minibot:=true or wolfgang:=true or davros:=true behind you roslaunch.\n###\n###\n###\n###\n###")
| 47.2 | 198 | 0.648305 | #!/usr/bin/env python3
import rospy
rospy.logerr("###\n###\n###\n###\n###\nYou didn't specifiy which robot you want to start!\nPlease add minibot:=true or wolfgang:=true or davros:=true behind you roslaunch.\n###\n###\n###\n###\n###")
| 0 | 0 | 0 |
395e3450ce5675d25cb67b1cbba1201ead7d4bd1 | 612 | py | Python | cms_redirects/admin.py | mllrsohn/django-cms-redirects | 3398528e44594adb708aa090d5b7867f619db10e | [
"BSD-3-Clause"
] | 8 | 2015-02-10T20:30:26.000Z | 2020-05-31T20:20:51.000Z | cms_redirects/admin.py | mllrsohn/django-cms-redirects | 3398528e44594adb708aa090d5b7867f619db10e | [
"BSD-3-Clause"
] | 5 | 2017-04-10T07:41:45.000Z | 2021-12-20T08:49:35.000Z | cms_redirects/admin.py | mllrsohn/django-cms-redirects | 3398528e44594adb708aa090d5b7867f619db10e | [
"BSD-3-Clause"
] | 8 | 2015-04-16T21:25:55.000Z | 2018-09-27T11:15:12.000Z | from django.contrib import admin
from cms_redirects.models import CMSRedirect
admin.site.register(CMSRedirect, CMSRedirectAdmin)
| 32.210526 | 97 | 0.625817 | from django.contrib import admin
from cms_redirects.models import CMSRedirect
class CMSRedirectAdmin(admin.ModelAdmin):
list_display = ('old_path', 'new_path', 'page', 'page_site', 'site', 'actual_response_code',)
list_filter = ('site',)
search_fields = ('old_path', 'new_path', 'page__title_set__title')
... | 0 | 459 | 23 |
9f217f8a02a0f671c29167ca02a91879f9fdb7e4 | 1,347 | py | Python | ccfwidget/treemap_widget.py | NeurodataWithoutBorders/ccf-widget | 482b2ecb2d9b227425cf09fa00a4d15857f0de26 | [
"MIT"
] | 5 | 2020-06-17T02:40:02.000Z | 2020-11-18T17:18:04.000Z | ccfwidget/treemap_widget.py | NeurodataWithoutBorders/ccf-widget | 482b2ecb2d9b227425cf09fa00a4d15857f0de26 | [
"MIT"
] | 18 | 2020-06-13T18:43:23.000Z | 2020-08-27T16:43:34.000Z | ccfwidget/treemap_widget.py | NeurodataWithoutBorders/ccf-widget | 482b2ecb2d9b227425cf09fa00a4d15857f0de26 | [
"MIT"
] | null | null | null | import plotly.graph_objects as go
@register
| 28.659574 | 74 | 0.669636 | import plotly.graph_objects as go
class StructureNodeWidget(ipytree.Node):
allen_id = 0
# Allen ID of the parent in the Allen Ontology StructureGraph
parent_structure_id = 0
acronym = 'Allen ontology acronym'
@register
class IPyTreeWidget(ipytree.Tree):
def __init__(self, structure_graph):
... | 992 | 182 | 126 |
06aa52314a9c965d93128b5579494aaf803987c3 | 646 | py | Python | cybox/test/objects/win_network_route_entry_test.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | null | null | null | cybox/test/objects/win_network_route_entry_test.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | null | null | null | cybox/test/objects/win_network_route_entry_test.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | 1 | 2019-04-16T18:37:32.000Z | 2019-04-16T18:37:32.000Z | # Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import unittest
from cybox.objects.win_network_route_entry_object import WinNetworkRouteEntry
from cybox.test import EntityTestCase, round_trip
from cybox.test.objects import ObjectTestCase
if __name__ == "__mai... | 26.916667 | 77 | 0.752322 | # Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import unittest
from cybox.objects.win_network_route_entry_object import WinNetworkRouteEntry
from cybox.test import EntityTestCase, round_trip
from cybox.test.objects import ObjectTestCase
class TestWinNetworkR... | 0 | 277 | 23 |
b8dab34e2ddba5fa52d18ceed2c8f8efbaf24b94 | 3,710 | py | Python | external/evolver_gff_featurestats2.py | dentearl/evolverSimControl | b3236debbc8d945a99aecb0988bd1f48f25913c3 | [
"MIT"
] | 4 | 2018-12-01T13:49:12.000Z | 2021-02-18T17:55:46.000Z | external/evolver_gff_featurestats2.py | dentearl/evolverSimControl | b3236debbc8d945a99aecb0988bd1f48f25913c3 | [
"MIT"
] | null | null | null | external/evolver_gff_featurestats2.py | dentearl/evolverSimControl | b3236debbc8d945a99aecb0988bd1f48f25913c3 | [
"MIT"
] | 1 | 2021-04-10T15:05:11.000Z | 2021-04-10T15:05:11.000Z | #!/usr/bin/env python
# Copyright (C) 2008-2011 by
# George Asimenos, Robert C. Edgar, Serafim Batzoglou and Arend Sidow.
#
# 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 restrictio... | 28.106061 | 127 | 0.646092 | #!/usr/bin/env python
# Copyright (C) 2008-2011 by
# George Asimenos, Robert C. Edgar, Serafim Batzoglou and Arend Sidow.
#
# 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 restrictio... | 649 | 0 | 115 |
62ff44c7a0f8ffe85637457045ee365bbf8e42f1 | 4,116 | py | Python | LearningSafeSets/Model/SafeSet.py | alexliniger/AdversarialRoadModel | 14157760687c22acc8b91c39128875005ada7563 | [
"Apache-2.0"
] | 20 | 2020-07-17T06:32:32.000Z | 2022-03-27T03:24:26.000Z | LearningSafeSets/Model/SafeSet.py | alexliniger/AdversarialRoadModel | 14157760687c22acc8b91c39128875005ada7563 | [
"Apache-2.0"
] | null | null | null | LearningSafeSets/Model/SafeSet.py | alexliniger/AdversarialRoadModel | 14157760687c22acc8b91c39128875005ada7563 | [
"Apache-2.0"
] | 7 | 2020-07-19T07:16:01.000Z | 2022-01-22T22:58:02.000Z | ## Copyright 2020 Alexander Liniger
## 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 ... | 36.75 | 75 | 0.49757 | ## Copyright 2020 Alexander Liniger
## 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 ... | 3,228 | 4 | 76 |
920fe3da4f1f82c7e5f82cc9d08809d75841703f | 12,412 | py | Python | arpa-rfp-evaluation/summary_reports.py | cityofasheville/abi-vendro-processing | 72ed24216ee4772d72abd26b956d7f97ed23bdd3 | [
"MIT"
] | null | null | null | arpa-rfp-evaluation/summary_reports.py | cityofasheville/abi-vendro-processing | 72ed24216ee4772d72abd26b956d7f97ed23bdd3 | [
"MIT"
] | 1 | 2021-09-02T19:58:09.000Z | 2021-09-02T19:58:09.000Z | arpa-rfp-evaluation/summary_reports.py | cityofasheville/data-processing-scripts | 72ed24216ee4772d72abd26b956d7f97ed23bdd3 | [
"MIT"
] | null | null | null | from os import link
from googleapiclient.discovery import build
import json
from csv import reader
from google.oauth2 import service_account
import pandas as pd
from os.path import exists
import numpy as np
from functools import reduce
import time
SERVICE_ACCOUNT_FILE = None
SCOPES = ['https://www.googleapis.com/auth/... | 44.328571 | 172 | 0.677409 | from os import link
from googleapiclient.discovery import build
import json
from csv import reader
from google.oauth2 import service_account
import pandas as pd
from os.path import exists
import numpy as np
from functools import reduce
import time
SERVICE_ACCOUNT_FILE = None
SCOPES = ['https://www.googleapis.com/auth/... | 10,595 | 0 | 161 |
f838c963eb88052d512eb77b99721f3c3bb5120a | 2,041 | py | Python | test/algorithms/initial_points/test_initial_point.py | kevinsung/qiskit-nature | 407533e05ca33fa53eb4e9cd7b089a0a99f9540e | [
"Apache-2.0"
] | null | null | null | test/algorithms/initial_points/test_initial_point.py | kevinsung/qiskit-nature | 407533e05ca33fa53eb4e9cd7b089a0a99f9540e | [
"Apache-2.0"
] | null | null | null | test/algorithms/initial_points/test_initial_point.py | kevinsung/qiskit-nature | 407533e05ca33fa53eb4e9cd7b089a0a99f9540e | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 31.890625 | 77 | 0.696717 | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 141 | 0 | 26 |
ca810b6f0d9eabaeb4ad71ee8608ce994583b4bc | 22,392 | py | Python | Compressive_Sampling.py | tnakaicode/Python-for-Signal-Processing | b610ca377564e115a0dbd5a8cdcc2ad195c3b162 | [
"CC-BY-3.0"
] | null | null | null | Compressive_Sampling.py | tnakaicode/Python-for-Signal-Processing | b610ca377564e115a0dbd5a8cdcc2ad195c3b162 | [
"CC-BY-3.0"
] | null | null | null | Compressive_Sampling.py | tnakaicode/Python-for-Signal-Processing | b610ca377564e115a0dbd5a8cdcc2ad195c3b162 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# ## Compressive sampling Overview
# our previous discussion, we saw that imposing bandlimited-ness on our class of signals permits point-wise sampling of our signal and then later perfect reconstruction. It turns out that by imposing *sparsity* we can also obtain perfect recons... | 41.543599 | 626 | 0.675196 | #!/usr/bin/env python
# coding: utf-8
# ## Compressive sampling Overview
# our previous discussion, we saw that imposing bandlimited-ness on our class of signals permits point-wise sampling of our signal and then later perfect reconstruction. It turns out that by imposing *sparsity* we can also obtain perfect recons... | 745 | 0 | 23 |
8afc13e213c403a3dacc0931aa5029c3a13cf2e0 | 2,656 | py | Python | lineartransporteqn.py | killacamron/CFDcourse21 | 5ae59303d042819e0246e793271f420de8e1bbdb | [
"MIT"
] | null | null | null | lineartransporteqn.py | killacamron/CFDcourse21 | 5ae59303d042819e0246e793271f420de8e1bbdb | [
"MIT"
] | null | null | null | lineartransporteqn.py | killacamron/CFDcourse21 | 5ae59303d042819e0246e793271f420de8e1bbdb | [
"MIT"
] | null | null | null | # =============================================================================
#
# Explicit Finite Difference Method Code to Solve the 1D Linear Transport Equation
# Adapted by: Cameron Armstrong (2019)
# Source: Lorena Barba, 12 Steps to NS in Python
# Institution: Virginia Commonwealth University
#
# ======... | 33.2 | 98 | 0.460843 | # =============================================================================
#
# Explicit Finite Difference Method Code to Solve the 1D Linear Transport Equation
# Adapted by: Cameron Armstrong (2019)
# Source: Lorena Barba, 12 Steps to NS in Python
# Institution: Virginia Commonwealth University
#
# ======... | 0 | 0 | 0 |
452c277e6f370c2445473182b1051da62995480e | 5,454 | py | Python | monty/exts/info/docs/_html.py | onerandomusername/monty-python | fcd8b2827eb9bbb2a05d28f80ac9e215589f03f7 | [
"MIT"
] | 20 | 2021-12-31T10:17:20.000Z | 2022-03-31T04:16:17.000Z | monty/exts/info/docs/_html.py | onerandomusername/monty-bot | b1c769e44b56bc45f37fc809064571d59c80db27 | [
"MIT"
] | 1 | 2022-03-13T22:34:33.000Z | 2022-03-13T22:34:52.000Z | monty/exts/info/docs/_html.py | onerandomusername/monty-bot | b1c769e44b56bc45f37fc809064571d59c80db27 | [
"MIT"
] | 3 | 2022-01-02T15:21:46.000Z | 2022-03-05T09:37:54.000Z | import re
from functools import partial
from typing import Callable, Container, Iterable, List, Union
from bs4 import BeautifulSoup
from bs4.element import NavigableString, PageElement, SoupStrainer, Tag
from monty.log import get_logger
from . import MAX_SIGNATURE_AMOUNT
log = get_logger(__name__)
_UNWANTED_SIGNA... | 38.957143 | 120 | 0.710671 | import re
from functools import partial
from typing import Callable, Container, Iterable, List, Union
from bs4 import BeautifulSoup
from bs4.element import NavigableString, PageElement, SoupStrainer, Tag
from monty.log import get_logger
from . import MAX_SIGNATURE_AMOUNT
log = get_logger(__name__)
_UNWANTED_SIGNA... | 434 | 0 | 54 |
23d3fbbdeeaccf228df906ea84306f0500785058 | 6,513 | py | Python | preflibtools/instances/sampling.py | nmattei/PrefLib-Tools | d1a1137efdc6a5722bbb0e15a0c1174a0236aefb | [
"BSD-3-Clause-Clear"
] | 17 | 2015-06-01T15:00:09.000Z | 2019-09-18T18:05:38.000Z | preflibtools/instances/sampling.py | nmattei/PrefLib-Tools | d1a1137efdc6a5722bbb0e15a0c1174a0236aefb | [
"BSD-3-Clause-Clear"
] | 6 | 2016-06-06T07:40:41.000Z | 2018-01-04T22:09:21.000Z | preflibtools/instances/sampling.py | nmattei/PrefLib-Tools | d1a1137efdc6a5722bbb0e15a0c1174a0236aefb | [
"BSD-3-Clause-Clear"
] | 7 | 2015-06-02T04:58:13.000Z | 2019-12-13T13:26:58.000Z | """ This module describes procedures to sample preferences for different probability distributions.
"""
import numpy as np
def generateICStrictProfile(nbVoters, alternatives):
""" Generates a profile following the impartial culture.
:param nbVoters: Number of orders to sample.
:type nbVoters: int
:param alter... | 35.396739 | 106 | 0.716874 | """ This module describes procedures to sample preferences for different probability distributions.
"""
import numpy as np
def generateICStrictProfile(nbVoters, alternatives):
""" Generates a profile following the impartial culture.
:param nbVoters: Number of orders to sample.
:type nbVoters: int
:param alter... | 474 | 0 | 24 |
1a8e4c575c1b0238e1aaf8f4d51c772141dd949b | 1,100 | py | Python | module1-introduction-to-sql/assignment/buddymove_holidayiq.py | jonathanmendoza-tx/DS-Unit-3-Sprint-2-SQL-and-Databases | 7976332b75b8c81b2dd06682c3be1acd390dbd8c | [
"MIT"
] | null | null | null | module1-introduction-to-sql/assignment/buddymove_holidayiq.py | jonathanmendoza-tx/DS-Unit-3-Sprint-2-SQL-and-Databases | 7976332b75b8c81b2dd06682c3be1acd390dbd8c | [
"MIT"
] | null | null | null | module1-introduction-to-sql/assignment/buddymove_holidayiq.py | jonathanmendoza-tx/DS-Unit-3-Sprint-2-SQL-and-Databases | 7976332b75b8c81b2dd06682c3be1acd390dbd8c | [
"MIT"
] | null | null | null | import sqlite3
import pandas as pd
!wget https://raw.githubusercontent.com/jonathanmendoza-tx/DS-Unit-3-Sprint-2-SQL-and-Databases/master/module1-introduction-to-sql/buddymove_holidayiq.csv
conn = sqlite3.connect('buddymove_holidayiq.sqlite3')
cur = conn.cursor()
df = pd.read_csv('/content/buddymove_holidayiq.csv', ... | 25.581395 | 154 | 0.719091 | import sqlite3
import pandas as pd
!wget https://raw.githubusercontent.com/jonathanmendoza-tx/DS-Unit-3-Sprint-2-SQL-and-Databases/master/module1-introduction-to-sql/buddymove_holidayiq.csv
conn = sqlite3.connect('buddymove_holidayiq.sqlite3')
cur = conn.cursor()
df = pd.read_csv('/content/buddymove_holidayiq.csv', ... | 0 | 0 | 0 |
95e7082386e5418aa14fda8e81fb4e55fd79a141 | 54 | py | Python | quart_rapidoc/version.py | marirs/quart-rapidoc | fd86604ee5ffea7bd33b08af537472f0df21e8c8 | [
"MIT"
] | 1 | 2020-07-06T17:11:02.000Z | 2020-07-06T17:11:02.000Z | quart_rapidoc/version.py | marirs/quart-rapidoc | fd86604ee5ffea7bd33b08af537472f0df21e8c8 | [
"MIT"
] | null | null | null | quart_rapidoc/version.py | marirs/quart-rapidoc | fd86604ee5ffea7bd33b08af537472f0df21e8c8 | [
"MIT"
] | null | null | null | """quart_redoc version file."""
__version__ = "0.5.1"
| 18 | 31 | 0.666667 | """quart_redoc version file."""
__version__ = "0.5.1"
| 0 | 0 | 0 |
e2e6c98c7ef19d0a3e295150199aeb3a5229e053 | 48,085 | py | Python | cli/cyberPanel.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | cli/cyberPanel.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | cli/cyberPanel.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | #!/usr/local/CyberCP/bin/python
import os,sys
sys.path.append('/usr/local/CyberCP')
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
django.setup()
from inspect import stack
from cli.cliLogger import cliLogger as logger
import json
from plogical.virtualHostUtilities import virtualHostUt... | 36.181339 | 214 | 0.58434 | #!/usr/local/CyberCP/bin/python
import os,sys
sys.path.append('/usr/local/CyberCP')
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
django.setup()
from inspect import stack
from cli.cliLogger import cliLogger as logger
import json
from plogical.virtualHostUtilities import virtualHostUt... | 45,619 | -4 | 1,153 |
ca330354912944efbfce5a46ab08e1b882f586b6 | 904 | py | Python | SkipgramSampler/fixedarray.py | InzamamRahaman/SkipgramSampling | 16a4bbab0e85ceb46191f074b61e639d9b408dc8 | [
"MIT"
] | 1 | 2017-10-13T00:37:25.000Z | 2017-10-13T00:37:25.000Z | SkipgramSampler/fixedarray.py | InzamamRahaman/SkipgramSampling | 16a4bbab0e85ceb46191f074b61e639d9b408dc8 | [
"MIT"
] | 6 | 2017-10-13T04:43:02.000Z | 2017-10-14T20:33:39.000Z | SkipgramSampler/fixedarray.py | InzamamRahaman/SkipgramSampling | 16a4bbab0e85ceb46191f074b61e639d9b408dc8 | [
"MIT"
] | null | null | null | from collections import deque
class FixedArray(object):
"""
Object acts a queue of fixed length
"""
| 22.6 | 42 | 0.551991 | from collections import deque
class FixedArray(object):
"""
Object acts a queue of fixed length
"""
def __init__(self, limit):
self.count = 0
self.limit = limit
self.contents = deque()
def append(self, x, callback=None):
if self.count < self.limit:
self... | 627 | 0 | 162 |
3fb46c294a5360bb8f1d5b3c59d0fde197c8961d | 4,380 | py | Python | setup.py | Tobi-Alonso/ResNet50-PYNQ | 7c203c2b249479c5384afe152dde2bb06576339b | [
"BSD-3-Clause"
] | null | null | null | setup.py | Tobi-Alonso/ResNet50-PYNQ | 7c203c2b249479c5384afe152dde2bb06576339b | [
"BSD-3-Clause"
] | null | null | null | setup.py | Tobi-Alonso/ResNet50-PYNQ | 7c203c2b249479c5384afe152dde2bb06576339b | [
"BSD-3-Clause"
] | 1 | 2020-03-27T18:20:47.000Z | 2020-03-27T18:20:47.000Z | # Copyright (c) 2019, Xilinx
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and th... | 35.04 | 81 | 0.656164 | # Copyright (c) 2019, Xilinx
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and th... | 727 | 0 | 76 |
c04249abf3a5ebc265209326af85d9f62c50c23b | 3,052 | py | Python | testing/python_lib/test_faucet_state_collector.py | pbatta/forch | df033bc5b7cbac06e1c406257193cb0cb62f2742 | [
"Apache-2.0"
] | 1 | 2019-12-12T23:13:24.000Z | 2019-12-12T23:13:24.000Z | testing/python_lib/test_faucet_state_collector.py | pbatta/forch | df033bc5b7cbac06e1c406257193cb0cb62f2742 | [
"Apache-2.0"
] | 92 | 2019-12-13T03:30:35.000Z | 2021-11-11T16:16:13.000Z | testing/python_lib/test_faucet_state_collector.py | pbatta/forch | df033bc5b7cbac06e1c406257193cb0cb62f2742 | [
"Apache-2.0"
] | 7 | 2020-01-11T14:12:46.000Z | 2021-01-25T17:30:55.000Z | """Unit tests for Faucet State Collector"""
import unittest
from unit_base import FaucetStateCollectorTestBase
from forch.proto.faucet_event_pb2 import StackTopoChange
from forch.utils import dict_proto
class DataplaneStateTestCase(FaucetStateCollectorTestBase):
"""Test cases for dataplane state"""
def tes... | 37.219512 | 100 | 0.582241 | """Unit tests for Faucet State Collector"""
import unittest
from unit_base import FaucetStateCollectorTestBase
from forch.proto.faucet_event_pb2 import StackTopoChange
from forch.utils import dict_proto
class DataplaneStateTestCase(FaucetStateCollectorTestBase):
"""Test cases for dataplane state"""
def _bu... | 1,537 | 0 | 81 |
3c98d96e351e9f0cf0c5d2fb68fa0eae5f624451 | 2,344 | py | Python | tests/python/gaia-ui-tests/gaiatest/apps/persona/app.py | pdehaan/gaia | 0ea959d81cefa0128157ec3ff0e2b7bdd29afacf | [
"Apache-2.0"
] | 1 | 2015-03-02T04:03:00.000Z | 2015-03-02T04:03:00.000Z | tests/python/gaia-ui-tests/gaiatest/apps/persona/app.py | caseyyee/gaia | fa82433dda06e9ae7d35a1f74cc16f4dd72cc514 | [
"Apache-2.0"
] | null | null | null | tests/python/gaia-ui-tests/gaiatest/apps/persona/app.py | caseyyee/gaia | fa82433dda06e9ae7d35a1f74cc16f4dd72cc514 | [
"Apache-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from marionette.by import By
from gaiatest.apps.base import Base
| 37.206349 | 103 | 0.729522 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from marionette.by import By
from gaiatest.apps.base import Base
class Persona(Base):
# iframes
_persona_fram... | 1,374 | 681 | 23 |
46007c370fa322eb1ca7e4346385565ed9dfbbd8 | 4,826 | py | Python | ethevents/client/connection.py | ezdac/ethevents | 9f4b0ff1ba0d303180abe3b5336805335bc0765b | [
"MIT"
] | 2 | 2018-08-21T01:06:30.000Z | 2019-03-05T08:15:55.000Z | ethevents/client/connection.py | ezdac/ethevents | 9f4b0ff1ba0d303180abe3b5336805335bc0765b | [
"MIT"
] | 1 | 2018-04-23T14:01:51.000Z | 2018-04-23T14:09:51.000Z | ethevents/client/connection.py | ezdac/ethevents | 9f4b0ff1ba0d303180abe3b5336805335bc0765b | [
"MIT"
] | 1 | 2022-03-22T04:57:16.000Z | 2022-03-22T04:57:16.000Z | import time
import click
import requests
from elasticsearch.connection import Connection
from elasticsearch.connection_pool import DummyConnectionPool
from elasticsearch.transport import Transport
from elasticsearch.exceptions import (
ConnectionError,
ConnectionTimeout,
SSLError
)
from elasticsearch.compa... | 28.05814 | 90 | 0.564857 | import time
import click
import requests
from elasticsearch.connection import Connection
from elasticsearch.connection_pool import DummyConnectionPool
from elasticsearch.transport import Transport
from elasticsearch.exceptions import (
ConnectionError,
ConnectionTimeout,
SSLError
)
from elasticsearch.compa... | 4,063 | 36 | 148 |
df6d818cc916d501a3e8707af88d5a3730dc6550 | 615 | py | Python | source/client/pages/SpeciesElement.py | RobinSatterthwaite/BirdTable | ef35c0135ee54910e535281e7f690643c3b4f6c4 | [
"MIT"
] | null | null | null | source/client/pages/SpeciesElement.py | RobinSatterthwaite/BirdTable | ef35c0135ee54910e535281e7f690643c3b4f6c4 | [
"MIT"
] | null | null | null | source/client/pages/SpeciesElement.py | RobinSatterthwaite/BirdTable | ef35c0135ee54910e535281e7f690643c3b4f6c4 | [
"MIT"
] | null | null | null |
from pystache import TemplateSpec
| 18.088235 | 57 | 0.580488 |
from pystache import TemplateSpec
class SpeciesElement(TemplateSpec):
template_name = "SpeciesElement"
def __init__(self,
name,
binomial_name,
count,
times_seen,
include_times_seen,
seen,
heard):
self.name = name
self.... | 483 | 73 | 23 |
2abdd1a8347e55f710b0bd9bf098d6715d1155a9 | 561 | py | Python | Number Guessing.py | GamePlayer-7/Gaming | 4466f2e693f0c10d3bc041b388526484713dc2e1 | [
"MIT"
] | null | null | null | Number Guessing.py | GamePlayer-7/Gaming | 4466f2e693f0c10d3bc041b388526484713dc2e1 | [
"MIT"
] | null | null | null | Number Guessing.py | GamePlayer-7/Gaming | 4466f2e693f0c10d3bc041b388526484713dc2e1 | [
"MIT"
] | null | null | null | import random # imports the random module, which contains a variety of things to do with random number generation.
number = random.randint(1,10) #If we wanted a random integer, we can use the randint function Randint accepts two parameters: a lowest and a highest number.
for i in range(0,3):
user = int(... | 51 | 161 | 0.672014 | import random # imports the random module, which contains a variety of things to do with random number generation.
number = random.randint(1,10) #If we wanted a random integer, we can use the randint function Randint accepts two parameters: a lowest and a highest number.
for i in range(0,3):
user = int(... | 0 | 0 | 0 |
1afcc354de4e4e1ba67d59086c2b25d41157da44 | 2,681 | py | Python | src/waldur_auth_saml2/utils.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 26 | 2017-10-18T13:49:58.000Z | 2021-09-19T04:44:09.000Z | src/waldur_auth_saml2/utils.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 14 | 2018-12-10T14:14:51.000Z | 2021-06-07T10:33:39.000Z | src/waldur_auth_saml2/utils.py | geant-multicloud/MCMS-mastermind | 81333180f5e56a0bc88d7dad448505448e01f24e | [
"MIT"
] | 32 | 2017-09-24T03:10:45.000Z | 2021-10-16T16:41:09.000Z | from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from djangosaml2.conf import get_config
from djangosaml2.utils import available_idps
from saml2.attribute_converter import ac_factory
from saml2.mdstore import InMemoryMetaData, MetaDataFile
from saml2.mdstore import name as get_idp_... | 33.5125 | 91 | 0.697128 | from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from djangosaml2.conf import get_config
from djangosaml2.utils import available_idps
from saml2.attribute_converter import ac_factory
from saml2.mdstore import InMemoryMetaData, MetaDataFile
from saml2.mdstore import name as get_idp_... | 2,089 | 26 | 168 |
a8f717c691e08e576daf5d6b539ccd45bbb8b08f | 2,114 | py | Python | src/blockdiag/imagedraw/utils/__init__.py | Dridi/blockdiag | bbb16f8a731cdf79a675a63c1ff847e70fdc4a5b | [
"Apache-2.0"
] | null | null | null | src/blockdiag/imagedraw/utils/__init__.py | Dridi/blockdiag | bbb16f8a731cdf79a675a63c1ff847e70fdc4a5b | [
"Apache-2.0"
] | null | null | null | src/blockdiag/imagedraw/utils/__init__.py | Dridi/blockdiag | bbb16f8a731cdf79a675a63c1ff847e70fdc4a5b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Takeshi KOMIYA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 30.2 | 78 | 0.682119 | # -*- coding: utf-8 -*-
# Copyright 2011 Takeshi KOMIYA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 225 | 0 | 23 |
4b72d9fce27cf73da17b49970b55c087c4464e31 | 362 | py | Python | telefones/models.py | projeto-agro-tcc/osvaldo-backend | 7e8b6b2ed849cd54f0bb5b855c4016fa062d3c33 | [
"MIT"
] | null | null | null | telefones/models.py | projeto-agro-tcc/osvaldo-backend | 7e8b6b2ed849cd54f0bb5b855c4016fa062d3c33 | [
"MIT"
] | null | null | null | telefones/models.py | projeto-agro-tcc/osvaldo-backend | 7e8b6b2ed849cd54f0bb5b855c4016fa062d3c33 | [
"MIT"
] | null | null | null | from django.db import models
| 25.857143 | 72 | 0.70442 | from django.db import models
class Telefone(models.Model):
residencial = models.CharField(max_length=14, null=True, blank=True)
celular = models.CharField(max_length=12, null=False)
outro = models.CharField(max_length=14, null=True, blank=True)
class Meta:
db_table = "en_telefones"
def _... | 25 | 284 | 23 |
5a4d29d31fc8b9261b5b5f65d7bb0b5cb3b90e4d | 4,639 | py | Python | xt/framework/comm/comm_conf.py | ZZHsunsky/xingtian | 0484e2c968d9e6b2e5f43a3b86c0213a095ba309 | [
"MIT"
] | null | null | null | xt/framework/comm/comm_conf.py | ZZHsunsky/xingtian | 0484e2c968d9e6b2e5f43a3b86c0213a095ba309 | [
"MIT"
] | null | null | null | xt/framework/comm/comm_conf.py | ZZHsunsky/xingtian | 0484e2c968d9e6b2e5f43a3b86c0213a095ba309 | [
"MIT"
] | null | null | null | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#
# 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 us... | 34.362963 | 79 | 0.64432 | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#
# 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 us... | 402 | 2,060 | 22 |
3e25d2bb70c9499de1f4cb505fe2880342dc5c50 | 2,572 | py | Python | python/nbdb/anomaly/static.py | rubrikinc/nbdb2 | 359db63a39e016e3eb197b8ea511d6e8cffa1853 | [
"Apache-2.0"
] | 2 | 2022-03-21T15:48:33.000Z | 2022-03-27T00:43:12.000Z | python/nbdb/anomaly/static.py | rubrikinc/nbdb2 | 359db63a39e016e3eb197b8ea511d6e8cffa1853 | [
"Apache-2.0"
] | null | null | null | python/nbdb/anomaly/static.py | rubrikinc/nbdb2 | 359db63a39e016e3eb197b8ea511d6e8cffa1853 | [
"Apache-2.0"
] | 1 | 2022-03-27T00:43:31.000Z | 2022-03-27T00:43:31.000Z | """
Static threshold based anomaly detection
"""
from typing import List, Tuple
import logging
import numpy as np
import pandas as pd
from nbdb.anomaly.anomaly_interface import AnomalyInterface
from nbdb.readapi.graphite_response import Anomaly
from nbdb.readapi.time_series_response import TimeRange
logger = logging... | 35.232877 | 73 | 0.613919 | """
Static threshold based anomaly detection
"""
from typing import List, Tuple
import logging
import numpy as np
import pandas as pd
from nbdb.anomaly.anomaly_interface import AnomalyInterface
from nbdb.readapi.graphite_response import Anomaly
from nbdb.readapi.time_series_response import TimeRange
logger = logging... | 0 | 0 | 0 |
9288bc7c0b122d032f93019718b7a23eb2c872b0 | 1,598 | py | Python | tests/test_help.py | thomasvolk/R_ev3dev | 53b8c83af49e88eb4766deea0a690c55d1304d6a | [
"Apache-2.0"
] | null | null | null | tests/test_help.py | thomasvolk/R_ev3dev | 53b8c83af49e88eb4766deea0a690c55d1304d6a | [
"Apache-2.0"
] | null | null | null | tests/test_help.py | thomasvolk/R_ev3dev | 53b8c83af49e88eb4766deea0a690c55d1304d6a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import unittest
from R_ev3dev.interpreter import Interpreter, Command
from R_ev3dev.help import Help, Version
class TestCommand01(Command):
""" this is the test command 01
usage:
c01
"""
class TestCommand02(Command):
""" this is the test command 02
"""
| 21.594595 | 86 | 0.628911 | #!/usr/bin/env python3
import unittest
from R_ev3dev.interpreter import Interpreter, Command
from R_ev3dev.help import Help, Version
class TestCommand01(Command):
""" this is the test command 01
usage:
c01
"""
def invoke(self, interpreter_context, args):
return 1
class TestCom... | 1,029 | 21 | 231 |
0cb3d0dd6f38e1ffc07fd4e85e3458786f9cf6d8 | 420 | py | Python | news/urls.py | vigen-b/FakeNews | fc19f623529d1661c9f3d475adc9db98ee95a38a | [
"Apache-2.0"
] | null | null | null | news/urls.py | vigen-b/FakeNews | fc19f623529d1661c9f3d475adc9db98ee95a38a | [
"Apache-2.0"
] | null | null | null | news/urls.py | vigen-b/FakeNews | fc19f623529d1661c9f3d475adc9db98ee95a38a | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns
from news import views
app_name = "news"
urlpatterns = [
path("news/", views.NewsList.as_view()),
path("news/<int:pk>/", views.NewsDetail.as_view()),
path("category/", views.CategoryList.as_view()),
path("categor... | 30 | 63 | 0.735714 | from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns
from news import views
app_name = "news"
urlpatterns = [
path("news/", views.NewsList.as_view()),
path("news/<int:pk>/", views.NewsDetail.as_view()),
path("category/", views.CategoryList.as_view()),
path("categor... | 0 | 0 | 0 |
8a0003c5108f33e3f1329656eaa782586e2568a7 | 9,993 | py | Python | realtime_hand_3d/segmentation/models/csm.py | NeelayS/realtime_hand | 219c772b9b7df60c390edac7da23f9cdddebca4d | [
"MIT"
] | null | null | null | realtime_hand_3d/segmentation/models/csm.py | NeelayS/realtime_hand | 219c772b9b7df60c390edac7da23f9cdddebca4d | [
"MIT"
] | null | null | null | realtime_hand_3d/segmentation/models/csm.py | NeelayS/realtime_hand | 219c772b9b7df60c390edac7da23f9cdddebca4d | [
"MIT"
] | null | null | null | import torch
from torch import nn
from .retrieve import SEG_MODELS_REGISTRY
@SEG_MODELS_REGISTRY.register()
| 32.339806 | 88 | 0.536976 | import torch
from torch import nn
from .retrieve import SEG_MODELS_REGISTRY
class Bottleneck(nn.Module):
expansion = 4
def __init__(self, in_channels, out_channels, stride=1, downsample=None):
super(Bottleneck, self).__init__()
self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1,... | 9,530 | 98 | 251 |
9967baa443818e97fb20549f70a4bd20685b2cd4 | 5,239 | py | Python | bobstack/sipmessaging/sipMessage.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/sipmessaging/sipMessage.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/sipmessaging/sipMessage.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from sipHeader import SIPHeader
from sipStartLineFactory import SIPStartLineFactory
| 23.181416 | 76 | 0.640389 | try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from sipHeader import SIPHeader
from sipStartLineFactory import SIPStartLineFactory
class SIPMessage(object):
@classmethod
def new_parsed_from(cls, a_string):
answer = cls()
answer.raw_string = a_stri... | 3,211 | 1,825 | 23 |
943c8ed1cd17178b2e7dd6ef67854da8a007f148 | 98 | py | Python | codes_auto/1635.number-of-good-pairs.py | smartmark-pro/leetcode_record | 6504b733d892a705571eb4eac836fb10e94e56db | [
"MIT"
] | null | null | null | codes_auto/1635.number-of-good-pairs.py | smartmark-pro/leetcode_record | 6504b733d892a705571eb4eac836fb10e94e56db | [
"MIT"
] | null | null | null | codes_auto/1635.number-of-good-pairs.py | smartmark-pro/leetcode_record | 6504b733d892a705571eb4eac836fb10e94e56db | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=1635 lang=python3
#
# [1635] number-of-good-pairs
#
None
# @lc code=end | 14 | 42 | 0.673469 | #
# @lc app=leetcode.cn id=1635 lang=python3
#
# [1635] number-of-good-pairs
#
None
# @lc code=end | 0 | 0 | 0 |
3d707e5f1c279e06637838e9d88dd40ec499c8ba | 1,110 | py | Python | python-the-hard-way/12-prompting-people.py | Valka7a/python-playground | f08d4374f2cec2e8b1afec3753854b1ec10ff480 | [
"MIT"
] | null | null | null | python-the-hard-way/12-prompting-people.py | Valka7a/python-playground | f08d4374f2cec2e8b1afec3753854b1ec10ff480 | [
"MIT"
] | null | null | null | python-the-hard-way/12-prompting-people.py | Valka7a/python-playground | f08d4374f2cec2e8b1afec3753854b1ec10ff480 | [
"MIT"
] | null | null | null | # Exercise 12: Prompting People
# Variables
age = raw_input("How old are you? ")
height = raw_input("How tall are you? ")
weight = raw_input("How much do you weigh? ")
# Print
print "So, you're %r old, %r tall and %r heavy." % (age, height, weight)
# Study Drills
# 1. In Terminal where you normally run python to ru... | 34.6875 | 76 | 0.715315 | # Exercise 12: Prompting People
# Variables
age = raw_input("How old are you? ")
height = raw_input("How tall are you? ")
weight = raw_input("How much do you weigh? ")
# Print
print "So, you're %r old, %r tall and %r heavy." % (age, height, weight)
# Study Drills
# 1. In Terminal where you normally run python to ru... | 0 | 0 | 0 |
17884ad7e858a3c341d64db09625d9ca52b143f6 | 1,730 | py | Python | alipay/aop/api/domain/InvestorMaterialInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/InvestorMaterialInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/InvestorMaterialInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
| 24.366197 | 67 | 0.550289 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class InvestorMaterialInfo(object):
def __init__(self):
self._file_id = None
self._file_url = None
self._type = None
@property
def file_id(self):
return self._f... | 1,218 | 374 | 23 |
715eab9e05e4e3e6f81c12646f271a7236441291 | 12,764 | py | Python | msticpy/nbtools/azure_ml_tools.py | ekmixon/msticpy | 8676a648ba9bfb4d848a8dda964820d4942a32ca | [
"MIT"
] | null | null | null | msticpy/nbtools/azure_ml_tools.py | ekmixon/msticpy | 8676a648ba9bfb4d848a8dda964820d4942a32ca | [
"MIT"
] | 3 | 2021-05-15T02:16:39.000Z | 2022-01-19T13:13:25.000Z | msticpy/nbtools/azure_ml_tools.py | ekmixon/msticpy | 8676a648ba9bfb4d848a8dda964820d4942a32ca | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Checker... | 33.413613 | 90 | 0.645096 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Checker... | 0 | 0 | 0 |
b65206728e5f3f6cbab0f87066d7ed1dc8784f63 | 4,423 | py | Python | konfuzio_sdk/urls.py | atraining/document-ai-python-sdk | ea2df68af0254053da7e6f4c6e2c2df6d7911233 | [
"MIT"
] | null | null | null | konfuzio_sdk/urls.py | atraining/document-ai-python-sdk | ea2df68af0254053da7e6f4c6e2c2df6d7911233 | [
"MIT"
] | null | null | null | konfuzio_sdk/urls.py | atraining/document-ai-python-sdk | ea2df68af0254053da7e6f4c6e2c2df6d7911233 | [
"MIT"
] | null | null | null | """Endpoints of the Konfuzio Host."""
import logging
from konfuzio_sdk import KONFUZIO_HOST, KONFUZIO_PROJECT_ID
logger = logging.getLogger(__name__)
def get_auth_token_url() -> str:
"""
Generate URL that creates an authentication token for the user.
:return: URL to generate the token.
"""
ret... | 29.291391 | 116 | 0.703821 | """Endpoints of the Konfuzio Host."""
import logging
from konfuzio_sdk import KONFUZIO_HOST, KONFUZIO_PROJECT_ID
logger = logging.getLogger(__name__)
def get_auth_token_url() -> str:
"""
Generate URL that creates an authentication token for the user.
:return: URL to generate the token.
"""
ret... | 0 | 0 | 0 |
5a5179184e11bd69c115e048377711a912dc3761 | 440 | py | Python | Web/user/models.py | Pancras-Zheng/Graduation-Project | 5d1ae78d5e890fa7ecc2456d0d3d22bdea7c29f0 | [
"MIT"
] | 37 | 2018-01-25T03:14:24.000Z | 2021-12-15T10:02:37.000Z | Web/user/models.py | Pancras-Zheng/Graduation-Project | 5d1ae78d5e890fa7ecc2456d0d3d22bdea7c29f0 | [
"MIT"
] | null | null | null | Web/user/models.py | Pancras-Zheng/Graduation-Project | 5d1ae78d5e890fa7ecc2456d0d3d22bdea7c29f0 | [
"MIT"
] | 10 | 2019-04-11T07:27:10.000Z | 2021-11-24T11:16:14.000Z | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.base_user import BaseUserManager
# Create your models here.
| 27.5 | 69 | 0.747727 | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.base_user import BaseUserManager
# Create your models here.
class User(AbstractUser):
nickname = models.CharField(_('昵称'),max_length=50,blank=True)
... | 0 | 200 | 23 |
db4b3216850356cdd188fbda35706bb2acbe536c | 14,096 | py | Python | src/huggingface_hub/commands/user.py | FrancescoSaverioZuppichini/huggingface_hub | 9e7ffda07ddcd668302a61156bcae0d9ec97a26e | [
"Apache-2.0"
] | 1 | 2022-03-28T14:15:24.000Z | 2022-03-28T14:15:24.000Z | src/huggingface_hub/commands/user.py | osanseviero/huggingface_hub | b1cf2d8f47088d3fce2244058d222a4d8234b3ab | [
"Apache-2.0"
] | null | null | null | src/huggingface_hub/commands/user.py | osanseviero/huggingface_hub | b1cf2d8f47088d3fce2244058d222a4d8234b3ab | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The HuggingFace Team. 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 applicabl... | 35.064677 | 135 | 0.605065 | # Copyright 2020 The HuggingFace Team. 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 applicabl... | 8,862 | 137 | 472 |
293ccee023fc91f0aa073e2ba442d3ed89f6b0d4 | 8,365 | py | Python | src/ramstk/logger.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 26 | 2019-05-15T02:03:47.000Z | 2022-02-21T07:28:11.000Z | src/ramstk/logger.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 815 | 2019-05-10T12:31:52.000Z | 2022-03-31T12:56:26.000Z | src/ramstk/logger.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 9 | 2019-04-20T23:06:29.000Z | 2022-01-24T21:21:04.000Z | # -*- coding: utf-8 -*-
#
# ramstk.logger.py is part of The RAMSTK Project
#
# All rights reserved.
# Copyright 2019 Doyle Rowland doyle.rowland <AT> reliaqual <DOT> com
"""RAMSTK Logger Module."""
# Standard Library Imports
import logging
import sys
from typing import Dict
# Third Party Imports
from pubsub imp... | 39.64455 | 82 | 0.68416 | # -*- coding: utf-8 -*-
#
# ramstk.logger.py is part of The RAMSTK Project
#
# All rights reserved.
# Copyright 2019 Doyle Rowland doyle.rowland <AT> reliaqual <DOT> com
"""RAMSTK Logger Module."""
# Standard Library Imports
import logging
import sys
from typing import Dict
# Third Party Imports
from pubsub imp... | 0 | 0 | 0 |
f4bbd3c26bf1e8d647337c4dd66784c1c9d86a9f | 2,458 | py | Python | examples/demo/status_overlay.py | martinRenou/chaco | 1888da3ecee89f9b2d11900cda9333b32fc5e89a | [
"BSD-3-Clause"
] | 3 | 2017-09-17T17:32:06.000Z | 2022-03-15T13:04:43.000Z | examples/demo/status_overlay.py | martinRenou/chaco | 1888da3ecee89f9b2d11900cda9333b32fc5e89a | [
"BSD-3-Clause"
] | null | null | null | examples/demo/status_overlay.py | martinRenou/chaco | 1888da3ecee89f9b2d11900cda9333b32fc5e89a | [
"BSD-3-Clause"
] | 5 | 2015-05-17T16:08:11.000Z | 2021-02-23T09:23:42.000Z |
import numpy
from chaco.api import Plot, ArrayPlotData
from chaco.layers.api import ErrorLayer, WarningLayer, StatusLayer
from enable.component_editor import ComponentEditor
from traits.api import HasTraits, Instance, Button
from traitsui.api import UItem, View, HGroup
class MyPlot(HasTraits):
""" Displays a plo... | 32.342105 | 74 | 0.614321 |
import numpy
from chaco.api import Plot, ArrayPlotData
from chaco.layers.api import ErrorLayer, WarningLayer, StatusLayer
from enable.component_editor import ComponentEditor
from traits.api import HasTraits, Instance, Button
from traitsui.api import UItem, View, HGroup
class MyPlot(HasTraits):
""" Displays a plo... | 415 | 0 | 54 |
08cdc43106ee16eac03626a91a328ff78df10a22 | 681 | py | Python | multi_threadpool_executor.py | Dev-Bobbie/multi_spider | 8fd19ab70de04b6cac021d354850b07ffcf360f2 | [
"Apache-2.0"
] | null | null | null | multi_threadpool_executor.py | Dev-Bobbie/multi_spider | 8fd19ab70de04b6cac021d354850b07ffcf360f2 | [
"Apache-2.0"
] | null | null | null | multi_threadpool_executor.py | Dev-Bobbie/multi_spider | 8fd19ab70de04b6cac021d354850b07ffcf360f2 | [
"Apache-2.0"
] | null | null | null | from concurrent.futures import ThreadPoolExecutor
import time
if __name__ == '__main__':
main() | 24.321429 | 49 | 0.625551 | from concurrent.futures import ThreadPoolExecutor
import time
def sayhello(a):
print("hello: "+a)
time.sleep(2)
def main():
seed=["a","b","c"]
start1=time.time()
for each in seed:
sayhello(each)
end1=time.time()
print("time1: "+str(end1-start1))
start2=time.time()
with Thre... | 535 | 0 | 46 |
61b5793ee25a599b5e5738633cc2cd220b7bf9e9 | 7,541 | py | Python | boss2.py | Jamhacks2018/TheJamExpansion | 1acec353e666fef6608e06b57e82683053e7f060 | [
"MIT"
] | null | null | null | boss2.py | Jamhacks2018/TheJamExpansion | 1acec353e666fef6608e06b57e82683053e7f060 | [
"MIT"
] | null | null | null | boss2.py | Jamhacks2018/TheJamExpansion | 1acec353e666fef6608e06b57e82683053e7f060 | [
"MIT"
] | 3 | 2018-05-05T19:59:56.000Z | 2020-11-15T21:06:27.000Z | from pygame import *
from enemies import *
import random
init()
fontGeneral = font.Font('resources/fonts/Calibri.ttf', 30)
fontHealth = font.Font('resources/fonts/Calibri Bold.ttf', 15)
#draws itself and its health
| 40.983696 | 287 | 0.502851 | from pygame import *
from enemies import *
import random
init()
fontGeneral = font.Font('resources/fonts/Calibri.ttf', 30)
fontHealth = font.Font('resources/fonts/Calibri Bold.ttf', 15)
class Cap():
def __init__(self):
#initialize the image and pos of cap:
self.img = image.load('resourc... | 6,824 | -17 | 424 |
9084b7ccd8e3dba852fd6469469662507b5a8c2b | 24,781 | py | Python | src/simulator/network_wrong_mi.py | ChenGeng-ZJU/PCC-RL | 6627a186643175ea68269d78e206e6bc45ac634f | [
"Apache-2.0"
] | null | null | null | src/simulator/network_wrong_mi.py | ChenGeng-ZJU/PCC-RL | 6627a186643175ea68269d78e206e6bc45ac634f | [
"Apache-2.0"
] | null | null | null | src/simulator/network_wrong_mi.py | ChenGeng-ZJU/PCC-RL | 6627a186643175ea68269d78e206e6bc45ac634f | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Nathan Jay and Noga Rotman
#
# 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 ... | 38.183359 | 130 | 0.561438 | # Copyright 2019 Nathan Jay and Noga Rotman
#
# 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 ... | 19,700 | 3,056 | 569 |
e2b17755e0aaa5b3a5cbb71d2ff79a60e5f99eea | 3,150 | py | Python | cheddar_oauth_example/settings.py | brianbrunner/cheddar-oauth-demo | 7768023a355d9cdc2e861aded2c05ebe3246c930 | [
"MIT"
] | 1 | 2015-05-26T18:21:32.000Z | 2015-05-26T18:21:32.000Z | cheddar_oauth_example/settings.py | brianbrunner/cheddar-oauth-demo | 7768023a355d9cdc2e861aded2c05ebe3246c930 | [
"MIT"
] | null | null | null | cheddar_oauth_example/settings.py | brianbrunner/cheddar-oauth-demo | 7768023a355d9cdc2e861aded2c05ebe3246c930 | [
"MIT"
] | null | null | null | """
Django settings for cheddar_oauth_example project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BAS... | 23.333333 | 89 | 0.699365 | """
Django settings for cheddar_oauth_example project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BAS... | 0 | 0 | 0 |
1097c97b6b77b2f181e0c5a9531a0851278011cb | 470 | py | Python | django101/django102/urls.py | Minkov/python-web-2020-09 | a43baf4dd4dd811caf25aad971a0f1a4d3d486a4 | [
"MIT"
] | 4 | 2020-10-30T23:13:50.000Z | 2020-12-26T21:35:00.000Z | django101/django102/urls.py | Minkov/python-web-2020-09 | a43baf4dd4dd811caf25aad971a0f1a4d3d486a4 | [
"MIT"
] | null | null | null | django101/django102/urls.py | Minkov/python-web-2020-09 | a43baf4dd4dd811caf25aad971a0f1a4d3d486a4 | [
"MIT"
] | 7 | 2020-09-17T13:08:35.000Z | 2020-10-31T15:01:46.000Z | from django.urls import path
from django102.views import index as index_view, UsersListView, GamesListView, something, methods_demo, \
raises_exception, create_game
urlpatterns = [
path('', index_view, name='index'),
path('2/', UsersListView.as_view()),
path('games/', GamesListView.as_view()),... | 33.571429 | 106 | 0.676596 | from django.urls import path
from django102.views import index as index_view, UsersListView, GamesListView, something, methods_demo, \
raises_exception, create_game
urlpatterns = [
path('', index_view, name='index'),
path('2/', UsersListView.as_view()),
path('games/', GamesListView.as_view()),... | 0 | 0 | 0 |
699f409bdd5d561bb93770f28b38f939f53fc421 | 5,483 | py | Python | 3_dataset_create.py | shivanirmishra/musicgenre | 954214b6f7756c05de1253702811fd69dd99b0e2 | [
"MIT"
] | null | null | null | 3_dataset_create.py | shivanirmishra/musicgenre | 954214b6f7756c05de1253702811fd69dd99b0e2 | [
"MIT"
] | null | null | null | 3_dataset_create.py | shivanirmishra/musicgenre | 954214b6f7756c05de1253702811fd69dd99b0e2 | [
"MIT"
] | null | null | null |
from google.colab import drive
drive.mount('/content/drive')
import librosa
import os
import pandas as pd
from numpy import mean
import warnings;
warnings.filterwarnings('ignore');
folders_5s = {
'pop_5s':'/content/drive/My Drive/ML_Project/New_Data/pop_test_5s',
'rnb_5s':'/content/drive/... | 28.857895 | 89 | 0.666423 |
from google.colab import drive
drive.mount('/content/drive')
import librosa
import os
import pandas as pd
from numpy import mean
import warnings;
warnings.filterwarnings('ignore');
folders_5s = {
'pop_5s':'/content/drive/My Drive/ML_Project/New_Data/pop_test_5s',
'rnb_5s':'/content/drive/... | 0 | 0 | 0 |
412a8b42be8c6054311e076c95465833bdd45355 | 1,206 | py | Python | data/train_test_split.py | ttaoREtw/A-Pytorch-Implementation-of-Tacotron-End-to-end-Text-to-speech-Deep-Learning-Model | 6b0f615cafb0530370631a880aac5736fe9a2c64 | [
"MIT"
] | 105 | 2018-09-13T02:45:10.000Z | 2021-06-24T03:31:15.000Z | data/train_test_split.py | henryhenrychen/Tacotron-pytorch | 4a4d1ea0d83fd88a50464999f5d55fe012c86687 | [
"MIT"
] | 9 | 2018-12-11T02:37:58.000Z | 2021-03-18T02:42:40.000Z | data/train_test_split.py | henryhenrychen/Tacotron-pytorch | 4a4d1ea0d83fd88a50464999f5d55fe012c86687 | [
"MIT"
] | 31 | 2018-09-15T14:51:31.000Z | 2021-01-19T07:37:14.000Z | import os
import argparse
import random
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Split the data')
parser.add_argument('--meta-all', type=str, help='The meta file generated by preprocess.py', required=True)
parser.add_argument('--ratio-test', default=0.1, type=float, help='... | 31.736842 | 114 | 0.662521 | import os
import argparse
import random
def split_and_save(args):
meta_all_path = args.meta_all
meta_dir = os.path.dirname(os.path.realpath(meta_all_path))
meta_tr_path = os.path.join(meta_dir, 'meta_train.txt')
meta_te_path = os.path.join(meta_dir, 'meta_test.txt')
with open(meta_all_path) as f:
... | 762 | 0 | 23 |
4d36c18720eb25777d76206398891b1da5c803d3 | 10,711 | py | Python | item_sets.py | jay-maity/RecommendPCY | 040eda27be46d241406d3cb8ce6605dde492fef9 | [
"MIT"
] | null | null | null | item_sets.py | jay-maity/RecommendPCY | 040eda27be46d241406d3cb8ce6605dde492fef9 | [
"MIT"
] | null | null | null | item_sets.py | jay-maity/RecommendPCY | 040eda27be46d241406d3cb8ce6605dde492fef9 | [
"MIT"
] | null | null | null | """ Frequent item discovery by PCY algorithm"""
import operator
import json
import sys
from pyspark import SparkContext, SparkConf
import pyspark_cassandra
from cassandra.cluster import Cluster
cluster = None
session = None
class PCYFrequentItems:
"""
Find Frequent item list using PCY algorithm
"""
... | 34.220447 | 98 | 0.527588 | """ Frequent item discovery by PCY algorithm"""
import operator
import json
import sys
from pyspark import SparkContext, SparkConf
import pyspark_cassandra
from cassandra.cluster import Cluster
cluster = None
session = None
class PCYFrequentItems:
"""
Find Frequent item list using PCY algorithm
"""
... | 0 | 0 | 0 |
67a731ca62e5cbd2844ce988950efc73fd0d3ec6 | 5,201 | pyw | Python | pncShell.pyw | BobBaylor/pnc | 11b5a08a1fce5c605a203c4e46c9d9599024ad3c | [
"MIT"
] | null | null | null | pncShell.pyw | BobBaylor/pnc | 11b5a08a1fce5c605a203c4e46c9d9599024ad3c | [
"MIT"
] | null | null | null | pncShell.pyw | BobBaylor/pnc | 11b5a08a1fce5c605a203c4e46c9d9599024ad3c | [
"MIT"
] | null | null | null | """
A wrapper around my pnc.py module
"""
import os.path
import wx
import wx.lib.filebrowsebutton as filebrowse
import pnc
class MyFrame(wx.Frame):
"""
This is MyFrame. It just shows a few controls on a wxPanel,
and has a simple menu.
Use this file inFileBtn
Write this root name TextEntry
... | 38.242647 | 153 | 0.586233 | """
A wrapper around my pnc.py module
"""
import os.path
import wx
import wx.lib.filebrowsebutton as filebrowse
import pnc
class MyFrame(wx.Frame):
"""
This is MyFrame. It just shows a few controls on a wxPanel,
and has a simple menu.
Use this file inFileBtn
Write this root name TextEntry
... | 3,265 | 0 | 26 |
f7357be79ed5cf787004c67c6e35b3966042133a | 659 | py | Python | ouch_server.py | jahinzee/theouchteam | 870767cae81ad37b4191ded64c3e83eb48be982a | [
"MIT"
] | 3 | 2022-01-09T02:40:31.000Z | 2022-02-01T03:57:40.000Z | ouch_server.py | jahinzee/theouchteam | 870767cae81ad37b4191ded64c3e83eb48be982a | [
"MIT"
] | null | null | null | ouch_server.py | jahinzee/theouchteam | 870767cae81ad37b4191ded64c3e83eb48be982a | [
"MIT"
] | 1 | 2022-01-21T08:05:27.000Z | 2022-01-21T08:05:27.000Z | import sys
from src.Exchange import Exchange
if __name__ == "__main__":
exchange = None
if len(sys.argv) == 2:
if sys.argv[1] == "debug":
# Exchange outputs using debug mode.
exchange = Exchange(debug="dump")
elif sys.argv[1] == "none":
# Exchange won't outp... | 32.95 | 86 | 0.608498 | import sys
from src.Exchange import Exchange
if __name__ == "__main__":
exchange = None
if len(sys.argv) == 2:
if sys.argv[1] == "debug":
# Exchange outputs using debug mode.
exchange = Exchange(debug="dump")
elif sys.argv[1] == "none":
# Exchange won't outp... | 0 | 0 | 0 |
9f8dc9d33b7c561ec7708fe6db9f376c20086e3c | 42 | py | Python | ml-agents/mlagents/trainers/components/reward_signals/extrinsic/__init__.py | russellcaughey/ml-agents | 493c75bf683d35d512ae6fb57d4a1a332116df15 | [
"Apache-2.0"
] | 3 | 2018-09-18T13:40:29.000Z | 2019-02-14T07:30:09.000Z | ml-agents/mlagents/trainers/components/reward_signals/extrinsic/__init__.py | russellcaughey/ml-agents | 493c75bf683d35d512ae6fb57d4a1a332116df15 | [
"Apache-2.0"
] | 1 | 2020-04-27T01:52:49.000Z | 2020-04-27T01:52:49.000Z | ml-agents/mlagents/trainers/components/reward_signals/extrinsic/__init__.py | russellcaughey/ml-agents | 493c75bf683d35d512ae6fb57d4a1a332116df15 | [
"Apache-2.0"
] | 2 | 2019-09-10T16:05:48.000Z | 2020-07-24T20:40:26.000Z | from .signal import ExtrinsicRewardSignal
| 21 | 41 | 0.880952 | from .signal import ExtrinsicRewardSignal
| 0 | 0 | 0 |
a3dcdb967f844c2c93436cc07445e0c92c4d3a7d | 99 | py | Python | server_prod.py | techx/evolution-chamber | dea9b7d563df6f06d270078f5c512e3f7e367a92 | [
"MIT"
] | 4 | 2015-06-22T15:44:57.000Z | 2015-06-22T15:57:03.000Z | server_prod.py | techx/evolution-chamber | dea9b7d563df6f06d270078f5c512e3f7e367a92 | [
"MIT"
] | null | null | null | server_prod.py | techx/evolution-chamber | dea9b7d563df6f06d270078f5c512e3f7e367a92 | [
"MIT"
] | 2 | 2015-07-09T15:21:37.000Z | 2016-02-02T15:59:09.000Z | import server
if __name__ == "__main__":
server.app.run(host='0.0.0.0',port=5000,debug=False)
| 19.8 | 56 | 0.686869 | import server
if __name__ == "__main__":
server.app.run(host='0.0.0.0',port=5000,debug=False)
| 0 | 0 | 0 |
da72584d02e46192004671f6611a889c0dd3c753 | 2,533 | py | Python | datahub/email_ingestion/emails.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 6 | 2019-12-02T16:11:24.000Z | 2022-03-18T10:02:02.000Z | datahub/email_ingestion/emails.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 1,696 | 2019-10-31T14:08:37.000Z | 2022-03-29T12:35:57.000Z | datahub/email_ingestion/emails.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 9 | 2019-11-22T12:42:03.000Z | 2021-09-03T14:25:05.000Z | import tempfile
from logging import getLogger
import mailparser
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from datahub.documents import utils as documents
from datahub.interaction.email_processors.processors import CalendarInteractionEmailProcessor
logger = getLogger(__... | 33.773333 | 95 | 0.649428 | import tempfile
from logging import getLogger
import mailparser
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from datahub.documents import utils as documents
from datahub.interaction.email_processors.processors import CalendarInteractionEmailProcessor
logger = getLogger(__... | 0 | 0 | 0 |
0af7288a9052da637b85d240b67185965f20ec48 | 1,105 | py | Python | classes/rooms.py | Loekring/Neversoft | a9e600131585741652b62b2dbbaa2febc1656843 | [
"MIT"
] | 1 | 2018-01-21T21:15:52.000Z | 2018-01-21T21:15:52.000Z | classes/rooms.py | Loekring/Neversoft | a9e600131585741652b62b2dbbaa2febc1656843 | [
"MIT"
] | null | null | null | classes/rooms.py | Loekring/Neversoft | a9e600131585741652b62b2dbbaa2febc1656843 | [
"MIT"
] | null | null | null | import random as r
offBoundsMsgs = ["Der er ikkje noko i den retninga.", "Du møtte ein vegg.", "Du kjem deg ikkje vidare i den retninga."]
roomSizeX, roomSizeY = 2, 1
# Dette er baseklassa til allle romma
| 31.571429 | 119 | 0.6181 | import random as r
offBoundsMsgs = ["Der er ikkje noko i den retninga.", "Du møtte ein vegg.", "Du kjem deg ikkje vidare i den retninga."]
roomSizeX, roomSizeY = 2, 1
class Rooms:
# Dette er baseklassa til allle romma
def __init__(self, name, smell, feel, taste, look, sound, jump):
self.name = name... | 669 | -9 | 233 |
9c6cb2f62249c9249426fed5a021326cf26ae2cd | 3,970 | py | Python | pymatflow/vasp/scripts/vasp-dfpt.py | DeqiTang/pymatflow | bd8776feb40ecef0e6704ee898d9f42ded3b0186 | [
"MIT"
] | 6 | 2020-03-06T16:13:08.000Z | 2022-03-09T07:53:34.000Z | pymatflow/vasp/scripts/vasp-dfpt.py | DeqiTang/pymatflow | bd8776feb40ecef0e6704ee898d9f42ded3b0186 | [
"MIT"
] | 1 | 2021-10-02T02:23:08.000Z | 2021-11-08T13:29:37.000Z | pymatflow/vasp/scripts/vasp-dfpt.py | DeqiTang/pymatflow | bd8776feb40ecef0e6704ee898d9f42ded3b0186 | [
"MIT"
] | 1 | 2021-07-10T16:28:14.000Z | 2021-07-10T16:28:14.000Z | #!/usr/bin/env python
# _*_ coding: utf-8 _*_
import os
import argparse
from pymatflow.vasp.dfpt import dfpt_run
"""
usage:
"""
params = {}
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--directory", type=str, default="tmp-vasp-static",
... | 36.090909 | 251 | 0.522418 | #!/usr/bin/env python
# _*_ coding: utf-8 _*_
import os
import argparse
from pymatflow.vasp.dfpt import dfpt_run
"""
usage:
"""
params = {}
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--directory", type=str, default="tmp-vasp-static",
... | 0 | 0 | 0 |
9d62cac37a74dba044cd1a53d16dc1255a546ab1 | 260 | py | Python | python5.py | audstanley/nodePythonProcessWatcher | cf3b707af81c837b99c5b2d955cf0d718e286e81 | [
"MIT"
] | null | null | null | python5.py | audstanley/nodePythonProcessWatcher | cf3b707af81c837b99c5b2d955cf0d718e286e81 | [
"MIT"
] | null | null | null | python5.py | audstanley/nodePythonProcessWatcher | cf3b707af81c837b99c5b2d955cf0d718e286e81 | [
"MIT"
] | null | null | null | from python5_unixSocket import interComs
myInterComs = interComs()
myInterComs.run()
import sys
from time import sleep
while True:
print("MESSAGES FROM PYTHON 5")
sys.stdout.flush()
myInterComs.send( {"wordDawg": "from python5"} )
sleep(0.500) | 23.636364 | 52 | 0.726923 | from python5_unixSocket import interComs
myInterComs = interComs()
myInterComs.run()
import sys
from time import sleep
while True:
print("MESSAGES FROM PYTHON 5")
sys.stdout.flush()
myInterComs.send( {"wordDawg": "from python5"} )
sleep(0.500) | 0 | 0 | 0 |
2c4146e35515d5d11823006c020a481717320a31 | 1,909 | py | Python | Revitron.tab/RPM.panel/Setup.pulldown/ProjectSetup.pushbutton/ProjectSetup_script.py | jmcouffin/revitron-ui | f67739488b504cdb0cabe36e088a40fe3cd2b282 | [
"MIT"
] | null | null | null | Revitron.tab/RPM.panel/Setup.pulldown/ProjectSetup.pushbutton/ProjectSetup_script.py | jmcouffin/revitron-ui | f67739488b504cdb0cabe36e088a40fe3cd2b282 | [
"MIT"
] | null | null | null | Revitron.tab/RPM.panel/Setup.pulldown/ProjectSetup.pushbutton/ProjectSetup_script.py | jmcouffin/revitron-ui | f67739488b504cdb0cabe36e088a40fe3cd2b282 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Define extensions to be used with this Revit model. Defined extensions can be installed by using the "Install Extensions" button.
"""
import revitron
import System.Windows
from pyrevit import script
from rpw.ui.forms import FlexForm, TextBox, Button, Label
if not revitron.Document().isFami... | 37.431373 | 130 | 0.707177 | # -*- coding: utf-8 -*-
"""
Define extensions to be used with this Revit model. Defined extensions can be installed by using the "Install Extensions" button.
"""
import revitron
import System.Windows
from pyrevit import script
from rpw.ui.forms import FlexForm, TextBox, Button, Label
def openHelp(sender, e):
script.... | 83 | 0 | 23 |
d570100b492c0df602a33bf7fd31f800015b364c | 3,653 | py | Python | src/features/spectrum.py | vikigenius/neural_speaker_identification | a723290808d748daf65163b71aef2c5376319db3 | [
"MIT"
] | 1 | 2019-07-27T00:32:02.000Z | 2019-07-27T00:32:02.000Z | src/features/spectrum.py | vikigenius/neural_speaker_identification | a723290808d748daf65163b71aef2c5376319db3 | [
"MIT"
] | null | null | null | src/features/spectrum.py | vikigenius/neural_speaker_identification | a723290808d748daf65163b71aef2c5376319db3 | [
"MIT"
] | 1 | 2019-07-27T00:32:06.000Z | 2019-07-27T00:32:06.000Z | #!/usr/bin/env python
import logging
import numpy as np
import librosa
import scipy
from random import randint
from src.utils.math_utils import nextpow2
logger = logging.getLogger(__name__)
| 30.957627 | 79 | 0.595401 | #!/usr/bin/env python
import logging
import numpy as np
import librosa
import scipy
from random import randint
from src.utils.math_utils import nextpow2
logger = logging.getLogger(__name__)
class Spectrum(object):
def __init__(self, hparams):
self.sample_freq = hparams.sample_freq
self.duration ... | 938 | 2,499 | 23 |
1e6f1908f373e61b9009dc90b043eed4cfc23a7c | 1,561 | py | Python | src/network.py | Renerick/python-neural-network | 552da90999622232d0e7061c690c972f7a2201d0 | [
"MIT"
] | 1 | 2019-08-12T09:15:12.000Z | 2019-08-12T09:15:12.000Z | src/network.py | Renerick/python-neural-network | 552da90999622232d0e7061c690c972f7a2201d0 | [
"MIT"
] | null | null | null | src/network.py | Renerick/python-neural-network | 552da90999622232d0e7061c690c972f7a2201d0 | [
"MIT"
] | null | null | null | import numpy as np
import pickle
@np.vectorize
| 26.457627 | 70 | 0.559257 | import numpy as np
import pickle
@np.vectorize
def deriv(x):
return 1. if x > 0 else 0.
class Network:
def __init__(self, *args):
np.random.seed(1)
all_layers = args
self.hidden_layers = []
self.biases = []
for l in zip(all_layers, all_layers[1:]):
self... | 1,320 | 146 | 45 |
01fd056ce41c1c67b73640a90525a86f7223ab98 | 51,070 | py | Python | backend/grafit/migrations/0003_load_data.py | fossabot/grafit | c7328cc7ed4d37d36fc735944aa8763fad090d97 | [
"MIT"
] | 16 | 2018-10-12T16:33:52.000Z | 2020-06-23T20:11:34.000Z | backend/grafit/migrations/0003_load_data.py | fossabot/grafit | c7328cc7ed4d37d36fc735944aa8763fad090d97 | [
"MIT"
] | 41 | 2018-10-14T21:28:38.000Z | 2021-06-10T22:01:45.000Z | backend/grafit/migrations/0003_load_data.py | fossabot/grafit | c7328cc7ed4d37d36fc735944aa8763fad090d97 | [
"MIT"
] | 4 | 2018-10-28T10:47:26.000Z | 2020-07-20T04:17:04.000Z | # Generated by Django 2.1.2 on 2018-10-25 09:36
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
import uuid
| 100.928854 | 1,002 | 0.739495 | # Generated by Django 2.1.2 on 2018-10-25 09:36
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
dependencies = [
('grafit', '0002_article'),
]
operati... | 0 | 50,949 | 23 |
ddfea5bd5d0e0cf8608cb0a07599e5e6b06f933e | 494 | py | Python | Python Script Tools/18.0 Create Dataframe And Store It In a CSV.py | juan1305/0.11-incremento_descremento | 954ddb32180c3197e5b01cf95d20f5325ada8a29 | [
"MIT"
] | 1 | 2020-04-13T00:16:16.000Z | 2020-04-13T00:16:16.000Z | Python Script Tools/18.0 Create Dataframe And Store It In a CSV.py | juan1305/0.11-incremento_descremento | 954ddb32180c3197e5b01cf95d20f5325ada8a29 | [
"MIT"
] | null | null | null | Python Script Tools/18.0 Create Dataframe And Store It In a CSV.py | juan1305/0.11-incremento_descremento | 954ddb32180c3197e5b01cf95d20f5325ada8a29 | [
"MIT"
] | null | null | null | import pandas as pd
# Crear diccionario donde key sera columna a crear
# y su valuela informacion de cada columna
data = {'paises': ['Mexico', 'España', 'Estados Unidos'],
'Ciudades': ['Monterrey,' 'Madrid', 'Nueva York'],
'Casos': [4291, 3829, 10283]}
# Crear un DataFrame pasando el diccioario y
# señalizar ... | 27.444444 | 64 | 0.700405 | import pandas as pd
# Crear diccionario donde key sera columna a crear
# y su valuela informacion de cada columna
data = {'paises': ['Mexico', 'España', 'Estados Unidos'],
'Ciudades': ['Monterrey,' 'Madrid', 'Nueva York'],
'Casos': [4291, 3829, 10283]}
# Crear un DataFrame pasando el diccioario y
# señalizar ... | 0 | 0 | 0 |
d3b313c3dd0ec4a73ea6c33bd5b776e0285a4fc6 | 30,581 | py | Python | pxr/usd/usdLux/testenv/testUsdLuxLight.py | yurivict/USD | 3b097e3ba8fabf1777a1256e241ea15df83f3065 | [
"Apache-2.0"
] | 1 | 2021-09-25T12:49:37.000Z | 2021-09-25T12:49:37.000Z | pxr/usd/usdLux/testenv/testUsdLuxLight.py | yurivict/USD | 3b097e3ba8fabf1777a1256e241ea15df83f3065 | [
"Apache-2.0"
] | null | null | null | pxr/usd/usdLux/testenv/testUsdLuxLight.py | yurivict/USD | 3b097e3ba8fabf1777a1256e241ea15df83f3065 | [
"Apache-2.0"
] | 1 | 2018-10-03T19:08:33.000Z | 2018-10-03T19:08:33.000Z | #!/pxrpythonsubst
#
# Copyright 2017 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
... | 48.083333 | 82 | 0.632059 | #!/pxrpythonsubst
#
# Copyright 2017 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
... | 21,048 | 8,253 | 23 |
0e80c9e7dca15d7cd5266e3c0a1290507d1a7a09 | 3,801 | py | Python | scripts/fix_rttm.py | sehgal-simran/RPNSD | 5ec70d11e3d177fb87a8499b63cd1c5ba60549b6 | [
"MIT"
] | 59 | 2020-02-19T11:23:14.000Z | 2022-02-06T09:31:32.000Z | scripts/fix_rttm.py | yuzhms/RPNSD | 031377388cb498c0dee080a76bd588a9ee8b39e0 | [
"MIT"
] | 11 | 2020-03-05T10:23:43.000Z | 2021-10-11T02:15:28.000Z | scripts/fix_rttm.py | yuzhms/RPNSD | 031377388cb498c0dee080a76bd588a9ee8b39e0 | [
"MIT"
] | 13 | 2020-02-19T02:30:43.000Z | 2021-01-13T03:06:42.000Z | #!/usr/bin/env python3
# This script fixes some problems the RTTM file
# including invalid time boundaries and others
import os
import sys
import numpy as np
import argparse
if __name__ == "__main__":
main()
| 36.548077 | 146 | 0.594843 | #!/usr/bin/env python3
# This script fixes some problems the RTTM file
# including invalid time boundaries and others
import os
import sys
import numpy as np
import argparse
def get_args():
parser = argparse.ArgumentParser(
description="Fix RTTM file")
parser.add_argument("rttm_file", type=str,
... | 3,448 | 0 | 139 |
78c5929686706d7b4c5c6bb30eecae092b7caa4b | 997 | py | Python | polymorphism/polymorphism_demos.py | Minkov/python-oop | db9651eef374c0e74c32cb6f2bf07c734cc1d051 | [
"MIT"
] | 3 | 2021-11-16T04:52:53.000Z | 2022-02-07T20:28:41.000Z | polymorphism/polymorphism_demos.py | Minkov/python-oop | db9651eef374c0e74c32cb6f2bf07c734cc1d051 | [
"MIT"
] | null | null | null | polymorphism/polymorphism_demos.py | Minkov/python-oop | db9651eef374c0e74c32cb6f2bf07c734cc1d051 | [
"MIT"
] | 1 | 2021-12-07T07:04:38.000Z | 2021-12-07T07:04:38.000Z | import math
r = Rect(2, 5)
c = Circle(3)
shapes: list[Shape] = [
r,
c,
]
[print_area(s) for s in shapes]
print(isinstance(r, Rect))
print(isinstance(r, Circle))
print(isinstance(r, Shape))
# print_area(2)
print(Rect.mro())
Person().say_hello()
| 16.616667 | 50 | 0.608826 | import math
class Shape:
def area(self):
pass
class Rect(Shape):
def __init__(self, width, height):
self.width = width
self.height = height
def area(self):
return self.width * self.height
class Circle(Shape):
def __init__(self, radius):
self.radius = radius... | 455 | -21 | 300 |