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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ba596998bb17250c636379d582718007fccc4be7 | 520 | py | Python | sell_staff/migrations/0002_auto_20201123_1455.py | Ishikashah2510/nirvaas_main | 5eaf92756d06261a7f555b10aad864a34c9e761b | [
"MIT"
] | null | null | null | sell_staff/migrations/0002_auto_20201123_1455.py | Ishikashah2510/nirvaas_main | 5eaf92756d06261a7f555b10aad864a34c9e761b | [
"MIT"
] | null | null | null | sell_staff/migrations/0002_auto_20201123_1455.py | Ishikashah2510/nirvaas_main | 5eaf92756d06261a7f555b10aad864a34c9e761b | [
"MIT"
] | 3 | 2020-12-30T11:35:22.000Z | 2021-01-07T13:10:26.000Z | # Generated by Django 3.1.3 on 2020-11-23 09:25
import django.core.files.storage
from django.db import migrations, models
| 26 | 156 | 0.655769 | # Generated by Django 3.1.3 on 2020-11-23 09:25
import django.core.files.storage
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sell_staff', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='items',
... | 0 | 373 | 23 |
42b02546d446dc752a8de017e36e151146bb611a | 1,008 | py | Python | apprentice_learner/urls.py | afcarl/apprentice_learner_api | c59f4e6d6f03eb807d61a4bcfa1e5771d8b969cc | [
"MIT"
] | 1 | 2019-04-22T16:38:57.000Z | 2019-04-22T16:38:57.000Z | apprentice_learner/urls.py | afcarl/apprentice_learner_api | c59f4e6d6f03eb807d61a4bcfa1e5771d8b969cc | [
"MIT"
] | null | null | null | apprentice_learner/urls.py | afcarl/apprentice_learner_api | c59f4e6d6f03eb807d61a4bcfa1e5771d8b969cc | [
"MIT"
] | null | null | null | from django.conf.urls import url
from django.conf import settings
from django.conf.urls.static import static
from apprentice_learner import views
app_name = 'apprentice_api'
urlpatterns = [
url(r'^create/$', views.create, name = "create"),
url(r'^request/(?P<agent_id>[0-9]+)/$', views.request, name="request"),
url... | 53.052632 | 107 | 0.676587 | from django.conf.urls import url
from django.conf import settings
from django.conf.urls.static import static
from apprentice_learner import views
app_name = 'apprentice_api'
urlpatterns = [
url(r'^create/$', views.create, name = "create"),
url(r'^request/(?P<agent_id>[0-9]+)/$', views.request, name="request"),
url... | 0 | 0 | 0 |
149af82596d8471e480030d64ffea479f630a7ae | 1,288 | py | Python | config/LoggingConfiguration.py | ronnyfriedland/minioclient | b4a55ed62f1d61f39254a4003ee65b3a778f3526 | [
"MIT"
] | 1 | 2020-06-10T10:32:32.000Z | 2020-06-10T10:32:32.000Z | config/LoggingConfiguration.py | ronnyfriedland/minioclient | b4a55ed62f1d61f39254a4003ee65b3a778f3526 | [
"MIT"
] | 2 | 2019-11-11T19:16:52.000Z | 2019-11-12T07:05:56.000Z | config/LoggingConfiguration.py | ronnyfriedland/minioclient | b4a55ed62f1d61f39254a4003ee65b3a778f3526 | [
"MIT"
] | null | null | null | from config.Configuration import Configuration
import logging
class LoggingConfiguration(Configuration):
"""
Author: Ronny Friedland
Handles logging configuration
"""
CONFIG_DEFAULTS = {'loglevel':'INFO'}
def check_config(self):
"""
Check if config.ini contains logging sett... | 29.272727 | 80 | 0.631988 | from config.Configuration import Configuration
import logging
class LoggingConfiguration(Configuration):
"""
Author: Ronny Friedland
Handles logging configuration
"""
CONFIG_DEFAULTS = {'loglevel':'INFO'}
def __init__(self, config_file = Configuration.config_file):
super().__init__... | 77 | 0 | 27 |
b77ad8cc5db628e76e31d19b2fa47cd72b004797 | 1,670 | py | Python | cli/gardener_ci/_oci.py | mliepold/cc-utils | 3f8c4b0d11d6a52d1605026f478371411daab81e | [
"BSD-3-Clause"
] | null | null | null | cli/gardener_ci/_oci.py | mliepold/cc-utils | 3f8c4b0d11d6a52d1605026f478371411daab81e | [
"BSD-3-Clause"
] | null | null | null | cli/gardener_ci/_oci.py | mliepold/cc-utils | 3f8c4b0d11d6a52d1605026f478371411daab81e | [
"BSD-3-Clause"
] | null | null | null | import dataclasses
import pprint
import sys
import ccc.oci
import oci
__cmd_name__ = 'oci'
| 22.266667 | 85 | 0.646707 | import dataclasses
import pprint
import sys
import ccc.oci
import oci
__cmd_name__ = 'oci'
def cp(src:str, tgt:str):
oci_client = ccc.oci.oci_client()
oci.replicate_artifact(
src_image_reference=src,
tgt_image_reference=tgt,
oci_client=oci_client,
)
def ls(image: str):
oci... | 1,457 | 0 | 115 |
dd9bbf8526198f00fb8980811e2cc9ecc05c908e | 697 | py | Python | sch/migrations/0001_initial.py | nikhilxifer/bloodbankmanagement | a31ce090c33fa2499f26ec685220d207d9f08394 | [
"MIT"
] | null | null | null | sch/migrations/0001_initial.py | nikhilxifer/bloodbankmanagement | a31ce090c33fa2499f26ec685220d207d9f08394 | [
"MIT"
] | null | null | null | sch/migrations/0001_initial.py | nikhilxifer/bloodbankmanagement | a31ce090c33fa2499f26ec685220d207d9f08394 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2021-06-09 14:32
from django.db import migrations, models
| 24.892857 | 79 | 0.519369 | # Generated by Django 3.1 on 2021-06-09 14:32
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='search1',
fields=[
('ID', models.IntegerField... | 0 | 585 | 23 |
ca2aafd31bdda323c2b2d51628c87574d4b747b8 | 1,720 | py | Python | src/abstract_structures/queues/linked_queue.py | mlatifi/Python-and-Algorithms-and-Data-Structures | 47fed555093b0797a5d8043573a3278028b26a2b | [
"MIT"
] | 5 | 2017-08-03T06:33:49.000Z | 2021-08-06T13:20:57.000Z | src/abstract_structures/queues/linked_queue.py | ritahu/Python-and-Algorithms-and-Data-Structures | d2c082d261a68b06f533703867ae8a90ac7f4df1 | [
"MIT"
] | null | null | null | src/abstract_structures/queues/linked_queue.py | ritahu/Python-and-Algorithms-and-Data-Structures | d2c082d261a68b06f533703867ae8a90ac7f4df1 | [
"MIT"
] | 6 | 2017-04-27T13:30:49.000Z | 2020-11-01T20:28:55.000Z | #!/usr/bin/env python
__author__ = "bt3"
''' Queue acts as a container for nodes (objects) that are inserted and removed according FIFO'''
if __name__ == '__main__':
queue = LinkedQueue()
print("Is the queue empty? ", queue.isEmpty())
print("Adding 0 to 10 in the queue...")
for i in range(... | 21.234568 | 97 | 0.547093 | #!/usr/bin/env python
__author__ = "bt3"
''' Queue acts as a container for nodes (objects) that are inserted and removed according FIFO'''
class Node(object):
def __init__(self, value=None, pointer=None):
self.value = value
self.pointer = None
class LinkedQueue(object):
def __init__(self):... | 854 | 3 | 260 |
132ae91e8cc24c13ceba95761dfe1777e9a63d5b | 814 | py | Python | Python/Python_Web_Development/FlaskMegaTutorial/microblog/migrations/versions/04f42852fee8_add_about_me_last_seen_fields_to_users_.py | nitin-cherian/LifeLongLearning | 84084792058358365162c645742c70064a2d5fd6 | [
"MIT"
] | 4 | 2018-01-19T17:15:06.000Z | 2018-01-24T00:06:42.000Z | Python/Python_Web_Development/FlaskMegaTutorial/microblog/migrations/versions/04f42852fee8_add_about_me_last_seen_fields_to_users_.py | nitin-cherian/LifeLongLearning | 84084792058358365162c645742c70064a2d5fd6 | [
"MIT"
] | null | null | null | Python/Python_Web_Development/FlaskMegaTutorial/microblog/migrations/versions/04f42852fee8_add_about_me_last_seen_fields_to_users_.py | nitin-cherian/LifeLongLearning | 84084792058358365162c645742c70064a2d5fd6 | [
"MIT"
] | null | null | null | """add about_me, last_seen fields to users table.
Revision ID: 04f42852fee8
Revises: 60ae9f5ea6d5
Create Date: 2018-03-27 06:43:46.542593
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '04f42852fee8'
down_revision = '60ae9f5ea6d5'
branch_labels = None
depends_... | 26.258065 | 86 | 0.694103 | """add about_me, last_seen fields to users table.
Revision ID: 04f42852fee8
Revises: 60ae9f5ea6d5
Create Date: 2018-03-27 06:43:46.542593
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '04f42852fee8'
down_revision = '60ae9f5ea6d5'
branch_labels = None
depends_... | 436 | 0 | 46 |
e2508963f16fb9876ae5bcfdfbf8321d39c4f391 | 8,125 | py | Python | src/cam.py | FredrikM97/Medical-ROI | 54246341460c04caeced2ef6dcab984f6c260c9d | [
"Apache-2.0"
] | null | null | null | src/cam.py | FredrikM97/Medical-ROI | 54246341460c04caeced2ef6dcab984f6c260c9d | [
"Apache-2.0"
] | null | null | null | src/cam.py | FredrikM97/Medical-ROI | 54246341460c04caeced2ef6dcab984f6c260c9d | [
"Apache-2.0"
] | null | null | null | """
This module contain various types of functions/classes to access and generate CAM.
"""
import warnings
from typing import List, Tuple, Union
import matplotlib.pyplot as plt
import nibabel as nib
import numpy as np
import torch
import torchcam
import torchvision
from src.display.cmap import parula_map
from src.fi... | 33.29918 | 182 | 0.586954 | """
This module contain various types of functions/classes to access and generate CAM.
"""
import warnings
from typing import List, Tuple, Union
import matplotlib.pyplot as plt
import nibabel as nib
import numpy as np
import torch
import torchcam
import torchvision
from src.display.cmap import parula_map
from src.fi... | 0 | 0 | 0 |
69ef23366f317ce1c6e8f4704475e1dca0a6acea | 74 | py | Python | charing-be/test/test.py | YinhaoHe/84-Charing-Cross-Road | 358f195792938e06c25b8b6ed526b087f6752f0e | [
"MIT"
] | null | null | null | charing-be/test/test.py | YinhaoHe/84-Charing-Cross-Road | 358f195792938e06c25b8b6ed526b087f6752f0e | [
"MIT"
] | null | null | null | charing-be/test/test.py | YinhaoHe/84-Charing-Cross-Road | 358f195792938e06c25b8b6ed526b087f6752f0e | [
"MIT"
] | null | null | null | print "SELECT pair_email FROM users where email = %s" , '236294386@qq.com' | 74 | 74 | 0.743243 | print "SELECT pair_email FROM users where email = %s" , '236294386@qq.com' | 0 | 0 | 0 |
dbde4d25c1933c6a398c3ec1379b9a6c559bdb6a | 28,529 | py | Python | SynapticPlasticityModel/plotting_utils.py | baiydaavi/RL_models_with_choice_selective_sequences | 94cf48fef53c4db6ee22eb96bad7f882fb182411 | [
"Apache-2.0"
] | null | null | null | SynapticPlasticityModel/plotting_utils.py | baiydaavi/RL_models_with_choice_selective_sequences | 94cf48fef53c4db6ee22eb96bad7f882fb182411 | [
"Apache-2.0"
] | null | null | null | SynapticPlasticityModel/plotting_utils.py | baiydaavi/RL_models_with_choice_selective_sequences | 94cf48fef53c4db6ee22eb96bad7f882fb182411 | [
"Apache-2.0"
] | 1 | 2022-03-03T19:42:13.000Z | 2022-03-03T19:42:13.000Z | import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stats
import statsmodels.api as sm
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import MaxNLocator
class GenerateTestPlots:
"""Generates plots using data collected during model run."""
... | 37.538158 | 90 | 0.547688 | import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stats
import statsmodels.api as sm
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import MaxNLocator
class GenerateTestPlots:
"""Generates plots using data collected during model run."""
... | 27,159 | 0 | 216 |
64580f2692073985264822164567bb614d8a4c4c | 1,769 | py | Python | programing/geeksforgeeks.py | meobach/Algorithms | 3e502132924ac9e647216bfef5b5f105e8c09b5b | [
"MIT"
] | null | null | null | programing/geeksforgeeks.py | meobach/Algorithms | 3e502132924ac9e647216bfef5b5f105e8c09b5b | [
"MIT"
] | null | null | null | programing/geeksforgeeks.py | meobach/Algorithms | 3e502132924ac9e647216bfef5b5f105e8c09b5b | [
"MIT"
] | null | null | null | # arr=Arr([2,1,3,4,5,6,1,1,6,2,4,5,3,1])
# print(arr.reverse())
arr=Arr([3, -5,-1])
print(arr.minimize_flip_k_length_subarr([1,2,3]))
| 29.483333 | 57 | 0.520068 | class Arr:
def __init__(self,item) -> None:
self.length=len(item)
self.arr=item
def reverse(self):
for i in range(int(self.length/2)):
temp=self.arr[i]
self.arr[i]=self.arr[self.length-i-1]
self.arr[self.length-i-1]=temp
return self.arr
def... | 1,402 | -19 | 252 |
1e67bd8da46926fc9941be5fbf374117f1a2b1eb | 1,159 | py | Python | old code/confusion.py | dll-ncai/AI-ForestWatch | 54c4090abfd98c5e6bc0e2a867f508f57656e698 | [
"MIT"
] | 2 | 2021-12-05T11:57:02.000Z | 2021-12-12T20:56:48.000Z | old code/confusion.py | dll-ncai/AI-ForestWatch | 54c4090abfd98c5e6bc0e2a867f508f57656e698 | [
"MIT"
] | null | null | null | old code/confusion.py | dll-ncai/AI-ForestWatch | 54c4090abfd98c5e6bc0e2a867f508f57656e698 | [
"MIT"
] | 2 | 2021-11-12T15:15:09.000Z | 2021-12-05T11:57:04.000Z | # Copyright (c) 2021, Technische Universität Kaiserslautern (TUK) & National University of Sciences and Technology (NUST).
# All rights reserved.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import print_function
from __f... | 30.5 | 122 | 0.666954 | # Copyright (c) 2021, Technische Universität Kaiserslautern (TUK) & National University of Sciences and Technology (NUST).
# All rights reserved.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import print_function
from __f... | 627 | 0 | 23 |
16e53805572b8113ae7560f4666939311a8abbfc | 2,218 | py | Python | app/chord.py | roi3363/music-pytheory | 53cc3c4f0025acef75411ff85e1ce365912267be | [
"MIT"
] | 2 | 2019-09-24T09:41:37.000Z | 2020-07-26T20:21:05.000Z | app/chord.py | roi3363/music-pytheory | 53cc3c4f0025acef75411ff85e1ce365912267be | [
"MIT"
] | null | null | null | app/chord.py | roi3363/music-pytheory | 53cc3c4f0025acef75411ff85e1ce365912267be | [
"MIT"
] | null | null | null | import data.music_theory as music_data
from app.note import Note
from app.base import Base
class Chord(Base):
"""
"""
def invert_chord(self, chord, inversion = 'root'):
"""
Args:
chord (list): The notes of the chord
inversion (str): The inversion name (root, first... | 34.65625 | 94 | 0.5789 | import data.music_theory as music_data
from app.note import Note
from app.base import Base
class Chord(Base):
"""
"""
def __init__(self, root, quality ='major', interval = None, inversion = None):
self.validate_arguments()
super().__init__()
self._root = Note(root)
self._qu... | 1,082 | 0 | 80 |
27919122a1a37252cf66cbce135362572c292d99 | 1,341 | py | Python | lineflow/datasets/small_parallel_enja.py | sobamchan/lineflow | 708a875c090b7df48c9eca3f630915a9c6e5bbd6 | [
"MIT"
] | null | null | null | lineflow/datasets/small_parallel_enja.py | sobamchan/lineflow | 708a875c090b7df48c9eca3f630915a9c6e5bbd6 | [
"MIT"
] | null | null | null | lineflow/datasets/small_parallel_enja.py | sobamchan/lineflow | 708a875c090b7df48c9eca3f630915a9c6e5bbd6 | [
"MIT"
] | null | null | null | from lineflow.download import cached_download
from lineflow.datasets import Seq2SeqDataset
TRAIN_EN_URL = 'https://raw.githubusercontent.com/odashi/small_parallel_enja/master/train.en'
TRAIN_JA_URL = 'https://raw.githubusercontent.com/odashi/small_parallel_enja/master/train.ja'
DEV_EN_URL = 'https://raw.githubuserco... | 44.7 | 110 | 0.722595 | from lineflow.download import cached_download
from lineflow.datasets import Seq2SeqDataset
TRAIN_EN_URL = 'https://raw.githubusercontent.com/odashi/small_parallel_enja/master/train.en'
TRAIN_JA_URL = 'https://raw.githubusercontent.com/odashi/small_parallel_enja/master/train.ja'
DEV_EN_URL = 'https://raw.githubuserco... | 625 | 19 | 49 |
c76a98f0436678fb21037c006fad63fbc11d9a00 | 284 | py | Python | src/uykfe/sequence/simple/simple.py | Robbt/uykfe | c4b3d2a49ce14b2b6847a4b59bd55201c62ea8c3 | [
"BSD-2-Clause"
] | null | null | null | src/uykfe/sequence/simple/simple.py | Robbt/uykfe | c4b3d2a49ce14b2b6847a4b59bd55201c62ea8c3 | [
"BSD-2-Clause"
] | null | null | null | src/uykfe/sequence/simple/simple.py | Robbt/uykfe | c4b3d2a49ce14b2b6847a4b59bd55201c62ea8c3 | [
"BSD-2-Clause"
] | null | null | null |
from uykfe.sequence.db import DbControl
| 28.4 | 90 | 0.704225 |
from uykfe.sequence.db import DbControl
class SimpleControl(DbControl):
def weighted_artists(self, state, track):
for (weight, artist) in super(SimpleControl, self).weighted_artists(state, track):
yield (weight * self._unplayed(state, artist), artist)
| 178 | 10 | 54 |
1e128480da9319aae5d4a027db4f8bdc82c64ae1 | 251 | py | Python | tests/whoosh_tests/tests/__init__.py | speedplane/django-haystack | 4ace30aea6aa1b1708f79a5a9df20a00fa0b4d96 | [
"BSD-3-Clause"
] | 1 | 2017-10-12T14:25:06.000Z | 2017-10-12T14:25:06.000Z | tests/whoosh_tests/tests/__init__.py | speedplane/django-haystack | 4ace30aea6aa1b1708f79a5a9df20a00fa0b4d96 | [
"BSD-3-Clause"
] | 1 | 2016-08-03T18:01:43.000Z | 2016-08-03T18:03:00.000Z | tests/whoosh_tests/tests/__init__.py | speedplane/django-haystack | 4ace30aea6aa1b1708f79a5a9df20a00fa0b4d96 | [
"BSD-3-Clause"
] | null | null | null | import warnings
warnings.simplefilter('ignore', Warning)
from whoosh_tests.tests.test_forms import *
from whoosh_tests.tests.test_inputs import *
from whoosh_tests.tests.test_whoosh_query import *
from whoosh_tests.tests.test_whoosh_backend import *
| 31.375 | 52 | 0.844622 | import warnings
warnings.simplefilter('ignore', Warning)
from whoosh_tests.tests.test_forms import *
from whoosh_tests.tests.test_inputs import *
from whoosh_tests.tests.test_whoosh_query import *
from whoosh_tests.tests.test_whoosh_backend import *
| 0 | 0 | 0 |
6e542c21b275803ac419ea5e1f0ca19c451e8a0b | 407 | py | Python | clientmanager/migrations/0003_document_status.py | trebla64/django-app-ff | 4615e4cd23e9d9b6745533a8f60ffab8ff5215b6 | [
"CC0-1.0"
] | null | null | null | clientmanager/migrations/0003_document_status.py | trebla64/django-app-ff | 4615e4cd23e9d9b6745533a8f60ffab8ff5215b6 | [
"CC0-1.0"
] | null | null | null | clientmanager/migrations/0003_document_status.py | trebla64/django-app-ff | 4615e4cd23e9d9b6745533a8f60ffab8ff5215b6 | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-06 08:15
from django.db import migrations, models
| 21.421053 | 69 | 0.60688 | # Generated by Django 3.2.8 on 2021-10-06 08:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('clientmanager', '0002_client_manager'),
]
operations = [
migrations.AddField(
model_name='document',
name='status',
... | 0 | 293 | 23 |
881799f5680f2888d83b164e8bc97741ebb51dec | 43 | py | Python | Chapter16/cf_rfem_hist_price/venv/lib/python3.6/locale.py | wtwong316/Mastering-Elasticsearch-7.0 | 8e88f938c9feb201649bd23c4d517bc6af93fbaa | [
"MIT"
] | 25 | 2019-03-08T01:03:03.000Z | 2022-02-14T17:38:32.000Z | Chapter16/cf_rfem_hist_price/venv/lib/python3.6/locale.py | wtwong316/Mastering-Elasticsearch-7.0 | 8e88f938c9feb201649bd23c4d517bc6af93fbaa | [
"MIT"
] | 2 | 2019-02-15T17:34:37.000Z | 2019-07-11T14:37:02.000Z | Chapter16/cf_rfem_hist_price/venv/lib/python3.6/locale.py | wtwong316/Mastering-Elasticsearch-7.0 | 8e88f938c9feb201649bd23c4d517bc6af93fbaa | [
"MIT"
] | 31 | 2019-01-15T20:16:50.000Z | 2022-03-01T05:47:38.000Z | /home/wai/anaconda3/lib/python3.6/locale.py | 43 | 43 | 0.813953 | /home/wai/anaconda3/lib/python3.6/locale.py | 0 | 0 | 0 |
e0b5c22d429a097b1237ab5e3fce5fb295657cd1 | 143 | py | Python | nose2/tests/functional/support/scenario/tests_in_package/setup.py | ltfish/nose2 | e47363dad10056cf906daf387613c21d74f37e56 | [
"BSD-2-Clause"
] | null | null | null | nose2/tests/functional/support/scenario/tests_in_package/setup.py | ltfish/nose2 | e47363dad10056cf906daf387613c21d74f37e56 | [
"BSD-2-Clause"
] | null | null | null | nose2/tests/functional/support/scenario/tests_in_package/setup.py | ltfish/nose2 | e47363dad10056cf906daf387613c21d74f37e56 | [
"BSD-2-Clause"
] | 1 | 2019-11-24T12:11:52.000Z | 2019-11-24T12:11:52.000Z | from setuptools import setup, find_packages
setup(name='pkg1',
packages=find_packages(),
test_suite='nose2.collector.collector')
| 20.428571 | 45 | 0.734266 | from setuptools import setup, find_packages
setup(name='pkg1',
packages=find_packages(),
test_suite='nose2.collector.collector')
| 0 | 0 | 0 |
62257ae4a782556aa3adeb2c6ac9c25afeee0495 | 2,575 | py | Python | 20211217/sort_contours.py | sgzqc/wechat | 6589915c46b8f51d28dba61c6da9702821f5b47c | [
"MIT"
] | 8 | 2021-12-02T10:01:55.000Z | 2022-03-18T13:00:18.000Z | 20211217/sort_contours.py | sgzqc/wechat | 6589915c46b8f51d28dba61c6da9702821f5b47c | [
"MIT"
] | null | null | null | 20211217/sort_contours.py | sgzqc/wechat | 6589915c46b8f51d28dba61c6da9702821f5b47c | [
"MIT"
] | 10 | 2021-10-01T23:38:15.000Z | 2022-03-21T05:04:07.000Z | import numpy as np
import argparse
import cv2
if __name__ == "__main__":
ap = argparse.ArgumentParser()
ap.add_argument('-i', '--image', required=False, help='path to the image',default='./image/lego_blocks_1.png')
ap.add_argument('-m', '--method', required=False, help='Sorting method',default='left-to... | 31.024096 | 114 | 0.632621 | import numpy as np
import argparse
import cv2
def grab_contours(cnts):
# if the length the contours tuple returned by cv2.findContours
# is '2' then we are using either OpenCV v2.4, v4-beta, or
# v4-official
if len(cnts) == 2:
cnts = cnts[0]
# if the length of the contours tuple is '3' th... | 1,165 | 0 | 69 |
fe75f8645b99e6a9ba1b849178eb856864f1527c | 1,025 | py | Python | GUIforINFO.py | freshicet/Home_Depot | 91379144daeef7548bb7976379766df7ec90b383 | [
"Unlicense",
"MIT"
] | null | null | null | GUIforINFO.py | freshicet/Home_Depot | 91379144daeef7548bb7976379766df7ec90b383 | [
"Unlicense",
"MIT"
] | null | null | null | GUIforINFO.py | freshicet/Home_Depot | 91379144daeef7548bb7976379766df7ec90b383 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Small GUI for getting all the info for the Home Depot survey.
from tkinter import *
master = Tk()
Label(master, text="First Name").grid(row=0)
Label(master, text="Last Name").grid(row=1)
Label(master, text="E-mail").grid(row=2)
Label(master, text="Zip Code").grid(row=3)
... | 22.777778 | 63 | 0.650732 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Small GUI for getting all the info for the Home Depot survey.
from tkinter import *
def show_entry_fields():
First_Name = e1.get()
Last_Name = e2.get()
email = e3.get()
zip_Code = e4.get()
file = open('File_INFO.txt', 'w')
file.write(First_Name + '\n... | 296 | 0 | 23 |
4c62d89701ad7d468174036c7f208033dd9bfb01 | 873 | py | Python | web-server/plugins/slycat-blob-parser.py | sandialabs/slycat | efbb91ce4ea4da08b58399eb820f6d6987408e44 | [
"BSD-3-Clause"
] | 66 | 2015-01-06T20:53:50.000Z | 2022-03-30T17:25:04.000Z | web-server/plugins/slycat-blob-parser.py | agentdavidjoseph/slycat | 690e1cb07a6fa990d7206265e18edb22ae3f62e7 | [
"BSD-3-Clause"
] | 782 | 2015-01-05T15:42:30.000Z | 2022-03-11T03:27:52.000Z | web-server/plugins/slycat-blob-parser.py | agentdavidjoseph/slycat | 690e1cb07a6fa990d7206265e18edb22ae3f62e7 | [
"BSD-3-Clause"
] | 23 | 2015-04-29T08:16:27.000Z | 2022-01-05T23:21:54.000Z | # Copyright (c) 2013, 2018 National Technology and Engineering Solutions of Sandia, LLC . Under the terms of Contract
# DE-NA0003525 with National Technology and Engineering Solutions of Sandia, LLC, the U.S. Government
# retains certain rights in this software.
import numpy
import slycat.web.server
| 39.681818 | 117 | 0.749141 | # Copyright (c) 2013, 2018 National Technology and Engineering Solutions of Sandia, LLC . Under the terms of Contract
# DE-NA0003525 with National Technology and Engineering Solutions of Sandia, LLC, the U.S. Government
# retains certain rights in this software.
import numpy
import slycat.web.server
def parse(databa... | 523 | 0 | 46 |
8c6d306387daa7e43907a9bed19723fe958470fa | 1,087 | py | Python | proteus/tests/MeshAdaptPUMI/test_meshLoad.py | burgreen/proteus | 033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d | [
"MIT"
] | null | null | null | proteus/tests/MeshAdaptPUMI/test_meshLoad.py | burgreen/proteus | 033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d | [
"MIT"
] | null | null | null | proteus/tests/MeshAdaptPUMI/test_meshLoad.py | burgreen/proteus | 033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from ctypes import *
from proteus import MeshTools
from proteus import cmeshTools
from proteus.MeshAdaptPUMI import MeshAdaptPUMI
from nose.tools import eq_ as eq
from nose.tools import ok_ as ok
import os
def test_meshLoadPUMI(verbose=0):
"""Test to load serial PUMI model and mesh"""
tes... | 33.96875 | 61 | 0.769089 | #!/usr/bin/env python
from ctypes import *
from proteus import MeshTools
from proteus import cmeshTools
from proteus.MeshAdaptPUMI import MeshAdaptPUMI
from nose.tools import eq_ as eq
from nose.tools import ok_ as ok
import os
def test_meshLoadPUMI(verbose=0):
"""Test to load serial PUMI model and mesh"""
tes... | 0 | 0 | 0 |
caddaf8c2f2f5897b36a354154f9f52968e3d5cf | 458 | py | Python | clubapp/forms.py | thomaskise/pythonclub | 40361a945b9b95b17c3a8e628f18de4d062f77d1 | [
"Apache-2.0"
] | 2 | 2019-04-04T18:34:11.000Z | 2019-04-09T04:58:10.000Z | clubapp/forms.py | thomaskise/pythonclub | 40361a945b9b95b17c3a8e628f18de4d062f77d1 | [
"Apache-2.0"
] | null | null | null | clubapp/forms.py | thomaskise/pythonclub | 40361a945b9b95b17c3a8e628f18de4d062f77d1 | [
"Apache-2.0"
] | null | null | null | from django import forms
from .models import Meeting, Resource | 28.625 | 56 | 0.68559 | from django import forms
from .models import Meeting, Resource
class MeetingForm(forms.ModelForm):
class Meta:
model=Meeting
fields='__all__'
#can list individual fields seperated by a comma
#also definition of form fields
class ResourceForm(forms.ModelForm):
class Meta:
... | 0 | 350 | 46 |
48781dd4e4933f0deb04ff6e449eade807322d1a | 4,589 | py | Python | demo/cubemap_video_max.py | RyosukeHori/mmsegmentation | 5024918af521dce29ce2ea257aa378e305cef67f | [
"Apache-2.0"
] | null | null | null | demo/cubemap_video_max.py | RyosukeHori/mmsegmentation | 5024918af521dce29ce2ea257aa378e305cef67f | [
"Apache-2.0"
] | null | null | null | demo/cubemap_video_max.py | RyosukeHori/mmsegmentation | 5024918af521dce29ce2ea257aa378e305cef67f | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
import numpy as np
import py360convert
import os
import cv2
from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot, ret_result
from mmseg.core.evaluation import get_palette
from PIL import Image
import mmcv
if __name__ == '__main__':
main()
| 37.614754 | 110 | 0.593158 | from argparse import ArgumentParser
import numpy as np
import py360convert
import os
import cv2
from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot, ret_result
from mmseg.core.evaluation import get_palette
from PIL import Image
import mmcv
def main():
parser = ArgumentParser()
par... | 4,257 | 0 | 23 |
8415119534766c8a202d2b0fad8956d28398d2e9 | 932 | py | Python | netests/converters/vrf/nxos/ssh.py | Netests/netests | 1a48bda461761c4ec854d6fa0c38629049009a4a | [
"MIT"
] | 14 | 2020-06-08T07:34:59.000Z | 2022-03-14T08:52:03.000Z | netests/converters/vrf/nxos/ssh.py | Netests/netests | 1a48bda461761c4ec854d6fa0c38629049009a4a | [
"MIT"
] | null | null | null | netests/converters/vrf/nxos/ssh.py | Netests/netests | 1a48bda461761c4ec854d6fa0c38629049009a4a | [
"MIT"
] | 3 | 2020-06-19T03:57:05.000Z | 2020-06-22T22:46:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
from netests.constants import NOT_SET
from netests.protocols.vrf import VRF, ListVRF
| 25.888889 | 72 | 0.553648 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
from netests.constants import NOT_SET
from netests.protocols.vrf import VRF, ListVRF
def _nxos_vrf_ssh_converter(
hostname: str(),
cmd_output,
options={}
) -> ListVRF:
if not isinstance(cmd_output, dict):
cmd_output = json.loads(cmd_... | 763 | 0 | 23 |
b420e19501b17b9d1f75e7151a97ea68cce75225 | 10,477 | py | Python | pomdp_problems/load_unload/load_unload.py | justinchiu/pomdp-py | 27fd8cc3b215b428289d89ec9ed44d88910fc4ea | [
"MIT"
] | 87 | 2020-02-16T03:12:10.000Z | 2022-03-31T08:38:10.000Z | pomdp_problems/load_unload/load_unload.py | justinchiu/pomdp-py | 27fd8cc3b215b428289d89ec9ed44d88910fc4ea | [
"MIT"
] | 15 | 2020-08-01T00:25:33.000Z | 2022-02-19T22:37:11.000Z | pomdp_problems/load_unload/load_unload.py | justinchiu/pomdp-py | 27fd8cc3b215b428289d89ec9ed44d88910fc4ea | [
"MIT"
] | 26 | 2020-02-20T01:15:33.000Z | 2022-03-30T16:21:37.000Z | """The load unload problem. An agent is placed on a one dimensional grid world
and is tasked with loading itself up on the right side of the world and
unloading on the left. The agent can observe whether or not it is in the load or
unload block but can not tell its exact location of whether it is loaded or
unloaded. Th... | 36.890845 | 89 | 0.626802 | """The load unload problem. An agent is placed on a one dimensional grid world
and is tasked with loading itself up on the right side of the world and
unloading on the left. The agent can observe whether or not it is in the load or
unload block but can not tell its exact location of whether it is loaded or
unloaded. Th... | 7,003 | 859 | 809 |
f3a1df15ec24260cf5c5ef37c81224449331dcaf | 1,333 | py | Python | oops_fhir/r4/code_system/code_search_support.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | oops_fhir/r4/code_system/code_search_support.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | oops_fhir/r4/code_system/code_search_support.py | Mikuana/oops_fhir | 77963315d123756b7d21ae881f433778096a1d25 | [
"MIT"
] | null | null | null | from pathlib import Path
from fhir.resources.codesystem import CodeSystem
from oops_fhir.utils import CodeSystemConcept
__all__ = ["CodeSearchSupport"]
_resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json"))
class CodeSearchSupport:
"""
CodeSearchSupport
The degree to which the server... | 24.236364 | 127 | 0.651163 | from pathlib import Path
from fhir.resources.codesystem import CodeSystem
from oops_fhir.utils import CodeSystemConcept
__all__ = ["CodeSearchSupport"]
_resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json"))
class CodeSearchSupport:
"""
CodeSearchSupport
The degree to which the server... | 0 | 19 | 27 |
71cdd1f0685eebf6a131858e768d45b3c37617a0 | 1,428 | py | Python | tests/c_pointer_test.py | jacobwilliams/flist | 6255b824d81b1f97aa48aaabe912b9af313dce49 | [
"BSD-3-Clause"
] | 26 | 2015-11-14T18:41:51.000Z | 2021-11-23T14:55:41.000Z | tests/c_pointer_test.py | jacobwilliams/flist | 6255b824d81b1f97aa48aaabe912b9af313dce49 | [
"BSD-3-Clause"
] | 3 | 2016-10-04T14:42:56.000Z | 2020-02-20T21:48:04.000Z | tests/c_pointer_test.py | jacobwilliams/flist | 6255b824d81b1f97aa48aaabe912b9af313dce49 | [
"BSD-3-Clause"
] | 6 | 2015-11-15T15:34:10.000Z | 2018-11-07T13:16:26.000Z |
""" Some experiments with python ctypes """
# build the shared library using something like:
#
# ifort -shared -fPIC key_module.f90 linked_list_module.f90 tests/blah_module.f90 tests/c_pointer_test_module.f90 -o test.so
from ctypes import *
# load the shared library:
test = CDLL('test.so')
# define the procedure ... | 26.943396 | 124 | 0.672969 |
""" Some experiments with python ctypes """
# build the shared library using something like:
#
# ifort -shared -fPIC key_module.f90 linked_list_module.f90 tests/blah_module.f90 tests/c_pointer_test_module.f90 -o test.so
from ctypes import *
# load the shared library:
test = CDLL('test.so')
# define the procedure ... | 0 | 0 | 0 |
d99e2c9e3d3cd7002f6fd3ed81916d4e62da0af9 | 931 | py | Python | src/txdocumint/error.py | fusionapp/documint-client-python | 87818629e5c1641c103d4e8837095c622e5180ce | [
"MIT"
] | null | null | null | src/txdocumint/error.py | fusionapp/documint-client-python | 87818629e5c1641c103d4e8837095c622e5180ce | [
"MIT"
] | 13 | 2016-04-30T09:00:07.000Z | 2018-07-02T13:22:28.000Z | src/txdocumint/error.py | fusionapp/documint-client-python | 87818629e5c1641c103d4e8837095c622e5180ce | [
"MIT"
] | 1 | 2018-07-05T07:42:43.000Z | 2018-07-05T07:42:43.000Z | class DocumintErrorCause(object):
"""
Specific error cause.
"""
class DocumintError(RuntimeError):
"""
Structured Documint error.
"""
class MalformedDocumintError(RuntimeError):
"""
An error, indicated by status code, was malformed.
:ivar bytes data: Error response data.
"""... | 23.871795 | 62 | 0.615467 | class DocumintErrorCause(object):
"""
Specific error cause.
"""
def __init__(self, type, reason, description=None):
self.type = type
self.reason = reason
self.description = description
def __repr__(self):
return '<{} type={} reason={} description={}>'.format(
... | 449 | 0 | 105 |
35b7cff2cc3b238cd4bfb994a7196a1afa8029b3 | 1,305 | py | Python | geokey/users/tests/test_templatetags.py | universityofsussex/geokey | 25e161dbc81841c57c148053dbe99facc81e84b8 | [
"Apache-2.0"
] | null | null | null | geokey/users/tests/test_templatetags.py | universityofsussex/geokey | 25e161dbc81841c57c148053dbe99facc81e84b8 | [
"Apache-2.0"
] | null | null | null | geokey/users/tests/test_templatetags.py | universityofsussex/geokey | 25e161dbc81841c57c148053dbe99facc81e84b8 | [
"Apache-2.0"
] | null | null | null | """Tests for template tags of users."""
from django.test import TestCase
from geokey.categories.tests.model_factories import CategoryFactory
from ..templatetags import filter_tags
| 29 | 72 | 0.603831 | """Tests for template tags of users."""
from django.test import TestCase
from geokey.categories.tests.model_factories import CategoryFactory
from ..templatetags import filter_tags
class TemplateTagsTest(TestCase):
def test_show_restrict(self):
category = CategoryFactory.create()
self.assertEqua... | 952 | 12 | 157 |
13a4e7e7126b95c3f73e3e4068d9d93479ca736a | 1,120 | py | Python | regression.py | xiaoJacky/machineLearning | 518f2e7c13ebf2674e6e5dde95fd305cbd4b99eb | [
"Apache-2.0"
] | 1 | 2017-08-15T01:36:12.000Z | 2017-08-15T01:36:12.000Z | regression.py | xiaoJacky/machineLearning | 518f2e7c13ebf2674e6e5dde95fd305cbd4b99eb | [
"Apache-2.0"
] | null | null | null | regression.py | xiaoJacky/machineLearning | 518f2e7c13ebf2674e6e5dde95fd305cbd4b99eb | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
'''
最小二乘法回归
参考博客:http://blog.csdn.net/wangyangzhizhou/article/details/60133958
line 代数推导
matrixLine 矩阵推导
'''
if __name__ == '__main__':
# line()
matrixLine()
| 20.363636 | 66 | 0.5625 | #-*- coding:utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
'''
最小二乘法回归
参考博客:http://blog.csdn.net/wangyangzhizhou/article/details/60133958
line 代数推导
matrixLine 矩阵推导
'''
def calcAB(x,y):
n = len(x)
sumX,sumY,sumXY,sumXX =0,0,0,0
for i in range(0,n):
sumX += x[i]
sumY += y[i]... | 814 | 0 | 69 |
45ed68759dc66b9a7b5994d75aea2cdb1b6b467e | 9,405 | py | Python | pixiedust/utils/sampleData.py | jordangeorge/pixiedust | 00e49f4e8ba44cc248685146d3ad7e2d04ac6cd4 | [
"Apache-2.0"
] | null | null | null | pixiedust/utils/sampleData.py | jordangeorge/pixiedust | 00e49f4e8ba44cc248685146d3ad7e2d04ac6cd4 | [
"Apache-2.0"
] | null | null | null | pixiedust/utils/sampleData.py | jordangeorge/pixiedust | 00e49f4e8ba44cc248685146d3ad7e2d04ac6cd4 | [
"Apache-2.0"
] | null | null | null | # -------------------------------------------------------------------------------
# Copyright IBM Corp. 2017
#
# 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/licens... | 44.785714 | 205 | 0.606273 | # -------------------------------------------------------------------------------
# Copyright IBM Corp. 2017
#
# 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/licens... | 5,499 | 210 | 190 |
74c68dfa0c1af26f9531ec184b91550bd2fa0f44 | 568 | py | Python | plotting.py | Sumanshekhar17/3rd-year-project | b991311fe09fc7b181193a8d74d7f0ae98090331 | [
"MIT"
] | 2 | 2021-09-01T03:50:03.000Z | 2021-09-01T03:50:04.000Z | plotting.py | Sumanshekhar17/3rd-year-project | b991311fe09fc7b181193a8d74d7f0ae98090331 | [
"MIT"
] | null | null | null | plotting.py | Sumanshekhar17/3rd-year-project | b991311fe09fc7b181193a8d74d7f0ae98090331 | [
"MIT"
] | null | null | null | reset
set terminal postscript eps enhanced "Helvetica" 20 color
set output "velocity_field_cpu.eps"
unset logscale
set xrange [0 : 1]
set yrange [0 : 1]
set size square
set nokey
factor = 0.1
plot "velocity_cpu_128.dat" using 1:2:($3*factor):($4*factor) every 2 with vec lc 3
set output "velocity_field_gpu.eps"
un... | 20.285714 | 89 | 0.721831 | reset
set terminal postscript eps enhanced "Helvetica" 20 color
set output "velocity_field_cpu.eps"
unset logscale
set xrange [0 : 1]
set yrange [0 : 1]
set size square
set nokey
factor = 0.1
plot "velocity_cpu_128.dat" using 1:2:($3*factor):($4*factor) every 2 with vec lc 3
set output "velocity_field_gpu.eps"
un... | 0 | 0 | 0 |
55d07cc127592663522871df6aa0279d8f606d72 | 7,940 | py | Python | python/GtBurst/dataCollector.py | fermi-lat/pyBurstAnalysisGUI | add53fe77ef71cb64a27751f024fb914f7cc0863 | [
"BSD-3-Clause"
] | 2 | 2019-03-06T15:48:20.000Z | 2020-05-02T15:02:57.000Z | python/GtBurst/dataCollector.py | fermi-lat/pyBurstAnalysisGUI | add53fe77ef71cb64a27751f024fb914f7cc0863 | [
"BSD-3-Clause"
] | 5 | 2019-01-23T11:35:41.000Z | 2019-03-29T17:36:19.000Z | python/GtBurst/dataCollector.py | fermi-lat/pyBurstAnalysisGUI | add53fe77ef71cb64a27751f024fb914f7cc0863 | [
"BSD-3-Clause"
] | null | null | null | #This is a mother class to get GBM and LLE data files (lle, pha and rsp)
#Author: giacomov@slac.stanford.edu
import os,sys,glob,string,errno,shutil
from GtBurst.my_fits_io import pyfits
from GtBurst.GtBurstException import GtBurstException
import ftplib, socket
import time
try:
from tkinter import *
... | 33.221757 | 210 | 0.519144 | #This is a mother class to get GBM and LLE data files (lle, pha and rsp)
#Author: giacomov@slac.stanford.edu
import os,sys,glob,string,errno,shutil
from GtBurst.my_fits_io import pyfits
from GtBurst.GtBurstException import GtBurstException
import ftplib, socket
import time
try:
from tkinter import *
... | 7,180 | 161 | 25 |
dcd3f1ee0dfd454993014e91127c0cc526852235 | 1,692 | py | Python | dwitter/feed/urls.py | PythEch/dwitter | 5b48ce2f6ebc6267dc942043efcbc1010079f6d4 | [
"Apache-2.0"
] | null | null | null | dwitter/feed/urls.py | PythEch/dwitter | 5b48ce2f6ebc6267dc942043efcbc1010079f6d4 | [
"Apache-2.0"
] | null | null | null | dwitter/feed/urls.py | PythEch/dwitter | 5b48ce2f6ebc6267dc942043efcbc1010079f6d4 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$',
views.feed, {'page_nr': 1, 'sort': 'hot'}, name='root'),
url(r'^page/(?P<page_nr>\d+)$',
views.feed, {'sort': 'new'}, name='feed_page'),
url(r'^hot$',
views.feed, {'page_nr': 1, 'sort': 'hot'}, name='h... | 35.25 | 99 | 0.548463 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$',
views.feed, {'page_nr': 1, 'sort': 'hot'}, name='root'),
url(r'^page/(?P<page_nr>\d+)$',
views.feed, {'sort': 'new'}, name='feed_page'),
url(r'^hot$',
views.feed, {'page_nr': 1, 'sort': 'hot'}, name='h... | 0 | 0 | 0 |
7c87b5aa45a8066517718e04ad9e06d160f6d5f0 | 36 | py | Python | wsgi.py | svetlyak40wt/cony | bf8d52ab92782944d9ff40799b52298fd6f9bc8f | [
"BSD-3-Clause"
] | 5 | 2015-01-12T12:21:11.000Z | 2021-12-09T14:28:41.000Z | wsgi.py | svetlyak40wt/cony | bf8d52ab92782944d9ff40799b52298fd6f9bc8f | [
"BSD-3-Clause"
] | null | null | null | wsgi.py | svetlyak40wt/cony | bf8d52ab92782944d9ff40799b52298fd6f9bc8f | [
"BSD-3-Clause"
] | 1 | 2019-06-10T16:30:52.000Z | 2019-06-10T16:30:52.000Z | from cony import wsgi
app = wsgi()
| 9 | 21 | 0.694444 | from cony import wsgi
app = wsgi()
| 0 | 0 | 0 |
71af2d320f928f46da13c0c5cc7ef247457cafcf | 1,202 | py | Python | devon/makers/configuremake.py | joehewitt/devon | 5b11265e5eae3db7bfaeb49543a2a6293bd15557 | [
"BSD-3-Clause"
] | 3 | 2015-12-25T16:26:02.000Z | 2016-05-08T18:19:25.000Z | devon/makers/configuremake.py | joehewitt/devon | 5b11265e5eae3db7bfaeb49543a2a6293bd15557 | [
"BSD-3-Clause"
] | null | null | null | devon/makers/configuremake.py | joehewitt/devon | 5b11265e5eae3db7bfaeb49543a2a6293bd15557 | [
"BSD-3-Clause"
] | 1 | 2021-07-13T07:17:01.000Z | 2021-07-13T07:17:01.000Z |
import devon.maker, devon.make
from devon.tags import *
import re, os.path
# **************************************************************************************************
| 34.342857 | 100 | 0.543261 |
import devon.maker, devon.make
from devon.tags import *
import re, os.path
# **************************************************************************************************
class ConfigureMake(devon.maker.MakerManyToOne):
def getTarget(self, project):
return project.config.output
def ... | 839 | 27 | 158 |
3e65c79541e7c85c3c24698560ce761bee060730 | 956 | py | Python | Chapter 1/direct_surface.py | indrag49/Computational-Stat-Mech | 0877f54a0245fce815f03478f4fb219fd6314951 | [
"MIT"
] | 19 | 2018-06-29T12:22:47.000Z | 2022-03-10T03:18:18.000Z | Chapter 1/direct_surface.py | indrag49/Computational-Stat-Mech | 0877f54a0245fce815f03478f4fb219fd6314951 | [
"MIT"
] | null | null | null | Chapter 1/direct_surface.py | indrag49/Computational-Stat-Mech | 0877f54a0245fce815f03478f4fb219fd6314951 | [
"MIT"
] | 7 | 2018-11-30T01:56:36.000Z | 2021-12-23T15:29:56.000Z | import random
import math as m
def direct_surface(d):
""" d is the dimension of the sphere, sigma is the standard deviation of the gaussian"""
sigma=1./m.sqrt(d)
S=0
x=[0]*d
for k in range(d):
x[k]=gauss(sigma)[1]
S+=x[k]**2
for k in range... | 22.761905 | 96 | 0.528243 | import random
import math as m
def gauss(sigma):
phi=random.uniform(0, 2*m.pi)
Upsilon=-m.log(random.uniform(0, 1))
r=sigma*m.sqrt(2*Upsilon)
x=r*m.cos(phi)
y=r*m.sin(phi)
return [x, y]
def direct_surface(d):
""" d is the dimension of the sphere, sigma is the st... | 181 | 0 | 23 |
8e18cce450eda2b2ae936f7b5a3c009fa87b2aae | 1,116 | py | Python | neon/ipc/rpc_client.py | kashif/neon | d4d8ed498ee826b67f5fda1746d2d65c8ce613d2 | [
"Apache-2.0"
] | 1 | 2018-07-17T16:54:58.000Z | 2018-07-17T16:54:58.000Z | neon/ipc/rpc_client.py | kashif/neon | d4d8ed498ee826b67f5fda1746d2d65c8ce613d2 | [
"Apache-2.0"
] | null | null | null | neon/ipc/rpc_client.py | kashif/neon | d4d8ed498ee826b67f5fda1746d2d65c8ce613d2 | [
"Apache-2.0"
] | 2 | 2016-06-09T13:05:00.000Z | 2021-02-18T14:18:15.000Z | # ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# 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.o... | 37.2 | 78 | 0.634409 | # ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# 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.o... | 0 | 0 | 0 |
7593f06cc9b1c45fe4e4bc186067be86fcc1e347 | 963 | py | Python | tests/file_io_standard_gzip_test.py | RJMW/pymzML | fe45a41e7bd599929e7626a32d7ec26178fc475d | [
"MIT"
] | 117 | 2015-01-23T22:34:32.000Z | 2022-03-31T22:09:06.000Z | tests/file_io_standard_gzip_test.py | MKoesters/pymzML | ac9c73a24fd08b3e3f64aef7ba113e0f0adfc39a | [
"MIT"
] | 217 | 2015-02-12T05:33:24.000Z | 2022-03-30T20:34:59.000Z | tests/file_io_standard_gzip_test.py | MKoesters/pymzML | ac9c73a24fd08b3e3f64aef7ba113e0f0adfc39a | [
"MIT"
] | 73 | 2015-04-09T16:20:24.000Z | 2022-02-22T03:05:49.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Part of pymzml test cases
"""
import os
from pymzml.file_classes.standardGzip import StandardGzip
import unittest
import random
from pymzml.spec import Spectrum, Chromatogram
import re
import struct
import test_file_paths
class StandardGzipTest(unittest.TestCase):
... | 20.0625 | 57 | 0.607477 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Part of pymzml test cases
"""
import os
from pymzml.file_classes.standardGzip import StandardGzip
import unittest
import random
from pymzml.spec import Spectrum, Chromatogram
import re
import struct
import test_file_paths
class StandardGzipTest(unittest.TestCase):
... | 145 | 0 | 27 |
6b6f11960c3660e6819d245730828e01a7c206c6 | 2,542 | py | Python | src/source/sampler.py | thunlp/CrossET | d7a06d0325789ac4482c109fff0f0de9bd77c015 | [
"MIT"
] | null | null | null | src/source/sampler.py | thunlp/CrossET | d7a06d0325789ac4482c109fff0f0de9bd77c015 | [
"MIT"
] | null | null | null | src/source/sampler.py | thunlp/CrossET | d7a06d0325789ac4482c109fff0f0de9bd77c015 | [
"MIT"
] | null | null | null | import json
import time
from random import shuffle, randint
from tqdm import tqdm
| 28.244444 | 81 | 0.445712 | import json
import time
from random import shuffle, randint
from tqdm import tqdm
class sampler:
def __init__(self, data, types, batch_size):
self.batch_size = batch_size
self.data = data
self.types = types
self.n = len(data)
self.ind = {}
self.keys = []
sh... | 1,602 | 838 | 23 |
c126561a59466caffcb2634c1a769879b9fe1447 | 1,347 | py | Python | examples/pca.py | SatyadevNtv/mctorch | ebc16e4437ad62858d95a8559262ee30191d36ff | [
"MIT"
] | 188 | 2018-09-22T14:18:17.000Z | 2022-03-10T01:20:25.000Z | examples/pca.py | SatyadevNtv/mctorch | ebc16e4437ad62858d95a8559262ee30191d36ff | [
"MIT"
] | 13 | 2019-02-07T02:16:58.000Z | 2022-02-24T15:00:19.000Z | examples/pca.py | SatyadevNtv/mctorch | ebc16e4437ad62858d95a8559262ee30191d36ff | [
"MIT"
] | 30 | 2018-10-02T18:54:50.000Z | 2022-03-02T01:56:59.000Z | import torch
import mctorch.nn as nn
import mctorch.optim as optim
import numpy as np
torch.manual_seed(0)
# Random data with high variance in first two dimension
X = torch.diag(torch.FloatTensor([3,2,1])).matmul(torch.randn(3,200))
X -= X.mean(axis=0)
# 1. Initialize Parameter
manifold_param = nn.Para... | 28.0625 | 75 | 0.691166 | import torch
import mctorch.nn as nn
import mctorch.optim as optim
import numpy as np
torch.manual_seed(0)
# Random data with high variance in first two dimension
X = torch.diag(torch.FloatTensor([3,2,1])).matmul(torch.randn(3,200))
X -= X.mean(axis=0)
# 1. Initialize Parameter
manifold_param = nn.Para... | 110 | 0 | 23 |
fff190148a03e69459b59c42a7ffff8717696f9f | 147 | py | Python | level0/question81.py | kevin00000000/Python-programming-exercises | 87546906d817263ae7ddbd0276f0bb36e0d63c41 | [
"MIT"
] | null | null | null | level0/question81.py | kevin00000000/Python-programming-exercises | 87546906d817263ae7ddbd0276f0bb36e0d63c41 | [
"MIT"
] | null | null | null | level0/question81.py | kevin00000000/Python-programming-exercises | 87546906d817263ae7ddbd0276f0bb36e0d63c41 | [
"MIT"
] | null | null | null | import zlib
s = 'hello world!hello world!hello world!hello world!'
t = zlib.compress(s.encode())
print(t)
print(bytes(zlib.decompress(t)).decode()) | 29.4 | 54 | 0.734694 | import zlib
s = 'hello world!hello world!hello world!hello world!'
t = zlib.compress(s.encode())
print(t)
print(bytes(zlib.decompress(t)).decode()) | 0 | 0 | 0 |
a6fca02226b0b52aa6be593066ec3394841fec73 | 883 | py | Python | Client_Android.py | Mandar-Sharma/Sockets | 687d61e89da29b208ca3cd4d8ca03d0b84193aa8 | [
"MIT"
] | null | null | null | Client_Android.py | Mandar-Sharma/Sockets | 687d61e89da29b208ca3cd4d8ca03d0b84193aa8 | [
"MIT"
] | null | null | null | Client_Android.py | Mandar-Sharma/Sockets | 687d61e89da29b208ca3cd4d8ca03d0b84193aa8 | [
"MIT"
] | null | null | null | import os
from socket import *
import time
os.chdir("/storage/emulated/0/Project")
s = socket(AF_INET,SOCK_STREAM)
host = "192.168.64.1"
port = 9010
s.connect((host,port))
filename = 'Text.txt'
clock_start = time.clock()
time_start = time.time()
#rb- readonly : Binary
f = open(filename, 'rb')
#1024 Buf... | 25.228571 | 76 | 0.676104 | import os
from socket import *
import time
os.chdir("/storage/emulated/0/Project")
s = socket(AF_INET,SOCK_STREAM)
host = "192.168.64.1"
port = 9010
s.connect((host,port))
filename = 'Text.txt'
clock_start = time.clock()
time_start = time.time()
#rb- readonly : Binary
f = open(filename, 'rb')
#1024 Buf... | 0 | 0 | 0 |
b68441d9d8dd3c633e51ecf4a376cd1b7694255e | 2,771 | py | Python | scripts/ingests/2020Best_pmUKIRT_ingest.py | cfontanive/SIMPLE-db | 92dd86c043c5cf610e3097928936ed15c72f7697 | [
"BSD-3-Clause"
] | 6 | 2020-10-21T05:56:25.000Z | 2021-09-25T00:06:46.000Z | scripts/ingests/2020Best_pmUKIRT_ingest.py | cfontanive/SIMPLE-db | 92dd86c043c5cf610e3097928936ed15c72f7697 | [
"BSD-3-Clause"
] | 130 | 2020-10-27T20:25:22.000Z | 2022-03-15T21:23:23.000Z | scripts/ingests/2020Best_pmUKIRT_ingest.py | cfontanive/SIMPLE-db | 92dd86c043c5cf610e3097928936ed15c72f7697 | [
"BSD-3-Clause"
] | 8 | 2020-10-27T19:54:01.000Z | 2021-11-19T18:59:47.000Z | import sys
sys.path.append('.')
from astrodbkit2.astrodb import create_database
from astrodbkit2.astrodb import Database
from simple.schema import *
from astropy.table import Table
import numpy as np
from scripts.ingests.utils import ingest_proper_motions
from astropy.coordinates import SkyCoord
import astropy.units as... | 35.075949 | 178 | 0.760736 | import sys
sys.path.append('.')
from astrodbkit2.astrodb import create_database
from astrodbkit2.astrodb import Database
from simple.schema import *
from astropy.table import Table
import numpy as np
from scripts.ingests.utils import ingest_proper_motions
from astropy.coordinates import SkyCoord
import astropy.units as... | 715 | 0 | 23 |
8f64baeba42a571559bd700887dd83e29e5c5e72 | 294 | py | Python | client/labml/internal/logger/destinations/__init__.py | elgalu/labml | 511f0bbfcbeb4bc34bc6966a3973ff4e7e48eeee | [
"MIT"
] | 463 | 2021-05-28T03:21:14.000Z | 2022-03-28T06:28:21.000Z | client/labml/internal/logger/destinations/__init__.py | elgalu/labml | 511f0bbfcbeb4bc34bc6966a3973ff4e7e48eeee | [
"MIT"
] | 15 | 2021-06-22T10:02:36.000Z | 2021-12-20T06:14:12.000Z | client/labml/internal/logger/destinations/__init__.py | elgalu/labml | 511f0bbfcbeb4bc34bc6966a3973ff4e7e48eeee | [
"MIT"
] | 29 | 2020-06-03T07:13:31.000Z | 2021-05-23T18:20:34.000Z | from typing import List, Union, Tuple, Optional
from labml.internal.util.colors import StyleCode
| 26.727273 | 78 | 0.676871 | from typing import List, Union, Tuple, Optional
from labml.internal.util.colors import StyleCode
class Destination:
def log(self, parts: List[Union[str, Tuple[str, Optional[StyleCode]]]], *,
is_new_line: bool,
is_reset: bool):
raise NotImplementedError()
| 149 | -3 | 49 |
95adfcedeeceb1f8475fea951258d8cb1f33e0df | 2,503 | py | Python | blog/models.py | roofxixi/July | d02965c989adde4ad1aadaffdf9f7bd334810dcf | [
"MIT"
] | null | null | null | blog/models.py | roofxixi/July | d02965c989adde4ad1aadaffdf9f7bd334810dcf | [
"MIT"
] | null | null | null | blog/models.py | roofxixi/July | d02965c989adde4ad1aadaffdf9f7bd334810dcf | [
"MIT"
] | 1 | 2021-06-05T15:32:43.000Z | 2021-06-05T15:32:43.000Z | from django.db import models
# Create your models here.
__all__ = [
'Categories',
'Article',
'Links',
'Tag'
]
| 30.52439 | 101 | 0.679584 | from django.db import models
# Create your models here.
__all__ = [
'Categories',
'Article',
'Links',
'Tag'
]
class Categories(models.Model):
name = models.CharField(max_length=32, unique=True, verbose_name='分类名称')
title = models.CharField(max_length=64, verbose_name='标题')
description = ... | 89 | 2,356 | 92 |
e13243a254e486667260acf8db8e332acc4a80b0 | 1,977 | py | Python | tartiflette_plugin_scalars/us_currency.py | AutumnalDream/tartiflette-plugin-scalars | 2c73b20eac93b364a97b2192956e5fd4034ec35a | [
"MIT"
] | 8 | 2019-10-02T12:47:15.000Z | 2021-12-15T14:29:37.000Z | tartiflette_plugin_scalars/us_currency.py | AutumnalDream/tartiflette-plugin-scalars | 2c73b20eac93b364a97b2192956e5fd4034ec35a | [
"MIT"
] | 109 | 2019-09-19T13:37:43.000Z | 2022-03-28T07:08:50.000Z | tartiflette_plugin_scalars/us_currency.py | AutumnalDream/tartiflette-plugin-scalars | 2c73b20eac93b364a97b2192956e5fd4034ec35a | [
"MIT"
] | 4 | 2019-10-26T19:57:20.000Z | 2021-06-24T14:32:37.000Z | from typing import Union # pylint: disable=unused-import
from tartiflette.constants import UNDEFINED_VALUE
from tartiflette.language.ast import StringValueNode
class USCurrency:
"""
Scalar which handles USD amounts (in format $XX.YY)
"""
@staticmethod
def parse_literal(ast: "ValueNode") -> Uni... | 31.887097 | 82 | 0.614568 | from typing import Union # pylint: disable=unused-import
from tartiflette.constants import UNDEFINED_VALUE
from tartiflette.language.ast import StringValueNode
def _parse_us_currency(value: str) -> int:
if isinstance(value, str):
return float(value[1:]) * 100
raise TypeError(
f"USCurrency ca... | 195 | 0 | 23 |
e8c3c51f619356e810aecfe09d711fb7f47243cc | 770 | py | Python | kintone/icon_kintone/actions/get_record_by_id/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | kintone/icon_kintone/actions/get_record_by_id/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | kintone/icon_kintone/actions/get_record_by_id/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import GetRecordByIdInput, GetRecordByIdOutput, Input, Output, Component
# Custom imports below
from icon_kintone.util.kintone import get_record
| 32.083333 | 96 | 0.680519 | import komand
from .schema import GetRecordByIdInput, GetRecordByIdOutput, Input, Output, Component
# Custom imports below
from icon_kintone.util.kintone import get_record
class GetRecordById(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='get_record_by_id'... | 506 | 14 | 77 |
6194050e1c395ec5c5e4b253d6977c10ebfc1e77 | 6,892 | py | Python | Assets/Tools/generate_scales.py | elkwolf/ear-training | 1d210dd4723e2edd50969fb693f0110b81e849ec | [
"MIT"
] | 6 | 2020-06-01T18:39:26.000Z | 2020-10-15T12:54:08.000Z | Assets/Tools/generate_scales.py | elkwolf/ear-training | 1d210dd4723e2edd50969fb693f0110b81e849ec | [
"MIT"
] | 11 | 2020-06-03T01:35:47.000Z | 2021-04-06T18:58:00.000Z | Assets/Tools/generate_scales.py | elkwolf/ear-training | 1d210dd4723e2edd50969fb693f0110b81e849ec | [
"MIT"
] | 2 | 2021-03-30T17:28:11.000Z | 2021-03-30T17:37:04.000Z | # -*- coding: utf-8 -*-
"""Generate all the scales in different notations.
This code has been written to test whether the user interface works.
The notations and names are approximated, as I am no expert of any other
way of spelling scales than spanish, and maybe english.
For the generation of these scales, an equal-... | 37.254054 | 111 | 0.435142 | # -*- coding: utf-8 -*-
"""Generate all the scales in different notations.
This code has been written to test whether the user interface works.
The notations and names are approximated, as I am no expert of any other
way of spelling scales than spanish, and maybe english.
For the generation of these scales, an equal-... | 0 | 0 | 0 |
93b4317c019f6e5107db5321f2babd1d5d74946e | 5,142 | py | Python | Poem_generator/codes/visualization.py | shenhao-stu/2021_computer_design | 8729c1962a0aeaa12888092dda5d00723f62aad2 | [
"MIT"
] | 3 | 2021-03-29T08:25:29.000Z | 2021-09-17T22:45:18.000Z | Poem_generator/codes/visualization.py | shenhao-stu/2021_computer_design | 8729c1962a0aeaa12888092dda5d00723f62aad2 | [
"MIT"
] | null | null | null | Poem_generator/codes/visualization.py | shenhao-stu/2021_computer_design | 8729c1962a0aeaa12888092dda5d00723f62aad2 | [
"MIT"
] | 1 | 2022-02-22T02:15:51.000Z | 2022-02-22T02:15:51.000Z | # -*- coding: utf-8 -*-
# @Author: Xiaoyuan Yi
# @Last Modified by: Xiaoyuan Yi
# @Last Modified time: 2020-06-11 22:04:36
# @Email: yi-xy16@mails.tsinghua.edu.cn
# @Description:
'''
Copyright 2020 THUNLP Lab. All Rights Reserved.
This code is part of the online Chinese poetry generation system, Jiuge.
System URL: ht... | 32.961538 | 118 | 0.604434 | # -*- coding: utf-8 -*-
# @Author: Xiaoyuan Yi
# @Last Modified by: Xiaoyuan Yi
# @Last Modified time: 2020-06-11 22:04:36
# @Email: yi-xy16@mails.tsinghua.edu.cn
# @Description:
'''
Copyright 2020 THUNLP Lab. All Rights Reserved.
This code is part of the online Chinese poetry generation system, Jiuge.
System URL: ht... | 4,345 | 0 | 134 |
35944c066e9e73f69a07d3e3dc969e189308bc87 | 3,934 | py | Python | SERVER/buissness/UMS_services.py | PawaN-K-MishrA/FTP-server | 090040ed7b40a8507578cd124dd18f9911068a14 | [
"MIT"
] | null | null | null | SERVER/buissness/UMS_services.py | PawaN-K-MishrA/FTP-server | 090040ed7b40a8507578cd124dd18f9911068a14 | [
"MIT"
] | null | null | null | SERVER/buissness/UMS_services.py | PawaN-K-MishrA/FTP-server | 090040ed7b40a8507578cd124dd18f9911068a14 | [
"MIT"
] | null | null | null | import sys
sys.path.append('..')
from data.DBConnection import DBConnection
from data.user import User
| 21.855556 | 141 | 0.669039 | import sys
sys.path.append('..')
from data.DBConnection import DBConnection
from data.user import User
class UMS_services:
@staticmethod
def add(u):
result=False
conx=DBConnection.connect()
cur=conx.cursor()
query='insert into userMaster (userName,password,userType,userStatus,name,email,contact,address,gender... | 3,470 | 303 | 22 |
16f381165f84836e0d5f3f01fed80f56a786bce1 | 16,514 | py | Python | tests/test_xlsx_to_arrow.py | CJWorkbench/arrow-tools | 1944e40853d82d7dad3d47a72958326cefff367a | [
"MIT"
] | 1 | 2021-11-23T03:57:03.000Z | 2021-11-23T03:57:03.000Z | tests/test_xlsx_to_arrow.py | CJWorkbench/arrow-tools | 1944e40853d82d7dad3d47a72958326cefff367a | [
"MIT"
] | null | null | null | tests/test_xlsx_to_arrow.py | CJWorkbench/arrow-tools | 1944e40853d82d7dad3d47a72958326cefff367a | [
"MIT"
] | 1 | 2021-11-23T03:57:06.000Z | 2021-11-23T03:57:06.000Z | import datetime
from pathlib import Path
import subprocess
import tempfile
from typing import Tuple, Union
import openpyxl as xl
import pyarrow
from .util import assert_table_equals
# This is hard to test, since it's really an invalid Excel file
# def test_no_sheets_is_error():
# # https://openpyxl.readthedocs.... | 32.128405 | 102 | 0.579206 | import datetime
from pathlib import Path
import subprocess
import tempfile
from typing import Tuple, Union
import openpyxl as xl
import pyarrow
from .util import assert_table_equals
def do_convert(
xlsx_path: Path,
*,
max_rows: int = 99999,
max_columns: int = 99998,
max_bytes_per_value: int = 9999... | 14,830 | 0 | 644 |
ff09700cf57e7d8296d2dca0aeb45a99125e1f13 | 31,256 | py | Python | src/fr/tagc/rainet/core/execution/processing/catrapid/ReadCatrapid.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | src/fr/tagc/rainet/core/execution/processing/catrapid/ReadCatrapid.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | src/fr/tagc/rainet/core/execution/processing/catrapid/ReadCatrapid.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | import os
import argparse
import numpy as np
from fr.tagc.rainet.core.util.exception.RainetException import RainetException
from fr.tagc.rainet.core.util.log.Logger import Logger
from fr.tagc.rainet.core.util.time.Timer import Timer
from fr.tagc.rainet.core.util.subprocess.SubprocessUtil import SubprocessUtil
#======... | 48.234568 | 281 | 0.559829 | import os
import argparse
import numpy as np
from fr.tagc.rainet.core.util.exception.RainetException import RainetException
from fr.tagc.rainet.core.util.log.Logger import Logger
from fr.tagc.rainet.core.util.time.Timer import Timer
from fr.tagc.rainet.core.util.subprocess.SubprocessUtil import SubprocessUtil
#======... | 23,717 | 1,975 | 23 |
b6d0c601f0b3ca1259885a7dddccd7cb50af0917 | 2,047 | py | Python | watchdog_s3.py | giuliocalzolari/watchdog_s3 | 2578791fd82114afe79c77469e2d969e162b29a2 | [
"MIT"
] | 3 | 2018-02-28T16:19:20.000Z | 2021-11-05T06:47:51.000Z | watchdog_s3.py | giuliocalzolari/watchdog_s3 | 2578791fd82114afe79c77469e2d969e162b29a2 | [
"MIT"
] | null | null | null | watchdog_s3.py | giuliocalzolari/watchdog_s3 | 2578791fd82114afe79c77469e2d969e162b29a2 | [
"MIT"
] | 1 | 2020-08-15T02:19:53.000Z | 2020-08-15T02:19:53.000Z | #!/usr/bin/env python
import sys
import time
import logging
import boto3
from botocore.exceptions import ClientError
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
logging.basicConfig(level=logging.INFO,format='%(asctime)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
lo... | 27.293333 | 103 | 0.602345 | #!/usr/bin/env python
import sys
import time
import logging
import boto3
from botocore.exceptions import ClientError
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
logging.basicConfig(level=logging.INFO,format='%(asctime)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
lo... | 451 | 760 | 23 |
bf1f7972df9e38d244077c4f38d14e906f106268 | 177 | py | Python | tiger_pl/__main__.py | dmzobel/tiger | bc3b936bd596235360f3cd8f02c9746279af00ed | [
"MIT"
] | null | null | null | tiger_pl/__main__.py | dmzobel/tiger | bc3b936bd596235360f3cd8f02c9746279af00ed | [
"MIT"
] | null | null | null | tiger_pl/__main__.py | dmzobel/tiger | bc3b936bd596235360f3cd8f02c9746279af00ed | [
"MIT"
] | null | null | null | import argparse
from tiger_pl import Tiger
parser = argparse.ArgumentParser()
parser.add_argument("filename")
args = parser.parse_args()
print(Tiger(args.filename).execute())
| 19.666667 | 37 | 0.79096 | import argparse
from tiger_pl import Tiger
parser = argparse.ArgumentParser()
parser.add_argument("filename")
args = parser.parse_args()
print(Tiger(args.filename).execute())
| 0 | 0 | 0 |
95d68597ab6f351f4854c1f350aad77f05ff8017 | 5,275 | py | Python | adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/master_definitions/bia_application_interface.py | ArrowElectronics/Vital-Signs-Monitoring | ba43fe9a116d94170561433910fd7bffba5726e7 | [
"Unlicense"
] | 5 | 2021-06-13T17:11:19.000Z | 2021-12-01T18:20:38.000Z | adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/master_definitions/bia_application_interface.py | ArrowElectronics/Vital-Signs-Monitoring | ba43fe9a116d94170561433910fd7bffba5726e7 | [
"Unlicense"
] | null | null | null | adi_study_watch/nrf5_sdk_15.2.0/adi_study_watch/cli/m2m2/inc/master_definitions/bia_application_interface.py | ArrowElectronics/Vital-Signs-Monitoring | ba43fe9a116d94170561433910fd7bffba5726e7 | [
"Unlicense"
] | 1 | 2022-01-08T15:01:44.000Z | 2022-01-08T15:01:44.000Z | #!/usr/bin/env python3
from ctypes import *
import common_application_interface
import common_sensor_interface
| 33.386076 | 79 | 0.660474 | #!/usr/bin/env python3
from ctypes import *
import common_application_interface
import common_sensor_interface
class M2M2_BIA_APP_CMD_ENUM_t(c_uint8):
_M2M2_BIA_APP_CMD_LOWEST = 0x40
M2M2_BIA_APP_CMD_SWEEP_FREQ_ENABLE_REQ = 0x42
M2M2_BIA_APP_CMD_SWEEP_FREQ_ENABLE_RESP = 0x43
M2M2_BIA_APP_CMD_SWEEP_F... | 0 | 4,678 | 483 |
2570e87ff7b6b4f4aaed4a328b7361c96668d859 | 1,409 | py | Python | setup.py | Adalyia/aiowowapi | 660297d00273468b336749e8a079f7292a6be4d8 | [
"MIT"
] | null | null | null | setup.py | Adalyia/aiowowapi | 660297d00273468b336749e8a079f7292a6be4d8 | [
"MIT"
] | null | null | null | setup.py | Adalyia/aiowowapi | 660297d00273468b336749e8a079f7292a6be4d8 | [
"MIT"
] | null | null | null | from setuptools import setup
readme = ''
with open('README.rst') as f:
readme = f.read()
requirements = [
'aiohttp>=3.7.0,<3.8.0'
]
extras_require = {
'docs': [
'sphinx>=4.1.2',
'sphinx_rtd_theme>=0.5.2',
]
}
packages = [
'aiowowapi',
'aiowowapi.retail',
]
setup(
... | 25.618182 | 79 | 0.631654 | from setuptools import setup
readme = ''
with open('README.rst') as f:
readme = f.read()
requirements = [
'aiohttp>=3.7.0,<3.8.0'
]
extras_require = {
'docs': [
'sphinx>=4.1.2',
'sphinx_rtd_theme>=0.5.2',
]
}
packages = [
'aiowowapi',
'aiowowapi.retail',
]
setup(
... | 0 | 0 | 0 |
948ced1d7fbe483c56ec4e04a79fdbbf44a8dcd3 | 5,329 | py | Python | redirect_demo/settings.py | mllrsohn/django-cms-redirects | 3398528e44594adb708aa090d5b7867f619db10e | [
"BSD-3-Clause"
] | 8 | 2015-02-10T20:30:26.000Z | 2020-05-31T20:20:51.000Z | redirect_demo/settings.py | mllrsohn/django-cms-redirects | 3398528e44594adb708aa090d5b7867f619db10e | [
"BSD-3-Clause"
] | 5 | 2017-04-10T07:41:45.000Z | 2021-12-20T08:49:35.000Z | redirect_demo/settings.py | mllrsohn/django-cms-redirects | 3398528e44594adb708aa090d5b7867f619db10e | [
"BSD-3-Clause"
] | 8 | 2015-04-16T21:25:55.000Z | 2018-09-27T11:15:12.000Z | # Django settings for redirect_demo project.
import os
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
gettext = lambda s: s
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends... | 29.605556 | 122 | 0.691687 | # Django settings for redirect_demo project.
import os
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
gettext = lambda s: s
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends... | 0 | 0 | 0 |
bd3809cf0caa404dcf1774a91b849c420fd6f92c | 2,615 | py | Python | src/m1_hangman.py | theneltj/21-FunctionalDecomposition | 53dd19436a3f33e65957e8db0216bcb056ce187e | [
"MIT"
] | null | null | null | src/m1_hangman.py | theneltj/21-FunctionalDecomposition | 53dd19436a3f33e65957e8db0216bcb056ce187e | [
"MIT"
] | null | null | null | src/m1_hangman.py | theneltj/21-FunctionalDecomposition | 53dd19436a3f33e65957e8db0216bcb056ce187e | [
"MIT"
] | null | null | null | """
Hangman.
Authors: Tyler Thenell and Zachary Zdanavicius.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
# DONE: 2. Implement Hangman using your Iterative Enhancement Plan.
import random
####### Do NOT attempt this assignment before class! #######
main()
| 27.526316 | 67 | 0.56673 | """
Hangman.
Authors: Tyler Thenell and Zachary Zdanavicius.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
# DONE: 2. Implement Hangman using your Iterative Enhancement Plan.
import random
####### Do NOT attempt this assignment before class! #######
def main():
print('_________________________________')
... | 2,208 | 0 | 138 |
cfac305f0f7ce458aca125a8380e57d97d04bc9b | 81,938 | py | Python | openstuder.py | OpenStuder/openstuder-client-python | ade667116afcd084faed93febfa4e267972f5250 | [
"MIT"
] | null | null | null | openstuder.py | OpenStuder/openstuder-client-python | ade667116afcd084faed93febfa4e267972f5250 | [
"MIT"
] | null | null | null | openstuder.py | OpenStuder/openstuder-client-python | ade667116afcd084faed93febfa4e267972f5250 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Callable, Optional, Tuple, List
from enum import Enum, Flag, auto
from threading import Thread
import datetime
import json
import websocket
class SIStatus(Enum):
"""
Status of operations on the OpenStuder gateway.
- **SIStatus.SUCCESS**: Operation was... | 48.541469 | 180 | 0.672435 | from __future__ import annotations
from typing import Callable, Optional, Tuple, List
from enum import Enum, Flag, auto
from threading import Thread
import datetime
import json
import websocket
class SIStatus(Enum):
"""
Status of operations on the OpenStuder gateway.
- **SIStatus.SUCCESS**: Operation was... | 33,241 | 1,476 | 558 |
19edf52f2ee673c122ec1d673f22633ce7ecfbaf | 1,675 | py | Python | py_neuromodulation/nm_fft.py | neuromodulation/py_neuromodulation | 1e8505d4324c9d2f37e5d56629a2ee418ea0b12b | [
"MIT"
] | 7 | 2021-05-12T02:13:12.000Z | 2022-02-28T13:14:23.000Z | py_neuromodulation/nm_fft.py | neuromodulation/py_neuromodulation | 1e8505d4324c9d2f37e5d56629a2ee418ea0b12b | [
"MIT"
] | 98 | 2021-03-26T19:04:20.000Z | 2022-03-15T09:07:29.000Z | py_neuromodulation/nm_fft.py | neuromodulation/py_neuromodulation | 1e8505d4324c9d2f37e5d56629a2ee418ea0b12b | [
"MIT"
] | 1 | 2021-07-16T10:39:01.000Z | 2021-07-16T10:39:01.000Z | from scipy import fft
import numpy as np
def get_fft_features(features_, s, fs, data, KF_dict, ch, f_ranges, f_band_names):
"""Get FFT features for different f_ranges. Data needs to be a batch of 1s length
Parameters
----------
features_ : dict
feature dictionary
s : dict
settings... | 32.843137 | 85 | 0.616716 | from scipy import fft
import numpy as np
def get_fft_features(features_, s, fs, data, KF_dict, ch, f_ranges, f_band_names):
"""Get FFT features for different f_ranges. Data needs to be a batch of 1s length
Parameters
----------
features_ : dict
feature dictionary
s : dict
settings... | 0 | 0 | 0 |
0086c54dad5b6fdac6f2eec722f377e833b2a519 | 2,099 | py | Python | kubeasy_sdk/service.py | dylanturn/kubeasy | 7c9fd62e22ecd89632f5aa7a7a17fda24ebe7490 | [
"Apache-2.0"
] | null | null | null | kubeasy_sdk/service.py | dylanturn/kubeasy | 7c9fd62e22ecd89632f5aa7a7a17fda24ebe7490 | [
"Apache-2.0"
] | null | null | null | kubeasy_sdk/service.py | dylanturn/kubeasy | 7c9fd62e22ecd89632f5aa7a7a17fda24ebe7490 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from enum import Enum
from imports import k8s
from cdk8s import Chart
from kubeasy_sdk.deployment import Deployment
from kubeasy_sdk.utils.resource import Rendered
from kubeasy_sdk.utils.networking.service_port import ServicePort
from kubeasy_sdk.utils.collections.service_ports impo... | 28.364865 | 110 | 0.738923 | from __future__ import annotations
from enum import Enum
from imports import k8s
from cdk8s import Chart
from kubeasy_sdk.deployment import Deployment
from kubeasy_sdk.utils.resource import Rendered
from kubeasy_sdk.utils.networking.service_port import ServicePort
from kubeasy_sdk.utils.collections.service_ports impo... | 1,356 | 113 | 245 |
6176f54a26a8cd4a12b47289cd60ad078137a050 | 1,602 | py | Python | day14/solution.py | Mark-Simulacrum/advent-of-code-2015 | 8b842eba07a68fd4c2baad60f4ea204429d62f35 | [
"MIT"
] | 1 | 2015-12-20T23:59:34.000Z | 2015-12-20T23:59:34.000Z | day14/solution.py | Mark-Simulacrum/advent-of-code-2015 | 8b842eba07a68fd4c2baad60f4ea204429d62f35 | [
"MIT"
] | null | null | null | day14/solution.py | Mark-Simulacrum/advent-of-code-2015 | 8b842eba07a68fd4c2baad60f4ea204429d62f35 | [
"MIT"
] | null | null | null | import operator
import re
data = open("data", "r").read()
seconds = 2503
reindeers = map(parseDataLine, data.split("\n"))
reindeerNames = {}
for reindeer in reindeers:
reindeerNames[reindeer[0]] = 0
for second in range(seconds + 1):
inLeads = inLeadAtSecond(reindeers, second)
for inLead in inLeads:
reindeerN... | 23.910448 | 102 | 0.708489 | import operator
import re
data = open("data", "r").read()
def parseDataLine(line):
name, kmPerSec, speedTime, restTime = re.search(
r'(\w+) .* (\d+) km/s for (\d+) .* (\d+)', line).groups()
kmPerSec = int(kmPerSec)
speedTime = int(speedTime)
restTime = int(restTime)
return ( name, kmPerSec, speedTime, restTi... | 1,001 | 0 | 69 |
8a523dc01e2cfb12326fe5012d648b8bc8959329 | 1,834 | py | Python | samples/quandl_sample.py | daxlab/pyalgotrade | 5517c2644da97e7ef143d344d813232d6845a29f | [
"Apache-2.0"
] | 1,000 | 2016-01-26T12:10:11.000Z | 2022-03-01T23:59:50.000Z | samples/quandl_sample.py | leeong05/pyalgotrade | 5578596f2442aeb3f1a777a79f82e041c1609f5f | [
"Apache-2.0"
] | 22 | 2016-01-26T15:14:09.000Z | 2019-01-30T02:36:38.000Z | samples/quandl_sample.py | leeong05/pyalgotrade | 5578596f2442aeb3f1a777a79f82e041c1609f5f | [
"Apache-2.0"
] | 613 | 2016-01-27T01:02:30.000Z | 2022-03-21T01:38:58.000Z | from pyalgotrade import strategy
from pyalgotrade import plotter
from pyalgotrade.tools import quandl
from pyalgotrade.feed import csvfeed
import datetime
if __name__ == "__main__":
main(True)
| 33.345455 | 134 | 0.703381 | from pyalgotrade import strategy
from pyalgotrade import plotter
from pyalgotrade.tools import quandl
from pyalgotrade.feed import csvfeed
import datetime
class MyStrategy(strategy.BacktestingStrategy):
def __init__(self, feed, quandlFeed, instrument):
strategy.BacktestingStrategy.__init__(self, feed)
... | 1,481 | 26 | 126 |
ef7deba50f2dc714d92981f52b24ec7718b9a073 | 1,629 | py | Python | tests/unit/test_notebooks.py | Saransh-cpp/liionpack | 82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43 | [
"MIT"
] | 23 | 2021-09-28T15:48:48.000Z | 2022-03-15T10:34:35.000Z | tests/unit/test_notebooks.py | Saransh-cpp/liionpack | 82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43 | [
"MIT"
] | 131 | 2021-09-29T09:18:50.000Z | 2022-03-03T06:09:52.000Z | tests/unit/test_notebooks.py | Saransh-cpp/liionpack | 82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43 | [
"MIT"
] | 17 | 2021-09-29T13:14:00.000Z | 2022-03-24T11:01:19.000Z | #
# Tests jupyter notebooks
#
import os
import subprocess
import unittest
import nbconvert
import liionpack as lp
if __name__ == "__main__":
unittest.main()
| 31.941176 | 151 | 0.544506 | #
# Tests jupyter notebooks
#
import os
import subprocess
import unittest
import nbconvert
import liionpack as lp
class TestNotebooks(unittest.TestCase):
def test_notebooks(self):
examples_folder = os.path.join(lp.ROOT_DIR, "docs", "examples")
for filename in os.listdir(examples_folder):
... | 1,396 | 18 | 49 |
b9da83eaab411be02a255e3869cef457be65eecc | 169 | py | Python | frappe/patches/v7_0/update_send_after_in_bulk_email.py | Nxweb-in/frappe | 56b3eb52bf56dd71bee29fde3ed28ed9c6d15947 | [
"MIT"
] | 1 | 2021-06-03T07:04:48.000Z | 2021-06-03T07:04:48.000Z | frappe/patches/v7_0/update_send_after_in_bulk_email.py | Nxweb-in/frappe | 56b3eb52bf56dd71bee29fde3ed28ed9c6d15947 | [
"MIT"
] | null | null | null | frappe/patches/v7_0/update_send_after_in_bulk_email.py | Nxweb-in/frappe | 56b3eb52bf56dd71bee29fde3ed28ed9c6d15947 | [
"MIT"
] | null | null | null |
import frappe
from frappe.utils import now_datetime | 28.166667 | 100 | 0.781065 |
import frappe
from frappe.utils import now_datetime
def execute():
frappe.db.sql('update `tabEmail Queue` set send_after=%s where send_after is null', now_datetime()) | 94 | 0 | 23 |
8284ceab076e729a53283aca651148ca390bb5ce | 2,485 | py | Python | app.py | andresmvidaurre/Project | a3c1193f8c6aac13218715a8ad98479c60f0168a | [
"MIT"
] | 1 | 2022-03-04T22:21:54.000Z | 2022-03-04T22:21:54.000Z | app.py | andresmvidaurre/Project | a3c1193f8c6aac13218715a8ad98479c60f0168a | [
"MIT"
] | null | null | null | app.py | andresmvidaurre/Project | a3c1193f8c6aac13218715a8ad98479c60f0168a | [
"MIT"
] | 2 | 2022-02-02T19:24:12.000Z | 2022-02-09T02:33:15.000Z | from flask import Flask, render_template, request
import pickle
import pandas as pd
# app instantiation
APP = Flask(__name__)
# Load model
with open("xgb_class_1.pkl", "rb") as f:
model = pickle.load(f)
@APP.route('/')
def Home_page():
'''Landing page to the Kickstarter Prediction project'''
return rende... | 36.544118 | 125 | 0.651911 | from flask import Flask, render_template, request
import pickle
import pandas as pd
# app instantiation
APP = Flask(__name__)
# Load model
with open("xgb_class_1.pkl", "rb") as f:
model = pickle.load(f)
def create_project_df(name, blurb, goal, category, length):
# function to process user input and make a da... | 2,033 | 0 | 45 |
2cdf216954cfff6bf8963150ed97dfed0f7362b0 | 1,125 | py | Python | leetcode/implement_queue_using_stacks.py | zhangao0086/Python-Algorithm | 981c875b2e0f30619bd3d44e1f2bd0c47d1464a2 | [
"MIT"
] | 3 | 2021-05-21T12:55:14.000Z | 2022-02-01T16:21:30.000Z | leetcode/implement_queue_using_stacks.py | zhangao0086/Python-Algorithm | 981c875b2e0f30619bd3d44e1f2bd0c47d1464a2 | [
"MIT"
] | null | null | null | leetcode/implement_queue_using_stacks.py | zhangao0086/Python-Algorithm | 981c875b2e0f30619bd3d44e1f2bd0c47d1464a2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*-coding:utf-8-*-
__author__ = "Bannings"
if __name__ == '__main__':
obj = MyQueue()
obj.push(1)
obj.push(2)
assert obj.peek() == 1
assert obj.pop() == 1
assert obj.empty() == False | 22.5 | 76 | 0.524444 | #!/usr/bin/python3
# -*-coding:utf-8-*-
__author__ = "Bannings"
class MyQueue:
def __init__(self):
"""
Initialize your data structure here.
"""
self.stack = []
self.reverse_stack = []
def push(self, x: int) -> None:
"""
Push element x to the back of qu... | 0 | 873 | 23 |
53f979a770bf36c7d39eb7c9093dddfa222161db | 20,464 | py | Python | Tests/interop/net/field/test_static_fields.py | btddg28/ironpython | 8006238c19d08db5db9bada39d765143e631059e | [
"Apache-2.0"
] | null | null | null | Tests/interop/net/field/test_static_fields.py | btddg28/ironpython | 8006238c19d08db5db9bada39d765143e631059e | [
"Apache-2.0"
] | null | null | null | Tests/interop/net/field/test_static_fields.py | btddg28/ironpython | 8006238c19d08db5db9bada39d765143e631059e | [
"Apache-2.0"
] | 1 | 2019-09-18T05:37:46.000Z | 2019-09-18T05:37:46.000Z | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of t... | 44.008602 | 115 | 0.722097 | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of t... | 18,035 | 0 | 306 |
4e71ac5ceee753ffebe093fcf274c014b19c977c | 4,299 | py | Python | RKD/model/backbone/inception/google.py | pantheon5100/fmcw-finetune-RKD | 1e606432ca3006e8c5d48030301988d5febb4c1b | [
"Apache-2.0"
] | 2 | 2020-08-24T07:57:16.000Z | 2022-01-16T02:06:40.000Z | RKD/model/backbone/inception/google.py | pantheon5100/fmcw-finetune-RKD | 1e606432ca3006e8c5d48030301988d5febb4c1b | [
"Apache-2.0"
] | null | null | null | RKD/model/backbone/inception/google.py | pantheon5100/fmcw-finetune-RKD | 1e606432ca3006e8c5d48030301988d5febb4c1b | [
"Apache-2.0"
] | null | null | null | import os
import torch
import torch.nn as nn
import h5py
from collections import OrderedDict
from torchvision.datasets.utils import download_url
__all__ = ["GoogleNet"]
| 40.556604 | 120 | 0.551058 | import os
import torch
import torch.nn as nn
import h5py
from collections import OrderedDict
from torchvision.datasets.utils import download_url
__all__ = ["GoogleNet"]
class GoogleNet(nn.Sequential):
output_size = 1024
input_side = 227
rescale = 255.0
rgb_mean = [122.7717, 115.9465, 102.9801]
r... | 3,631 | 396 | 99 |
0f6cbf7880a269cc7ee9969661d51e032171160e | 1,448 | py | Python | string_constants.py | PyPals/pywebsis | 01d9dd9751fa0296c11354322b70c6efef4a9671 | [
"MIT"
] | null | null | null | string_constants.py | PyPals/pywebsis | 01d9dd9751fa0296c11354322b70c6efef4a9671 | [
"MIT"
] | 7 | 2016-04-18T17:04:58.000Z | 2016-08-11T13:05:31.000Z | string_constants.py | PyPals/pywebsis | 01d9dd9751fa0296c11354322b70c6efef4a9671 | [
"MIT"
] | null | null | null | import constants
base_url = 'http://websismit.manipal.edu/websis/control/StudentAcademicProfile'
url = base_url + '?productCategoryId=0905-TERM-'
base_url_details = 'http://websismit.manipal.edu/websis/control/'
url_details = base_url_details + 'ListCTPEnrollment?customTimePeriodId='
#HTML IDs to be used in first... | 46.709677 | 79 | 0.839088 | import constants
base_url = 'http://websismit.manipal.edu/websis/control/StudentAcademicProfile'
url = base_url + '?productCategoryId=0905-TERM-'
base_url_details = 'http://websismit.manipal.edu/websis/control/'
url_details = base_url_details + 'ListCTPEnrollment?customTimePeriodId='
#HTML IDs to be used in first... | 0 | 0 | 0 |
ad7f3ce39bee40ba0b8f15a52a9d6a03823d342e | 282 | py | Python | sample_problems/problems_with_solution101.py | adi01trip01/adi_workspace | f493b3ba84645eec3a57607243760a826880d1a3 | [
"MIT"
] | null | null | null | sample_problems/problems_with_solution101.py | adi01trip01/adi_workspace | f493b3ba84645eec3a57607243760a826880d1a3 | [
"MIT"
] | null | null | null | sample_problems/problems_with_solution101.py | adi01trip01/adi_workspace | f493b3ba84645eec3a57607243760a826880d1a3 | [
"MIT"
] | null | null | null | # Write a Python program to access and print a URL's content to the console.
from http.client import HTTPConnection
conn = HTTPConnection("example.com")
conn.request("GET", "/")
result = conn.getresponse()
# retrieves the entire contents.
contents = result.read()
print(contents)
| 28.2 | 76 | 0.755319 | # Write a Python program to access and print a URL's content to the console.
from http.client import HTTPConnection
conn = HTTPConnection("example.com")
conn.request("GET", "/")
result = conn.getresponse()
# retrieves the entire contents.
contents = result.read()
print(contents)
| 0 | 0 | 0 |
e9c0bafa2df3e1bf122110edaf6d11c7a8a1d0ae | 143 | py | Python | blog_content/custom_context_processor.py | paulootavio343/Blog | 06e4814688770580b191129d5db60cc90a1fef6d | [
"MIT"
] | null | null | null | blog_content/custom_context_processor.py | paulootavio343/Blog | 06e4814688770580b191129d5db60cc90a1fef6d | [
"MIT"
] | null | null | null | blog_content/custom_context_processor.py | paulootavio343/Blog | 06e4814688770580b191129d5db60cc90a1fef6d | [
"MIT"
] | null | null | null | from .models import Category
| 17.875 | 61 | 0.657343 | from .models import Category
def subject_renderer(request):
return {
'categories': Category.objects.all().order_by('-id'),
}
| 90 | 0 | 23 |
a7f198e1d8cff8833d4ae6d9f3264eb305093d82 | 549 | py | Python | answers/vjha21/Day8/question1.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 22 | 2021-03-16T14:07:47.000Z | 2021-08-13T08:52:50.000Z | answers/vjha21/Day8/question1.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 174 | 2021-03-16T21:16:40.000Z | 2021-06-12T05:19:51.000Z | answers/vjha21/Day8/question1.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 135 | 2021-03-16T16:47:12.000Z | 2021-06-27T14:22:38.000Z | ##Return sum of all unique elements of an array
if __name__ == "__main__":
nums = [1, 2, 3, 2]
print(unique_element(nums))
| 24.954545 | 65 | 0.586521 | ##Return sum of all unique elements of an array
def unique_element(array):
n = len(array)
unique_elements = []
array.sort()
if array[0] != array[1]:
unique_elements.append(array[0])
for i in range(1, n - 1):
if array[i] != array[i + 1] and array[i] != array[i - 1]:
uniq... | 392 | 0 | 23 |
422a4cf2546ac8427c4d0f426776bc704bc59852 | 1,119 | py | Python | 7/13/solve.py | juancroldan/tuenti-challenge | 4b0b233f457366dd78e80c011ade138cd162e297 | [
"Unlicense"
] | null | null | null | 7/13/solve.py | juancroldan/tuenti-challenge | 4b0b233f457366dd78e80c011ade138cd162e297 | [
"Unlicense"
] | null | null | null | 7/13/solve.py | juancroldan/tuenti-challenge | 4b0b233f457366dd78e80c011ade138cd162e297 | [
"Unlicense"
] | null | null | null | from numpy import uint64 as ui, arange
START = 1050
ONE = ui(1)
n = START
while n < 2**32 -1:
print(n)
with open("fromto.txt", "a") as f:
f.write("%s\t%s\n" % (n, carvedToWritten(n)))
n += 1 | 31.083333 | 62 | 0.460232 | from numpy import uint64 as ui, arange
START = 1050
ONE = ui(1)
def carvedToWritten(n):
n = ui(n)
r = ui(0)
for i in arange(64, dtype = ui):
a = ui(0)
for j in reversed(arange(n + 1, dtype = ui)):
b = ui(0)
for k in arange(i+1, dtype = ui):
#print("N: {0:064b}".format(n).replace("0"," ")+"|%s" % n)
... | 899 | 0 | 22 |
1cbcd39bc17ace2409f7b87b96e0cffb046b876c | 3,893 | py | Python | jina/peapods/peas/helper.py | anuragdw710/jina | b2d3577f2d5b86399f0b4a8e4529df4929dd18ff | [
"Apache-2.0"
] | 3 | 2021-09-02T04:55:20.000Z | 2021-11-15T09:41:50.000Z | jina/peapods/peas/helper.py | sheetal01761/jina | 520fc0794fb43d96e1fc85534e9df3cf9c89c42e | [
"Apache-2.0"
] | null | null | null | jina/peapods/peas/helper.py | sheetal01761/jina | 520fc0794fb43d96e1fc85534e9df3cf9c89c42e | [
"Apache-2.0"
] | null | null | null | import multiprocessing
import threading
from functools import partial
from typing import Union, TYPE_CHECKING
from copy import deepcopy
from ... import __default_host__
from ...hubble.hubio import HubIO
from ...hubble.helper import is_valid_huburi
from ...enums import GatewayProtocolType, RuntimeBackendType
from ...pa... | 34.451327 | 106 | 0.670948 | import multiprocessing
import threading
from functools import partial
from typing import Union, TYPE_CHECKING
from copy import deepcopy
from ... import __default_host__
from ...hubble.hubio import HubIO
from ...hubble.helper import is_valid_huburi
from ...enums import GatewayProtocolType, RuntimeBackendType
from ...pa... | 1,490 | 0 | 158 |
f0028266ec1bf2c346a778c1687f14b66af3ebf8 | 400 | py | Python | tests/test_ukw_intelli_store.py | Maddonix/ukw-intelli-store | a6ba088e70d5ee2e9499a9c72477833dfccafb0b | [
"MIT"
] | null | null | null | tests/test_ukw_intelli_store.py | Maddonix/ukw-intelli-store | a6ba088e70d5ee2e9499a9c72477833dfccafb0b | [
"MIT"
] | null | null | null | tests/test_ukw_intelli_store.py | Maddonix/ukw-intelli-store | a6ba088e70d5ee2e9499a9c72477833dfccafb0b | [
"MIT"
] | null | null | null |
from ukw_intelli_store.cli import main
from ukw_intelli_store.endomaterial import EndoMaterial
path_test_imd = "tests/data/imd.xlsx"
path_test_mat = "tests/data/mat.xlsx" | 25 | 55 | 0.75 |
from ukw_intelli_store.cli import main
from ukw_intelli_store.endomaterial import EndoMaterial
path_test_imd = "tests/data/imd.xlsx"
path_test_mat = "tests/data/mat.xlsx"
def test_main():
assert main([]) == 0
def test_init():
em = EndoMaterial(path_test_imd, path_test_mat)
def test_dgvs_keys():
em = En... | 159 | 0 | 69 |
c58165e956f88791ce62265295e7af9606f33f81 | 16 | py | Python | main_1.py | jayz0417/second_project | 44f0912d58330e84654277b51268b30f5599ddc1 | [
"MIT"
] | null | null | null | main_1.py | jayz0417/second_project | 44f0912d58330e84654277b51268b30f5599ddc1 | [
"MIT"
] | null | null | null | main_1.py | jayz0417/second_project | 44f0912d58330e84654277b51268b30f5599ddc1 | [
"MIT"
] | null | null | null | print("user 1")
| 8 | 15 | 0.625 | print("user 1")
| 0 | 0 | 0 |
ae4c3233b0ceea19ef2685aab78a94e4c2bee8b1 | 3,471 | py | Python | Code/AntialiasingManager.py | kergalym/RenderPipeline-version_1_release | 3c78b79d44c33781374e870dd8aad03aa6ce1268 | [
"WTFPL"
] | null | null | null | Code/AntialiasingManager.py | kergalym/RenderPipeline-version_1_release | 3c78b79d44c33781374e870dd8aad03aa6ce1268 | [
"WTFPL"
] | null | null | null | Code/AntialiasingManager.py | kergalym/RenderPipeline-version_1_release | 3c78b79d44c33781374e870dd8aad03aa6ce1268 | [
"WTFPL"
] | null | null | null | from panda3d.core import PTAVecBase2f, Vec2
from Code.DebugObject import DebugObject
from Code.Globals import Globals
from Code.RenderPasses.AntialiasingFXAAPass import AntialiasingFXAAPass
from Code.RenderPasses.AntialiasingSMAAPass import AntialiasingSMAAPass
class AntialiasingManager(DebugObject):
""" The A... | 39 | 97 | 0.649957 | from panda3d.core import PTAVecBase2f, Vec2
from Code.DebugObject import DebugObject
from Code.Globals import Globals
from Code.RenderPasses.AntialiasingFXAAPass import AntialiasingFXAAPass
from Code.RenderPasses.AntialiasingSMAAPass import AntialiasingSMAAPass
class AntialiasingManager(DebugObject):
""" The A... | 0 | 0 | 0 |
04070cd4f46b9eb0eadbd6ad622f2b8d021be30e | 11,573 | py | Python | pysnmp-with-texts/CISCO-MGX82XX-RPM-RSRC-PART-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-MGX82XX-RPM-RSRC-PART-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-MGX82XX-RPM-RSRC-PART-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-MGX82XX-RPM-RSRC-PART-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-MGX82XX-RPM-RSRC-PART-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:07:29 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Pytho... | 148.371795 | 980 | 0.786054 | #
# PySNMP MIB module CISCO-MGX82XX-RPM-RSRC-PART-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-MGX82XX-RPM-RSRC-PART-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:07:29 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Pytho... | 0 | 0 | 0 |
85cb17c76ba00077b48b22352c3160c6a838c796 | 5,108 | py | Python | bin/gen_config_files.py | dannima/pae_probe_experiments-1 | 28e9f2b3873f21b39c377899d31c7a04da2b844b | [
"BSD-2-Clause"
] | null | null | null | bin/gen_config_files.py | dannima/pae_probe_experiments-1 | 28e9f2b3873f21b39c377899d31c7a04da2b844b | [
"BSD-2-Clause"
] | null | null | null | bin/gen_config_files.py | dannima/pae_probe_experiments-1 | 28e9f2b3873f21b39c377899d31c7a04da2b844b | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import sys
import yaml
from pathlib import Path
if __name__ == '__main__':
main()
| 38.406015 | 75 | 0.42502 | #!/usr/bin/env python3
import argparse
import os
import sys
import yaml
from pathlib import Path
def main():
parser = argparse.ArgumentParser(
'generate configuration files', add_help=True)
parser.add_argument(
'feats_dir', nargs=None,
help='directory of extracted features')
parser... | 4,947 | 0 | 23 |
6f35b4635df9875af0d7c1384cce264be2293dda | 10,176 | py | Python | octagon/environment/__init__.py | Randmeer/Cobalt-Quest | 79b62dea6420cb9f4cd09fa048ddd2b033cad35f | [
"MIT"
] | null | null | null | octagon/environment/__init__.py | Randmeer/Cobalt-Quest | 79b62dea6420cb9f4cd09fa048ddd2b033cad35f | [
"MIT"
] | null | null | null | octagon/environment/__init__.py | Randmeer/Cobalt-Quest | 79b62dea6420cb9f4cd09fa048ddd2b033cad35f | [
"MIT"
] | null | null | null | import random
import time
import pygame
import QuickJSON
import copy
from pathfinding.core.diagonal_movement import DiagonalMovement
from pathfinding.core.grid import Grid
from pathfinding.finder.a_star import AStarFinder
from octagon.utils import render_text, var, img, cout, mp_scene
from octagon.environment import h... | 40.541833 | 172 | 0.548054 | import random
import time
import pygame
import QuickJSON
import copy
from pathfinding.core.diagonal_movement import DiagonalMovement
from pathfinding.core.grid import Grid
from pathfinding.finder.a_star import AStarFinder
from octagon.utils import render_text, var, img, cout, mp_scene
from octagon.environment import h... | 4,003 | 5,784 | 23 |
70eff2f01152c525f8b8dc057859f9aef2a73800 | 1,273 | py | Python | setup.py | AT0myks/imbox | 6cdc0f01350a6c4b7721e0b9666cb9ce272f2282 | [
"MIT"
] | null | null | null | setup.py | AT0myks/imbox | 6cdc0f01350a6c4b7721e0b9666cb9ce272f2282 | [
"MIT"
] | null | null | null | setup.py | AT0myks/imbox | 6cdc0f01350a6c4b7721e0b9666cb9ce272f2282 | [
"MIT"
] | null | null | null | from setuptools import setup
import os
# Get version without importing, which avoids dependency issues
setup(
name='imbox',
version=get_version(),
description="Python IMAP for Human beings",
long_description=read('README.md'),
keywords='email, IMAP, parsing emails',
author='Martin Rusev',
... | 28.288889 | 75 | 0.61194 | from setuptools import setup
import os
# Get version without importing, which avoids dependency issues
def get_version():
import re
with open('imbox/version.py') as version_file:
return re.search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""",
version_file.read()).group('ve... | 294 | 0 | 45 |
023af08d13a34ed97c0a6e47836ce856fe50e698 | 1,666 | py | Python | decode.py | cardi/proofpoint-url-decoder | eef834b35faabfe3c8fdb856089151b4f7471143 | [
"CC0-1.0"
] | 12 | 2018-02-24T20:00:51.000Z | 2021-08-05T16:52:55.000Z | decode.py | cardi/proofpoint-url-decoder | eef834b35faabfe3c8fdb856089151b4f7471143 | [
"CC0-1.0"
] | 4 | 2016-02-17T02:58:03.000Z | 2020-05-05T06:35:50.000Z | decode.py | cardi/proofpoint-url-decoder | eef834b35faabfe3c8fdb856089151b4f7471143 | [
"CC0-1.0"
] | 2 | 2018-09-24T17:31:23.000Z | 2018-11-14T15:53:28.000Z | #!/usr/bin/env python3
#
# Written in 2016 by Calvin Ardi <calvin@isi.edu>
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
#
# You should have rece... | 24.865672 | 78 | 0.655462 | #!/usr/bin/env python3
#
# Written in 2016 by Calvin Ardi <calvin@isi.edu>
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
#
# You should have rece... | 0 | 0 | 0 |
b49fa7e2bb38a1cf88dd66da0115311861eadda9 | 6,341 | py | Python | pyibisami/tools/ami_generator.py | jdpatt/PyAMI | 82b4912496b7c5ca89b20974a5e93eddb2c519de | [
"BSD-2-Clause"
] | null | null | null | pyibisami/tools/ami_generator.py | jdpatt/PyAMI | 82b4912496b7c5ca89b20974a5e93eddb2c519de | [
"BSD-2-Clause"
] | 1 | 2019-03-20T01:33:20.000Z | 2019-04-12T00:22:02.000Z | pyibisami/tools/ami_generator.py | jdpatt/PyAMI | 82b4912496b7c5ca89b20974a5e93eddb2c519de | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python
"""
IBIS-AMI model source code, AMI file, and IBIS file configuration utility.
Original author: David Banas
Original date: February 26, 2016
This script gets called from a makefile, when any of the following need rebuilding:
* a C++ source code file
* a ``*.AMI`` file
* a ``*.IBS`` file
A... | 36.234286 | 115 | 0.565211 | #! /usr/bin/env python
"""
IBIS-AMI model source code, AMI file, and IBIS file configuration utility.
Original author: David Banas
Original date: February 26, 2016
This script gets called from a makefile, when any of the following need rebuilding:
* a C++ source code file
* a ``*.AMI`` file
* a ``*.IBS`` file
A... | 0 | 0 | 0 |
7fca02acbdaee874a9f10b153ace0e59eaf7cad1 | 1,272 | py | Python | namematcher/name.py | sansbacon/namematcher | 0f6c3327784d3db5be0f59853d11604fd802a7a0 | [
"MIT"
] | 1 | 2019-05-01T04:47:29.000Z | 2019-05-01T04:47:29.000Z | namematcher/name.py | sansbacon/playermatcher | 0f6c3327784d3db5be0f59853d11604fd802a7a0 | [
"MIT"
] | null | null | null | namematcher/name.py | sansbacon/playermatcher | 0f6c3327784d3db5be0f59853d11604fd802a7a0 | [
"MIT"
] | null | null | null | '''
name.py
Common name functions
'''
import logging
from nameparser import HumanName
logging.getLogger(__name__).addHandler(logging.NullHandler())
def first_last(name):
'''
Returns name in First Last format
Args:
name(str)
Returns:
str
'''
hn = HumanName(name)
return... | 15.512195 | 68 | 0.543239 | '''
name.py
Common name functions
'''
import logging
from nameparser import HumanName
logging.getLogger(__name__).addHandler(logging.NullHandler())
def first_last(name):
'''
Returns name in First Last format
Args:
name(str)
Returns:
str
'''
hn = HumanName(name)
return... | 0 | 0 | 0 |
29822bb68190a23a133bc28ddc7ced8fd2e1380e | 1,175 | py | Python | setup.py | niall-twomey/recommender_metrics | a195ffbfdfb261bb973479a58123c0cc9ae2ae4c | [
"MIT"
] | 1 | 2021-05-19T18:10:23.000Z | 2021-05-19T18:10:23.000Z | setup.py | niall-twomey/recommender_metrics | a195ffbfdfb261bb973479a58123c0cc9ae2ae4c | [
"MIT"
] | null | null | null | setup.py | niall-twomey/recommender_metrics | a195ffbfdfb261bb973479a58123c0cc9ae2ae4c | [
"MIT"
] | null | null | null | from distutils.util import convert_path
import setuptools
# Load the readme
with open("README.md", "r") as fh:
long_description = fh.read()
# Load the version info
version_namespace = {}
ver_path = convert_path("recommender_metrics/version.py")
with open(ver_path) as ver_file:
exec(ver_file.read(), version_n... | 31.756757 | 69 | 0.704681 | from distutils.util import convert_path
import setuptools
# Load the readme
with open("README.md", "r") as fh:
long_description = fh.read()
# Load the version info
version_namespace = {}
ver_path = convert_path("recommender_metrics/version.py")
with open(ver_path) as ver_file:
exec(ver_file.read(), version_n... | 0 | 0 | 0 |
bc2a45af624278e403bb3fb45fea1f5191ff6ddc | 5,417 | py | Python | renormalizer/spectra/finitet.py | liwt31/Renormalizer | 123a9d53f4f5f32c0088c255475f0ee60d02c745 | [
"Apache-2.0"
] | null | null | null | renormalizer/spectra/finitet.py | liwt31/Renormalizer | 123a9d53f4f5f32c0088c255475f0ee60d02c745 | [
"Apache-2.0"
] | null | null | null | renormalizer/spectra/finitet.py | liwt31/Renormalizer | 123a9d53f4f5f32c0088c255475f0ee60d02c745 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: Jiajun Ren <jiajunren0522@gmail.com>
import numpy as np
from renormalizer.mps import Mpo, MpDm, ThermalProp
from renormalizer.spectra.base import SpectraTdMpsJobBase
from renormalizer.mps.mps import BraKetPair
from renormalizer.utils import CompressConfig, EvolveConfig
import os
impo... | 35.874172 | 115 | 0.634484 | # -*- coding: utf-8 -*-
# Author: Jiajun Ren <jiajunren0522@gmail.com>
import numpy as np
from renormalizer.mps import Mpo, MpDm, ThermalProp
from renormalizer.spectra.base import SpectraTdMpsJobBase
from renormalizer.mps.mps import BraKetPair
from renormalizer.utils import CompressConfig, EvolveConfig
import os
impo... | 4,655 | 295 | 95 |
5674fd5c9728b9f954621893c6f14f5e32ddb63a | 1,969 | py | Python | quakenet/data_io.py | AfricaMachineIntelligence/ConvNetQuake | 6fea487ce0031d31cc64ad14f9ffc6a0b088a723 | [
"MIT"
] | 162 | 2017-02-10T20:13:57.000Z | 2022-03-06T12:50:50.000Z | quakenet/data_io.py | VioletaSeo/ConvNetQuake | 9d8bb6d41e5e3185edf3a3fc716539b910e17cfe | [
"MIT"
] | 15 | 2017-05-25T03:58:35.000Z | 2020-03-12T18:39:10.000Z | quakenet/data_io.py | VioletaSeo/ConvNetQuake | 9d8bb6d41e5e3185edf3a3fc716539b910e17cfe | [
"MIT"
] | 108 | 2017-05-25T03:19:51.000Z | 2022-03-18T02:07:09.000Z | """Handle the raw data input/output and interface with external formats."""
from obspy.core import read
from obspy.core.utcdatetime import UTCDateTime
import pandas as pd
import datetime as dt
def load_stream(path):
"""Loads a Stream object from the file at path.
Args:
path: path to the input file, ... | 28.536232 | 103 | 0.670391 | """Handle the raw data input/output and interface with external formats."""
from obspy.core import read
from obspy.core.utcdatetime import UTCDateTime
import pandas as pd
import datetime as dt
def load_stream(path):
"""Loads a Stream object from the file at path.
Args:
path: path to the input file, ... | 607 | 0 | 69 |
b9b359d27fc50e548e1458ba61b0b764c0deece5 | 1,350 | py | Python | datastructures/trees/binary_search_tree/bst_iterator.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | datastructures/trees/binary_search_tree/bst_iterator.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | datastructures/trees/binary_search_tree/bst_iterator.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | from datastructures.stacks import Stack
from datastructures.trees.binary_tree_node import BinaryTreeNode
| 34.615385 | 108 | 0.663704 | from datastructures.stacks import Stack
from datastructures.trees.binary_tree_node import BinaryTreeNode
class BinarySearchTreeIterator:
def __init__(self, root: BinaryTreeNode):
self.root = root
self.stack = Stack()
self.__leftmost_inorder(root)
def __leftmost_inorder(self, root: B... | 277 | 944 | 23 |
4d451e2d20fe2b297765f47c0f6c62e2ecc3467e | 4,987 | py | Python | tests/test_git.py | ChristopherMacGown/roundabout | b2222bb1aa98a1c39c26928dbcd9f1be114d02e4 | [
"Apache-2.0"
] | 3 | 2016-08-09T21:26:06.000Z | 2018-04-23T15:11:56.000Z | tests/test_git.py | ChristopherMacGown/roundabout | b2222bb1aa98a1c39c26928dbcd9f1be114d02e4 | [
"Apache-2.0"
] | 1 | 2020-10-23T20:49:22.000Z | 2020-10-23T20:49:22.000Z | tests/test_git.py | ChristopherMacGown/roundabout | b2222bb1aa98a1c39c26928dbcd9f1be114d02e4 | [
"Apache-2.0"
] | null | null | null | import os
import git
import time
import unittest
from roundabout.config import Config
from roundabout.git_client import Git, GitException
from tests import utils
| 35.119718 | 92 | 0.630038 | import os
import git
import time
import unittest
from roundabout.config import Config
from roundabout.git_client import Git, GitException
from tests import utils
def create_test_repo():
repo_path = utils.testdata('test_repo')
if not os.path.exists(repo_path):
repo = git.Repo.init(repo_path, mkdir=Tru... | 4,411 | 15 | 396 |
96b0b2385f546a67ce430aec7c5a1b3251ee87e9 | 277 | py | Python | c__84.py | fhansmann/coding-challenges | eebb37565c72e05b77383c24e8273a1e4019b58e | [
"MIT"
] | null | null | null | c__84.py | fhansmann/coding-challenges | eebb37565c72e05b77383c24e8273a1e4019b58e | [
"MIT"
] | null | null | null | c__84.py | fhansmann/coding-challenges | eebb37565c72e05b77383c24e8273a1e4019b58e | [
"MIT"
] | null | null | null | subjects=["I", "You"]
verbs=["Play", "Love"]
objects=["Hockey","Football"]
for i in range(len(subjects)):
for j in range(len(verbs)):
for k in range(len(objects)):
sentence = "%s %s %s." % (subjects[i], verbs[j], objects[k])
print(sentence)
| 30.777778 | 72 | 0.559567 | subjects=["I", "You"]
verbs=["Play", "Love"]
objects=["Hockey","Football"]
for i in range(len(subjects)):
for j in range(len(verbs)):
for k in range(len(objects)):
sentence = "%s %s %s." % (subjects[i], verbs[j], objects[k])
print(sentence)
| 0 | 0 | 0 |
444d27edb84e0134aecd2dd93a8734c3940cff4b | 26 | py | Python | compose/__init__.py | pareshmg/compose | cba758361499d74ef26bf281b73206e6dc12b5c9 | [
"Apache-2.0"
] | 2 | 2020-12-08T21:11:58.000Z | 2021-02-19T11:59:47.000Z | compose/__init__.py | pareshmg/compose | cba758361499d74ef26bf281b73206e6dc12b5c9 | [
"Apache-2.0"
] | 20 | 2020-09-07T16:12:31.000Z | 2022-03-29T22:05:14.000Z | compose/__init__.py | pareshmg/compose | cba758361499d74ef26bf281b73206e6dc12b5c9 | [
"Apache-2.0"
] | 1 | 2019-06-11T15:42:28.000Z | 2019-06-11T15:42:28.000Z | __version__ = '1.28.0dev'
| 13 | 25 | 0.692308 | __version__ = '1.28.0dev'
| 0 | 0 | 0 |
e59a74324e1f816e6c8f796417e7e26135c6bb8d | 6,746 | py | Python | examples/Python/XdmfExampleMap.py | scottwedge/xdmf | f41196c966997a20f60525a3d2083490a63626a3 | [
"BSD-3-Clause"
] | 4 | 2015-12-07T08:11:06.000Z | 2020-06-15T01:39:07.000Z | examples/Python/XdmfExampleMap.py | scottwedge/xdmf | f41196c966997a20f60525a3d2083490a63626a3 | [
"BSD-3-Clause"
] | 1 | 2020-04-26T16:50:37.000Z | 2020-04-26T16:50:37.000Z | examples/Python/XdmfExampleMap.py | scottwedge/xdmf | f41196c966997a20f60525a3d2083490a63626a3 | [
"BSD-3-Clause"
] | 4 | 2016-04-04T20:54:31.000Z | 2020-06-15T01:39:08.000Z | from Xdmf import *
if __name__ == "__main__":
#//initialization begin
exampleMap = XdmfMap.New()
#//initialization end
#//initializationnode begin
#create attributes for each task id
#the index of the node id in the attribute is the local node id
map1Attribu... | 32.747573 | 121 | 0.581085 | from Xdmf import *
if __name__ == "__main__":
#//initialization begin
exampleMap = XdmfMap.New()
#//initialization end
#//initializationnode begin
#create attributes for each task id
#the index of the node id in the attribute is the local node id
map1Attribu... | 0 | 0 | 0 |
6996451be4ca13631306c9b573c5f22692758516 | 68 | py | Python | examples/python/gpss/gpss_server.py | xueyubingsen/grpc | b156ebaa24a015402f588b235b79112dc230f6dd | [
"Apache-2.0"
] | null | null | null | examples/python/gpss/gpss_server.py | xueyubingsen/grpc | b156ebaa24a015402f588b235b79112dc230f6dd | [
"Apache-2.0"
] | null | null | null | examples/python/gpss/gpss_server.py | xueyubingsen/grpc | b156ebaa24a015402f588b235b79112dc230f6dd | [
"Apache-2.0"
] | null | null | null | import gpss_pb2_grpc
| 13.6 | 39 | 0.823529 | import gpss_pb2_grpc
class Gpss(gpss_pb2_grpc.GpssServicer):
def
| 0 | 24 | 23 |
2d6fb01b6e6bd5b2b3104188d493377d8ad5da52 | 1,203 | py | Python | functions/shared.py | Lynxtickler/rest-api-terraform | d8b8125de80228a4bee2d8ad4ff7593b77eff121 | [
"MIT"
] | null | null | null | functions/shared.py | Lynxtickler/rest-api-terraform | d8b8125de80228a4bee2d8ad4ff7593b77eff121 | [
"MIT"
] | 4 | 2021-10-16T06:37:28.000Z | 2022-01-05T19:49:44.000Z | functions/shared.py | Lynxtickler/rest-api-terraform | d8b8125de80228a4bee2d8ad4ff7593b77eff121 | [
"MIT"
] | 1 | 2021-11-22T14:24:17.000Z | 2021-11-22T14:24:17.000Z | import json
import traceback
import boto3
from boto3.dynamodb.conditions import Attr
TABLE_NAME = 'Quotes'
DAILY_RESOURCE_NAME = 'daily'
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table(TABLE_NAME)
| 27.340909 | 81 | 0.677473 | import json
import traceback
import boto3
from boto3.dynamodb.conditions import Attr
TABLE_NAME = 'Quotes'
DAILY_RESOURCE_NAME = 'daily'
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table(TABLE_NAME)
def response(code=200, headers=None, body='', encode=False):
if not headers:
headers = {'Conte... | 895 | 0 | 92 |
2647696ce205cc1642aeaa417b1a7a5955aaec8e | 4,474 | py | Python | Carteira.py | racoba/AppCarteiraPY | a95749ccbf453b40ecaccedba090b78a922cddc5 | [
"MIT"
] | null | null | null | Carteira.py | racoba/AppCarteiraPY | a95749ccbf453b40ecaccedba090b78a922cddc5 | [
"MIT"
] | null | null | null | Carteira.py | racoba/AppCarteiraPY | a95749ccbf453b40ecaccedba090b78a922cddc5 | [
"MIT"
] | null | null | null | import numpy as np;
import pandas as pd
import matplotlib.pyplot as plt;
from pandas_datareader import data as web
import yfinance as yf
yf.pdr_override()
import os
import dadosCart as c
somaPal=0
somaEu=0
rentTotal=0
decisao=1
while decisao!=5:
os.system('cls')
decisao = int(input('Digite o que você deseja... | 38.568966 | 268 | 0.524139 | import numpy as np;
import pandas as pd
import matplotlib.pyplot as plt;
from pandas_datareader import data as web
import yfinance as yf
yf.pdr_override()
import os
import dadosCart as c
somaPal=0
somaEu=0
rentTotal=0
decisao=1
while decisao!=5:
os.system('cls')
decisao = int(input('Digite o que você deseja... | 0 | 0 | 0 |
5cd05fd5f965eaf7a1a4a0b1f9bcc7674c613cb6 | 136 | py | Python | Ago-Dic-2019/JOSE ONOFRE/PRACTICAS/Practica1/Names.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2019/JOSE ONOFRE/PRACTICAS/Practica1/Names.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2019/JOSE ONOFRE/PRACTICAS/Practica1/Names.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | names = ['Juan','Pedro','Alejandro','Roberto','Enrique']
print(names[0])
print(names[1])
print(names[2])
print(names[3])
print(names[4]) | 22.666667 | 56 | 0.676471 | names = ['Juan','Pedro','Alejandro','Roberto','Enrique']
print(names[0])
print(names[1])
print(names[2])
print(names[3])
print(names[4]) | 0 | 0 | 0 |