hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9fe479013ce3a3988212e8d4b844733583d369d5 | 1,788 | py | Python | main.py | miamagana/RSE_Oauth | a716acc3d59f6e84cc74ec15f2d15e90e60fd757 | [
"MIT"
] | null | null | null | main.py | miamagana/RSE_Oauth | a716acc3d59f6e84cc74ec15f2d15e90e60fd757 | [
"MIT"
] | null | null | null | main.py | miamagana/RSE_Oauth | a716acc3d59f6e84cc74ec15f2d15e90e60fd757 | [
"MIT"
] | null | null | null | import json
from fastapi import FastAPI
from starlette.config import Config
from fastapi.requests import Request
from fastapi.responses import HTMLResponse, RedirectResponse
from starlette.middleware.sessions import SessionMiddleware
from authlib.integrations.starlette_client import OAuth, OAuthError
from fastapi.stati... | 34.384615 | 92 | 0.738255 |
659bee9bd6ddee546f4bf07747a30950e6a7b641 | 62,187 | py | Python | sympy/core/evalf.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | 1 | 2021-11-19T03:38:42.000Z | 2021-11-19T03:38:42.000Z | sympy/core/evalf.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | null | null | null | sympy/core/evalf.py | yupbank/sympy | 66d7aef9dc1b26055af22e27ba42004c40b95d7c | [
"BSD-3-Clause"
] | null | null | null | """
Adaptive numerical evaluation of SymPy expressions, using mpmath
for mathematical functions.
"""
from typing import Tuple as tTuple, Optional, Union as tUnion, Callable, List, Dict as tDict, Type, TYPE_CHECKING, \
Any, overload
import math
import mpmath.libmp as libmp
from mpmath import (
make_mpc, make_... | 34.281698 | 116 | 0.565182 |
bca5054501923ea57405977120a1f956ccb8f56f | 1,539 | py | Python | code/Scripts/preprocess.py | Parth27/Lin | dd089a87a95d28ed8b8169b7b5554dc063a88f64 | [
"MIT"
] | 2 | 2020-12-02T11:43:02.000Z | 2021-01-17T15:47:45.000Z | code/Scripts/preprocess.py | Parth27/Lin | dd089a87a95d28ed8b8169b7b5554dc063a88f64 | [
"MIT"
] | 9 | 2020-10-15T23:15:51.000Z | 2021-01-16T05:35:52.000Z | code/Scripts/preprocess.py | Parth27/Lin | dd089a87a95d28ed8b8169b7b5554dc063a88f64 | [
"MIT"
] | 1 | 2021-01-17T15:48:13.000Z | 2021-01-17T15:48:13.000Z | import os
import pickle
import random
import re
import warnings
import numpy as np
import pandas as pd
import stanfordnlp
# Preprocess data
def preprocess(data):
contractions = {}
data['Sentence'] = data['Sentence'].astype(str)
# List of contractions from Wikipedia
with open('/home/parth/Lin/config/Co... | 31.408163 | 82 | 0.603639 |
ca5cc823049c5fc3c81a995763ef8e51d95368ca | 859 | py | Python | barbican/tests/utils.py | stanzikratel/barbican-2 | 10fae57c1cae3e140c19069a48f562d62ca53663 | [
"Apache-2.0"
] | null | null | null | barbican/tests/utils.py | stanzikratel/barbican-2 | 10fae57c1cae3e140c19069a48f562d62ca53663 | [
"Apache-2.0"
] | null | null | null | barbican/tests/utils.py | stanzikratel/barbican-2 | 10fae57c1cae3e140c19069a48f562d62ca53663 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013-2014 Rackspace, 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 33.038462 | 69 | 0.72759 |
3c7c2e4ba4f7ea824e71779f096790d09e06bee2 | 4,760 | py | Python | ichnaea/models/station.py | crankycoder/ichnaea | fb54000e92c605843b7a41521e36fd648c11ae94 | [
"Apache-2.0"
] | 1 | 2018-01-18T16:02:43.000Z | 2018-01-18T16:02:43.000Z | ichnaea/models/station.py | crankycoder/ichnaea | fb54000e92c605843b7a41521e36fd648c11ae94 | [
"Apache-2.0"
] | null | null | null | ichnaea/models/station.py | crankycoder/ichnaea | fb54000e92c605843b7a41521e36fd648c11ae94 | [
"Apache-2.0"
] | 1 | 2018-01-19T17:56:48.000Z | 2018-01-19T17:56:48.000Z | import colander
from sqlalchemy import (
Column,
Date,
String,
)
from sqlalchemy.dialects.mysql import (
DOUBLE as Double,
INTEGER as Integer,
TINYINT as TinyInteger,
)
from ichnaea.models.base import CreationMixin
from ichnaea.models import constants
from ichnaea.models.constants import TEMPOR... | 31.523179 | 71 | 0.690546 |
d0f615849f34dd50cbb21a45daa904b1834ca719 | 2,216 | py | Python | src/containerapp/setup.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | null | null | null | src/containerapp/setup.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | null | null | null | src/containerapp/setup.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 34.092308 | 94 | 0.642148 |
f73fa0079d5e7b4d943b50a571bcacca8bb0bb54 | 2,558 | py | Python | tests/test_algolia.py | Kinto/kinto-algolia | f7bfdf795dc2073a69b7c31df1e650e2b51d05d7 | [
"Apache-2.0"
] | null | null | null | tests/test_algolia.py | Kinto/kinto-algolia | f7bfdf795dc2073a69b7c31df1e650e2b51d05d7 | [
"Apache-2.0"
] | 35 | 2018-04-11T15:14:42.000Z | 2021-06-25T15:18:04.000Z | tests/test_algolia.py | Kinto/kinto-algolia | f7bfdf795dc2073a69b7c31df1e650e2b51d05d7 | [
"Apache-2.0"
] | null | null | null | import unittest
from unittest import mock
from algoliasearch.exceptions import AlgoliaException
from . import BaseWebTest
class RecordIndexing(BaseWebTest, unittest.TestCase):
def setUp(self):
self.app.put("/buckets/bid", headers=self.headers)
self.app.put("/buckets/bid/collections/cid", header... | 41.258065 | 82 | 0.582095 |
b2a18b8ed6166fef2d473aedddb5baa372d00894 | 13,039 | py | Python | snakemake/persistence.py | CIMAC-CIDC/cidc-snakemake | 3a44501c5fbf1428f42ff6a47e6bc5fa7b369cf8 | [
"MIT"
] | null | null | null | snakemake/persistence.py | CIMAC-CIDC/cidc-snakemake | 3a44501c5fbf1428f42ff6a47e6bc5fa7b369cf8 | [
"MIT"
] | null | null | null | snakemake/persistence.py | CIMAC-CIDC/cidc-snakemake | 3a44501c5fbf1428f42ff6a47e6bc5fa7b369cf8 | [
"MIT"
] | null | null | null | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2015, Johannes Köster"
__email__ = "koester@jimmy.harvard.edu"
__license__ = "MIT"
import os
import shutil
import signal
import marshal
import pickle
import json
import time
from base64 import urlsafe_b64encode, b64encode
from functools import lru_cache, partia... | 34.586207 | 134 | 0.587085 |
164eeb53b71d458b39874c645649e76e7867eb21 | 13,266 | py | Python | deeplio/models/tester.py | rginjapan/DeepLIO | 00ba27b9173b55d415a977f4d4d3c07f26c43c79 | [
"Apache-2.0"
] | 43 | 2020-07-16T18:23:56.000Z | 2022-03-03T21:30:58.000Z | deeplio/models/tester.py | rginjapan/DeepLIO | 00ba27b9173b55d415a977f4d4d3c07f26c43c79 | [
"Apache-2.0"
] | 18 | 2020-06-16T13:13:32.000Z | 2022-03-17T11:08:01.000Z | deeplio/models/tester.py | rginjapan/DeepLIO | 00ba27b9173b55d415a977f4d4d3c07f26c43c79 | [
"Apache-2.0"
] | 10 | 2020-04-14T14:06:19.000Z | 2021-11-16T08:08:37.000Z | import time
import yaml
from pathlib import Path
import matplotlib
import numpy as np
import yaml
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import torch
import torch.utils.data
from torch.utils import tensorboard
from liegroups.torch import SO3
from deeplio import datasets as ds
from deeplio.common im... | 40.693252 | 143 | 0.550882 |
570e9e2dada92a0e4615eb6a7bdb2c0c16b96036 | 11,311 | py | Python | src/webhook_app.py | vbrik/topology | de07dab847f35e6ea5e1ddc043a768c478d8e36a | [
"Apache-2.0"
] | null | null | null | src/webhook_app.py | vbrik/topology | de07dab847f35e6ea5e1ddc043a768c478d8e36a | [
"Apache-2.0"
] | null | null | null | src/webhook_app.py | vbrik/topology | de07dab847f35e6ea5e1ddc043a768c478d8e36a | [
"Apache-2.0"
] | null | null | null | """
Application File
"""
import flask
import flask.logging
from flask import Flask, Response, request
import glob
import hmac
import logging
import os
import re
import subprocess
from subprocess import PIPE
import sys
from webapp import default_config
from webapp import webhook_status_messages
from webapp.common i... | 39.968198 | 79 | 0.658474 |
b9618316567ff2fb59767d6576eab229e6b835f1 | 1,476 | py | Python | ViewProgressScreen.py | noooway/exj | 4f9adf2e340c0e215f5138a848cddba6567725a9 | [
"MIT"
] | 1 | 2020-04-15T21:42:42.000Z | 2020-04-15T21:42:42.000Z | ViewProgressScreen.py | noooway/exj | 4f9adf2e340c0e215f5138a848cddba6567725a9 | [
"MIT"
] | null | null | null | ViewProgressScreen.py | noooway/exj | 4f9adf2e340c0e215f5138a848cddba6567725a9 | [
"MIT"
] | null | null | null | from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
class ViewProgressScreen( Screen ):
def __init__( self, **kwargs ):
super( ViewProgressScreen, self ).__init__( **kw... | 41 | 69 | 0.676829 |
2ab88e4f0bf7f9d25c837b2c16aae7b06df05b86 | 20,377 | py | Python | Plot.ly/2_Plotly_Dataset.py | kadulemos/Data-Science---Python | e54a82e0aaf4a2e784c7641a833c7ba290eac6ef | [
"MIT"
] | null | null | null | Plot.ly/2_Plotly_Dataset.py | kadulemos/Data-Science---Python | e54a82e0aaf4a2e784c7641a833c7ba290eac6ef | [
"MIT"
] | null | null | null | Plot.ly/2_Plotly_Dataset.py | kadulemos/Data-Science---Python | e54a82e0aaf4a2e784c7641a833c7ba290eac6ef | [
"MIT"
] | null | null | null | # To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %% [markdown]
# <h2>Visualização de dados Reais<h2>
# %%
import pandas as pd
import numpy as np
# %%
# Importando Cufflinks
import cufflinks as cf
from plotly.offline import plot, iplot
# %%
# Ativando o modo Offline
cf.go_offl... | 26.77661 | 106 | 0.565343 |
5ac29df5206149e779d17bbf7b778aa637e9cc64 | 3,322 | py | Python | huaweicloud-sdk-bms/huaweicloudsdkbms/v1/model/entitie.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-bms/huaweicloudsdkbms/v1/model/entitie.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-bms/huaweicloudsdkbms/v1/model/entitie.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class Entitie:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json ke... | 24.072464 | 74 | 0.528898 |
0de50dc5bd58cb1e959ee356f74db8b444c32ed5 | 122,668 | py | Python | source/globalCommands.py | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | 1 | 2018-11-16T10:15:59.000Z | 2018-11-16T10:15:59.000Z | source/globalCommands.py | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | null | null | null | source/globalCommands.py | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | null | null | null | # -*- coding: UTF-8 -*-
#globalCommands.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer... | 51.75865 | 314 | 0.775133 |
e2483a8b0a3d1abe959d5dd19474d0f4075a9fdb | 6,001 | py | Python | salt/modules/win_wusa.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | salt/modules/win_wusa.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 1 | 2017-07-10T21:44:39.000Z | 2017-07-10T21:44:39.000Z | salt/modules/win_wusa.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | """
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
.. versionadded:: 2018.3.4
"""
import logging
import os
import salt.utils.platform
from salt.exceptions import CommandExecutionError
log = logging.getLogger(__name__)
# Define t... | 25.53617 | 99 | 0.609065 |
61066d1026c56d3b84113d89f84492c483078156 | 4,193 | py | Python | Phase2/.ipynb_checkpoints/rp_augment_main-checkpoint.py | nasim-alamdari/Personalization-of-HA-Compression-by-HITL-Reinforcement-Learning | dac1fda1c5d8fee0f7cee3f5a8a937cbad0c442a | [
"MIT"
] | 6 | 2021-09-27T19:58:33.000Z | 2022-01-27T01:11:37.000Z | Phase2/.ipynb_checkpoints/rp_augment_main-checkpoint.py | nasim-alamdari/Personalization-of-HA-Compression-by-HITL-Reinforcement-Learning | dac1fda1c5d8fee0f7cee3f5a8a937cbad0c442a | [
"MIT"
] | null | null | null | Phase2/.ipynb_checkpoints/rp_augment_main-checkpoint.py | nasim-alamdari/Personalization-of-HA-Compression-by-HITL-Reinforcement-Learning | dac1fda1c5d8fee0f7cee3f5a8a937cbad0c442a | [
"MIT"
] | 1 | 2021-12-21T00:12:57.000Z | 2021-12-21T00:12:57.000Z | #==========================================
# Data Augmentation main
# Author: Nasim Alamdari
# Date: Dec. 2020
#==========================================
import os, glob
import numpy as np
import librosa
import librosa.display
import math
import random
from random import randint
import matplotlib
matplotlib.use('... | 43.226804 | 142 | 0.705461 |
ff805ea6b439eb285251aa4f7019a300d5297300 | 336 | py | Python | bluebottle/slides/migrations/0003_merge_20170118_1533.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 10 | 2015-05-28T18:26:40.000Z | 2021-09-06T10:07:03.000Z | bluebottle/slides/migrations/0003_merge_20170118_1533.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 762 | 2015-01-15T10:00:59.000Z | 2022-03-31T15:35:14.000Z | bluebottle/slides/migrations/0003_merge_20170118_1533.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 9 | 2015-02-20T13:19:30.000Z | 2022-03-08T14:09:17.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-01-18 14:33
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('slides', '0002_auto_20161115_1601'),
('slides', '0002_auto_20161109_1024'),
]
opera... | 19.764706 | 48 | 0.660714 |
b35f7823e95114ba611122a537baec05f2bb6cfc | 835 | py | Python | datatables/views.py | thinkAmi/danborary | c875b4b479ae0fd5e676a6aae823988a76f09a11 | [
"MIT"
] | 3 | 2020-12-28T02:59:32.000Z | 2021-08-30T07:34:41.000Z | datatables/views.py | thinkAmi/danborary | c875b4b479ae0fd5e676a6aae823988a76f09a11 | [
"MIT"
] | null | null | null | datatables/views.py | thinkAmi/danborary | c875b4b479ae0fd5e676a6aae823988a76f09a11 | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
from django_datatables_view.base_datatable_view import BaseDatatableView
from api.models import Book
class BookDataTableView(BaseDatatableView):
model = Book
columns = [
'id',
'ndl__isbn',
'title',
'ndl__volume',
... | 23.194444 | 72 | 0.608383 |
990a737f92e9eb60a6b4610c6da72ef31248988c | 88,268 | py | Python | tools/otci/otci/otci.py | rednodelabs/openthread | 6e88d170bb7567d5e9638168e597f602ff3b6046 | [
"BSD-3-Clause"
] | null | null | null | tools/otci/otci/otci.py | rednodelabs/openthread | 6e88d170bb7567d5e9638168e597f602ff3b6046 | [
"BSD-3-Clause"
] | null | null | null | tools/otci/otci/otci.py | rednodelabs/openthread | 6e88d170bb7567d5e9638168e597f602ff3b6046 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2020, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 36.763015 | 208 | 0.598779 |
b4b2cafaed79c0eb0eb4ea45062324179a6d4c5f | 1,075 | py | Python | UnityPy/enums/Audio.py | hydrargyrum/UnityPy | d119f5a27fa56270630ff40d7762cdf9b4abbac3 | [
"MIT"
] | null | null | null | UnityPy/enums/Audio.py | hydrargyrum/UnityPy | d119f5a27fa56270630ff40d7762cdf9b4abbac3 | [
"MIT"
] | null | null | null | UnityPy/enums/Audio.py | hydrargyrum/UnityPy | d119f5a27fa56270630ff40d7762cdf9b4abbac3 | [
"MIT"
] | null | null | null | from enum import IntEnum
class AudioType(IntEnum):
UNKNOWN = 0,
ACC = 1,
AIFF = 2,
IT = 10,
MOD = 12,
MPEG = 13,
OGGVORBIS = 14,
S3M = 17,
WAV = 20,
XM = 21,
XMA = 22,
VAG = 23,
AUDIOQUEUE = 24
class AudioCompressionFormat(IntEnum):
PCM = 0,
Vorbis = 1,
ADPCM = 2,
MP3 = 3,
VAG = 4,
HEVAG = 5,
XMA... | 18.859649 | 40 | 0.664186 |
796342a07d0949b7d8f2511713b330ee7130d535 | 5,703 | py | Python | main.py | doublestraus/secret-finder | 23babe9329b0cf13c78de9d22af58927575586e2 | [
"Apache-2.0"
] | 2 | 2021-11-10T22:36:31.000Z | 2021-11-12T12:26:34.000Z | main.py | doublestraus/secret-finder | 23babe9329b0cf13c78de9d22af58927575586e2 | [
"Apache-2.0"
] | null | null | null | main.py | doublestraus/secret-finder | 23babe9329b0cf13c78de9d22af58927575586e2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import json
import argparse
import time
import traceback
import sys
import uuid
import parsers.confluence.parser as confluence_parser
import parsers.jira.parser as jira_parser
import parsers.redmine.parser as redmine_parser
from termcolor import colored, cprint
from datetime import datetime
def ge... | 35.42236 | 117 | 0.642644 |
5ba98840d611aded29a7fe8a4d7e973e45c2841b | 549 | py | Python | src/adafruit_blinka/microcontroller/esp8266/pin.py | twa127/Adafruit_Blinka | 560ab1fcabf64b9941ed57a3cfed996b836178fa | [
"MIT"
] | 294 | 2018-06-30T19:08:27.000Z | 2022-03-26T21:08:47.000Z | src/adafruit_blinka/microcontroller/esp8266/pin.py | twa127/Adafruit_Blinka | 560ab1fcabf64b9941ed57a3cfed996b836178fa | [
"MIT"
] | 421 | 2018-06-30T20:54:46.000Z | 2022-03-31T15:08:37.000Z | src/adafruit_blinka/microcontroller/esp8266/pin.py | twa127/Adafruit_Blinka | 560ab1fcabf64b9941ed57a3cfed996b836178fa | [
"MIT"
] | 234 | 2018-07-23T18:49:16.000Z | 2022-03-28T16:59:48.000Z | """ESP8266 pin names"""
from microcontroller import Pin
GPIO0 = Pin(0)
GPIO1 = Pin(1)
GPIO2 = Pin(2)
GPIO3 = Pin(3)
GPIO4 = Pin(4)
GPIO5 = Pin(5)
GPIO12 = Pin(12)
GPIO13 = Pin(13)
GPIO14 = Pin(14)
GPIO15 = Pin(15)
GPIO16 = Pin(16)
TOUT = Pin("TOUT")
# ordered as spiId, sckId, mosiId, misoId
spiPorts = (1, GPIO14, GP... | 18.3 | 79 | 0.648452 |
ef12067fcdc7813c094617ab7a7f194088d30e7d | 14,493 | py | Python | python/ccxt/async_support/__init__.py | pranjaldoshi96/ccxt | 999fc84c2f0397ca4a55ce5af7ea4ab120c0ba73 | [
"MIT"
] | null | null | null | python/ccxt/async_support/__init__.py | pranjaldoshi96/ccxt | 999fc84c2f0397ca4a55ce5af7ea4ab120c0ba73 | [
"MIT"
] | null | null | null | python/ccxt/async_support/__init__.py | pranjaldoshi96/ccxt | 999fc84c2f0397ca4a55ce5af7ea4ab120c0ba73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CCXT: CryptoCurrency eXchange Trading Library (Async)"""
# -----------------------------------------------------------------------------
__version__ = '1.59.75'
# -----------------------------------------------------------------------------
from ccxt.async_support.base.exchange import Ex... | 50.852632 | 86 | 0.558477 |
c816050b4554ac97a73841a81679315335cb752a | 3,345 | py | Python | app/recipe/views.py | peidrao/recipe-api | 085e5f3be282c8d88a9d23e21782c270561f8a60 | [
"MIT"
] | null | null | null | app/recipe/views.py | peidrao/recipe-api | 085e5f3be282c8d88a9d23e21782c270561f8a60 | [
"MIT"
] | null | null | null | app/recipe/views.py | peidrao/recipe-api | 085e5f3be282c8d88a9d23e21782c270561f8a60 | [
"MIT"
] | null | null | null | from rest_framework.decorators import action
from rest_framework.response import Response
from rest_framework import viewsets, mixins, status
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from core.models import Tag, Ingredient, Recipe
from recipe ... | 35.210526 | 77 | 0.67713 |
edefe73dd11125f2fd222da1748c50695f80c6b6 | 1,611 | py | Python | ecl/connectivity/v1/cic.py | keiichi-hikita/eclsdk | c43afb982fd54eb1875cdc22d46044644d804c4a | [
"Apache-2.0"
] | 5 | 2017-04-07T06:23:04.000Z | 2019-11-19T00:52:34.000Z | ecl/connectivity/v1/cic.py | keiichi-hikita/eclsdk | c43afb982fd54eb1875cdc22d46044644d804c4a | [
"Apache-2.0"
] | 16 | 2018-09-12T11:14:40.000Z | 2021-04-19T09:02:44.000Z | ecl/connectivity/v1/cic.py | keiichi-hikita/eclsdk | c43afb982fd54eb1875cdc22d46044644d804c4a | [
"Apache-2.0"
] | 14 | 2017-05-11T14:26:26.000Z | 2021-07-14T14:00:06.000Z | # -*- coding: utf-8 -*-
from ecl import utils
from ecl.connectivity import connectivity_service
from ecl import resource2
class CIC(resource2.Resource):
resource_key = None
resources_key = None
base_path = '/mCICs/%(mcic_id)s/CICs'
service = connectivity_service.ConnectivityService()
# capabili... | 33.5625 | 71 | 0.682185 |
a3aaa968d677b0e860cc85f53ff396133546e8a0 | 9,288 | py | Python | test_frcnn.py | Tovion/frcnn-from-scratch-with-keras | 8503b4fb38f72cb0585b7a32b67ccdde0a2fb2eb | [
"Apache-2.0"
] | 170 | 2018-09-04T18:35:07.000Z | 2022-03-30T10:33:09.000Z | test_frcnn.py | Tovion/frcnn-from-scratch-with-keras | 8503b4fb38f72cb0585b7a32b67ccdde0a2fb2eb | [
"Apache-2.0"
] | 95 | 2018-11-09T16:51:44.000Z | 2022-01-25T08:36:09.000Z | test_frcnn.py | Tovion/frcnn-from-scratch-with-keras | 8503b4fb38f72cb0585b7a32b67ccdde0a2fb2eb | [
"Apache-2.0"
] | 116 | 2018-11-09T16:44:36.000Z | 2022-03-13T08:03:10.000Z | from __future__ import division
import os
import cv2
import numpy as np
import sys
import pickle
from optparse import OptionParser
import time
from keras_frcnn import config
from keras import backend as K
from keras.layers import Input
from keras.models import Model
from keras_frcnn import roi_helpers
from keras.applic... | 32.475524 | 151 | 0.710164 |
d13c375ddc0ff50429628c9bb20fa0e9001ab70b | 244 | py | Python | backend/api.py | mentix02/medialist-backend | 397b1a382b12bab273360dadb0b3c32de43747cd | [
"MIT"
] | 1 | 2019-11-22T19:29:39.000Z | 2019-11-22T19:29:39.000Z | backend/api.py | mentix02/medialist-backend | 397b1a382b12bab273360dadb0b3c32de43747cd | [
"MIT"
] | 1 | 2019-11-25T09:50:07.000Z | 2021-07-15T07:05:28.000Z | backend/api.py | mentix02/medialist-backend | 397b1a382b12bab273360dadb0b3c32de43747cd | [
"MIT"
] | null | null | null | from django.urls import path, include
urlpatterns = (
path('topics/', include('topic.urls')),
path('authors/', include('author.urls')),
path('articles/', include('article.urls')),
path('bookmark/', include('bookmark.urls')),
)
| 27.111111 | 48 | 0.643443 |
52452e0c2f7820416adb63f530dd281e0d7e09e9 | 265 | py | Python | hunter_douglas/hunter_douglas/doctype/interview_evaluation_sheet/interview_evaluation_sheet.py | thispl/hunter_douglas | 40ac85e9fba607ec8a9aa6a472b486f8b24f8600 | [
"MIT"
] | null | null | null | hunter_douglas/hunter_douglas/doctype/interview_evaluation_sheet/interview_evaluation_sheet.py | thispl/hunter_douglas | 40ac85e9fba607ec8a9aa6a472b486f8b24f8600 | [
"MIT"
] | null | null | null | hunter_douglas/hunter_douglas/doctype/interview_evaluation_sheet/interview_evaluation_sheet.py | thispl/hunter_douglas | 40ac85e9fba607ec8a9aa6a472b486f8b24f8600 | [
"MIT"
] | 1 | 2019-12-31T06:52:12.000Z | 2019-12-31T06:52:12.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018, VHRS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class InterviewEvaluationSheet(Document):
pass
| 24.090909 | 49 | 0.788679 |
a4c983cf47d6c5bcf243e3a9a793a1b99475e9b4 | 20,235 | py | Python | cogs/commands/misc/misc.py | DiscordGIR/Bloo | e23172950ebb664cc96d91222b35a90f7d9802c0 | [
"MIT"
] | 34 | 2021-10-30T16:48:28.000Z | 2022-03-25T03:22:12.000Z | cogs/commands/misc/misc.py | DiscordGIR/Bloo | e23172950ebb664cc96d91222b35a90f7d9802c0 | [
"MIT"
] | 9 | 2021-11-19T04:25:29.000Z | 2022-03-09T22:35:46.000Z | cogs/commands/misc/misc.py | DiscordGIR/Bloo | e23172950ebb664cc96d91222b35a90f7d9802c0 | [
"MIT"
] | 20 | 2021-11-05T21:14:59.000Z | 2022-03-30T21:15:40.000Z | import base64
import datetime
import io
import json
import traceback
import aiohttp
import discord
import pytimeparse
from data.services.guild_service import guild_service
from discord.commands import Option, slash_command, message_command, user_command
from discord.ext import commands
from discord.utils import forma... | 42.510504 | 247 | 0.629009 |
65a3bf28c3baf82cfb4fdf2d1aa9ac87b53cb7fb | 5,252 | py | Python | homeassistant/components/daikin/__init__.py | ccatterina/core | 36789cfc310f270bf343676eb94d123e5d0dfa83 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/daikin/__init__.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 45 | 2020-07-23T07:13:34.000Z | 2022-03-31T06:01:55.000Z | homeassistant/components/daikin/__init__.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 2 | 2021-03-17T11:01:07.000Z | 2021-08-19T15:21:32.000Z | """Platform for the Daikin AC."""
import asyncio
from datetime import timedelta
import logging
from aiohttp import ClientConnectionError
from async_timeout import timeout
from pydaikin.daikin_base import Appliance
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeas... | 31.261905 | 83 | 0.651561 |
b71f86f98be80c2bfaaad92b5af410424fd2e4ea | 393 | py | Python | constants.py | vipul-sharma20/compressr | a3818c9dda979013d025be81b70cc8dc6d33edcd | [
"Unlicense",
"MIT"
] | 3 | 2016-04-18T15:21:39.000Z | 2017-02-01T18:46:42.000Z | constants.py | vipul-sharma20/compressr | a3818c9dda979013d025be81b70cc8dc6d33edcd | [
"Unlicense",
"MIT"
] | 7 | 2016-04-16T09:41:21.000Z | 2016-05-15T13:44:10.000Z | constants.py | vipul-sharma20/compressr | a3818c9dda979013d025be81b70cc8dc6d33edcd | [
"Unlicense",
"MIT"
] | null | null | null | """
constants for util and compressr script
"""
REDUCED = 'reduced'
SUFFIX_FLAG = 'suffix_flag'
PREFIX_FLAG = 'prefix_flag'
VOWEL_FLAG = 'vowel_flag'
LENGTH = 'length'
REDUCED_LENGTH = 'reduced_length'
VOWELS = ['a', 'e', 'i', 'o', 'u']
ITEMTYPE = 'itemtype'
HASHTAG = 'hashtag'
URL = 'url'
DEFAULT = 'default'
# Bitl... | 19.65 | 57 | 0.715013 |
d0691e08b87e1153c3936c0687b2318fcd1ac3d2 | 879 | py | Python | hallo/server_factory.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2022-01-27T13:25:01.000Z | 2022-01-27T13:25:01.000Z | hallo/server_factory.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/server_factory.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from hallo.server import Server
from hallo.server_irc import ServerIRC
from hallo.server_telegram import ServerTelegram
class ServerFactory:
"""
Server factory, makes servers.
Basically looks at xml, finds server type, and passes to appropriate Server object constructor
"""
def __init__(self, hal... | 31.392857 | 98 | 0.671217 |
0602d76d5d875bd9f245780a4e0bbb6be4ad7824 | 122 | py | Python | app/root_file.py | LukeSamkharadze/wallet-management | c2efeb54676e4fe0901b6980f1ba6e5af5796271 | [
"MIT"
] | null | null | null | app/root_file.py | LukeSamkharadze/wallet-management | c2efeb54676e4fe0901b6980f1ba6e5af5796271 | [
"MIT"
] | null | null | null | app/root_file.py | LukeSamkharadze/wallet-management | c2efeb54676e4fe0901b6980f1ba6e5af5796271 | [
"MIT"
] | null | null | null | # Added for root navigation
import os
def get_app_path() -> str:
return os.path.dirname(os.path.realpath(__file__))
| 17.428571 | 54 | 0.729508 |
e3e2e450eece3aecd8e81bbbd48e590d5e7a18a3 | 44,668 | py | Python | gluoncv/model_zoo/resnet.py | JSoothe/gluon-cv | bca14b75c0e8b6b1cb74447499770e0a337c1f0c | [
"Apache-2.0"
] | 69 | 2021-01-22T18:09:15.000Z | 2022-03-29T09:38:03.000Z | gluoncv/model_zoo/resnet.py | JSoothe/gluon-cv | bca14b75c0e8b6b1cb74447499770e0a337c1f0c | [
"Apache-2.0"
] | 5 | 2019-07-15T11:26:43.000Z | 2020-07-17T18:51:01.000Z | gluoncv/model_zoo/resnet.py | JSoothe/gluon-cv | bca14b75c0e8b6b1cb74447499770e0a337c1f0c | [
"Apache-2.0"
] | 11 | 2019-06-20T01:48:30.000Z | 2021-04-14T09:46:44.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 44.181998 | 99 | 0.649413 |
5d46f39fcc5674c43f9d1a539013777d54366a0d | 4,487 | py | Python | electrum/constants.py | asuka431/electrum-bari | 18ab1950cfc8990133544a4059743db84b87abee | [
"MIT"
] | null | null | null | electrum/constants.py | asuka431/electrum-bari | 18ab1950cfc8990133544a4059743db84b87abee | [
"MIT"
] | null | null | null | electrum/constants.py | asuka431/electrum-bari | 18ab1950cfc8990133544a4059743db84b87abee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Electrum - lightweight Baricoin client
# Copyright (C) 2018 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# includ... | 29.715232 | 82 | 0.676398 |
e7a5e1ec7997495f7cc603b60d21c87d96d2f344 | 1,180 | py | Python | owscapable/waterml/wml11.py | b-cube/OwsCapable | a01815418fe982434503d6542cb18e1ac8989684 | [
"BSD-3-Clause"
] | 1 | 2016-02-01T12:55:13.000Z | 2016-02-01T12:55:13.000Z | owscapable/waterml/wml11.py | b-cube/OwsCapable | a01815418fe982434503d6542cb18e1ac8989684 | [
"BSD-3-Clause"
] | 1 | 2015-06-23T14:07:50.000Z | 2015-06-23T14:07:50.000Z | owscapable/waterml/wml11.py | b-cube/OwsCapable | a01815418fe982434503d6542cb18e1ac8989684 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import (absolute_import, division, print_function)
from owscapable.waterml.wml import SitesResponse, TimeSeriesResponse, VariablesResponse, namespaces
from owscapable.etree import etree
def ns(namespace):
return namespaces.get(namespace)
class WaterML_1_1(object):
def __init__(self, element):... | 33.714286 | 99 | 0.641525 |
aab102efbd45ef46729c02b72a7911b761907fef | 2,494 | py | Python | internal/notes/builtin-SAVE/packages/openssh/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/openssh/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/openssh/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 45.345455 | 92 | 0.694467 |
dbf9f802726f65a67c4b7ba59d92bca001fe6564 | 621 | py | Python | configs/fastfcn/fastfcn_r50-d32_jpu_aspp_512x512_160k_ade20k.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 18 | 2022-03-28T12:36:21.000Z | 2022-03-31T10:47:07.000Z | configs/fastfcn/fastfcn_r50-d32_jpu_aspp_512x512_160k_ade20k.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 2 | 2022-02-25T03:07:23.000Z | 2022-03-08T12:54:05.000Z | configs/fastfcn/fastfcn_r50-d32_jpu_aspp_512x512_160k_ade20k.py | weiyx16/mmsegmentation | 6d35d76195f173fbc6b119a7d7815e67d78024c6 | [
"Apache-2.0"
] | 4 | 2022-03-28T14:19:41.000Z | 2022-03-30T08:06:55.000Z | # model settings
_base_ = './fastfcn_r50-d32_jpu_psp_512x512_160k_ade20k.py'
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
decode_head=dict(
_delete_=True,
type='ASPPHead',
in_channels=2048,
in_index=2,
channels=512,
dilations=(1, 12, 24, 36),
... | 29.571429 | 74 | 0.63285 |
c3a68a4fb6b2cde2cdce6b2afbdcb8c4737e2c98 | 2,583 | py | Python | class/mysql.py | midoks/mw-simdht | 79caba2e3bc704665922d3c1298816c596dcbe04 | [
"MIT"
] | null | null | null | class/mysql.py | midoks/mw-simdht | 79caba2e3bc704665922d3c1298816c596dcbe04 | [
"MIT"
] | null | null | null | class/mysql.py | midoks/mw-simdht | 79caba2e3bc704665922d3c1298816c596dcbe04 | [
"MIT"
] | 1 | 2020-02-26T06:07:26.000Z | 2020-02-26T06:07:26.000Z | # coding: utf-8
import re
import os
import sys
sys.path.append("/usr/local/lib/python2.7/site-packages")
class mysql:
__DB_PASS = None
__DB_USER = 'root'
__DB_PORT = 3306
__DB_HOST = 'localhost'
__DB_NAME = 'test'
__DB_CONN = None
__DB_CUR = None
__DB_ERR = None
... | 28.076087 | 145 | 0.523035 |
024c41ca339c9efd64370c8df53243ac2cc2fc12 | 7,506 | py | Python | app/reports/actions.py | twatchy/cito_engine | a62dce3c76567dd36b7efcaa70e03728b335f44e | [
"Apache-2.0"
] | 9 | 2015-01-19T17:04:08.000Z | 2021-06-05T02:18:23.000Z | app/reports/actions.py | twatchy/cito_engine | a62dce3c76567dd36b7efcaa70e03728b335f44e | [
"Apache-2.0"
] | 28 | 2015-06-17T19:08:48.000Z | 2019-02-08T04:55:36.000Z | app/reports/actions.py | twatchy/cito_engine | a62dce3c76567dd36b7efcaa70e03728b335f44e | [
"Apache-2.0"
] | 13 | 2015-01-19T17:05:03.000Z | 2020-02-20T05:28:14.000Z | """Copyright 2014 Cyrus Dasadia
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | 39.714286 | 112 | 0.668665 |
a467735b58f03b2b1979a5a6e09a0009fab68b7a | 495 | py | Python | json_checker/__init__.py | DKorytkin/JsonChecker | 1a803c3d873db5a1139a55b7efb3b40d9c1b6891 | [
"MIT"
] | 5 | 2017-08-17T11:24:13.000Z | 2017-08-21T09:45:29.000Z | json_checker/__init__.py | DKorytkin/JsonChecker | 1a803c3d873db5a1139a55b7efb3b40d9c1b6891 | [
"MIT"
] | 179 | 2017-09-05T09:18:41.000Z | 2022-03-31T17:20:03.000Z | json_checker/__init__.py | DKorytkin/json_checker | 1a803c3d873db5a1139a55b7efb3b40d9c1b6891 | [
"MIT"
] | null | null | null | from json_checker.app import Checker
from json_checker.core.checkers import And, Or, OptionalKey
from json_checker.core.exceptions import (
CheckerError,
DictCheckerError,
FunctionCheckerError,
ListCheckerError,
MissKeyCheckerError,
TypeCheckerError,
)
__all__ = [
"Checker",
"And",
... | 19.8 | 59 | 0.69899 |
4ac95346840f88ee5d7b7de1569b0b84e719deb8 | 236 | py | Python | py/split.py | jieyaren/hello-world | 9fbc7d117b9aee98d748669646dd200c25a4122f | [
"WTFPL"
] | 3 | 2021-11-12T09:20:21.000Z | 2022-02-18T11:34:33.000Z | py/split.py | jieyaren/hello-world | 9fbc7d117b9aee98d748669646dd200c25a4122f | [
"WTFPL"
] | 1 | 2021-03-08T03:23:04.000Z | 2021-03-08T03:23:04.000Z | py/split.py | jieyaren/hello-world | 9fbc7d117b9aee98d748669646dd200c25a4122f | [
"WTFPL"
] | null | null | null | source='"aaaaa":"bbbbb","content":"blahblah"'
substring_list=source.split(',')
for substr in substring_list:
index = substr.find("content")
if(index is not -1):
print(substr[index:])
else:
print("skip")
| 23.6 | 45 | 0.614407 |
b76c90bc0f448747caae16ecb5c7d20b1791ddad | 5,031 | py | Python | heat/common/messaging.py | hongbin/heat | 1a8495eaa728d36ccff4b0285befb5a02e31b3de | [
"Apache-2.0"
] | null | null | null | heat/common/messaging.py | hongbin/heat | 1a8495eaa728d36ccff4b0285befb5a02e31b3de | [
"Apache-2.0"
] | null | null | null | heat/common/messaging.py | hongbin/heat | 1a8495eaa728d36ccff4b0285befb5a02e31b3de | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 eNovance <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 34.696552 | 79 | 0.676009 |
b3e2d9545a87fe0b78fc4c4cdc826e6026ce9839 | 6,874 | py | Python | backend/src/board/admin.py | baealex/Medium-Clone-in-Django | 1f388ca9d75c05ce3100dfb7ad58ef751c964d19 | [
"MIT"
] | null | null | null | backend/src/board/admin.py | baealex/Medium-Clone-in-Django | 1f388ca9d75c05ce3100dfb7ad58ef751c964d19 | [
"MIT"
] | null | null | null | backend/src/board/admin.py | baealex/Medium-Clone-in-Django | 1f388ca9d75c05ce3100dfb7ad58ef751c964d19 | [
"MIT"
] | null | null | null | from django.contrib import admin
from.models import *
# Register your models here.
@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
list_display = [
'created_date',
'author',
'post',
'text_md'
]
list_filter = ['author']
list_per_page = 30
@admin.register(... | 29.127119 | 94 | 0.653913 |
7ff755e2de6f5532f411ef8917d2bc8bad42bc7f | 697 | py | Python | train.py | jchibane/if-net_texture | 989ffdc9afc0296d92a55a7a1f155c1cc3e6e5e4 | [
"Unlicense"
] | 42 | 2020-09-24T12:28:14.000Z | 2022-03-22T14:37:21.000Z | train.py | jchibane/if-net_texture | 989ffdc9afc0296d92a55a7a1f155c1cc3e6e5e4 | [
"Unlicense"
] | 1 | 2021-05-25T03:03:42.000Z | 2021-05-27T13:11:16.000Z | train.py | jchibane/if-net_texture | 989ffdc9afc0296d92a55a7a1f155c1cc3e6e5e4 | [
"Unlicense"
] | 8 | 2020-10-10T07:56:52.000Z | 2022-02-19T22:42:51.000Z | import models.local_model as model
import models.dataloader as dataloader
from models import training
import argparse
import torch
import config.config_loader as cfg_loader
parser = argparse.ArgumentParser(
description='Train Model'
)
parser.add_argument('config', type=str, help='Path to config file.')
args = par... | 26.807692 | 139 | 0.777618 |
54f6fb77e3f25d3b79e0da0c4d83733977a688f7 | 492 | py | Python | events/mimicon2016/migrations/0002_auto_20160222_2108.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 13 | 2015-11-29T12:19:12.000Z | 2021-02-21T15:42:11.000Z | events/mimicon2016/migrations/0002_auto_20160222_2108.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 23 | 2015-04-29T19:43:34.000Z | 2021-02-10T05:50:17.000Z | events/mimicon2016/migrations/0002_auto_20160222_2108.py | darkismus/kompassi | 35dea2c7af2857a69cae5c5982b48f01ba56da1f | [
"CC-BY-3.0"
] | 11 | 2015-09-20T18:59:00.000Z | 2020-02-07T08:47:34.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-22 19:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mimicon2016', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='signupextra',
... | 23.428571 | 123 | 0.634146 |
617a64616137f8eea9cc4e46f56c578d38b7372f | 11,867 | py | Python | sdk/python/pulumi_azure_native/compute/v20150615/get_virtual_machine.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20150615/get_virtual_machine.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20150615/get_virtual_machine.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 44.781132 | 866 | 0.678436 |
1c97f5c13e27f242da35a6d62fc1ce3f538c3c98 | 1,500 | py | Python | listings/views.py | sistercharmings777/Estate_project | a6c419abfe624b362a63ef77116a437a71b00e2a | [
"MIT"
] | null | null | null | listings/views.py | sistercharmings777/Estate_project | a6c419abfe624b362a63ef77116a437a71b00e2a | [
"MIT"
] | null | null | null | listings/views.py | sistercharmings777/Estate_project | a6c419abfe624b362a63ef77116a437a71b00e2a | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404, render
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from .choices import state_choices, price_choices, bedroom_choices
from .models import Listing
def index(request):
listings = Listing.objects.order_by("-list_date").filter(is_published=... | 27.777778 | 81 | 0.678667 |
7ff4698375dc9cfc35e744a5974b01ee1bf446b3 | 3,509 | py | Python | misc/install-git-hooks.py | juanfra684/Nuitka | 0e276895fadabefb598232f2ccf8cc7736c9a85b | [
"Apache-2.0"
] | 1 | 2020-10-17T12:19:53.000Z | 2020-10-17T12:19:53.000Z | misc/install-git-hooks.py | juanfra684/Nuitka | 0e276895fadabefb598232f2ccf8cc7736c9a85b | [
"Apache-2.0"
] | 1 | 2020-07-11T17:53:56.000Z | 2020-07-11T17:53:56.000Z | misc/install-git-hooks.py | juanfra684/Nuitka | 0e276895fadabefb598232f2ccf8cc7736c9a85b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this fi... | 31.9 | 83 | 0.60929 |
5df1325860ea0bde79e602abf4ef042ae0064ab5 | 13,401 | py | Python | library/inky/inky_uc8159.py | jg76379/inky | 65e03c0e539dec7b53488fcb917ddade97b1ad80 | [
"MIT"
] | null | null | null | library/inky/inky_uc8159.py | jg76379/inky | 65e03c0e539dec7b53488fcb917ddade97b1ad80 | [
"MIT"
] | null | null | null | library/inky/inky_uc8159.py | jg76379/inky | 65e03c0e539dec7b53488fcb917ddade97b1ad80 | [
"MIT"
] | null | null | null | """Inky e-Ink Display Driver."""
import time
import struct
try:
from PIL import Image
except ImportError:
Image = None
from . import eeprom
try:
import numpy
except ImportError:
raise ImportError('This library requires the numpy module\nInstall with: sudo apt install python-numpy')
BLACK = 0
WHITE =... | 31.092807 | 214 | 0.583091 |
5cb95c4136d08eb2705d6b5e6d99ee0d636bca3d | 23,963 | py | Python | tests/test_xsd.py | vascohenriques/python-zeep | bf56414816b4c75f489d8185b9b71423a631b13a | [
"MIT"
] | 1,763 | 2016-02-28T19:28:54.000Z | 2022-03-31T14:51:19.000Z | tests/test_xsd.py | vascohenriques/python-zeep | bf56414816b4c75f489d8185b9b71423a631b13a | [
"MIT"
] | 1,239 | 2016-04-07T06:22:31.000Z | 2022-03-31T13:12:49.000Z | tests/test_xsd.py | vascohenriques/python-zeep | bf56414816b4c75f489d8185b9b71423a631b13a | [
"MIT"
] | 671 | 2016-04-04T16:54:51.000Z | 2022-03-30T09:12:27.000Z | import pytest
from lxml import etree
from tests.utils import assert_nodes_equal, render_node
from zeep import xsd
def test_container_elements():
custom_type = xsd.Element(
etree.QName("http://tests.python-zeep.org/", "authentication"),
xsd.ComplexType(
xsd.Sequence(
[
... | 33.893918 | 117 | 0.372783 |
7f7b2bae75e055252efff07289777321e0d5205c | 4,865 | py | Python | domrand/define_flags.py | ehu-ai/domrand | f1f3b901bd29caa575760335c7cc5d5f4a8cf661 | [
"MIT"
] | 20 | 2018-12-17T16:30:38.000Z | 2022-02-13T11:51:15.000Z | domrand/define_flags.py | ehu-ai/domrand | f1f3b901bd29caa575760335c7cc5d5f4a8cf661 | [
"MIT"
] | 6 | 2019-04-26T13:05:15.000Z | 2022-02-09T23:30:23.000Z | domrand/define_flags.py | ehu-ai/domrand | f1f3b901bd29caa575760335c7cc5d5f4a8cf661 | [
"MIT"
] | 4 | 2018-12-06T11:02:02.000Z | 2020-02-25T09:38:04.000Z | import os
from tensorflow.python.platform import flags
FLAGS = flags.FLAGS
# TODO: add meta-flags that cover several hyperamaters so that we can easily change them all at once instead of setting them individually
# DomRand flags
flags.DEFINE_string('xml', default='xmls/kuka/lbr4_reflex.xml', help='')
flags.DEFINE_boo... | 51.755319 | 258 | 0.735457 |
fc3d5a900fd4eb4a84c5cf255c5d1c6510779ea4 | 138 | py | Python | locale/pot/api/plotting/_autosummary/pyvista-Plotter-add_cursor-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 4 | 2020-08-07T08:19:19.000Z | 2020-12-04T09:51:11.000Z | locale/pot/api/plotting/_autosummary/pyvista-Plotter-add_cursor-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 19 | 2020-08-06T00:24:30.000Z | 2022-03-30T19:22:24.000Z | locale/pot/api/plotting/_autosummary/pyvista-Plotter-add_cursor-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 1 | 2021-03-09T07:50:40.000Z | 2021-03-09T07:50:40.000Z | import pyvista
sphere = pyvista.Sphere()
plotter = pyvista.Plotter()
_ = plotter.add_mesh(sphere)
_ = plotter.add_cursor()
plotter.show()
| 19.714286 | 28 | 0.753623 |
70fe7fa3b62dfe3f2e59cbd6ca8439bdadca371b | 8,696 | py | Python | intersight/model/boot_hdd_device_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/boot_hdd_device_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/boot_hdd_device_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 49.409091 | 1,678 | 0.638224 |
b9be1ae94f6b545d2ce00d4620887ffdf466f472 | 9,620 | py | Python | v0.5/classification_and_detection/python/webservice/service_resnet_coco1200_tf.py | yananYangYSU/inference | 9c0da4023a320aafdb70a1c00ffdaffe95a330a6 | [
"Apache-2.0"
] | 4 | 2019-11-08T01:23:07.000Z | 2019-11-15T07:47:03.000Z | v0.5/classification_and_detection/python/webservice/service_resnet_coco1200_tf.py | yananYangYSU/inference | 9c0da4023a320aafdb70a1c00ffdaffe95a330a6 | [
"Apache-2.0"
] | null | null | null | v0.5/classification_and_detection/python/webservice/service_resnet_coco1200_tf.py | yananYangYSU/inference | 9c0da4023a320aafdb70a1c00ffdaffe95a330a6 | [
"Apache-2.0"
] | null | null | null | """
mlperf inference benchmarking tool
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import os
import time
import numpy as np
from PIL import Image
import dataset
import imagenet
import coco
from backend_tf import BackendTensorflow
... | 34.234875 | 183 | 0.62474 |
e1cd5d5975cef1785aea7336e0ff56033d6560aa | 967 | py | Python | Image_Video/count_cards.py | commoncdp2021/Gun-Gaja-Gun | 95295f4ad97500d424b90c270bba6360f455844a | [
"MIT"
] | 171 | 2015-01-20T04:13:35.000Z | 2022-03-14T17:17:40.000Z | Image_Video/count_cards.py | commoncdp2021/Gun-Gaja-Gun | 95295f4ad97500d424b90c270bba6360f455844a | [
"MIT"
] | 4 | 2017-04-29T20:11:09.000Z | 2017-05-08T16:49:15.000Z | Image_Video/count_cards.py | commoncdp2021/Gun-Gaja-Gun | 95295f4ad97500d424b90c270bba6360f455844a | [
"MIT"
] | 112 | 2015-04-28T21:08:11.000Z | 2022-03-16T23:09:25.000Z | import cv2
import sys
def count_cards(infile="cards.jpg", nogui=False):
# Read the image
image = cv2.imread(infile)
#convert to grayscale
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
#blur it
blurred_image = cv2.GaussianBlur(gray_image, (7,7), 0)
# Run the Canny edge detector
... | 28.441176 | 92 | 0.65667 |
d3422ad86fb7161391f5a354b511c8063de3ebc4 | 4,657 | py | Python | scripts/aggregate_by_category.py | romankor/robintrack | 207a2914044b4858aea2c0106b3592de95a911c8 | [
"MIT"
] | 704 | 2018-06-27T22:07:53.000Z | 2022-01-29T13:47:03.000Z | scripts/aggregate_by_category.py | dan7geo/robintrack | fc01dba1e388825340f68f93f0fcea581be3c083 | [
"MIT"
] | 60 | 2018-06-06T08:52:16.000Z | 2022-03-30T22:38:35.000Z | scripts/aggregate_by_category.py | sak7po/robintrack | 630ffc6dd2d12b2902c83eb96ca128d535d5fd64 | [
"MIT"
] | 182 | 2018-06-28T18:23:52.000Z | 2022-01-05T10:12:49.000Z | """
Sums up popularity for all stocks by category and computes aggregate popularity history for each category
"""
from datetime import datetime
import os
from python_common.db import get_db
def get_day_id(dt: datetime) -> str:
return f"{dt.year}-{dt.month:02}-{dt.day:02}"
def get_all_stock_fundamentals():
... | 34.753731 | 105 | 0.620786 |
dcc2655a9d9fc1116c668bd4f3a239764393880e | 387 | py | Python | orml/migrations/0002_auto_20180226_2202.py | malero/django-orml | a1a8aa4c3ae5cc55fde1e717b166d478cf019e66 | [
"MIT"
] | 3 | 2018-02-21T22:51:40.000Z | 2018-02-28T20:43:10.000Z | orml/migrations/0002_auto_20180226_2202.py | malero/django-orml | a1a8aa4c3ae5cc55fde1e717b166d478cf019e66 | [
"MIT"
] | null | null | null | orml/migrations/0002_auto_20180226_2202.py | malero/django-orml | a1a8aa4c3ae5cc55fde1e717b166d478cf019e66 | [
"MIT"
] | 1 | 2018-02-21T22:49:43.000Z | 2018-02-21T22:49:43.000Z | # Generated by Django 2.0 on 2018-02-27 06:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orml', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='snapshotmeta',
name='json_data',
... | 20.368421 | 58 | 0.594315 |
ffb50fc639909b33dba482ebee059ba89d3e3d31 | 4,462 | py | Python | my_package/SeparableConvFlow/SeparableConvFlowLayer.py | mpriessner/DAIN | 105e49ee100f8f13f60ea3c310d3c44be90a9878 | [
"MIT"
] | 7,517 | 2019-03-25T01:04:47.000Z | 2022-03-31T06:40:51.000Z | my_package/SeparableConvFlow/SeparableConvFlowLayer.py | Julianhm9612/DAIN | e85e406947016d7db4469d880aa0d1f1f47b0f5b | [
"MIT"
] | 138 | 2019-04-04T07:06:32.000Z | 2022-03-31T18:32:07.000Z | my_package/SeparableConvFlow/SeparableConvFlowLayer.py | Julianhm9612/DAIN | e85e406947016d7db4469d880aa0d1f1f47b0f5b | [
"MIT"
] | 848 | 2019-03-25T01:05:05.000Z | 2022-03-31T10:01:48.000Z | # this is for wrapping the customized layer
import torch
from torch.autograd import Function
import separableconvflow_cuda as my_lib
import warnings
#Please check how the STN FUNCTION is written :
#https://github.com/fxia22/stn.pytorch/blob/master/script/functions/gridgen.py
#https://github.com/fxia22/stn.pytorc... | 46.968421 | 150 | 0.650157 |
2b4a5103f47a2220a5156400c95e7827e3917fc6 | 15,121 | py | Python | harness/tests/experiment/keras/test_tf_keras_trial.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | harness/tests/experiment/keras/test_tf_keras_trial.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | harness/tests/experiment/keras/test_tf_keras_trial.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | # type: ignore
import os
import subprocess
from pathlib import Path
from typing import Any, Callable, Dict, Optional
import pytest
import tensorflow as tf
from packaging import version
import determined as det
from determined import keras, workload
from tests.experiment import utils # noqa: I100
from tests.experimen... | 38.771795 | 100 | 0.635672 |
5cc968a3ed17a77957d4993bac142c3801204abe | 195 | py | Python | FeStiff/Numba/RandomTriangle.py | danielcort/benchmarks-python-julia-c | aececc9f1fc3c368ae57f84028b0cf35a0c138e4 | [
"MIT"
] | 21 | 2018-03-27T08:36:34.000Z | 2021-10-01T12:26:54.000Z | FeStiff/Numba/RandomTriangle.py | danielcort/benchmarks-python-julia-c | aececc9f1fc3c368ae57f84028b0cf35a0c138e4 | [
"MIT"
] | 2 | 2018-05-13T16:44:06.000Z | 2019-09-27T06:33:09.000Z | FeStiff/Numba/RandomTriangle.py | danielcort/benchmarks-python-julia-c | aececc9f1fc3c368ae57f84028b0cf35a0c138e4 | [
"MIT"
] | 6 | 2018-05-29T13:27:31.000Z | 2021-06-27T17:49:09.000Z | from numba import jit
@jit(nopython=True)
def RandomTriangle(R,x,y):
# domain is [0,10]x[0,10]
for i in range(0,3):
x[i]=R.fv(10.)
for i in range(0,3):
y[i]=R.fv(10.)
| 21.666667 | 29 | 0.553846 |
b21db148d92a9e83e8d73877d0137de1b3e81861 | 4,813 | py | Python | splparser/lexers/outputcsvlexer.py | lowell80/splparser | 2b33d74d59565cc53ae47452126621300dba9ed8 | [
"BSD-3-Clause"
] | 31 | 2015-12-02T15:41:06.000Z | 2022-03-16T22:27:23.000Z | splparser/lexers/outputcsvlexer.py | lowell80/splparser | 2b33d74d59565cc53ae47452126621300dba9ed8 | [
"BSD-3-Clause"
] | 1 | 2021-06-24T11:23:00.000Z | 2021-06-24T11:23:00.000Z | splparser/lexers/outputcsvlexer.py | lowell80/splparser | 2b33d74d59565cc53ae47452126621300dba9ed8 | [
"BSD-3-Clause"
] | 15 | 2015-12-10T16:48:20.000Z | 2022-02-26T18:12:44.000Z | #!/usr/bin/env python
import ply.lex
from ply.lex import TOKEN
import re
from splparser.regexes.searchregexes import *
from splparser.exceptions import SPLSyntaxError
tokens = [
'WILDCARD',
'EQ',
'IPV4ADDR', 'IPV6ADDR',
'EMAIL','HOSTNAME', 'URL', 'PATH', 'US_PHONE',
'WORD',
'INT', 'BIN', 'OCT... | 20.74569 | 79 | 0.627052 |
9b1345fb451c81ad7408d57b2ed4fb3831c61d64 | 16,901 | py | Python | baselines/common/tf_util.py | llach/baselines | 22e72ad9d4c9bc61e98186d6dcb09bf53892a8c2 | [
"MIT"
] | null | null | null | baselines/common/tf_util.py | llach/baselines | 22e72ad9d4c9bc61e98186d6dcb09bf53892a8c2 | [
"MIT"
] | null | null | null | baselines/common/tf_util.py | llach/baselines | 22e72ad9d4c9bc61e98186d6dcb09bf53892a8c2 | [
"MIT"
] | 1 | 2018-08-15T14:32:26.000Z | 2018-08-15T14:32:26.000Z | import collections
import copy
import functools
import multiprocessing
import os
import joblib
import numpy as np
import tensorflow as tf # pylint: ignore-module
def switch(condition, then_expression, else_expression):
"""Switches between two operations depending on a scalar value (int or bool).
Note that b... | 38.151242 | 171 | 0.601621 |
03253e9c6cd4b455ad56ec7ad20bfd19e76dcd2f | 2,379 | py | Python | heritage/migrations/0051_auto_20160617_2025.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | null | null | null | heritage/migrations/0051_auto_20160617_2025.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | 11 | 2020-03-24T15:29:46.000Z | 2022-03-11T23:14:48.000Z | heritage/migrations/0051_auto_20160617_2025.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('heritage', '0050_auto_20160301_0030'),
]
operations = [
migrations.AlterModelOptions(
name='recordsessionlink',
... | 42.482143 | 145 | 0.54897 |
4edb2df4fa8d4f244a6fb1d24d243a4c4a445884 | 858 | py | Python | ch10/code/ch10-01_folium_leaflet.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 98 | 2015-06-14T08:42:21.000Z | 2022-03-09T16:48:43.000Z | ch10/code/ch10-01_folium_leaflet.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 6 | 2015-12-23T09:56:33.000Z | 2022-02-13T20:06:05.000Z | ch10/code/ch10-01_folium_leaflet.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 43 | 2015-08-24T13:13:32.000Z | 2022-03-14T20:55:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import folium
import pandas as pd
# define the polygons
states_geojson = r'us-states.json'
# statistic data to connect to our polygons
state_unemployment = r'../www/html/US_Unemployment_Oct2012.csv'
# read the csv statistic data
state_data = pd.read_csv(state_unemploymen... | 31.777778 | 73 | 0.691142 |
da8033f9bd9b54e1472c82a23427bb1c37dd3c1f | 3,648 | py | Python | test/test_language_model.py | stompchicken/sutra | aa418f539dece51700299d939e9215a5a07f62a6 | [
"MIT"
] | null | null | null | test/test_language_model.py | stompchicken/sutra | aa418f539dece51700299d939e9215a5a07f62a6 | [
"MIT"
] | 1 | 2021-06-01T22:31:37.000Z | 2021-06-01T22:31:37.000Z | test/test_language_model.py | stompchicken/sutra | aa418f539dece51700299d939e9215a5a07f62a6 | [
"MIT"
] | null | null | null | import torch
from sutra.model.lm.rnn_lm import RNNLanguageModel, RNNLanguageModelConfig
from sutra.model.lm.transformer_lm import TransformerLanguageModel, TransformerLanguageModelConfig
from sutra.model.lm.linear_lm import LinearLanguageModel, LinearLanguageModelConfig
from sutra.model.lm.trainer import train_languag... | 28.724409 | 98 | 0.607456 |
03516727466099a57bfc72de558a8aa9a025682c | 21,349 | py | Python | grow/common/utils.py | tabulon-ext/grow | 2929c3e9b467a7768d5b5055fe965fbb5106603f | [
"MIT"
] | 335 | 2016-04-02T20:12:21.000Z | 2022-03-28T18:55:26.000Z | grow/common/utils.py | tabulon-ext/grow | 2929c3e9b467a7768d5b5055fe965fbb5106603f | [
"MIT"
] | 784 | 2016-04-01T16:56:41.000Z | 2022-03-05T01:25:34.000Z | grow/common/utils.py | tabulon-ext/grow | 2929c3e9b467a7768d5b5055fe965fbb5106603f | [
"MIT"
] | 54 | 2016-05-03T13:06:15.000Z | 2021-09-24T04:46:23.000Z | """Common grow utility functions."""
import csv as csv_lib
import codecs
import fnmatch
import functools
import gettext
import json
import logging
import os
import re
import string
import sys
import threading
import time
from urllib import parse as url_parse
from collections import OrderedDict
import yaml
import bs4
i... | 33.202177 | 110 | 0.605602 |
f3a889370f5347e6af9c55dd5498f34435dcd23b | 8,399 | py | Python | examples/evaluation_nonlinearity.py | maichmueller/CausalPy | d2dcd2c557e1ccdfa1fb77f3adbf78b0ea63c735 | [
"MIT"
] | null | null | null | examples/evaluation_nonlinearity.py | maichmueller/CausalPy | d2dcd2c557e1ccdfa1fb77f3adbf78b0ea63c735 | [
"MIT"
] | null | null | null | examples/evaluation_nonlinearity.py | maichmueller/CausalPy | d2dcd2c557e1ccdfa1fb77f3adbf78b0ea63c735 | [
"MIT"
] | null | null | null | import logging
import multiprocessing
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
from typing import Optional, List, Collection
from causalpy import Assignment
from causalpy.causal_prediction.interventional import (
AgnosticPredictor,
MultiAgnosticPredictor,
Density... | 28.375 | 97 | 0.544112 |
3d6fdf2b78414a7651d8be325985193bc9447171 | 12,328 | py | Python | tests/buildpackage.py | felixhummel/salt | b6d640da0db7a5a57709b48d8dc1d19509901e32 | [
"Apache-2.0"
] | null | null | null | tests/buildpackage.py | felixhummel/salt | b6d640da0db7a5a57709b48d8dc1d19509901e32 | [
"Apache-2.0"
] | null | null | null | tests/buildpackage.py | felixhummel/salt | b6d640da0db7a5a57709b48d8dc1d19509901e32 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Maintainer: Erik Johnson (https://github.com/terminalmage)
#
# WARNING: This script will recursively remove the build and artifact
# directories.
#
# This script is designed for speed, therefore it does not use mock and does not
# run tests. It *will* install the build deps on the machine runn... | 33.139785 | 80 | 0.587849 |
7342499179147972d2f7437dc59625f8596bf558 | 6,750 | py | Python | bert4torch/train.py | txg11/t5-pegasus-chinese | ef8de37ff2e2911ae308f5de937547a71945cdeb | [
"MIT"
] | 1 | 2022-02-25T03:05:46.000Z | 2022-02-25T03:05:46.000Z | bert4torch/train.py | txg11/t5-pegasus-chinese | ef8de37ff2e2911ae308f5de937547a71945cdeb | [
"MIT"
] | null | null | null | bert4torch/train.py | txg11/t5-pegasus-chinese | ef8de37ff2e2911ae308f5de937547a71945cdeb | [
"MIT"
] | null | null | null | from transformers.modeling_bert import BertForPreTraining
from xtools import *
from loss import CrossEntropyLoss
import random
from transformers import AdamW, get_linear_schedule_with_warmup
from torch.cuda import amp
from pytorch_lightning import seed_everything
import pkbar
import torch.distributed as dist
local_ran... | 32.142857 | 110 | 0.638519 |
71ab3167544410da1217c8a64b75f1f05a676817 | 182 | py | Python | app/grandchallenge/forum_member/models.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | 101 | 2018-04-11T14:48:04.000Z | 2022-03-28T00:29:48.000Z | app/grandchallenge/forum_member/models.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | 1,733 | 2018-03-21T11:56:16.000Z | 2022-03-31T14:58:30.000Z | app/grandchallenge/forum_member/models.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | 42 | 2018-06-08T05:49:07.000Z | 2022-03-29T08:43:01.000Z | # Custom models should be declared before importing
# django-machina models
# noinspection PyUnresolvedReferences
from machina.apps.forum_member.models import * # noqa: F401, F403
| 30.333333 | 66 | 0.807692 |
0e9f8e4aa5356b45ac606dc6d845a7775accb01d | 3,974 | py | Python | app/recipe/tests/test_tag_api.py | abhisek11/recepi-app-api | b26af38582fc4859d032aedfa55aef8e76db1123 | [
"MIT"
] | null | null | null | app/recipe/tests/test_tag_api.py | abhisek11/recepi-app-api | b26af38582fc4859d032aedfa55aef8e76db1123 | [
"MIT"
] | null | null | null | app/recipe/tests/test_tag_api.py | abhisek11/recepi-app-api | b26af38582fc4859d032aedfa55aef8e76db1123 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag, Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class P... | 31.792 | 71 | 0.631102 |
df6679d0bf604fbb00c2d86cd64caff6c8a688e1 | 1,448 | py | Python | examples/example.py | frenck/python-radios | f5b36cab45b639f2d11fe003033914473e66db08 | [
"MIT"
] | 7 | 2022-02-21T13:20:15.000Z | 2022-02-26T10:58:17.000Z | examples/example.py | frenck/python-radios | f5b36cab45b639f2d11fe003033914473e66db08 | [
"MIT"
] | 2 | 2022-03-07T16:46:22.000Z | 2022-03-30T06:34:03.000Z | examples/example.py | frenck/python-radios | f5b36cab45b639f2d11fe003033914473e66db08 | [
"MIT"
] | null | null | null | # pylint: disable=W0621
"""Asynchronous Python client for the Radio Browser API."""
import asyncio
from radios import FilterBy, Order, RadioBrowser
async def main() -> None:
"""Show example on how to query the Radio Browser API."""
async with RadioBrowser(user_agent="MyAwesomeApp/1.0.0") as radios:
... | 32.909091 | 83 | 0.641575 |
f4fa46296c5965170de8493830dd74be6c9d4005 | 2,636 | py | Python | external/models/basic_transH/basic_transH.py | swapUniba/Elliot_refactor-tesi-Ventrella | 3ddffc041696c90a6f6d3e8906c212fc4f55f842 | [
"Apache-2.0"
] | null | null | null | external/models/basic_transH/basic_transH.py | swapUniba/Elliot_refactor-tesi-Ventrella | 3ddffc041696c90a6f6d3e8906c212fc4f55f842 | [
"Apache-2.0"
] | null | null | null | external/models/basic_transH/basic_transH.py | swapUniba/Elliot_refactor-tesi-Ventrella | 3ddffc041696c90a6f6d3e8906c212fc4f55f842 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from elliot.evaluation.evaluator import Evaluator
from elliot.recommender.base_recommender_model import BaseRecommenderModel
from elliot.recommender.recommender_utils_mixin import RecMixin
from elliot.utils.folder import build_model_folder
class basic_transH(RecMixin, BaseRecommenderModel):
... | 39.939394 | 128 | 0.658953 |
3f4285f8be48fe2c727d05df0293d586de958d0e | 32,246 | py | Python | prody/sequence/msafile.py | fongchun/ProDy | cd781b105e3f502d581ee184c9009264b6245bcd | [
"MIT"
] | null | null | null | prody/sequence/msafile.py | fongchun/ProDy | cd781b105e3f502d581ee184c9009264b6245bcd | [
"MIT"
] | null | null | null | prody/sequence/msafile.py | fongchun/ProDy | cd781b105e3f502d581ee184c9009264b6245bcd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""This module defines functions and classes for parsing, manipulating, and
analyzing multiple sequence alignments."""
__author__ = 'Anindita Dutta, Ahmet Bakan'
from os.path import isfile, splitext, split, getsize
from numpy import array, fromstring, empty
from .sequence import splitSeqLabe... | 34.050686 | 105 | 0.559945 |
3a1025caf3645d082392cee4bd4c1dc1c1b08b5a | 22,372 | py | Python | lib/Crypto/SelfTest/PublicKey/test_import_RSA.py | alxchk/pycryptodome | bac89949c0ddd1034f97f6ee01769b4c5152fcf8 | [
"Unlicense"
] | 4 | 2019-06-19T05:37:48.000Z | 2021-07-09T16:05:57.000Z | lib/Crypto/SelfTest/PublicKey/test_import_RSA.py | alxchk/pycryptodome | bac89949c0ddd1034f97f6ee01769b4c5152fcf8 | [
"Unlicense"
] | 4 | 2019-12-11T21:28:39.000Z | 2021-06-10T22:22:35.000Z | lib/Crypto/SelfTest/PublicKey/test_import_RSA.py | alxchk/pycryptodome | bac89949c0ddd1034f97f6ee01769b4c5152fcf8 | [
"Unlicense"
] | 1 | 2019-02-27T21:29:16.000Z | 2019-02-27T21:29:16.000Z | # -*- coding: utf-8 -*-
#
# SelfTest/PublicKey/test_importKey.py: Self-test for importing RSA keys
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone i... | 44.213439 | 225 | 0.715493 |
042e91cac7bb8ca23278103860a535a9f11bb0e5 | 491 | py | Python | lebanese_channels/services/utils/web.py | blazeinmedia/Lebanese-Channels | f314868ac3da69ce5a27f6f953145096be1c31eb | [
"MIT"
] | 1 | 2020-04-09T19:39:35.000Z | 2020-04-09T19:39:35.000Z | lebanese_channels/services/utils/web.py | blazeinmedia/Lebanese-Channels | f314868ac3da69ce5a27f6f953145096be1c31eb | [
"MIT"
] | null | null | null | lebanese_channels/services/utils/web.py | blazeinmedia/Lebanese-Channels | f314868ac3da69ce5a27f6f953145096be1c31eb | [
"MIT"
] | null | null | null | import urllib
import urllib.parse
import urllib.request
def get_response(url: str, params=None):
data = None if params is None else urllib.parse.urlencode(params).encode('utf-8')
req = urllib.request.Request(url, data=data)
req.add_header('User-Agent',
'Mozilla/5.0 (X11; Ubuntu; Linux ... | 28.882353 | 98 | 0.680244 |
12cafaf5883f401dee50c31b1a49818eaef88ecf | 357 | py | Python | polling_stations/apps/data_importers/tests/stubs/stub_xpress_democlub.py | smsmith97/UK-Polling-Stations | ecbd98cb99e89e97354da3960b0063aa36181b11 | [
"BSD-3-Clause"
] | 29 | 2015-03-10T08:41:34.000Z | 2022-01-12T08:51:38.000Z | polling_stations/apps/data_importers/tests/stubs/stub_xpress_democlub.py | smsmith97/UK-Polling-Stations | ecbd98cb99e89e97354da3960b0063aa36181b11 | [
"BSD-3-Clause"
] | 4,112 | 2015-04-01T21:27:38.000Z | 2022-03-31T19:22:11.000Z | polling_stations/apps/data_importers/tests/stubs/stub_xpress_democlub.py | smsmith97/UK-Polling-Stations | ecbd98cb99e89e97354da3960b0063aa36181b11 | [
"BSD-3-Clause"
] | 31 | 2015-03-18T14:52:50.000Z | 2022-02-24T10:31:07.000Z | import os
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "AAA"
addresses_name = "test_democlub.csv"
stations_name = "test_democlub.csv"
base_folder_path = os.path.join(
os.path.dirname(__file__),... | 29.75 | 81 | 0.761905 |
11bedfb329397cc06c964b4bd87c991cde8339ff | 2,159 | py | Python | smartfancontrol/logger.py | daniel-kristjansson/smart-fancontrol | 237d98b3ca3d16d71b2d064b567206f15c84c588 | [
"BSD-3-Clause"
] | null | null | null | smartfancontrol/logger.py | daniel-kristjansson/smart-fancontrol | 237d98b3ca3d16d71b2d064b567206f15c84c588 | [
"BSD-3-Clause"
] | null | null | null | smartfancontrol/logger.py | daniel-kristjansson/smart-fancontrol | 237d98b3ca3d16d71b2d064b567206f15c84c588 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import sys
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
import tensorflow as tf
from smartfancontrol.features import summarize_features_v3_tensor
log_counter = 0
buffer_size = 100
features_dt_path = "/var/log/fancontrol/featurelog.v3"
features_dt = None
def info_log(message:... | 28.786667 | 116 | 0.654006 |
89df8a168f6cdaa7f61432fd72efdc0beb839796 | 1,356 | py | Python | wplay/utils/helpers.py | SaraLatif99/whatsapp-play | 2afb8ee5e748232ef6b18f403fbb44397b9ce99c | [
"MIT"
] | null | null | null | wplay/utils/helpers.py | SaraLatif99/whatsapp-play | 2afb8ee5e748232ef6b18f403fbb44397b9ce99c | [
"MIT"
] | null | null | null | wplay/utils/helpers.py | SaraLatif99/whatsapp-play | 2afb8ee5e748232ef6b18f403fbb44397b9ce99c | [
"MIT"
] | null | null | null | # region IMPORTS
from pathlib import Path
from whaaaaat import style_from_dict, Token
# endregion
# region WEBSITES
websites = {'whatsapp': 'https://web.whatsapp.com/'}
# endregion
# region SELECTOR
whatsapp_selectors_dict = {
'login_area':'#app > div > div > div.landing-header',
'new_chat_button': '#side > h... | 35.684211 | 131 | 0.669617 |
66f4e02fcaa8782c94f8f744a8f4c6623cf45f59 | 377 | py | Python | src/gateway_devices/enocean_gateway_device.py | bodiroga/rfc2217-gateway | f104eb2232bd776a18f07b3f6595f640344a0015 | [
"Apache-2.0"
] | 4 | 2020-09-07T09:54:33.000Z | 2021-04-11T09:40:04.000Z | src/gateway_devices/enocean_gateway_device.py | IvanAdamo/rfc2217-gateway | 843c91e02b40e3a9458e44aab4cdc7a735dabcdd | [
"Apache-2.0"
] | 1 | 2020-09-08T09:11:42.000Z | 2020-09-26T13:36:00.000Z | src/gateway_devices/enocean_gateway_device.py | IvanAdamo/rfc2217-gateway | 843c91e02b40e3a9458e44aab4cdc7a735dabcdd | [
"Apache-2.0"
] | 2 | 2020-09-08T10:54:56.000Z | 2021-01-17T22:00:11.000Z | #!/usr/bin/env python3
import logging
from gateway_devices.generic_gateway_device import GenericGatewayDevice
logger = logging.getLogger(__name__)
def get_class():
return EnoceanGatewayDevice
class EnoceanGatewayDevice(GenericGatewayDevice):
NAME = "Enocean"
ID_MODEL_ID = "6001"
ID_VENDOR_ID = "040... | 22.176471 | 71 | 0.758621 |
a88e12ba466f6a9b669e5bc8525cf6978f9a9186 | 3,384 | py | Python | test/functional/test_framework/coverage.py | Soficoin/soficoin-source | b77aa57a312c962df747893cf3361ca3f26cc8e7 | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | Soficoin/soficoin-source | b77aa57a312c962df747893cf3361ca3f26cc8e7 | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | Soficoin/soficoin-source | b77aa57a312c962df747893cf3361ca3f26cc8e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for doing coverage analysis on the RPC interface.
Provides a way to track which RPC commands... | 30.763636 | 87 | 0.661052 |
8a5a6f531f308f315330640ebc884f4335cab0ee | 26,298 | py | Python | examples/pytorch/translation/run_translation.py | cdleong/transformers | 47a9768334f71b7a519a723494399830b7590a02 | [
"Apache-2.0"
] | 1 | 2021-09-06T09:46:48.000Z | 2021-09-06T09:46:48.000Z | examples/pytorch/translation/run_translation.py | cdleong/transformers | 47a9768334f71b7a519a723494399830b7590a02 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/translation/run_translation.py | cdleong/transformers | 47a9768334f71b7a519a723494399830b7590a02 | [
"Apache-2.0"
] | 2 | 2021-08-14T07:29:17.000Z | 2021-09-06T06:21:59.000Z | #!/usr/bin/env python
# coding=utf-8
# Copyright The HuggingFace Team and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... | 43.253289 | 120 | 0.678759 |
6f61bdcc26dfb7735a83393834b94266890a3cb4 | 10,966 | py | Python | pytests/eventing/eventing_rqg.py | pavithra-mahamani/testrunner | d204491caa23f1fbe90505646534ed7810d96289 | [
"Apache-2.0"
] | 1 | 2020-08-31T18:51:45.000Z | 2020-08-31T18:51:45.000Z | pytests/eventing/eventing_rqg.py | pavithra-mahamani/testrunner | d204491caa23f1fbe90505646534ed7810d96289 | [
"Apache-2.0"
] | null | null | null | pytests/eventing/eventing_rqg.py | pavithra-mahamani/testrunner | d204491caa23f1fbe90505646534ed7810d96289 | [
"Apache-2.0"
] | 2 | 2020-07-24T07:12:01.000Z | 2022-03-17T23:43:28.000Z | import os, re
import zipfile
import datetime
import logging
from threading import Thread
from lib.membase.api.rest_client import RestConnection
from lib.testconstants import STANDARD_BUCKET_PORT
from pytests.eventing.eventing_constants import HANDLER_CODE, HANDLER_CODE_ERROR
from pytests.eventing.eventing_base import E... | 48.096491 | 174 | 0.586449 |
4e24607b6daae963fd570c83f6d4dd15b52b1f3f | 725 | py | Python | backend/atlas/migrations/0005_auto_20190716_2034.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 18 | 2019-09-24T23:49:41.000Z | 2020-11-14T17:30:27.000Z | backend/atlas/migrations/0005_auto_20190716_2034.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 53 | 2019-09-24T18:50:25.000Z | 2022-02-27T11:44:55.000Z | backend/atlas/migrations/0005_auto_20190716_2034.py | getsentry/atlas | 9bf4a236b99a24a7a17700591a0ff94feecf7ce7 | [
"Apache-2.0"
] | 2 | 2020-02-03T08:22:36.000Z | 2021-02-28T12:55:48.000Z | # Generated by Django 2.2.2 on 2019-07-16 20:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("atlas", "0004_auto_20190711_1346")]
operations = [
migrations.AddField(
model_name="profile",
na... | 25.892857 | 61 | 0.562759 |
bdd2e5a03ef12aef1df1929923ace419b48bfd43 | 95 | py | Python | CodeUp/1544.py | chae-heechan/Algorithm_Study | 183a77e2cfe352cd82fb5e988b493082529a73dd | [
"MIT"
] | null | null | null | CodeUp/1544.py | chae-heechan/Algorithm_Study | 183a77e2cfe352cd82fb5e988b493082529a73dd | [
"MIT"
] | null | null | null | CodeUp/1544.py | chae-heechan/Algorithm_Study | 183a77e2cfe352cd82fb5e988b493082529a73dd | [
"MIT"
] | null | null | null | # 함수로 * n개 출력하기
def f(key):
for i in range(key):
print("*", end="")
f(int(input())) | 19 | 26 | 0.494737 |
808ec40b36367a54cbb8a73fd92f729eec3752d8 | 6,319 | py | Python | state-change-localization-classification/cnn-lstm/main.py | EGO4D/hands-and-objects | 76d6ce6af1a9db4007ea24eb315f3f0eaea26bc2 | [
"MIT"
] | 24 | 2021-10-15T20:17:38.000Z | 2022-03-30T18:54:55.000Z | state-change-localization-classification/cnn-lstm/main.py | EGO4D/hands-and-objects | 76d6ce6af1a9db4007ea24eb315f3f0eaea26bc2 | [
"MIT"
] | 1 | 2022-03-09T03:35:42.000Z | 2022-03-10T20:50:24.000Z | state-change-localization-classification/cnn-lstm/main.py | EGO4D/hands-and-objects | 76d6ce6af1a9db4007ea24eb315f3f0eaea26bc2 | [
"MIT"
] | 4 | 2021-11-18T19:22:16.000Z | 2022-03-21T02:51:35.000Z | import argparse
from trainval import train, val
from evaluate import evaluate, generate_submission_file, generate_submission_file_cls
import torch
from simple_cnn_lstm import cnnlstm
from dataset import StateChangeDetectionAndKeyframeLocalisation_FB_annotations
import torch.nn as nn
import pickle
from torch.utils.data ... | 60.180952 | 160 | 0.752809 |
b7bfe362855cadcfc9ea8801167eb1cf099f5d5d | 1,447 | py | Python | qa/rpc-tests/blockchain.py | thetimpotter/bitcoin_1.0 | fd6914f886762d65bd352e216edbacb10a4f23a8 | [
"MIT"
] | 2 | 2015-12-07T18:52:28.000Z | 2015-12-07T19:00:47.000Z | qa/rpc-tests/blockchain.py | phabulu/litecoinz | f27d3e157811c8ae19bc7165d613f4d4b8ef9523 | [
"MIT"
] | null | null | null | qa/rpc-tests/blockchain.py | phabulu/litecoinz | f27d3e157811c8ae19bc7165d613f4d4b8ef9523 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test RPC calls related to blockchain state.
#
import decimal
from test_framework.test_framework import B... | 27.301887 | 76 | 0.684865 |
8ac357ac08b985ef86dc2224df0599c9fd055401 | 8,691 | py | Python | src/branding/branding.py | xcp-ng/win-installer | d232c8e5b074f1137f83b1d9d0d858fc727ea790 | [
"BSD-2-Clause"
] | 3 | 2018-10-27T23:33:13.000Z | 2022-02-04T19:08:41.000Z | src/branding/branding.py | qmutz/win-installer | d232c8e5b074f1137f83b1d9d0d858fc727ea790 | [
"BSD-2-Clause"
] | null | null | null | src/branding/branding.py | qmutz/win-installer | d232c8e5b074f1137f83b1d9d0d858fc727ea790 | [
"BSD-2-Clause"
] | 5 | 2018-08-14T03:09:22.000Z | 2022-02-04T19:11:48.000Z |
branding = {
"toolsName" : "XCP-ng XenServer Tools",
"installerProductName" : "XCP-ng XenServer Tools Installer",
"manufacturer" : "XCP-ng",
"installerKeyWords" : "XCP-ng XenServer Windows Installer",
"shortTools" : "XenTools",
"installerServiceName" : "XCP-ng Xen... | 52.355422 | 191 | 0.645035 |
ce9c9b1fe848bc698aa56a121ccaa0902900ad96 | 7,443 | py | Python | starcraft/battle_harassing_time.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | starcraft/battle_harassing_time.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | starcraft/battle_harassing_time.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | # Intended to be used for data visualization of when players scout
# during StarCraft 2
import csv
import sc2reader
import time
import traceback
from multiprocessing import Pool, cpu_count
from collections import Counter
import scouting_detector
import scouting_stats
from sc2reader.engine.plugins import SelectionTrack... | 42.531429 | 118 | 0.611984 |
175a0e99469d8b468278c12ab763ce50276a0c34 | 20,622 | py | Python | sfz2bitwig.py | dgmulf/sfz2bitwig | d7552842222839f057494fff179274c8ff1d2b67 | [
"MIT"
] | 41 | 2017-04-03T22:25:22.000Z | 2021-11-21T10:11:59.000Z | sfz2bitwig.py | dgmulf/sfz2bitwig | d7552842222839f057494fff179274c8ff1d2b67 | [
"MIT"
] | 2 | 2017-11-17T05:32:31.000Z | 2020-06-24T19:41:34.000Z | sfz2bitwig.py | dgmulf/sfz2bitwig | d7552842222839f057494fff179274c8ff1d2b67 | [
"MIT"
] | 6 | 2019-01-01T19:33:37.000Z | 2022-02-08T23:41:10.000Z | #!/usr/bin/env python3
VERSION="0.5.0" # MAJOR.MINOR.PATCH | http://semver.org
from collections import defaultdict
from collections import OrderedDict
from io import open
import zipfile
import wave
import math
import re
import os
import sys
import operator
import struct
import argparse
def parse_commandline():
... | 43.876596 | 261 | 0.519979 |
6a4f679e2957d6065bc8695f05feb3cb84f4e97f | 5,232 | py | Python | pyro/contrib/bnn/hidden_layer.py | patrickeganfoley/pyro | 3bd5e099e85f3686c66fc3b53476c3b009a77a02 | [
"Apache-2.0"
] | 2 | 2020-06-05T20:40:50.000Z | 2020-09-05T15:39:48.000Z | pyro/contrib/bnn/hidden_layer.py | patrickeganfoley/pyro | 3bd5e099e85f3686c66fc3b53476c3b009a77a02 | [
"Apache-2.0"
] | 1 | 2020-05-12T16:26:21.000Z | 2020-05-12T17:23:13.000Z | pyro/contrib/bnn/hidden_layer.py | patrickeganfoley/pyro | 3bd5e099e85f3686c66fc3b53476c3b009a77a02 | [
"Apache-2.0"
] | 1 | 2020-04-24T01:18:03.000Z | 2020-04-24T01:18:03.000Z | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import torch
from torch.distributions.utils import lazy_property
import torch.nn.functional as F
from pyro.contrib.bnn.utils import adjoin_ones_vector
from pyro.distributions.torch_distribution import TorchDistribution
class Hid... | 47.135135 | 112 | 0.661124 |
bcf4cbfaea718a29c144b4e146b9c64b9b332673 | 1,356 | py | Python | python/lswrc.py | misslibra/algorithms | 31648ee7a25710ff5340595222525721116f7e84 | [
"Apache-2.0"
] | 1 | 2021-12-19T14:17:46.000Z | 2021-12-19T14:17:46.000Z | python/lswrc.py | misslibra/algorithms | 31648ee7a25710ff5340595222525721116f7e84 | [
"Apache-2.0"
] | null | null | null | python/lswrc.py | misslibra/algorithms | 31648ee7a25710ff5340595222525721116f7e84 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
# author: cappyclearl
class Solution(object):
def lengthOfLongestSubstring(self, s):
"""
:type s: str
:rtype: int
"""
if len(s) is 0:
return len(s)
# 字符之前出现的位置
char_position = dict()
# s[i-1]为末尾的最长无... | 30.133333 | 67 | 0.509587 |
611b4c57f83f91801bea6fee4a1ab58a42480059 | 9,374 | py | Python | tests/test_poly_spaces.py | vondrejc/sfepy | 8e427af699c4b2858eb096510057abb3ae7e28e8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_poly_spaces.py | vondrejc/sfepy | 8e427af699c4b2858eb096510057abb3ae7e28e8 | [
"BSD-3-Clause"
] | null | null | null | tests/test_poly_spaces.py | vondrejc/sfepy | 8e427af699c4b2858eb096510057abb3ae7e28e8 | [
"BSD-3-Clause"
] | 2 | 2019-01-14T03:12:34.000Z | 2021-05-25T11:44:50.000Z | """
Test continuity of polynomial basis and its gradients along an edge on
:math:`y` line (2D) or on a face in :math:`x`-:math:`y` plane (3D) between two
elements aligned with the coordinate system, stack one on top of the other. The
evaluation occurs in several points shifted by a very small amount from the
boundary b... | 37.646586 | 79 | 0.499253 |
94e25d6cc100b5647dd5a06a7725fcffc3fae9d5 | 8,302 | py | Python | c_comp/asm_extensions.py | CorneliaXaos/Command-Block-Assembly | 6ed002c7df856d95d8cb2b8e5346c2bb807bf4bc | [
"MIT"
] | 1 | 2020-06-13T13:57:11.000Z | 2020-06-13T13:57:11.000Z | c_comp/asm_extensions.py | CorneliaXaos/Command-Block-Assembly | 6ed002c7df856d95d8cb2b8e5346c2bb807bf4bc | [
"MIT"
] | null | null | null | c_comp/asm_extensions.py | CorneliaXaos/Command-Block-Assembly | 6ed002c7df856d95d8cb2b8e5346c2bb807bf4bc | [
"MIT"
] | null | null | null | from packer.session import Session
from asm import Assembler
from cmd_ir.core_types import CmdFunction, VirtualString
from cmd_ir.core import Pragma
from cmd_ir.instructions import (RunCommand, SetScore, AddScore, SubScore,
PragmaInsn)
from cmd_ir.variables import VarType, GlobalScoreV... | 36.412281 | 80 | 0.58251 |
7b4fc0384acc0aa0f50603f70d322a6d152c302d | 1,591 | py | Python | utils.py | binfnstats/Hyperopt-Keras-CNN-CIFAR-100 | 7d619308f49e1703ccae9458e390255a8eef57b3 | [
"MIT"
] | 150 | 2017-07-17T21:25:54.000Z | 2022-01-25T18:43:07.000Z | utils.py | sum111-png/Hyperopt-Keras-CNN-CIFAR-100 | a22d28b2d74e42f4056d6126d46d65a9d6eb2caa | [
"MIT"
] | 2 | 2017-10-08T20:11:12.000Z | 2018-05-07T18:03:46.000Z | utils.py | sum111-png/Hyperopt-Keras-CNN-CIFAR-100 | a22d28b2d74e42f4056d6126d46d65a9d6eb2caa | [
"MIT"
] | 45 | 2017-08-08T02:11:47.000Z | 2021-10-16T14:46:55.000Z |
"""Json utils to print, save and load training results."""
from bson import json_util
import json
import os
__author__ = "Vooban Inc."
__copyright__ = "Copyright 2017, Vooban Inc."
__license__ = "MIT License"
# See: https://github.com/Vooban/Hyperopt-Keras-CNN-CIFAR-100/blob/master/LICENSE
RESULTS_DIR = "results/... | 26.516667 | 81 | 0.629793 |
8c81d1988f735efe5f8f6037e6ebc22a3ca4eb4a | 273 | py | Python | starlette_context/__init__.py | ginomempin/starlette-context | fbfff267cb101eaa566900afc7403902ecd9b3e8 | [
"MIT"
] | null | null | null | starlette_context/__init__.py | ginomempin/starlette-context | fbfff267cb101eaa566900afc7403902ecd9b3e8 | [
"MIT"
] | null | null | null | starlette_context/__init__.py | ginomempin/starlette-context | fbfff267cb101eaa566900afc7403902ecd9b3e8 | [
"MIT"
] | null | null | null | from contextvars import ContextVar
from typing import Any, Dict
__version__ = "0.3.1"
__author__ = "Tomasz Wojcik"
_request_scope_context_storage: ContextVar[Dict[Any, Any]] = ContextVar(
"starlette_context"
)
from starlette_context.ctx import context # noqa: E402
| 22.75 | 72 | 0.776557 |
b60165d9f7d51926f8bfcc135953f128fc95a978 | 1,332 | py | Python | shellhelp.py | darkwyrm/mensago-utils | f8fd77ac895a5acd800eaacca90b0753cbaaf2cb | [
"MIT"
] | null | null | null | shellhelp.py | darkwyrm/mensago-utils | f8fd77ac895a5acd800eaacca90b0753cbaaf2cb | [
"MIT"
] | null | null | null | shellhelp.py | darkwyrm/mensago-utils | f8fd77ac895a5acd800eaacca90b0753cbaaf2cb | [
"MIT"
] | null | null | null | '''This module contains code for the in-app help system. It's simple, but intended to be expandable
and actually useful'''
_gHelpTopics = dict()
_gKeywordMap = dict()
def addtopic(topic: str, text: str, keywords: list):
'''Adds a topic to the help database. The list of keywords may be None, but its usage is
high... | 26.64 | 100 | 0.711712 |
95ca70e37006d885be94954031c5bed1665bfa07 | 11,684 | py | Python | tftpy/TftpServer.py | JyuNya508/jpdaemon | c4dc3acebb3249680e656d8b88cbe5eb60f2fe3f | [
"MIT"
] | null | null | null | tftpy/TftpServer.py | JyuNya508/jpdaemon | c4dc3acebb3249680e656d8b88cbe5eb60f2fe3f | [
"MIT"
] | null | null | null | tftpy/TftpServer.py | JyuNya508/jpdaemon | c4dc3acebb3249680e656d8b88cbe5eb60f2fe3f | [
"MIT"
] | 1 | 2019-05-08T21:49:34.000Z | 2019-05-08T21:49:34.000Z | # vim: ts=4 sw=4 et ai:
# -*- coding: utf8 -*-
"""This module implements the TFTP Server functionality. Instantiate an
instance of the server, and then run the listen() method to listen for client
requests. Logging is performed via a standard logging object set in
TftpShared."""
import socket, os, time
import select
... | 45.111969 | 88 | 0.515063 |
4aa4fc53ccf09ab5fc0c411c93765dc517a5c8fb | 1,306 | py | Python | setup.py | rmallof/pysymemu | 7909fd065879f562004f6cc6be37f8072e85790b | [
"BSD-3-Clause"
] | 271 | 2015-01-01T06:14:03.000Z | 2022-03-04T09:57:21.000Z | setup.py | rmallof/pysymemu | 7909fd065879f562004f6cc6be37f8072e85790b | [
"BSD-3-Clause"
] | 6 | 2015-04-13T15:53:31.000Z | 2021-01-11T04:09:55.000Z | setup.py | rmallof/pysymemu | 7909fd065879f562004f6cc6be37f8072e85790b | [
"BSD-3-Clause"
] | 58 | 2015-01-01T06:10:07.000Z | 2021-02-13T19:41:02.000Z | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "pysymemu",
version = "0.0.1-alpha",
author = "Felipe Andres Manzano",
author_email = "feliam@binamuse.com",
description = ("A tool for symbolic execution of... | 34.368421 | 112 | 0.627106 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.