hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4efd1e2c58d40550d16328833e77260a19d43711 | 949 | py | Python | chat-bot/datadog.py | NepStark/mee6 | 4a7ba6b900277dd4e55c1e2a119d49ae9f98814b | [
"MIT"
] | 43 | 2018-02-17T21:53:51.000Z | 2022-03-28T08:40:14.000Z | chat-bot/datadog.py | NepStark/mee6 | 4a7ba6b900277dd4e55c1e2a119d49ae9f98814b | [
"MIT"
] | 16 | 2018-02-18T01:09:32.000Z | 2021-07-01T00:36:29.000Z | chat-bot/datadog.py | NepStark/mee6 | 4a7ba6b900277dd4e55c1e2a119d49ae9f98814b | [
"MIT"
] | 42 | 2018-03-16T01:36:49.000Z | 2022-02-22T07:35:45.000Z | import logging
log = logging.getLogger('discord')
| 21.088889 | 58 | 0.601686 | import aiomeasures
import logging
from functools import wraps
log = logging.getLogger('discord')
def existance_check(f):
@wraps(f)
def wrapper(self, *args, **kwargs):
if self.agent:
func = getattr(self.agent, f.__name__)
return func(*args, **kwargs)
else:
lo... | 0 | 434 | 0 | 324 | 0 | 47 | 0 | 3 | 90 |
fbfd34a7d886b9074494a43f11a99f1f4121e169 | 2,573 | py | Python | atomic_reactor/plugins/pre_add_yum_repo_by_url.py | ktdreyer/atomic-reactor | a3cc6a1a5187c7a178b183bef15faf3a4c9de52a | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/pre_add_yum_repo_by_url.py | ktdreyer/atomic-reactor | a3cc6a1a5187c7a178b183bef15faf3a4c9de52a | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/pre_add_yum_repo_by_url.py | ktdreyer/atomic-reactor | a3cc6a1a5187c7a178b183bef15faf3a4c9de52a | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
Add arbitrary yum repo, specified by URL of repo file, to a list of
repos which should be injected into built image by the inject_yum_repo
plugi... | 34.306667 | 95 | 0.62534 | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
Add arbitrary yum repo, specified by URL of repo file, to a list of
repos which should be injected into built image by the inject_yum_repo
plugi... | 0 | 0 | 0 | 1,824 | 0 | 0 | 0 | 49 | 67 |
fb282eef5cc10b99becc6de017eb6671a09ca29d | 1,090 | py | Python | generateStrategyFile.py | ToiletCommander/hog_contest_2021_cookes | a307289e65d27fa2e60f4b5cdf41bfe4f48ce838 | [
"MIT"
] | null | null | null | generateStrategyFile.py | ToiletCommander/hog_contest_2021_cookes | a307289e65d27fa2e60f4b5cdf41bfe4f48ce838 | [
"MIT"
] | null | null | null | generateStrategyFile.py | ToiletCommander/hog_contest_2021_cookes | a307289e65d27fa2e60f4b5cdf41bfe4f48ce838 | [
"MIT"
] | null | null | null | import final_strategy_train
import time
import submissions
from os import path
TRAIN_START_NAME = submissions.STRATEGY_NAME
TRAIN_EPOCH_NUM = submissions.EPOCH_NUM
FILENAME = 'savedStrats/' + TRAIN_START_NAME + "_" + str(TRAIN_EPOCH_NUM) + ".pkl"
if path.exists(FILENAME):
print("Strategy File", FILENAME, "Alread... | 28.684211 | 87 | 0.814679 | import final_strategy_train
import baseline_strategy
import test
import time
import submissions
from os import path
TRAIN_START_NAME = submissions.STRATEGY_NAME
TRAIN_EPOCH_NUM = submissions.EPOCH_NUM
FILENAME = 'savedStrats/' + TRAIN_START_NAME + "_" + str(TRAIN_EPOCH_NUM) + ".pkl"
if path.exists(FILENAME):
pri... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -7 | 44 |
310a4d9c5225665632367b13fc6b9f3442b8b766 | 1,845 | py | Python | datasetsnx/bamboo/misc/bbox.py | ckxy/part-of-hitogata | 76402d48a336fcd964d0e64bb01d959e8f07f296 | [
"MIT"
] | null | null | null | datasetsnx/bamboo/misc/bbox.py | ckxy/part-of-hitogata | 76402d48a336fcd964d0e64bb01d959e8f07f296 | [
"MIT"
] | null | null | null | datasetsnx/bamboo/misc/bbox.py | ckxy/part-of-hitogata | 76402d48a336fcd964d0e64bb01d959e8f07f296 | [
"MIT"
] | null | null | null |
__all__ = ['NormCoor']
| 26.73913 | 60 | 0.483469 | from ..base_internode import BaseInternode
__all__ = ['NormCoor']
class NormCoor(BaseInternode):
def __init__(self, size=None, no_forward=False):
self.size = size
self.no_forward = no_forward
def __call__(self, data_dict):
if self.no_forward:
return data_dict
if... | 0 | 0 | 0 | 1,753 | 0 | 0 | 0 | 21 | 45 |
e1300f02ac6964b3cd8989d7bdf2ce7f7eb16897 | 122 | py | Python | assets/powerStateOnIndicator.py | patricebeutler/pi-tablet_retropie | 66d266f1adf29d362bbca25076a18cd3f9b57cbd | [
"MIT"
] | null | null | null | assets/powerStateOnIndicator.py | patricebeutler/pi-tablet_retropie | 66d266f1adf29d362bbca25076a18cd3f9b57cbd | [
"MIT"
] | null | null | null | assets/powerStateOnIndicator.py | patricebeutler/pi-tablet_retropie | 66d266f1adf29d362bbca25076a18cd3f9b57cbd | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(14, GPIO.OUT)
GPIO.output(14, GPIO.HIGH)
| 15.25 | 26 | 0.729508 | #!/usr/bin/python2.7
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(14, GPIO.OUT)
GPIO.output(14, GPIO.HIGH)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
309a4f84f15e75c66ecf435c4aab13f1aa2e8d9f | 2,475 | py | Python | test/test_bad_width.py | jwodder/txtble | 682ffabf5bb11c606a457e5c18bd855cd81a5f69 | [
"MIT"
] | 3 | 2018-06-10T16:30:07.000Z | 2021-08-11T14:26:33.000Z | test/test_bad_width.py | jwodder/txtble | 682ffabf5bb11c606a457e5c18bd855cd81a5f69 | [
"MIT"
] | 25 | 2018-06-13T17:22:44.000Z | 2021-12-02T22:12:37.000Z | test/test_bad_width.py | jwodder/txtble | 682ffabf5bb11c606a457e5c18bd855cd81a5f69 | [
"MIT"
] | 1 | 2021-09-04T13:23:58.000Z | 2021-09-04T13:23:58.000Z |
BAD_STRING = "\x01"
ERRMSG = repr(BAD_STRING) + ": string has indeterminate width"
| 26.902174 | 77 | 0.588283 | import pytest
from txtble import IndeterminateWidthError, Txtble
BAD_STRING = "\x01"
ERRMSG = repr(BAD_STRING) + ": string has indeterminate width"
@pytest.mark.parametrize(
"s",
[
"\x0E",
"\x0F", # altcharset on/off
"\033[17;23H", # move cursor
"\a", # bell
"\b", ... | 0 | 691 | 0 | 0 | 0 | 1,491 | 0 | 21 | 182 |
6e4417f836c6ab50cd566bb21bbd1538762d3bf2 | 734 | py | Python | app.py | septober1/WebScraping-HW | aaf6b12d90f21425108cfd93376c1e9fc9bd4341 | [
"MIT"
] | null | null | null | app.py | septober1/WebScraping-HW | aaf6b12d90f21425108cfd93376c1e9fc9bd4341 | [
"MIT"
] | null | null | null | app.py | septober1/WebScraping-HW | aaf6b12d90f21425108cfd93376c1e9fc9bd4341 | [
"MIT"
] | null | null | null | from flask import Flask
import pymongo
# Establish Flask app & mongodb connection
app = Flask(__name__)
conn = "mongodb://localhost:27017"
client = pymongo.MongoClient(conn)
# Connect to mongo db and mars_info collection
db = client.mars
collection = db.mars_info
if __name__ == "__main__":
app.run(debug=True)... | 20.971429 | 59 | 0.692098 | from flask import Flask, render_template, jsonify, redirect
import pymongo
import scrape_mars
# Establish Flask app & mongodb connection
app = Flask(__name__)
conn = "mongodb://localhost:27017"
client = pymongo.MongoClient(conn)
# Connect to mongo db and mars_info collection
db = client.mars
collection = db.mars_info... | 0 | 312 | 0 | 0 | 0 | 0 | 0 | 33 | 68 |
860d03b07dff6c4ca42ee6a348de0c593ead8f88 | 1,422 | py | Python | update.py | BertLindeman/PiClock | bcb5dd5980d0fb219c2ce55c044ed755d2efa492 | [
"MIT"
] | null | null | null | update.py | BertLindeman/PiClock | bcb5dd5980d0fb219c2ce55c044ed755d2efa492 | [
"MIT"
] | 1 | 2018-12-23T16:30:48.000Z | 2018-12-23T16:30:48.000Z | update.py | BertLindeman/PiClock | bcb5dd5980d0fb219c2ce55c044ed755d2efa492 | [
"MIT"
] | null | null | null | import sys
import os.path
import re
buttonFileName = 'Button/gpio-keys'
print "Checking " + buttonFileName
if os.path.isfile(buttonFileName):
try:
print "Setting proper permissions on " + buttonFileName
os.chmod(buttonFileName, 0744)
except:
pass
apikeysFileName = 'Clock/ApiKeys.py'
wu... | 27.346154 | 67 | 0.594937 | import sys
import os.path
import re
buttonFileName = 'Button/gpio-keys'
print "Checking " + buttonFileName
if os.path.isfile(buttonFileName):
try:
print "Setting proper permissions on " + buttonFileName
os.chmod(buttonFileName, 0744)
except:
pass
apikeysFileName = 'Clock/ApiKeys.py'
wu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
06145c7d9254764743dda2f8ad442d0342e6ead8 | 234 | py | Python | mojang/account/structures/auth.py | Lucino772/pymojang | 579aa86131a88a2ffc053d466f585a7b7e6d5d28 | [
"MIT"
] | 8 | 2021-11-12T07:30:10.000Z | 2022-02-09T09:49:31.000Z | mojang/account/structures/auth.py | Lucino772/pymojang | 579aa86131a88a2ffc053d466f585a7b7e6d5d28 | [
"MIT"
] | 27 | 2021-09-09T18:46:32.000Z | 2022-03-10T16:46:24.000Z | mojang/account/structures/auth.py | Lucino772/pymojang | 579aa86131a88a2ffc053d466f585a7b7e6d5d28 | [
"MIT"
] | 1 | 2022-02-09T09:49:32.000Z | 2022-02-09T09:49:32.000Z |
## Security
| 16.714286 | 50 | 0.628205 | from typing import NamedTuple
## Security
class ChallengeInfo(NamedTuple):
"""
Attributes:
id (int): The id of the challenge
challenge (str): The challenge to complete
"""
id: int
challenge: str
| 0 | 0 | 0 | 168 | 0 | 0 | 0 | 8 | 44 |
52730e6f1dd262aede8560ada89b1a567dcfc07a | 9,698 | py | Python | src/pathlang.py | mruffalo/path | 5de703748da51b653280d5f4e9caf001f9ba682f | [
"MIT"
] | null | null | null | src/pathlang.py | mruffalo/path | 5de703748da51b653280d5f4e9caf001f9ba682f | [
"MIT"
] | 1 | 2016-05-30T15:37:08.000Z | 2016-06-08T13:29:45.000Z | src/pathlang.py | mruffalo/path | 5de703748da51b653280d5f4e9caf001f9ba682f | [
"MIT"
] | null | null | null | # PATH interpreter
# Copyright (c) 2003-04 Francis Rogers
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify... | 37.157088 | 91 | 0.567127 | # PATH interpreter
# Copyright (c) 2003-04 Francis Rogers
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify... | 0 | 0 | 0 | 8,537 | 0 | 0 | 0 | -23 | 68 |
8b87b28c049dd4879ee134ded06428abe59823de | 458 | py | Python | src/zerohunger/product/migrations/0002_auto_20200528_2033.py | BuildForSDG/Team-250-Backends | 1a81e20e3a01f909f26966070db5c9acc508838d | [
"MIT"
] | null | null | null | src/zerohunger/product/migrations/0002_auto_20200528_2033.py | BuildForSDG/Team-250-Backends | 1a81e20e3a01f909f26966070db5c9acc508838d | [
"MIT"
] | 16 | 2020-05-27T20:04:04.000Z | 2021-09-22T19:07:34.000Z | src/zerohunger/product/migrations/0002_auto_20200528_2033.py | BuildForSDG/Team-250-Backends | 1a81e20e3a01f909f26966070db5c9acc508838d | [
"MIT"
] | 1 | 2020-05-17T00:02:57.000Z | 2020-05-17T00:02:57.000Z | # Generated by Django 3.0.6 on 2020-05-28 19:33
| 20.818182 | 47 | 0.548035 | # Generated by Django 3.0.6 on 2020-05-28 19:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='produce',
name='product_img',
... | 0 | 0 | 0 | 344 | 0 | 0 | 0 | 19 | 46 |
ce9d27092e781bc4b5071fb38634b84dfe069529 | 706 | py | Python | tests/test_layout.py | up2cat/flask_extras | 7888da0ca2793e49a803a256b405fa43e6e64ae2 | [
"MIT"
] | 19 | 2016-08-03T07:10:23.000Z | 2022-03-03T16:37:11.000Z | tests/test_layout.py | christabor/jinja2_template_pack | f57300bc2922aa4105d1aa393351b63c86c26048 | [
"MIT"
] | 7 | 2016-11-11T21:54:53.000Z | 2018-11-21T04:33:46.000Z | tests/test_layout.py | christabor/jinja2_template_pack | f57300bc2922aa4105d1aa393351b63c86c26048 | [
"MIT"
] | 3 | 2016-12-30T10:34:02.000Z | 2021-04-08T05:40:09.000Z | """Tests for 'layout' filters."""
| 30.695652 | 56 | 0.626062 | """Tests for 'layout' filters."""
from flask_extras.filters import layout
class TestBs3Col:
"""All tests for bs3 col function."""
def test_returns_right_width(self):
"""Test the return value for a valid type."""
assert layout.bs3_cols(1) == 12
assert layout.bs3_cols(2) == 6
a... | 0 | 0 | 0 | 607 | 0 | 0 | 0 | 18 | 46 |
d915b38dcfbd37eee4f4627ebb2c7af5d548e0f3 | 404 | py | Python | rainbow_logging_handler/test/test_unicode.py | movermeyer/rainbow_logging_handler | 630c226696973d14b6e145bc7b0265180705b18e | [
"Unlicense"
] | 69 | 2015-01-25T22:57:50.000Z | 2022-01-02T22:32:47.000Z | rainbow_logging_handler/test/test_unicode.py | movermeyer/rainbow_logging_handler | 630c226696973d14b6e145bc7b0265180705b18e | [
"Unlicense"
] | 9 | 2015-04-13T07:35:14.000Z | 2020-07-03T10:50:26.000Z | rainbow_logging_handler/test/test_unicode.py | movermeyer/rainbow_logging_handler | 630c226696973d14b6e145bc7b0265180705b18e | [
"Unlicense"
] | 14 | 2015-11-20T14:13:37.000Z | 2019-10-29T08:08:19.000Z | # -*- coding: utf-8 -*-
| 22.444444 | 57 | 0.737624 | # -*- coding: utf-8 -*-
from nose.tools import *
import sys
import logging
from rainbow_logging_handler import RainbowLoggingHandler
def setup():
logger = logging.getLogger('test_unicode')
logger.setLevel(logging.DEBUG)
handler = RainbowLoggingHandler(sys.stderr)
logger.addHandler(handler)
def test_... | 15 | 0 | 0 | 0 | 0 | 218 | 0 | 21 | 134 |
adb4318c29d87b7f0f32e4598b56d9828cf8299f | 2,503 | py | Python | Modules/mailer.py | DaMuffinDev/ezruh | 7c57b8b77f01674c1f46c0adad661f234584e024 | [
"MIT"
] | null | null | null | Modules/mailer.py | DaMuffinDev/ezruh | 7c57b8b77f01674c1f46c0adad661f234584e024 | [
"MIT"
] | null | null | null | Modules/mailer.py | DaMuffinDev/ezruh | 7c57b8b77f01674c1f46c0adad661f234584e024 | [
"MIT"
] | null | null | null | from Resources.required_modules import pymodules
pymodules.install(pymodules.presets.modules("mailer"))
# Repeated mailing to a single address
def mail_repeated_address(message_object, data_object, reciever_address, repeat_amount=1):
"""
:param message_object - mailman_message("test subject", "test body", Mail... | 42.423729 | 126 | 0.713144 | from Resources.required_modules import pymodules
pymodules.install(pymodules.presets.modules("mailer"))
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
import ssl
class Mailman:
plain = "plain"
html = "html"
def __init__(self, sender_address, sender_passw... | 0 | 0 | 0 | 1,230 | 0 | 234 | 0 | 22 | 158 |
b1e8ba08a4bbae0f1f276f60cc1be2217333cfff | 10,106 | py | Python | src/ImageRetreival.py | midhunharikumar/DeepRetrieval | 011e8de70c14fd1404b5980a9d0b8fa618164204 | [
"Apache-2.0"
] | null | null | null | src/ImageRetreival.py | midhunharikumar/DeepRetrieval | 011e8de70c14fd1404b5980a9d0b8fa618164204 | [
"Apache-2.0"
] | null | null | null | src/ImageRetreival.py | midhunharikumar/DeepRetrieval | 011e8de70c14fd1404b5980a9d0b8fa618164204 | [
"Apache-2.0"
] | null | null | null |
from graphSearch import GraphSearch
from DeepFeatures import DeepFeatures
import os
import glob
import json
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
>>>>>>> c5b3a9dac6d0789cc8005df728bc69dff4b455b3
import argparse
import numpy as np
import scipy
from skimage import transform
<<<<<<< HEAD
=======
>>>>>>> Adding chang... | 36.749091 | 87 | 0.611419 |
from graphSearch import GraphSearch
from DeepFeatures import DeepFeatures
import os
import glob
import json
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
>>>>>>> c5b3a9dac6d0789cc8005df728bc69dff4b455b3
import argparse
import numpy as np
import scipy
from skimage import transform
<<<<<<< HEAD
=======
>>>>>>> Adding chang... | 0 | 0 | 0 | 589 | 0 | 459 | 0 | 0 | 156 |
b305f93cfe4292cf7d2578bfe7c8df446ed775a0 | 1,742 | py | Python | src/group2plugin/threshold/simple_threshold.py | bnorthan/Group2Plugin | f4a1153f2f6838e1651eaea12c49b3b9992ce3b7 | [
"BSD-3-Clause"
] | null | null | null | src/group2plugin/threshold/simple_threshold.py | bnorthan/Group2Plugin | f4a1153f2f6838e1651eaea12c49b3b9992ce3b7 | [
"BSD-3-Clause"
] | null | null | null | src/group2plugin/threshold/simple_threshold.py | bnorthan/Group2Plugin | f4a1153f2f6838e1651eaea12c49b3b9992ce3b7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'simple_threshold.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
| 43.55 | 76 | 0.719862 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'simple_threshold.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObje... | 0 | 0 | 0 | 1,471 | 0 | 0 | 0 | 21 | 46 |
a4d38a994e6522271df63468d089fc3bb69fa24a | 380 | py | Python | spoticly/commands/auth.py | onhernandes/spoticly | ed109f4ea118c57557af1e7a10120a120fd29fa4 | [
"MIT"
] | 6 | 2018-12-23T16:16:36.000Z | 2019-01-11T12:10:49.000Z | spoticly/commands/auth.py | onhernandes/spoticly | ed109f4ea118c57557af1e7a10120a120fd29fa4 | [
"MIT"
] | null | null | null | spoticly/commands/auth.py | onhernandes/spoticly | ed109f4ea118c57557af1e7a10120a120fd29fa4 | [
"MIT"
] | null | null | null | """Auth command."""
from .. import settings, spotify
| 22.352941 | 66 | 0.618421 | """Auth command."""
from .base import Base
from .. import settings, spotify
import spotipy
class Auth(Base):
"""Authenticate user"""
def run(self):
token = spotify.get_spotipy_token()
settings.set({"SPOTIPY_TOKEN": token})
sp = spotipy.Spotify(auth=token)
me = sp.me()
... | 0 | 0 | 0 | 264 | 0 | 0 | 0 | -6 | 68 |
d6306d2966bb106ce4fa119d9f81301133c44a19 | 1,573 | py | Python | Analyser/MachineLearning/PositionalEncoding.py | yangtx2009/finance | 5ba428f0495a16de89ea852e04e71bde8a00f9ba | [
"MIT"
] | null | null | null | Analyser/MachineLearning/PositionalEncoding.py | yangtx2009/finance | 5ba428f0495a16de89ea852e04e71bde8a00f9ba | [
"MIT"
] | null | null | null | Analyser/MachineLearning/PositionalEncoding.py | yangtx2009/finance | 5ba428f0495a16de89ea852e04e71bde8a00f9ba | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
positionalEncoding = PositionalEncoding(8,4)
print(positionalEncoding.get_positional_encoding()) | 44.942857 | 109 | 0.606484 | import tensorflow as tf
import numpy as np
class PositionalEncoding(object):
"""
In https://rubikscode.net/2019/08/05/transformer-with-python-and-tensorflow-2-0-attention-layers/,
he uses [sin(w*0), sin(w*1), ..., cos(w*0), cos(w*1), ...]
but in tensorflow tutorial https://www.tensorflow.or... | 0 | 0 | 0 | 1,375 | 0 | 0 | 0 | -1 | 67 |
63ecf56845adb30d091f361db591573e599b3552 | 17,697 | py | Python | bindings/gen_code.py | aldenml/ecc | eb67894406d5f68538f31c9ab11b72770ea3f24e | [
"MIT"
] | 7 | 2021-07-17T20:31:45.000Z | 2022-03-28T20:31:34.000Z | bindings/gen_code.py | aldenml/ecc | eb67894406d5f68538f31c9ab11b72770ea3f24e | [
"MIT"
] | 2 | 2022-01-16T03:02:25.000Z | 2022-02-12T17:13:47.000Z | bindings/gen_code.py | aldenml/ecc | eb67894406d5f68538f31c9ab11b72770ea3f24e | [
"MIT"
] | 1 | 2022-02-01T01:10:51.000Z | 2022-02-01T01:10:51.000Z | #
# Copyright (c) 2021-2022, Alden Torres
#
# Licensed under the terms of the MIT license.
# Copy of the license at https://opensource.org/licenses/MIT
#
ecc_headers = ["util", "hash", "mac", "kdf", "ed25519", "ristretto255", "bls12_381",
"h2c", "oprf", "opaque", "sign", "pre"]
ecc_ignore = ["... | 32.772222 | 119 | 0.480025 | #
# Copyright (c) 2021-2022, Alden Torres
#
# Licensed under the terms of the MIT license.
# Copy of the license at https://opensource.org/licenses/MIT
#
import json
import re
import subprocess
class ParamComment:
def __init__(self, ast):
self.ast = ast
self.name = ast["param"]
self.direc... | 0 | 0 | 0 | 11,327 | 0 | 5,554 | 0 | -26 | 366 |
eea7123f577b3f3ccb46873e4db90471d77c89c8 | 1,967 | py | Python | palantir/metrics.py | Ithil-protocol/palantir | 48dcfd05a04890c6e49cff16b26e854c026b104b | [
"MIT"
] | null | null | null | palantir/metrics.py | Ithil-protocol/palantir | 48dcfd05a04890c6e49cff16b26e854c026b104b | [
"MIT"
] | null | null | null | palantir/metrics.py | Ithil-protocol/palantir | 48dcfd05a04890c6e49cff16b26e854c026b104b | [
"MIT"
] | 1 | 2022-03-03T17:32:03.000Z | 2022-03-03T17:32:03.000Z | from typing import Dict, List, NewType
from palantir.types import Timestamp
Metrics = NewType("Metrics", Dict[Metric, Dict[Timestamp, List[float]]])
| 28.1 | 114 | 0.698017 | from enum import Enum
from typing import Dict, List, NewType
from palantir.clock import Clock
from palantir.types import Timestamp
class Metric(Enum):
GOVERNANCE_FEES_ETHEREUM = "governance_fees_ethereum"
INSUFFICIENT_LIQUIDITY = "insufficient_liquidity"
INSURANCE_POOL_LIQUIDITY_DAI = "insurance_pool_liq... | 0 | 0 | 0 | 1,312 | 0 | 256 | 0 | 11 | 229 |
993b873e588e1539e601dcb514eb394d2830282f | 36,674 | py | Python | esnet/src/main/resources/Lib/layer2/common/openflow.py | esnet/enos | 460ddf07dc3c78394246753166bf119a15809074 | [
"BSD-3-Clause-LBNL"
] | 10 | 2016-02-12T19:11:14.000Z | 2019-04-15T08:56:54.000Z | esnet/src/main/resources/Lib/layer2/common/openflow.py | esnet/enos | 460ddf07dc3c78394246753166bf119a15809074 | [
"BSD-3-Clause-LBNL"
] | 99 | 2016-04-11T15:58:20.000Z | 2016-07-25T17:22:01.000Z | esnet/src/main/resources/Lib/layer2/common/openflow.py | esnet/enos | 460ddf07dc3c78394246753166bf119a15809074 | [
"BSD-3-Clause-LBNL"
] | 2 | 2016-01-19T14:35:28.000Z | 2019-08-25T21:30:05.000Z | #
# ESnet Network Operating System (ENOS) Copyright (c) 2015, The Regents
# of the University of California, through Lawrence Berkeley National
# Laboratory (subject to receipt of any required approvals from the
# U.S. Dept. of Energy). All rights reserved.
#
# If you have questions about your rights to use or distrib... | 38.685654 | 159 | 0.600071 | #
# ESnet Network Operating System (ENOS) Copyright (c) 2015, The Regents
# of the University of California, through Lawrence Berkeley National
# Laboratory (subject to receipt of any required approvals from the
# U.S. Dept. of Energy). All rights reserved.
#
# If you have questions about your rights to use or distrib... | 0 | 2,346 | 0 | 32,588 | 0 | 30 | 0 | 67 | 478 |
d65423122854992b0203011e729a515a62a732f6 | 5,651 | py | Python | raspberry_pi_device.py | jamisonderek/waterconsumption | 08238257f18e31fcf51af4c64220ce08e9eeeb95 | [
"MIT"
] | null | null | null | raspberry_pi_device.py | jamisonderek/waterconsumption | 08238257f18e31fcf51af4c64220ce08e9eeeb95 | [
"MIT"
] | null | null | null | raspberry_pi_device.py | jamisonderek/waterconsumption | 08238257f18e31fcf51af4c64220ce08e9eeeb95 | [
"MIT"
] | 1 | 2021-05-12T01:52:11.000Z | 2021-05-12T01:52:11.000Z |
try:
except ImportError:
print ("\033[91mError importing DHT code -- Are you running on an IoT device?\033[0m")
try:
except NotImplementedError:
print ("\033[91mError importing board -- Are you running on an IoT device?\033[0m")
# TODO Brian: Add attributes for light sensor.
| 37.926174 | 113 | 0.61989 | from bme280 import Bme280
import busio
try:
import adafruit_dht
except ImportError:
print ("\033[91mError importing DHT code -- Are you running on an IoT device?\033[0m")
try:
import board
except NotImplementedError:
print ("\033[91mError importing board -- Are you running on an IoT device?\033[0m")
... | 0 | 0 | 0 | 5,048 | 0 | 0 | 0 | 64 | 251 |
58c789167d152f559c09f821128f691ff038b7b3 | 5,490 | py | Python | test/test_transition.py | Pat-Laub/pyABC | f23f0ff8d430a8ce0a0c8253b45e19add9121992 | [
"BSD-3-Clause"
] | null | null | null | test/test_transition.py | Pat-Laub/pyABC | f23f0ff8d430a8ce0a0c8253b45e19add9121992 | [
"BSD-3-Clause"
] | null | null | null | test/test_transition.py | Pat-Laub/pyABC | f23f0ff8d430a8ce0a0c8253b45e19add9121992 | [
"BSD-3-Clause"
] | null | null | null | from pyabc.transition import Transition
from pyabc import MultivariateNormalTransition
import pandas as pd
import numpy as np
from pyabc import GridSearchCV
def test_argument_order(transition: Transition):
"""
Dataframes passed to the transition kernels are generated from dicts.
Order of ... | 26.911765 | 76 | 0.660656 | from pyabc.transition import NotEnoughParticles, LocalTransition, Transition
from pyabc import MultivariateNormalTransition
import pandas as pd
import numpy as np
import pytest
from pyabc import GridSearchCV
@pytest.fixture(params=[LocalTransition, MultivariateNormalTransition])
def transition(request):
return re... | 0 | 102 | 0 | 0 | 0 | 3,116 | 0 | 29 | 459 |
105f5ac14e4c0d87d30b3f8c87a6092ad7a9a60e | 592 | py | Python | sessionista/tests/test_store.py | pabloriveracelerity/sessionista | 83f730d9573742832045d98410c4c5e561e2adc3 | [
"MIT"
] | null | null | null | sessionista/tests/test_store.py | pabloriveracelerity/sessionista | 83f730d9573742832045d98410c4c5e561e2adc3 | [
"MIT"
] | null | null | null | sessionista/tests/test_store.py | pabloriveracelerity/sessionista | 83f730d9573742832045d98410c4c5e561e2adc3 | [
"MIT"
] | null | null | null |
MY_ACTION = 'my_action'
| 24.666667 | 65 | 0.734797 | import pytest
from sessionista.store import store
MY_ACTION = 'my_action'
def my_action(state):
state['key'] = 'mutated value'
return state
def test_register_action():
store.register([my_action])
assert my_action.__name__ in store.actions.keys()
def test_store_dispatch_action():
new_state = stor... | 0 | 0 | 0 | 0 | 0 | 402 | 0 | 6 | 159 |
fa633b568f10afad94820d6756cfa17b45dfe88a | 571 | py | Python | mbpert/loss.py | yuanwxu/mbpert | 5e21f6647e3203d3160bb12ca4db6fa84dfe97c7 | [
"MIT"
] | null | null | null | mbpert/loss.py | yuanwxu/mbpert | 5e21f6647e3203d3160bb12ca4db6fa84dfe97c7 | [
"MIT"
] | null | null | null | mbpert/loss.py | yuanwxu/mbpert | 5e21f6647e3203d3160bb12ca4db6fa84dfe97c7 | [
"MIT"
] | null | null | null | import torch
def reg_loss_interaction(A, reg_lambda = 0.001, order=2):
""" Regularization loss for the off-diag elements of interaction matrix A """
mask = ~torch.eye(A.shape[0], dtype=torch.bool)
return reg_lambda * torch.linalg.norm(A[mask], order)
def reg_loss_r(r, reg_lambda = 0.001, order=2):
""" Regula... | 38.066667 | 79 | 0.721541 | import torch
def reg_loss_interaction(A, reg_lambda = 0.001, order=2):
""" Regularization loss for the off-diag elements of interaction matrix A """
mask = ~torch.eye(A.shape[0], dtype=torch.bool)
return reg_lambda * torch.linalg.norm(A[mask], order)
def reg_loss_r(r, reg_lambda = 0.001, order=2):
""" Regula... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0c22417d41c99a465d02b74317b81906e4bcecfb | 78 | py | Python | Source/Python/1002.py | felippegeorge/URI | 9ff647a7d42d34bdd128af5edd79a43b8d3453dd | [
"MIT"
] | 1 | 2015-08-15T04:53:56.000Z | 2015-08-15T04:53:56.000Z | Source/Python/1002.py | felippegeorge/URI | 9ff647a7d42d34bdd128af5edd79a43b8d3453dd | [
"MIT"
] | null | null | null | Source/Python/1002.py | felippegeorge/URI | 9ff647a7d42d34bdd128af5edd79a43b8d3453dd | [
"MIT"
] | null | null | null | raio = float(input())
area = (raio * raio) * 3.14159
print("A=%0.4f" %area) | 15.6 | 31 | 0.576923 | raio = float(input())
area = (raio * raio) * 3.14159
print("A=%0.4f" %area) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f00064f6b7fc3ea71807465854d75bed4fea15c4 | 843 | py | Python | human_data_collection/config.py | facebookresearch/bernoulli_lse | 8892039dfe88badc390c733fd7b938732375f29f | [
"MIT"
] | 2 | 2022-03-02T21:04:28.000Z | 2022-03-12T12:09:07.000Z | human_data_collection/config.py | facebookresearch/bernoulli_lse | 8892039dfe88badc390c733fd7b938732375f29f | [
"MIT"
] | null | null | null | human_data_collection/config.py | facebookresearch/bernoulli_lse | 8892039dfe88badc390c733fd7b938732375f29f | [
"MIT"
] | null | null | null | # Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
from datetime import datetime
"""
Develop an experiment that measures and combination of the following features:
spatial_frequency
temporal_frequency
mean_luminance
eccentricity
field_angle
orientation
"""
constants = dict(
savefolder=".... | 18.326087 | 78 | 0.671412 | # Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
from datetime import datetime
"""
Develop an experiment that measures and combination of the following features:
spatial_frequency
temporal_frequency
mean_luminance
eccentricity
field_angle
orientation
"""
constants = dict(
savefolder=".... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a32987adbdc3fc0450720a0e201da4981a60b211 | 1,022 | py | Python | output/models/ms_data/model_groups/mg_z004_xsd/mg_z004.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/model_groups/mg_z004_xsd/mg_z004.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/model_groups/mg_z004_xsd/mg_z004.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null |
__NAMESPACE__ = "urn:test"
| 22.217391 | 40 | 0.277886 | from dataclasses import dataclass, field
from typing import List
__NAMESPACE__ = "urn:test"
@dataclass
class Root:
class Meta:
namespace = "urn:test"
content: List[object] = field(
default_factory=list,
metadata={
"type": "Wildcard",
"namespace": "##any",
... | 0 | 905 | 0 | 0 | 0 | 0 | 0 | 21 | 67 |
05f1711d5f25dd7b06fc8822aa53033e2fb6bbca | 637 | py | Python | tethysext/atcore/services/model_database_connection_base.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | 3 | 2020-11-05T23:50:47.000Z | 2021-02-26T21:43:29.000Z | tethysext/atcore/services/model_database_connection_base.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | 7 | 2020-10-29T16:53:49.000Z | 2021-05-07T19:46:47.000Z | tethysext/atcore/services/model_database_connection_base.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | null | null | null | """
********************************************************************************
* Name: model_file_database_connection_base.py
* Author: nswain
* Created On: June 05, 2018
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""
| 20.548387 | 80 | 0.419152 | """
********************************************************************************
* Name: model_file_database_connection_base.py
* Author: nswain
* Created On: June 05, 2018
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""
class ModelDatabaseConnect... | 0 | 0 | 0 | 321 | 0 | 0 | 0 | 0 | 23 |
12c8e470fb7f3c244bc7475fe5cad16b5ecb00c7 | 3,637 | py | Python | episcanpy/plotting/_histograms.py | rLannes/epiScanpy | 3d5860551c99fb28ba5b56cb9aa0d246c529acc4 | [
"BSD-3-Clause"
] | null | null | null | episcanpy/plotting/_histograms.py | rLannes/epiScanpy | 3d5860551c99fb28ba5b56cb9aa0d246c529acc4 | [
"BSD-3-Clause"
] | null | null | null | episcanpy/plotting/_histograms.py | rLannes/epiScanpy | 3d5860551c99fb28ba5b56cb9aa0d246c529acc4 | [
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import random
import warnings
def cluster_composition(adata, cluster, condition, xlabel='cell cluster',
ylabel='cell count', title=None, save=False):
"""
Deprecated. Use epi.pl.cell_composition instead.
"""
... | 33.063636 | 115 | 0.59912 | import anndata as ad
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import random
import warnings
from warnings import warn
def cluster_composition(adata, cluster, condition, xlabel='cell cluster',
ylabel='cell count', title=None, save=False):
"""
Deprecated. Us... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 44 |
5deba5e0b03f29b0604e832936931a0fdecf8281 | 24,275 | py | Python | dynamic_word_embedding/local_jump_dsg_beam_search_gbooks.py | mandt-lab/variational-beam-search | 61f217ed6ac6fdda0123f2b3bda37fa42fb4b4c2 | [
"MIT"
] | 1 | 2022-03-16T09:50:10.000Z | 2022-03-16T09:50:10.000Z | dynamic_word_embedding/local_jump_dsg_beam_search_gbooks.py | mandt-lab/variational-beam-search | 61f217ed6ac6fdda0123f2b3bda37fa42fb4b4c2 | [
"MIT"
] | null | null | null | dynamic_word_embedding/local_jump_dsg_beam_search_gbooks.py | mandt-lab/variational-beam-search | 61f217ed6ac6fdda0123f2b3bda37fa42fb4b4c2 | [
"MIT"
] | null | null | null | import os
import subprocess
import multiprocessing
import itertools
import numpy as np
import tensorflow as tf
# mute tensorflow information
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # or any {'0', '1', '2'}
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) # or any {DEBUG, INFO, WARN, ERROR, FATAL}
i... | 53.351648 | 235 | 0.547518 | import sys
import os
import shutil
import subprocess
import multiprocessing
from multiprocessing import Pool
import pickle as pkl
import itertools
import numpy as np
from scipy import stats
import tensorflow as tf
# mute tensorflow information
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # or any {'0', '1', '2'}
tf.com... | 0 | 0 | 0 | 0 | 0 | 13,202 | 0 | -7 | 227 |
e4092deabc1d4e47b58cfaffc0533393eaf1eb12 | 6,098 | py | Python | sktime/transformations/panel/slope.py | mikofski/sktime | 87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7 | [
"BSD-3-Clause"
] | 5,349 | 2019-03-21T14:56:50.000Z | 2022-03-31T11:25:30.000Z | sktime/transformations/panel/slope.py | mikofski/sktime | 87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7 | [
"BSD-3-Clause"
] | 1,803 | 2019-03-26T13:33:53.000Z | 2022-03-31T23:58:10.000Z | sktime/transformations/panel/slope.py | mikofski/sktime | 87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7 | [
"BSD-3-Clause"
] | 911 | 2019-03-25T01:21:30.000Z | 2022-03-31T04:45:51.000Z | # -*- coding: utf-8 -*-
| 29.892157 | 80 | 0.5551 | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import math
import statistics
from sktime.transformations.base import _PanelToPanelTransformer
from sktime.datatypes._panel._convert import from_nested_to_2d_array
from sktime.utils.validation.panel import check_X
class SlopeTransformer(_PanelToPanelTrans... | 0 | 0 | 0 | 5,797 | 0 | 0 | 0 | 99 | 177 |
f2aaacc48f9073597461a5749ffc4ff6527d1561 | 1,092 | py | Python | util/update_db_category.py | osu-cascades/iot-lab-inventory | 80a0ae05b535449789cd1073e7cb9eebcbb0497f | [
"FSFAP"
] | 1 | 2018-01-11T07:23:28.000Z | 2018-01-11T07:23:28.000Z | util/update_db_category.py | osu-cascades/iot-lab-inventory | 80a0ae05b535449789cd1073e7cb9eebcbb0497f | [
"FSFAP"
] | 38 | 2017-05-03T07:36:27.000Z | 2018-01-11T02:28:10.000Z | util/update_db_category.py | osu-cascades/iot-lab-inventory | 80a0ae05b535449789cd1073e7cb9eebcbb0497f | [
"FSFAP"
] | null | null | null | #!/usr/bin/env python
# TODO: description of this script
# BOB = controller
# CAB = cable
# COM = misc
# DEV = controller
# GPS = sensor
# LCD = actuator
# ROB = actuator
# SEN = sensor
# TOL = tool
# WRL = wireless
# KIT = (drop)
# LAB = (drop)
# PRT = misc
from iot_lab_inventory import db
from iot_lab_inventory.model... | 24.266667 | 51 | 0.509158 | #!/usr/bin/env python
# TODO: description of this script
# BOB = controller
# CAB = cable
# COM = misc
# DEV = controller
# GPS = sensor
# LCD = actuator
# ROB = actuator
# SEN = sensor
# TOL = tool
# WRL = wireless
# KIT = (drop)
# LAB = (drop)
# PRT = misc
import flask_sqlalchemy
from iot_lab_inventory import db
fro... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 23 |
a7f272674c8d62253b6b7dea768935c680c80359 | 212 | py | Python | stockist/__stockist__.py | mainanick/stockist | abf457f5be77dd01a183a98fc7989463a0a7cbd0 | [
"WTFPL"
] | null | null | null | stockist/__stockist__.py | mainanick/stockist | abf457f5be77dd01a183a98fc7989463a0a7cbd0 | [
"WTFPL"
] | null | null | null | stockist/__stockist__.py | mainanick/stockist | abf457f5be77dd01a183a98fc7989463a0a7cbd0 | [
"WTFPL"
] | null | null | null | __title__ = "stockist"
__description__ = ""
__version__ = "0.1.1"
__author__ = "Maina Nick"
__license__ = "DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2.0"
__copyright__ = "Copyright (C) 2018-Present Maina Nick"
| 30.285714 | 63 | 0.735849 | __title__ = "stockist"
__description__ = ""
__version__ = "0.1.1"
__author__ = "Maina Nick"
__license__ = "DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2.0"
__copyright__ = "Copyright (C) 2018-Present Maina Nick"
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
72755bc746d04b3e5d1fb511a7512ba186454e41 | 25,748 | py | Python | sunshine_conversations_client/__init__.py | zendesk/sunshine-conversations-python | 2d0240681b809ffd8ff0e9ed58b33aae844d29f6 | [
"Apache-2.0"
] | 4 | 2020-09-27T14:28:25.000Z | 2022-02-02T13:51:29.000Z | sunshine_conversations_client/__init__.py | zendesk/sunshine-conversations-python | 2d0240681b809ffd8ff0e9ed58b33aae844d29f6 | [
"Apache-2.0"
] | 3 | 2021-09-30T18:18:58.000Z | 2021-12-04T07:55:23.000Z | sunshine_conversations_client/__init__.py | zendesk/sunshine-conversations-python | 2d0240681b809ffd8ff0e9ed58b33aae844d29f6 | [
"Apache-2.0"
] | 5 | 2020-11-07T02:08:18.000Z | 2021-12-07T17:10:23.000Z | # coding: utf-8
# flake8: noqa
"""
Sunshine Conversations API
The version of the OpenAPI document: 9.4.5
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
__version__ = "9.4.6"
# import apis into sdk package
# import ApiClient
# import models into sdk package
| 82.525641 | 154 | 0.929121 | # coding: utf-8
# flake8: noqa
"""
Sunshine Conversations API
The version of the OpenAPI document: 9.4.5
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
__version__ = "9.4.6"
# import apis into sdk package
from sunshine_conversations_client.api.activities_api i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19,049 | 6,380 |
ad7a4c7eb7c37da291e249e4519af96fb3c5470b | 410 | py | Python | pyoanda/__init__.py | toloco/pyoanda | 26b3f28a89d07c5c20d2a645884505387f1daae8 | [
"MIT"
] | 81 | 2015-03-18T23:02:33.000Z | 2021-07-13T15:00:14.000Z | pyoanda/__init__.py | toloco/pyoanda | 26b3f28a89d07c5c20d2a645884505387f1daae8 | [
"MIT"
] | 32 | 2015-04-18T22:04:00.000Z | 2019-02-28T00:58:39.000Z | pyoanda/__init__.py | toloco/pyoanda | 26b3f28a89d07c5c20d2a645884505387f1daae8 | [
"MIT"
] | 32 | 2015-04-06T16:42:07.000Z | 2018-02-13T19:06:19.000Z | __version__ = "1.021"
try:
except ImportError:
pass
# OANDA API URLS
SANDBOX = (
"http://api-sandbox.oanda.com",
"http://stream-sandbox.oanda.com"
)
PRACTICE = (
"https://api-fxpractice.oanda.com",
"https://stream-fxpractice.oanda.com"
)
TRADE = (
"https://api-fxtrade.oanda.com",
"https:... | 17.083333 | 41 | 0.643902 | __version__ = "1.021"
try:
from .client import Client
from .order import Order
except ImportError:
pass
# OANDA API URLS
SANDBOX = (
"http://api-sandbox.oanda.com",
"http://stream-sandbox.oanda.com"
)
PRACTICE = (
"https://api-fxpractice.oanda.com",
"https://stream-fxpractice.oanda.com"
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 52 |
833817a5731440fa53ab744b44090b40e1fec9e8 | 212 | py | Python | Python/7/FormTheLargest/form_the_largest.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | Python/7/FormTheLargest/form_the_largest.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | 6 | 2020-02-21T17:01:59.000Z | 2021-05-04T07:04:41.000Z | Python/7/FormTheLargest/form_the_largest.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | import sys
if __name__ == "__main__":
if len(sys.argv) == 2:
print(max_number(n=sys.argv[1]))
else:
sys.exit(1) | 17.666667 | 53 | 0.584906 | import sys
def max_number(n):
return int(''.join(sorted(str(n), reverse=True)))
if __name__ == "__main__":
if len(sys.argv) == 2:
print(max_number(n=sys.argv[1]))
else:
sys.exit(1) | 0 | 0 | 0 | 0 | 0 | 51 | 0 | 0 | 23 |
ced3891dc62d26c42d905ab39aeb29cacb79e194 | 1,338 | py | Python | Class6/processtxt.py | yipliu/NLPseq2seq | cf676387bb120cd974da71d848c95adb4aa46b19 | [
"MIT"
] | null | null | null | Class6/processtxt.py | yipliu/NLPseq2seq | cf676387bb120cd974da71d848c95adb4aa46b19 | [
"MIT"
] | null | null | null | Class6/processtxt.py | yipliu/NLPseq2seq | cf676387bb120cd974da71d848c95adb4aa46b19 | [
"MIT"
] | null | null | null |
import pandas as pd
from sklearn.model_selection import train_test_split
"""
Translate txt into json
"""
# Lowercase, trim, and remove non-letter characters
if __name__ == "__main__":
src_path, trg_path = 'data/hard_pc_src.txt', 'data/hard_pc_tar.txt'
raw_data = processData(src_path, trg_path, 'ISO-8859-... | 28.468085 | 75 | 0.660688 | import random
import re
import pandas as pd
from sklearn.model_selection import train_test_split
"""
Translate txt into json
"""
# Lowercase, trim, and remove non-letter characters
def normalizeString(s):
s = s.lower().strip()
#s = re.sub(r"([.!?])", r" \1", s)
#s = re.sub(r"[^a-zA-Z.!?]+", r" ", s)
r... | 0 | 0 | 0 | 0 | 0 | 544 | 0 | -20 | 89 |
e0ce324d88e9cc397f78e062be9c3720116ae51f | 1,078 | py | Python | custom/ilsgateway/__init__.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | 1 | 2017-02-10T03:14:51.000Z | 2017-02-10T03:14:51.000Z | custom/ilsgateway/__init__.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | null | null | null | custom/ilsgateway/__init__.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | null | null | null | from custom.ilsgateway.comparison_reports import ProductsCompareReport, LocationsCompareReport, WebUsersCompareReport, SMSUsersCompareReport
from custom.ilsgateway.tanzania.reports.alerts import AlertReport
from custom.ilsgateway.tanzania.reports.dashboard_report import DashboardReport
from custom.ilsgateway.tanzania.r... | 35.933333 | 97 | 0.78757 | from custom.ilsgateway.comparison_reports import ProductsCompareReport, LocationsCompareReport, \
WebUsersCompareReport, SMSUsersCompareReport
from custom.ilsgateway.tanzania.reports.alerts import AlertReport
from custom.ilsgateway.tanzania.reports.dashboard_report import DashboardReport
from custom.ilsgateway.tanz... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 |
3cb131142cd71e055289857ec52a4de26d549093 | 1,479 | py | Python | scripts/check_reaction_ts.py | jensengroup/elementary_step_om | 7ae7e5226f6be1f3ace3e3886a0284c4f8923ee9 | [
"MIT"
] | null | null | null | scripts/check_reaction_ts.py | jensengroup/elementary_step_om | 7ae7e5226f6be1f3ace3e3886a0284c4f8923ee9 | [
"MIT"
] | null | null | null | scripts/check_reaction_ts.py | jensengroup/elementary_step_om | 7ae7e5226f6be1f3ace3e3886a0284c4f8923ee9 | [
"MIT"
] | 1 | 2021-06-23T13:08:07.000Z | 2021-06-23T13:08:07.000Z | import sys
import pickle
from tqdm import tqdm
sys.path.append(sys.path[0].rsplit('/', 1)[0])
from elementary_step_om.external_calculation.xtb_calculations import xTBCalculator
from elementary_step_om.external_calculation.gaussian_calculations import GaussianCalculator
if __name__ == "__main__":
exteral_xt... | 27.90566 | 99 | 0.64165 | import sys
import pickle
from tqdm import tqdm
sys.path.append(sys.path[0].rsplit('/', 1)[0])
from elementary_step_om.chem import Fragment
from elementary_step_om.external_calculation.xtb_calculations import xTBCalculator
from elementary_step_om.external_calculation.gaussian_calculations import GaussianCalculator
i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 22 |
6cdbb7e727c11d4145e9db16260b9b1cbab53fdc | 10,040 | py | Python | safe-driver/src/evaluate/evaluate.py | azeltov/safe-driver-prediction-az | 6c9e5e21baf78e4c5d16ec62b8e3d45e1291dca4 | [
"MIT"
] | null | null | null | safe-driver/src/evaluate/evaluate.py | azeltov/safe-driver-prediction-az | 6c9e5e21baf78e4c5d16ec62b8e3d45e1291dca4 | [
"MIT"
] | 3 | 2022-02-14T20:57:51.000Z | 2022-02-14T21:56:19.000Z | safe-driver/src/evaluate/evaluate.py | azeltov/safe-driver-prediction-az | 6c9e5e21baf78e4c5d16ec62b8e3d45e1291dca4 | [
"MIT"
] | 1 | 2022-02-14T14:38:47.000Z | 2022-02-14T14:38:47.000Z | # Copyright (c) 2021 Microsoft
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
import logging
import os
import tempfile
from pathlib import Path
from typing import Literal, Tuple, Union
import lightgbm
import mlflow
import numpy as np
import pandas as pd
import typer
from azu... | 38.467433 | 115 | 0.671414 | # Copyright (c) 2021 Microsoft
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
import json
import logging
import os
import tempfile
from enum import Enum
from pathlib import Path
from typing import Literal, Tuple, Union
import lightgbm
import mlflow
import numpy as np
import... | 0 | 0 | 0 | 49 | 0 | 864 | 0 | -10 | 137 |
04d7506b0c868113231f6f68304757c976b482c0 | 7,988 | py | Python | fs_image/vm/vm.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | fs_image/vm/vm.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | fs_image/vm/vm.py | singhaditya28/fs_image | 3d122da48eab8b26e5add6754cc1f91296139c58 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
logger = logging.getLogger("vm")
| 32.604082 | 103 | 0.582123 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import asyncio
import importlib.resources
import logging
import os
import shlex
import subprocess
import sys
import tem... | 0 | 6,934 | 0 | 0 | 0 | 254 | 0 | 144 | 402 |
4ccd320efbef1eea7f5ccbd4c9e66d7b30001079 | 846 | py | Python | laelaps_control/src/laelaps_control/images/icons/__init__.py | roadnarrows-robotics/laelaps | 6501d28e05d781e2885fb689423c066b6614f6c5 | [
"MIT"
] | null | null | null | laelaps_control/src/laelaps_control/images/icons/__init__.py | roadnarrows-robotics/laelaps | 6501d28e05d781e2885fb689423c066b6614f6c5 | [
"MIT"
] | 1 | 2016-03-10T18:30:13.000Z | 2016-06-21T21:52:57.000Z | laelaps_control/src/laelaps_control/images/icons/__init__.py | roadnarrows-robotics/laelaps | 6501d28e05d781e2885fb689423c066b6614f6c5 | [
"MIT"
] | null | null | null | ## All icons in Laelaps package.
__all__ = [
'BotBwdIcon.png',
'BotFwdIcon.png',
'BotLeftIcon.png',
'BotRightIcon.png',
'BotStopIcon.png',
'LaelapsAlarmsIcon.png',
'LaelapsCamIcon.png',
'LaelapsImuIcon.png',
'LaelapsPanelIcon.png',
'LaelapsRangeIcon.png',
'LaelapsTwistIcon.png',
'ROSIcon.png',... | 20.634146 | 32 | 0.696217 | ## All icons in Laelaps package.
__all__ = [
'BotBwdIcon.png',
'BotFwdIcon.png',
'BotLeftIcon.png',
'BotRightIcon.png',
'BotStopIcon.png',
'LaelapsAlarmsIcon.png',
'LaelapsCamIcon.png',
'LaelapsImuIcon.png',
'LaelapsPanelIcon.png',
'LaelapsRangeIcon.png',
'LaelapsTwistIcon.png',
'ROSIcon.png',... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a644013a1b42a9740d2b05099f0a49ee16d2b1f7 | 1,293 | py | Python | main.py | clayz/crazy-quiz-web | 7601809ad521d95ae251a026f171b9ec6939c55f | [
"Apache-2.0"
] | null | null | null | main.py | clayz/crazy-quiz-web | 7601809ad521d95ae251a026f171b9ec6939c55f | [
"Apache-2.0"
] | null | null | null | main.py | clayz/crazy-quiz-web | 7601809ad521d95ae251a026f171b9ec6939c55f | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from api.user_api import user_api
from api.audit_api import audit_api
from api.sns_api import sns_api
app = Flask(__name__)
app.config.from_pyfile('settings.cfg')
app.register_blueprint(user_api)
app.register_blueprint(audit_api)
app.register_blueprint(sns_api)
| 22.293103 | 60 | 0.759474 | from flask import Flask
from flask import render_template
from api.user_api import user_api
from api.audit_api import audit_api
from api.sns_api import sns_api
from errors import ParameterError, DataError
from utilities import response
from constants import APIStatus
from batch.notification import apns_push
app = Flas... | 0 | 632 | 0 | 0 | 0 | 0 | 0 | 73 | 294 |
f133e2ff2fff65ea75c2847ad060287345811d01 | 2,854 | py | Python | with mosh everybody python/listMethods.py | mrtyasar/PythonLearn | b8fa5d97b9c811365db8457f42f1e1d04e4dc8a4 | [
"Apache-2.0"
] | null | null | null | with mosh everybody python/listMethods.py | mrtyasar/PythonLearn | b8fa5d97b9c811365db8457f42f1e1d04e4dc8a4 | [
"Apache-2.0"
] | null | null | null | with mosh everybody python/listMethods.py | mrtyasar/PythonLearn | b8fa5d97b9c811365db8457f42f1e1d04e4dc8a4 | [
"Apache-2.0"
] | null | null | null | # liste methotlar listelerimiz zerine methotlar sayesinde ilemler yapmamz salar
numbers = [5,2,1,7,4]
# listeye e eklemek iin append methodundan yararlanrz
numbers.append(20)
print(numbers)
# listeye indeks numarasna gre ge eklemek
numbers.insert(2,10)
print(numbers)
# listemizde bir eyi silmek iin remove methodundan... | 33.186047 | 98 | 0.783812 | # liste methotları listelerimiz üzerine methotlar sayesinde işlemler yapmamızı sağlar
numbers = [5,2,1,7,4]
# listeye öğe eklemek için append methodundan yararlanırız
numbers.append(20)
print(numbers)
# listeye indeks numarasına göre öge eklemek
numbers.insert(2,10)
print(numbers)
# listemizde bir öğeyi silmek için r... | 312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5c3304d2ed08b39f45fbb412e5ac6ad1311fe85d | 1,350 | py | Python | onepage.py | costiagur/parsebyocr | 3ea3a53112d884cdce160d842d6343a62cedd952 | [
"MIT"
] | null | null | null | onepage.py | costiagur/parsebyocr | 3ea3a53112d884cdce160d842d6343a62cedd952 | [
"MIT"
] | null | null | null | onepage.py | costiagur/parsebyocr | 3ea3a53112d884cdce160d842d6343a62cedd952 | [
"MIT"
] | null | null | null | # | 23.275862 | 82 | 0.495556 | from PIL import Image
from pdf2image import convert_from_bytes
import os
import math
import random
def onepage(scanfile, rollangle=0, hsa=0, vsa=0, dpirate=400):
os.makedirs(name='demo', exist_ok=True)
os.makedirs(name='drafts', exist_ok=True)
images = convert_from_bytes(scanfile, dpi=dpir... | 0 | 0 | 0 | 0 | 0 | 1,218 | 0 | -11 | 142 |
79857e041cb12d8eddc2312512f95a4e6eab8c1f | 1,301 | py | Python | tests/test_patterns.py | Unathi-Skosana/ptycho | 95e49a092d1212e2d02349ad4c50ea7db93e2687 | [
"MIT"
] | null | null | null | tests/test_patterns.py | Unathi-Skosana/ptycho | 95e49a092d1212e2d02349ad4c50ea7db93e2687 | [
"MIT"
] | null | null | null | tests/test_patterns.py | Unathi-Skosana/ptycho | 95e49a092d1212e2d02349ad4c50ea7db93e2687 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
from utils import stripes, get_gradation_2d, checkerboard, radial_gradient
from utils.filters import circ_mask
from skimage.color import rgb2gray
if __name__ == "__main__":
cmask = circ_mask(70, (35, 35), 35, 0)
im1 = stripes(32, 45,... | 32.525 | 67 | 0.659493 | import cv2
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
from numpy import pi
from utils import stripes, get_gradation_2d,\
get_gradation_3d, checkerboard, radial_gradient
from utils.filters import gau_kern, circ_mask
from skimage.color impor... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 111 |
e34e5e2d89e479a1b1c0502022620c288330f897 | 3,691 | py | Python | tools/test.py | starhiking/ATF_HRnet | 6b88b26f11d7018cf9b3dc5e2acf63a32ea62a13 | [
"MIT"
] | null | null | null | tools/test.py | starhiking/ATF_HRnet | 6b88b26f11d7018cf9b3dc5e2acf63a32ea62a13 | [
"MIT"
] | null | null | null | tools/test.py | starhiking/ATF_HRnet | 6b88b26f11d7018cf9b3dc5e2acf63a32ea62a13 | [
"MIT"
] | null | null | null | import os
import torch.nn as nn
import torch.backends.cudnn as cudnn
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
import lib.models as models
test_files = {
"WFLW":None,
"300W":None,
"AFLW":None,
"COFW":None
}
test_files["WFLW"] = [
"data/wflw/face_landmarks_wflw_... | 28.392308 | 119 | 0.692495 | import os
import pprint
import argparse
import time
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
from torch.utils.data import DataLoader
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
import lib.models as models
from lib.config import config, update_config
from l... | 0 | 0 | 0 | 0 | 0 | 2,279 | 0 | 37 | 244 |
97d604cccda88bedb00314e2a1bf19b3e7650f45 | 6,476 | py | Python | srl_nlp/annotate_documents.py | MeLL-UFF/srl-nlp | 97bdae26be03e94536531c581a34847dc419ef67 | [
"MIT"
] | null | null | null | srl_nlp/annotate_documents.py | MeLL-UFF/srl-nlp | 97bdae26be03e94536531c581a34847dc419ef67 | [
"MIT"
] | 1 | 2019-07-02T14:16:24.000Z | 2019-07-02T14:16:24.000Z | srl_nlp/annotate_documents.py | MeLL-UFF/srl-nlp | 97bdae26be03e94536531c581a34847dc419ef67 | [
"MIT"
] | 1 | 2019-02-20T19:30:06.000Z | 2019-02-20T19:30:06.000Z | #!/bin/env python2
"""
Script for running annotation on the document files.
"""
from sys import argv as _argv
import logging
from ConfigParser import ConfigParser
from os import path
logger = logging.getLogger(__name__)
config = ConfigParser()
_package_directory = path.dirname(__file__)
config.read(path.join(_pac... | 40.72956 | 119 | 0.631872 | #!/bin/env python2
"""
Script for running annotation on the document files.
"""
from sys import argv as _argv
import logging
from ConfigParser import ConfigParser
from os import path, listdir
from typing import List
from srl_nlp.framenet.adapter import PARSERS_AVAILABLE, DocumentAdapter
from srl_nlp.framenet.corpus... | 0 | 2,661 | 0 | 0 | 0 | 2,749 | 0 | 212 | 240 |
706acf25ef6d9f0510b5380903590b901503579a | 651 | py | Python | python_sandbox/python_sandbox/misc/find_owners.py | jduan/cosmos | c4bdc5b800c9b51084daf874769ac73e1c4b7dd5 | [
"MIT"
] | null | null | null | python_sandbox/python_sandbox/misc/find_owners.py | jduan/cosmos | c4bdc5b800c9b51084daf874769ac73e1c4b7dd5 | [
"MIT"
] | null | null | null | python_sandbox/python_sandbox/misc/find_owners.py | jduan/cosmos | c4bdc5b800c9b51084daf874769ac73e1c4b7dd5 | [
"MIT"
] | null | null | null | # This script takes a list of project directories and find the owner info from "_infra/project.yml"
if __name__ == '__main__':
main()
| 25.038462 | 99 | 0.609831 | # This script takes a list of project directories and find the owner info from "_infra/project.yml"
import os
import sys
import yaml
def find_owner(file):
fullpath = "/Users/jingjing_duan/repos2/treehouse_worktree3/%s/_infra/project.yml" % file
if os.path.exists(fullpath):
with open(fullpath) as fd:
... | 0 | 0 | 0 | 0 | 0 | 430 | 0 | -33 | 112 |
edd0094d77014c17278020051703276e87a9fbca | 1,674 | py | Python | stream_to_bq.py | VanAurum/gcp-dataflow-stream | f0744e2afb2b1cad434cea737e7c33da0f9c6f84 | [
"MIT"
] | null | null | null | stream_to_bq.py | VanAurum/gcp-dataflow-stream | f0744e2afb2b1cad434cea737e7c33da0f9c6f84 | [
"MIT"
] | 2 | 2021-04-30T20:58:24.000Z | 2021-06-02T00:02:02.000Z | stream_to_bq.py | VanAurum/gcp-dataflow-stream | f0744e2afb2b1cad434cea737e7c33da0f9c6f84 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import logging
import argparse
import apache_beam as beam
import apache_beam.transforms.window as window
'''Normalize pubsub string to json object'''
# Lines look like this:
# {'datetime': '2017-07-13T21:15:02Z', 'mac': 'FC:FC:48:AE:F6:94', 'status': 1}
def run(argv=None):
... | 38.045455 | 130 | 0.664875 | from __future__ import absolute_import
import logging
import argparse
import apache_beam as beam
import apache_beam.transforms.window as window
'''Normalize pubsub string to json object'''
# Lines look like this:
# {'datetime': '2017-07-13T21:15:02Z', 'mac': 'FC:FC:48:AE:F6:94', 'status': 1}
def parse_pubsub(line):... | 0 | 0 | 0 | 0 | 0 | 117 | 0 | 0 | 22 |
d94c2bb00333139d868231ce9412e41d697182d1 | 1,896 | py | Python | SDN_Beginners_with_RYU/part2/ofctl/vlan/topology.py | Brunner-Kibali/RYU-SDN-Code-Playground | 9cc6526fe6264c6993fbc6e576b97c144f96c57f | [
"Apache-2.0"
] | null | null | null | SDN_Beginners_with_RYU/part2/ofctl/vlan/topology.py | Brunner-Kibali/RYU-SDN-Code-Playground | 9cc6526fe6264c6993fbc6e576b97c144f96c57f | [
"Apache-2.0"
] | null | null | null | SDN_Beginners_with_RYU/part2/ofctl/vlan/topology.py | Brunner-Kibali/RYU-SDN-Code-Playground | 9cc6526fe6264c6993fbc6e576b97c144f96c57f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""Simple VLAN topology example
Linear Topology,
Switch1-----Switch2
Switch1-----a1, a2, b1, b2
Switch2-----a3, a4 ,b3, b4
objective:
1. a1,a2,a3,a4, belongs to VLAN 100
2. b1, b2, b3, b4 belongs to VLAN 200
Switch1 to Switch2 connected with 802.1Q TRUNK Links
"""
from mininet.net import Minin... | 27.478261 | 78 | 0.604958 | #!/usr/bin/python
"""Simple VLAN topology example
Linear Topology,
Switch1-----Switch2
Switch1-----a1, a2, b1, b2
Switch2-----a3, a4 ,b3, b4
objective:
1. a1,a2,a3,a4, belongs to VLAN 100
2. b1, b2, b3, b4 belongs to VLAN 200
Switch1 to Switch2 connected with 802.1Q TRUNK Links
"""
from mininet.topo import Top... | 0 | 0 | 0 | 1,146 | 0 | 0 | 0 | 32 | 68 |
cb6f3e6479d694b15767b972b53ef03c92b569f9 | 1,261 | py | Python | chapters/06/src/web/responder/strategy/base.py | PacktPublishing/-Learn-MongoDB-4.0 | 011f14fc66c42498dcbf07e64e760b5e9f420243 | [
"MIT"
] | 13 | 2020-08-06T17:05:50.000Z | 2021-11-08T13:12:11.000Z | chapters/06/src/web/responder/strategy/base.py | PacktPublishing/-Learn-MongoDB-4.0 | 011f14fc66c42498dcbf07e64e760b5e9f420243 | [
"MIT"
] | 4 | 2020-09-20T05:30:39.000Z | 2021-04-01T08:35:40.000Z | chapters/06/src/web/responder/strategy/base.py | PacktPublishing/-Learn-MongoDB-4.0 | 011f14fc66c42498dcbf07e64e760b5e9f420243 | [
"MIT"
] | 12 | 2020-08-07T06:45:43.000Z | 2021-12-08T06:58:23.000Z | # web.responder.strategy.base
"""
Base class for strategies returning JSON responses
"""
| 26.829787 | 94 | 0.536082 | # web.responder.strategy.base
import json
"""
Base class for strategies returning JSON responses
"""
class Base :
headers = []
data = {}
error = ''
status = 200
link = ''
http_status = {
200 : 'OK',
400 : 'BAD REQUEST',
404 : 'NOT FOUND',
500 : ... | 0 | 0 | 0 | 1,136 | 0 | 0 | 0 | -10 | 45 |
06384668c77a4de102f97a0abff46a7011dcdf27 | 3,305 | py | Python | model/lstm.py | LuckyHouse/SpeechGenderRecognition | 0ba8342c9d9010984b168e377070f1a142bb3f8e | [
"MIT"
] | 4 | 2019-11-08T07:20:49.000Z | 2021-12-09T09:10:36.000Z | model/lstm.py | LuckyHouse/SpeechGenderRecognition | 0ba8342c9d9010984b168e377070f1a142bb3f8e | [
"MIT"
] | null | null | null | model/lstm.py | LuckyHouse/SpeechGenderRecognition | 0ba8342c9d9010984b168e377070f1a142bb3f8e | [
"MIT"
] | 2 | 2019-11-08T07:20:51.000Z | 2021-12-09T09:11:32.000Z | # import tensorflow.keras as keras
# from keras.models import Sequential
# from keras.callbacks import EarlyStopping
# from keras.metrics import categorical_accuracy
# from keras.optimizers import RMSprop
| 52.460317 | 172 | 0.603026 | import keras
# import tensorflow.keras as keras
# from keras.models import Sequential
from keras.layers import LSTM,Dense,Activation,SimpleRNN,Conv1D,MaxPool1D,Flatten,Reshape,Dropout,MaxPooling1D,Masking
from keras.metrics import categorical_accuracy
# from keras.callbacks import EarlyStopping
# from keras.metrics imp... | 15 | 0 | 0 | 0 | 0 | 2,865 | 0 | 113 | 112 |
425d8c7c5f44c2e40a78b220f413369b8894e110 | 2,564 | py | Python | features/utilities.py | javadch2021/pyfeats | a5d2e24162361a2708d2bbcb7143a44a4e148bcd | [
"MIT"
] | 9 | 2021-11-28T01:51:40.000Z | 2022-03-27T12:12:58.000Z | features/utilities.py | javadch2021/pyfeats | a5d2e24162361a2708d2bbcb7143a44a4e148bcd | [
"MIT"
] | 3 | 2022-03-13T03:29:57.000Z | 2022-03-23T09:43:08.000Z | features/utilities.py | javadch2021/pyfeats | a5d2e24162361a2708d2bbcb7143a44a4e148bcd | [
"MIT"
] | 6 | 2021-07-08T04:00:37.000Z | 2021-11-09T19:12:39.000Z | # -*- coding: utf-8 -*-
__all__ = ['_energy', '_entropy', '_next_power_of_two', '_pad_image_power_2',
'pad_image', '_zero_runs']
| 33.298701 | 86 | 0.533151 | # -*- coding: utf-8 -*-
import numpy as np
import math
import cv2
__all__ = ['_energy', '_entropy', '_next_power_of_two', '_pad_image_power_2',
'pad_image', '_zero_runs']
def _energy(x):
return np.multiply(x,x).sum()
def _entropy(x):
return -np.multiply(x, np.log(x+1e-16)).sum()
d... | 0 | 0 | 0 | 0 | 0 | 2,199 | 0 | -24 | 245 |
3736ebeaff5ce386c0de4031f1ae3597bb60591d | 184 | py | Python | launcher/globals/LauncherGlobals.py | Trapdoor-NX/switch-launcher | 096f186cf449b192b71b11d2df9322ed9ed47950 | [
"BSD-3-Clause"
] | 15 | 2018-05-10T11:27:50.000Z | 2018-05-22T22:28:45.000Z | launcher/globals/LauncherGlobals.py | Trapdoor-NX/switch-launcher | 096f186cf449b192b71b11d2df9322ed9ed47950 | [
"BSD-3-Clause"
] | 1 | 2019-03-30T23:47:43.000Z | 2019-04-04T07:11:50.000Z | launcher/globals/LauncherGlobals.py | Trapdoor-NX/switch-launcher | 096f186cf449b192b71b11d2df9322ed9ed47950 | [
"BSD-3-Clause"
] | 1 | 2019-09-22T04:18:37.000Z | 2019-09-22T04:18:37.000Z | """
* Written by the Trapdoor-NX team, May 8, 2018.
* Licensing information can found in the 'LICENSE' file.
* Injector based on reswitched/fusee-launcher.
"""
CURR_VERSION = '0.1' | 26.285714 | 57 | 0.706522 | """
* Written by the Trapdoor-NX team, May 8, 2018.
* Licensing information can found in the 'LICENSE' file.
* Injector based on reswitched/fusee-launcher.
"""
CURR_VERSION = '0.1' | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e497e7f3f770774c5bec3a67be563380312efdd2 | 64 | py | Python | test.py | bmyerz/pysh | 693225040ca1f4d8d9ddeeed16b4b8b01541b84f | [
"MIT"
] | null | null | null | test.py | bmyerz/pysh | 693225040ca1f4d8d9ddeeed16b4b8b01541b84f | [
"MIT"
] | null | null | null | test.py | bmyerz/pysh | 693225040ca1f4d8d9ddeeed16b4b8b01541b84f | [
"MIT"
] | null | null | null | from pysh import pysh
a = 1
b = 2
pysh(s['echo $HOME {a} {b}']) | 12.8 | 29 | 0.578125 | from pysh import pysh
a = 1
b = 2
pysh(s['echo $HOME {a} {b}']) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a2ec3b39aacd16f080ba698aeee319b68257823e | 386 | py | Python | setup.py | mdcg/slack-hermes | 18330307f5a491dfda5d0ecc369adb3cff21f49a | [
"MIT"
] | 1 | 2020-02-27T18:46:37.000Z | 2020-02-27T18:46:37.000Z | setup.py | mdcg/slack-hermes | 18330307f5a491dfda5d0ecc369adb3cff21f49a | [
"MIT"
] | null | null | null | setup.py | mdcg/slack-hermes | 18330307f5a491dfda5d0ecc369adb3cff21f49a | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
requirements = ["slackclient==2.5.0"]
setup(
name="slackhermes",
version="1.0.0",
description="A message notifier for Slack",
author="mdcg",
url="https://github.com/mdcg/slack-hermes",
packages=find_packages(exclude=["tests"]),
install_requires=r... | 24.125 | 47 | 0.696891 | from setuptools import find_packages, setup
requirements = ["slackclient==2.5.0"]
setup(
name="slackhermes",
version="1.0.0",
description="A message notifier for Slack",
author="mdcg",
url="https://github.com/mdcg/slack-hermes",
packages=find_packages(exclude=["tests"]),
install_requires=r... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ad47b635b71330042fc78e893a2204b04da03904 | 8,301 | py | Python | crimsobot/utils/text.py | keli5/crimsoBOT | f9489ffbaa115357f910afd562fa2516932c5872 | [
"MIT"
] | 11 | 2020-06-28T15:18:13.000Z | 2022-02-05T23:09:20.000Z | crimsobot/utils/text.py | keli5/crimsoBOT | f9489ffbaa115357f910afd562fa2516932c5872 | [
"MIT"
] | 18 | 2020-03-24T03:18:12.000Z | 2022-03-12T01:07:29.000Z | crimsobot/utils/text.py | h-anjru/crimsoBOT | 8e678a6408ae99e740abfc8ab337543c666c1fb1 | [
"MIT"
] | 6 | 2020-05-08T19:35:49.000Z | 2022-02-05T23:09:21.000Z |
# This any param is a bummer but it's the only way I can see to make make mypy work the way we want.
# Everything is terrible.
| 30.076087 | 100 | 0.499096 | import re
from typing import Any
import pendulum
from timezonefinder import TimezoneFinder
from crimsobot.exceptions import LocationNotFound
from crimsobot.utils.astronomy import where_are_you
from crimsobot.utils.tools import clib_path_join
def block(message: str) -> str:
block = ':regional_indicator_'
num... | 402 | 0 | 0 | 0 | 0 | 7,670 | 0 | 88 | 270 |
ef89ae653b52ceb60ad670b2c5c1ffbb89d2b05e | 1,673 | py | Python | mplisp/functions/special_forms/lambda_expression.py | sukovanej/mplisp | a3faf8c06936bcc5cde59899abf41a1b379090f5 | [
"MIT"
] | null | null | null | mplisp/functions/special_forms/lambda_expression.py | sukovanej/mplisp | a3faf8c06936bcc5cde59899abf41a1b379090f5 | [
"MIT"
] | null | null | null | mplisp/functions/special_forms/lambda_expression.py | sukovanej/mplisp | a3faf8c06936bcc5cde59899abf41a1b379090f5 | [
"MIT"
] | null | null | null | """ Lambda, let, let*
Examples:
(let
(
(a 6))
(* a 1))
"""
from typing import List
import copy
import concurrent.futures
from mplisp.structures import env, tree
from mplisp import evaluator
def lambda_expression(args: List, node):
"""Return lambda expression"""
if len(args) != 2:
eval... | 27.42623 | 123 | 0.662283 | """ Lambda, let, let*
Examples:
(let
(
(a 6))
(* a 1))
"""
from typing import List
import copy
import concurrent.futures
from mplisp.structures import env, tree
from mplisp import evaluator
def lambda_expression(args: List, node):
"""Return lambda expression"""
if len(args) != 2:
eval... | 0 | 0 | 0 | 0 | 0 | 50 | 0 | 0 | 30 |
a82bfee14f9380df1c858837d77b3417b70f7a4f | 498 | py | Python | merge.py | jankais3r/Video-Depthify | 645a61e59dec029f0f52be9e0205d4e89022b6b1 | [
"MIT"
] | 9 | 2021-06-08T22:28:32.000Z | 2022-02-24T08:28:46.000Z | merge.py | jankais3r/Video-Depthify | 645a61e59dec029f0f52be9e0205d4e89022b6b1 | [
"MIT"
] | 2 | 2021-07-08T15:39:15.000Z | 2022-03-07T23:12:01.000Z | merge.py | jankais3r/Video-Depthify | 645a61e59dec029f0f52be9e0205d4e89022b6b1 | [
"MIT"
] | 4 | 2021-06-07T21:58:30.000Z | 2022-02-24T08:28:47.000Z | #!/usr/bin/env python3
import glob
from PIL import Image
for file in glob.glob("./rgb/*.jpg"):
im1 = Image.open(file)
try:
im2 = Image.open(file.replace('rgb', 'averaged'))
except:
im2 = Image.open(file.replace('rgb', 'depth'))
get_concat_v(im1, im2).save(file.replace('rgb', 'merged'))
#print("Merged: " + fi... | 24.9 | 61 | 0.656627 | #!/usr/bin/env python3
import glob
from PIL import Image
def get_concat_v(im1, im2):
dst = Image.new('RGB', (im1.width, im1.height + im2.height))
dst.paste(im1, (0, 0))
dst.paste(im2, (0, im1.height))
return dst
for file in glob.glob("./rgb/*.jpg"):
im1 = Image.open(file)
try:
im2 = Image.open(file.replace('... | 0 | 0 | 0 | 0 | 0 | 137 | 0 | 0 | 23 |
6fd3f57e604ef98b4559da3f3f7cfb034c38db88 | 12,527 | py | Python | lib/rgbmatrix.py | bopopescu/ros | 5dc6e23a280e1283de7b38f35116332a79ca33d2 | [
"MIT"
] | null | null | null | lib/rgbmatrix.py | bopopescu/ros | 5dc6e23a280e1283de7b38f35116332a79ca33d2 | [
"MIT"
] | null | null | null | lib/rgbmatrix.py | bopopescu/ros | 5dc6e23a280e1283de7b38f35116332a79ca33d2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
try:
except ImportError:
sys.exit("This script requires the numpy module\nInstall with: sudo pip3 install numpy")
# ..............................................................................
# ..............................................................................
... | 34.89415 | 117 | 0.453101 | #!/usr/bin/env python3
import sys, time, colorsys, threading
from enum import Enum
try:
import numpy
except ImportError:
sys.exit("This script requires the numpy module\nInstall with: sudo pip3 install numpy")
from lib.logger import Level, Logger
from lib.feature import Feature
from lib.enums import Color
fr... | 0 | 248 | 0 | 11,707 | 0 | 0 | 0 | 65 | 181 |
2b1a4c6401377c4e288636ef5d988082a1d4df90 | 28 | py | Python | snakebids/resources/__init__.py | pvandyken/snakebids | 10186d116dc016769e6b43c67f10e0d50264d053 | [
"MIT"
] | null | null | null | snakebids/resources/__init__.py | pvandyken/snakebids | 10186d116dc016769e6b43c67f10e0d50264d053 | [
"MIT"
] | 2 | 2022-02-11T22:08:36.000Z | 2022-02-11T22:08:47.000Z | snakebids/resources/__init__.py | pvandyken/snakebids | 10186d116dc016769e6b43c67f10e0d50264d053 | [
"MIT"
] | null | null | null | # flake8: noqa
__all__ = []
| 9.333333 | 14 | 0.607143 | # flake8: noqa
__all__ = []
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6271c20396f1e9fc505fb6d95324f9bd9d4dafa1 | 3,589 | py | Python | models/old_models/vaenet.py | WatChMaL/CNN | 2e14397bca6ced2fdfeab406e3c28561bb3af384 | [
"CNRI-Python",
"RSA-MD"
] | 3 | 2019-05-10T01:38:07.000Z | 2021-09-06T16:30:18.000Z | models/old_models/vaenet.py | WatChMaL/VAE | 2e14397bca6ced2fdfeab406e3c28561bb3af384 | [
"CNRI-Python",
"RSA-MD"
] | 3 | 2019-05-11T02:44:53.000Z | 2019-05-24T18:37:58.000Z | models/old_models/vaenet.py | WatChMaL/CNN | 2e14397bca6ced2fdfeab406e3c28561bb3af384 | [
"CNRI-Python",
"RSA-MD"
] | 8 | 2019-05-06T22:39:39.000Z | 2020-11-29T17:15:50.000Z | """
vaenet.py
PyTorch implementation of a Convolutional Neural Network Variational Autoencoder ( VaeNet )
Author : Abhishek .
"""
# PyTorch Imports
import torch.nn as nn
# VaeNet class | 42.72619 | 105 | 0.619671 | """
vaenet.py
PyTorch implementation of a Convolutional Neural Network Variational Autoencoder ( VaeNet )
Author : Abhishek .
"""
# PyTorch Imports
import torch.nn as nn
# VaeNet class
class VaeNet(nn.Module):
# Initializer for the ConvNetVAE model
def __init__(self, num_input_channels=19, num_latent_d... | 0 | 0 | 0 | 3,379 | 0 | 0 | 0 | 0 | 22 |
66f27b3b918c245ec30ffb47a08658fc60fa8667 | 568 | py | Python | app/__init__.py | PyREit/pyreit.github.io | 997287c6eb0fed16bae3e620ae49dc5bf58f0d9d | [
"MIT"
] | 3 | 2018-07-25T10:51:27.000Z | 2020-03-15T17:45:13.000Z | app/__init__.py | PyREit/PyRE | 997287c6eb0fed16bae3e620ae49dc5bf58f0d9d | [
"MIT"
] | null | null | null | app/__init__.py | PyREit/PyRE | 997287c6eb0fed16bae3e620ae49dc5bf58f0d9d | [
"MIT"
] | 3 | 2016-10-03T06:27:34.000Z | 2018-07-10T09:16:25.000Z | # Import di flask e degli operatori di templating
from flask import Flask
from flask_mail import Mail
# Definizione oggetto WSGI
app = Flask(__name__)
mail = Mail(app)
# Configurazioni
app.config.from_object('config')
app.secret_key = app.config['CSRF_SESSION_KEY']
# HTTP error handling
# Import a module / compon... | 23.666667 | 77 | 0.783451 | # Import di flask e degli operatori di templating
from flask import Flask, render_template
from flask_mail import Mail
# Definizione oggetto WSGI
app = Flask(__name__)
mail = Mail(app)
# Configurazioni
app.config.from_object('config')
app.secret_key = app.config['CSRF_SESSION_KEY']
# HTTP error handling
@app.errorh... | 0 | 67 | 0 | 0 | 0 | 0 | 0 | 17 | 22 |
37f0fc9a05516e1ab5fb26a736dca8f8edde7b01 | 63,805 | py | Python | pyoo.py | JavaScriptDude/pyoo | 242234b9dd6de9037de8c90cfcad0599ab514226 | [
"MIT"
] | 29 | 2017-12-13T17:36:25.000Z | 2021-07-01T09:19:24.000Z | pyoo.py | JavaScriptDude/pyoo | 242234b9dd6de9037de8c90cfcad0599ab514226 | [
"MIT"
] | 10 | 2019-04-02T15:26:58.000Z | 2021-11-29T20:11:15.000Z | pyoo.py | JavaScriptDude/pyoo | 242234b9dd6de9037de8c90cfcad0599ab514226 | [
"MIT"
] | 8 | 2017-12-21T10:32:51.000Z | 2021-07-09T09:50:36.000Z | """
PyOO - Pythonic interface to Apache OpenOffice API (UNO)
Copyright (c) 2016-2017 Seznam.cz, a.s.
Copyright (c) 2017-2019 Miloslav Pojman
"""
from __future__ import division
import itertools
import sys
import uno
# Filters used when saving document.
FILTER_PDF_EXPORT = 'writer_pdf_Export'
FILTER_WRITER_PDF_EXP... | 32.404774 | 141 | 0.637082 | """
PyOO - Pythonic interface to Apache OpenOffice API (UNO)
Copyright (c) 2016-2017 Seznam.cz, a.s.
Copyright (c) 2017-2019 Miloslav Pojman
"""
from __future__ import division
import datetime
import functools
import itertools
import numbers
import os
import sys
import uno
# Filters used when saving document.
FI... | 0 | 19,896 | 0 | 35,612 | 0 | 341 | 0 | -30 | 802 |
d24c75753ad5caa7a1a2e9900d04f82a3777485b | 3,575 | py | Python | learn_example.py | zerongxi/Kitchen2D | 2cbaa6c8ea8fbf5f5c3a5de34cb11efde4121793 | [
"MIT"
] | 35 | 2018-03-15T14:26:33.000Z | 2022-02-09T15:37:59.000Z | learn_example.py | zerongxi/Kitchen2D | 2cbaa6c8ea8fbf5f5c3a5de34cb11efde4121793 | [
"MIT"
] | 1 | 2020-11-03T04:49:43.000Z | 2020-11-17T16:42:48.000Z | learn_example.py | zerongxi/Kitchen2D | 2cbaa6c8ea8fbf5f5c3a5de34cb11efde4121793 | [
"MIT"
] | 12 | 2018-04-28T20:11:21.000Z | 2021-09-18T22:24:46.000Z | # Author: Zi Wang
import cPickle as pickle
import os
import active_learners.helper as helper
from active_learners.active_learner import run_ActiveLearner
def gen_data(expid, exp, n_data, save_fnm):
'''
Generate initial data for a function associated the experiment.
Args:
expid: ID of the experimen... | 36.479592 | 83 | 0.633566 | # Author: Zi Wang
import cPickle as pickle
import os
import active_learners.helper as helper
from active_learners.active_learner import run_ActiveLearner
def gen_data(expid, exp, n_data, save_fnm):
'''
Generate initial data for a function associated the experiment.
Args:
expid: ID of the experimen... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b4a4d274de5bef93dd6f606b38e12fd7d597cd7b | 3,151 | py | Python | Simulation/dance_moves.py | marakaspers/dancing-robot | 96acd30a052a73a1b9ac1beebadfc31f22a71b17 | [
"MIT"
] | null | null | null | Simulation/dance_moves.py | marakaspers/dancing-robot | 96acd30a052a73a1b9ac1beebadfc31f22a71b17 | [
"MIT"
] | null | null | null | Simulation/dance_moves.py | marakaspers/dancing-robot | 96acd30a052a73a1b9ac1beebadfc31f22a71b17 | [
"MIT"
] | null | null | null | import pybullet as p
import time
import pybullet_data
from math import sin, cos
physicsClient= p.connect(p.GUI)#or p.DIRECTfor non-graphical version
p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
p.setGravity(0,0,-10)
planeId= p.loadURDF("plane.urdf")
robotStartPos= [0,0,1]
robotStartOrientation= p... | 37.963855 | 123 | 0.690892 | import pybullet as p
import time
import pybullet_data
from math import sin, cos
import random
physicsClient= p.connect(p.GUI)#or p.DIRECTfor non-graphical version
p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
p.setGravity(0,0,-10)
planeId= p.loadURDF("plane.urdf")
robotStartPos= [0,0,1]
robotStar... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -8 | 23 |
084fcd85c33309640a6447a25a86394504f2ce38 | 10,463 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/dellemc/openmanage/tests/unit/plugins/modules/test_ome_network_vlan_info.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/dellemc/openmanage/tests/unit/plugins/modules/test_ome_network_vlan_info.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/dellemc/openmanage/tests/unit/plugins/modules/test_ome_network_vlan_info.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Dell EMC OpenManage Ansible Modules
# Version 2.1.3
# Copyright (C) 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from __future__ import (absolute_import, division, print_function)
_... | 53.382653 | 120 | 0.646469 | # -*- coding: utf-8 -*-
#
# Dell EMC OpenManage Ansible Modules
# Version 2.1.3
# Copyright (C) 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from __future__ import (absolute_import, division, print_function)
_... | 0 | 2,854 | 0 | 4,295 | 0 | 0 | 0 | 274 | 200 |
1eaf917fcf46af20e98f8c380ef16042692e0437 | 5,287 | py | Python | brownies/legacy/toENDF6/PoPs_toENDF6/decays/decayData.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 14 | 2019-08-29T23:46:24.000Z | 2022-03-21T10:16:25.000Z | brownies/legacy/toENDF6/PoPs_toENDF6/decays/decayData.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T16:14:45.000Z | 2021-12-01T01:54:34.000Z | brownies/legacy/toENDF6/PoPs_toENDF6/decays/decayData.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 2 | 2022-03-03T22:41:41.000Z | 2022-03-03T22:54:43.000Z | # <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
from brownies.legacy.converting.ENDFToGNDS import ENDF_ITYPE_4
from PoPs.decays import decayData as decayDataModule
RTYPdict... | 41.304688 | 120 | 0.597314 | # <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
from math import sqrt
from brownies.legacy.toENDF6 import endfFormats as endfFormatsModule
from brownies.legacy.converting.E... | 0 | 0 | 0 | 0 | 0 | 4,579 | 0 | 76 | 91 |
ee3e0c75593f9036757cd44575f1b1d05525a5f7 | 466 | py | Python | complex_numbers_demo.py | agolla0440/my_python_workbook | 3595037467e89e0950d0c356b2ba087e574e2bd9 | [
"Apache-2.0"
] | null | null | null | complex_numbers_demo.py | agolla0440/my_python_workbook | 3595037467e89e0950d0c356b2ba087e574e2bd9 | [
"Apache-2.0"
] | null | null | null | complex_numbers_demo.py | agolla0440/my_python_workbook | 3595037467e89e0950d0c356b2ba087e574e2bd9 | [
"Apache-2.0"
] | null | null | null | # Python code to demonstrate the working of
# complex(), real() and imag()
# importing "cmath" for complex number operations
# Initializing real numbers
x = 5
y = 3
# converting x and y into complex number
z = complex(x, y);
s = 5 + 3j
# printing real and imaginary part of complex number
print("The real part of comp... | 22.190476 | 59 | 0.706009 | # Python code to demonstrate the working of
# complex(), real() and imag()
# importing "cmath" for complex number operations
import cmath
# Initializing real numbers
x = 5
y = 3
# converting x and y into complex number
z = complex(x, y);
s = 5 + 3j
# printing real and imaginary part of complex number
print("The real... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -9 | 22 |
ca7f062c5c06ccd07dbef5425465baf6b16d51dc | 1,860 | py | Python | actions/Gesticulate.py | GAIA-GMU/PAR | 4a19c119c0e6537b98c948cc48960e8f17c2eccd | [
"Apache-2.0"
] | 4 | 2019-01-03T08:45:59.000Z | 2022-02-04T16:04:03.000Z | actions/Gesticulate.py | GAIA-GMU/PAR | 4a19c119c0e6537b98c948cc48960e8f17c2eccd | [
"Apache-2.0"
] | 3 | 2015-10-21T16:57:56.000Z | 2018-04-08T13:40:36.000Z | actions/Gesticulate.py | GAIA-GMU/PAR | 4a19c119c0e6537b98c948cc48960e8f17c2eccd | [
"Apache-2.0"
] | 2 | 2016-04-14T08:40:34.000Z | 2016-05-25T17:10:08.000Z | #jiggle.v.01
#Body_movement
#This frame contains words for motions or actions an Agent p
#erforms using some part of his/her body. A number of word
#s in this frame occur as blends with Communication, in whic
#h the action has an Addressee. For example, 'Pat nodded
#at Kim.' These examples differ from Communicat... | 35.769231 | 125 | 0.734946 | #jiggle.v.01
#Body_movement
#This frame contains words for motions or actions an Agent p
#erforms using some part of his/her body. A number of word
#s in this frame occur as blends with Communication, in whic
#h the action has an Addressee. For example, 'Pat nodded
#at Kim.' These examples differ from Communicat... | 0 | 0 | 0 | 0 | 0 | 1,061 | 0 | 0 | 92 |
762ecaaa1aa4b6aacfa3ef56be0e34fa5e92bb98 | 5,841 | py | Python | src/data/preprocessing/rescale_videos.py | HochulHwang/gc_test | c42e9ec3392bc02eef5e3943ec3bf79456e91bf9 | [
"MIT"
] | null | null | null | src/data/preprocessing/rescale_videos.py | HochulHwang/gc_test | c42e9ec3392bc02eef5e3943ec3bf79456e91bf9 | [
"MIT"
] | null | null | null | src/data/preprocessing/rescale_videos.py | HochulHwang/gc_test | c42e9ec3392bc02eef5e3943ec3bf79456e91bf9 | [
"MIT"
] | null | null | null | import argparse
import os
import subprocess
def get_duration(file):
"""Get the duration of a super_video using ffprobe. -> https://stackoverflow.com/questions/31024968/using-ffmpeg-to-obtain-super_video-durations-in-python"""
cmd = 'ffprobe -i {} -show_entries format=duration -v quiet -of csv="p=0"'.format(f... | 38.176471 | 161 | 0.610854 | import argparse
import os
import subprocess
import time
import sys
import ipdb
import pickle
from utils.meter import *
def main(args):
# Parameters from the args
dir, h, w, fps, common_suffix = args.dir, args.height, args.width, args.fps, args.common_suffix
# avi dir
dir_split = dir.split('/')
av... | 0 | 0 | 0 | 0 | 0 | 2,105 | 0 | -35 | 133 |
ae17f01f41142d0d022b976b2202c39fb0209bae | 1,258 | py | Python | convertjson2xml.py | uhellstr/convertjson2xml | 4638b22c36a8167328f4ba0c147f5efc2ba26a79 | [
"CC0-1.0"
] | null | null | null | convertjson2xml.py | uhellstr/convertjson2xml | 4638b22c36a8167328f4ba0c147f5efc2ba26a79 | [
"CC0-1.0"
] | null | null | null | convertjson2xml.py | uhellstr/convertjson2xml | 4638b22c36a8167328f4ba0c147f5efc2ba26a79 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# coding: UTF-8
"""
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Simple Python routine to convert JSON to XML
Example: python convertjson2xml.py /home/hellsulf/orascript/json2xml/JSON/2020_8_f1.json
Note: Requires json2xml
pip install json... | 27.955556 | 92 | 0.511924 | #!/usr/bin/env python
# coding: UTF-8
"""
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Simple Python routine to convert JSON to XML
Example: python convertjson2xml.py /home/hellsulf/orascript/json2xml/JSON/2020_8_f1.json
Note: Requires json2xml
pip install json... | 0 | 0 | 0 | 0 | 0 | 429 | 0 | 47 | 134 |
8fa49839a7459895664b9b7ab7501369560d80bf | 17,843 | py | Python | neural_network_lyapunov/examples/quadrotor2d/train_quadrotor_2d_demo.py | hongkai-dai/neural-network-lyapunov-1 | 8843c13f69f7f39cbb939ab250413e76f61843f6 | [
"MIT"
] | 58 | 2021-06-21T08:59:52.000Z | 2022-03-31T14:35:23.000Z | neural_network_lyapunov/examples/quadrotor2d/train_quadrotor_2d_demo.py | StanfordASL/neural-network-lyapunov | 9e5db1c7f91b42df729026c9aa8575bc126f66b6 | [
"MIT"
] | 8 | 2021-08-22T05:31:23.000Z | 2022-03-29T03:47:07.000Z | neural_network_lyapunov/examples/quadrotor2d/train_quadrotor_2d_demo.py | StanfordASL/neural-network-lyapunov | 9e5db1c7f91b42df729026c9aa8575bc126f66b6 | [
"MIT"
] | 11 | 2021-06-21T04:29:59.000Z | 2022-03-30T05:54:43.000Z | import neural_network_lyapunov.examples.quadrotor2d.quadrotor_2d as\
quadrotor_2d
import neural_network_lyapunov.relu_system as relu_system
import neural_network_lyapunov.lyapunov as lyapunov
import neural_network_lyapunov.feedback_system as feedback_system
import neural_network_lyapunov.train_lyapunov as train_lya... | 43.625917 | 79 | 0.584935 | import neural_network_lyapunov.examples.quadrotor2d.quadrotor_2d as\
quadrotor_2d
import neural_network_lyapunov.relu_system as relu_system
import neural_network_lyapunov.lyapunov as lyapunov
import neural_network_lyapunov.feedback_system as feedback_system
import neural_network_lyapunov.train_lyapunov as train_lya... | 15 | 0 | 0 | 0 | 0 | 4,763 | 0 | 0 | 142 |
a61174aa8ea4039c43ac95247e50a51800ae7406 | 1,492 | py | Python | pmem-mariadb/storage/tokudb/PerconaFT/src/tests/hotindexer-undo-do-tests/prov-2.py | wc222/pmdk-examples | 64aadc3a70471c469ac8e214eb1e04ff47cf18ff | [
"BSD-3-Clause"
] | 11 | 2017-10-28T08:41:08.000Z | 2021-06-24T07:24:21.000Z | pmem-mariadb/storage/tokudb/PerconaFT/src/tests/hotindexer-undo-do-tests/prov-2.py | WSCWDA/pmdk-examples | c3d079e52cd18b0e14836ef42bad9a995336bf90 | [
"BSD-3-Clause"
] | 1 | 2021-02-24T05:26:44.000Z | 2021-02-24T05:26:44.000Z | pmem-mariadb/storage/tokudb/PerconaFT/src/tests/hotindexer-undo-do-tests/prov-2.py | isabella232/pmdk-examples | be7a5a18ba7bb8931e512f6d552eadf820fa2235 | [
"BSD-3-Clause"
] | 4 | 2017-09-07T09:33:26.000Z | 2021-02-19T07:45:08.000Z | #!/usr/bin/env python
# generate hotindexing undo provisional tests with 2 nested transactions
import sys
sys.exit(main())
| 32.434783 | 90 | 0.50134 | #!/usr/bin/env python
# generate hotindexing undo provisional tests with 2 nested transactions
import sys
def print_tr(fp, tr, trstack):
trtype = tr[0]
xid = tr[1:]
if trtype == 'i':
print >>fp, "insert", trstack, xid, "v"+xid
if trtype == 'd':
print >>fp, "delete", trstack, xid
if... | 0 | 0 | 0 | 0 | 0 | 1,298 | 0 | 0 | 69 |
ac6f08962c7a70d7904e36c675cdea6f01d2cc93 | 6,228 | py | Python | bin/initialize_docker.py | ace-ecosystem/ACE | d17b5ef4bccf923ec6be5115fabe40f0627dab2d | [
"Apache-2.0"
] | 24 | 2019-09-21T21:09:45.000Z | 2022-03-15T19:48:13.000Z | bin/initialize_docker.py | ace-ecosystem/ACE | d17b5ef4bccf923ec6be5115fabe40f0627dab2d | [
"Apache-2.0"
] | 54 | 2019-09-16T20:06:30.000Z | 2021-08-18T22:22:08.000Z | bin/initialize_docker.py | ace-ecosystem/ACE | d17b5ef4bccf923ec6be5115fabe40f0627dab2d | [
"Apache-2.0"
] | 9 | 2019-09-08T13:35:55.000Z | 2021-01-03T15:23:37.000Z | #!/usr/bin/env python3
#
# initializes your docker development environment by creating
# random passwords for the database connections
# and then updating the configuration files with those passwords
#
import os
if __name__ == '__main__':
main()
| 37.071429 | 100 | 0.60806 | #!/usr/bin/env python3
#
# initializes your docker development environment by creating
# random passwords for the database connections
# and then updating the configuration files with those passwords
#
import os
import os.path
import random
import re
import shutil
import string
def generate_password() -> str:
ret... | 0 | 0 | 0 | 0 | 0 | 5,862 | 0 | -43 | 157 |
831d72cbe7bfa22d7ef93930daa94f0581dad49a | 7,485 | py | Python | src/trolling_detection/feature_extraction.py | rafaharo/trolling_detection | e919fa3fc6d8cd8251050fd2355fdff51ac0bbdc | [
"Apache-2.0"
] | 20 | 2015-11-18T22:26:54.000Z | 2021-04-15T13:29:30.000Z | src/trolling_detection/feature_extraction.py | rafaharo/trolling_detection | e919fa3fc6d8cd8251050fd2355fdff51ac0bbdc | [
"Apache-2.0"
] | 7 | 2021-06-08T22:35:59.000Z | 2022-03-12T00:49:51.000Z | src/trolling_detection/feature_extraction.py | rafaharo/trolling_detection | e919fa3fc6d8cd8251050fd2355fdff51ac0bbdc | [
"Apache-2.0"
] | 7 | 2015-11-22T11:15:32.000Z | 2020-11-16T13:12:46.000Z | import spacy
nlp = spacy.load("en_core_web_sm")
| 37.613065 | 111 | 0.593454 | import spacy
import numpy as np
from sklearn.base import BaseEstimator
nlp = spacy.load("en_core_web_sm")
def corpus_stats(collection):
import nltk
import pprint
words = tokenize_collection(collection, lowercase=True, stopwords='english', min_length=3)
text = nltk.Text(word.lower() for word in words)
... | 0 | 0 | 0 | 4,062 | 0 | 3,102 | 0 | 14 | 251 |
f004d8abe5ec61c30e086dac9027353b1073addb | 1,496 | py | Python | 151-200/155.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 151-200/155.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 151-200/155.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | # Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
#
# push(x) -- Push element x onto stack.
# pop() -- Removes the element on top of the stack.
# top() -- Get the top element.
# getMin() -- Retrieve the minimum element in the stack.
# Example:
# MinStack minStack = new ... | 22.666667 | 99 | 0.504679 | # Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
#
# push(x) -- Push element x onto stack.
# pop() -- Removes the element on top of the stack.
# top() -- Get the top element.
# getMin() -- Retrieve the minimum element in the stack.
# Example:
# MinStack minStack = new ... | 0 | 0 | 0 | 944 | 0 | 0 | 0 | 0 | 23 |
9e790b41d67e3b79d268959431651479f543e943 | 37,289 | py | Python | bot.py | GrishakV/Discord | 475b83dbe434758e3601e25c998b35cee41243f7 | [
"MIT"
] | null | null | null | bot.py | GrishakV/Discord | 475b83dbe434758e3601e25c998b35cee41243f7 | [
"MIT"
] | null | null | null | bot.py | GrishakV/Discord | 475b83dbe434758e3601e25c998b35cee41243f7 | [
"MIT"
] | null | null | null | import discord
client = discord.Client()
#
client.run('token')
| 52.006974 | 120 | 0.544745 | import discord
import math
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
await client.change_presence(status=discord.Status.online, activity=discord.Game('!!помощь/!!help developed \
by Hustle Castle RU'))
@client.event
async def on... | 2,860 | 35,730 | 0 | 0 | 0 | 0 | 0 | -10 | 68 |
21c0ae89d848708782516431fc95bc67d765e4b8 | 1,668 | py | Python | egnyte/tests/test_comments.py | matthiaspeplow/python-egnyte | 2403ad97c9049e6fefc91fe124b9f592d41ec86b | [
"MIT"
] | 18 | 2015-09-09T13:26:40.000Z | 2022-03-09T16:22:09.000Z | egnyte/tests/test_comments.py | matthiaspeplow/python-egnyte | 2403ad97c9049e6fefc91fe124b9f592d41ec86b | [
"MIT"
] | 23 | 2015-03-02T18:30:39.000Z | 2022-03-18T01:32:22.000Z | egnyte/tests/test_comments.py | matthiaspeplow/python-egnyte | 2403ad97c9049e6fefc91fe124b9f592d41ec86b | [
"MIT"
] | 30 | 2015-02-06T19:26:43.000Z | 2022-03-13T18:09:39.000Z |
EGNYTE_FILE_NAME = '/sample.png'
FILE_NAME = 'FILE1.png'
COMMENT = 'test comment'
| 29.785714 | 74 | 0.694844 | from egnyte.tests.config import EgnyteTestCase
from egnyte.tests.helpers import upload_file
EGNYTE_FILE_NAME = '/sample.png'
FILE_NAME = 'FILE1.png'
COMMENT = 'test comment'
class TestComments(EgnyteTestCase):
def setUp(self):
super(TestComments, self).setUp()
self.filepath = self.root_folder.pat... | 0 | 0 | 0 | 1,469 | 0 | 0 | 0 | 48 | 67 |
45ab567ab3f140ddd79d624993dab68a74b6348a | 767 | py | Python | setup.py | timotheecour/ncluster | 24baf049c2690505bf4dd63ec7d8822edb81b5a9 | [
"MIT"
] | 34 | 2019-05-19T02:49:02.000Z | 2021-11-04T18:49:48.000Z | setup.py | timotheecour/ncluster | 24baf049c2690505bf4dd63ec7d8822edb81b5a9 | [
"MIT"
] | 66 | 2019-05-19T18:46:53.000Z | 2019-09-16T00:48:25.000Z | setup.py | timotheecour/ncluster | 24baf049c2690505bf4dd63ec7d8822edb81b5a9 | [
"MIT"
] | 6 | 2019-10-01T07:28:52.000Z | 2022-02-05T02:45:18.000Z | from setuptools import setup
import re
requirements = []
for line in open('requirements.txt'):
req = line.split('#', 1)[0] # strip comments
requirements.append(req.strip())
# follow https://stackoverflow.com/a/7071358/419116
VERSIONFILE = "ncluster/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = ... | 29.5 | 77 | 0.650587 | from setuptools import setup
import re
requirements = []
for line in open('requirements.txt'):
req = line.split('#', 1)[0] # strip comments
requirements.append(req.strip())
# follow https://stackoverflow.com/a/7071358/419116
VERSIONFILE = "ncluster/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d298e53254ad61b92a2db01c75972330584def3d | 5,571 | py | Python | launch_testing_ros/test/examples/talker_listener_launch_test.py | zmichaels11/launch_ros | c5e2aa2bf0eb60d61c66dbe0a6da365230b3387d | [
"Apache-2.0"
] | null | null | null | launch_testing_ros/test/examples/talker_listener_launch_test.py | zmichaels11/launch_ros | c5e2aa2bf0eb60d61c66dbe0a6da365230b3387d | [
"Apache-2.0"
] | null | null | null | launch_testing_ros/test/examples/talker_listener_launch_test.py | zmichaels11/launch_ros | c5e2aa2bf0eb60d61c66dbe0a6da365230b3387d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Apex.AI, 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 in writing... | 33.560241 | 92 | 0.613714 | # Copyright 2019 Apex.AI, 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 in writing... | 0 | 1,222 | 0 | 3,511 | 0 | 0 | 0 | -51 | 292 |
301d7958969dbd90f1d78d08b2ac915a77c3f34d | 14,629 | py | Python | k8sv1/models/v1_service_spec.py | pearsontechnology/k8sv1 | f9df106a4f2492d35af63b6bb2b1da4ed2b84579 | [
"Apache-2.0"
] | 1 | 2016-08-10T15:06:53.000Z | 2016-08-10T15:06:53.000Z | k8sv1/models/v1_service_spec.py | pearsontechnology/k8sv1 | f9df106a4f2492d35af63b6bb2b1da4ed2b84579 | [
"Apache-2.0"
] | null | null | null | k8sv1/models/v1_service_spec.py | pearsontechnology/k8sv1 | f9df106a4f2492d35af63b6bb2b1da4ed2b84579 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use ... | 43.930931 | 494 | 0.672568 | # coding: utf-8
"""
No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use ... | 0 | 9,997 | 0 | 3,748 | 0 | 0 | 0 | -3 | 90 |
dabdaa68ff6a6375976c6f121eebc12be4cfb29a | 15,909 | py | Python | third_party/python-peachpy/peachpy/x86_64/__init__.py | gautamkmr/caffe2 | cde7f21d1e34ec714bc08dbfab945a1ad30e92ff | [
"MIT"
] | 40 | 2021-06-01T07:37:59.000Z | 2022-03-25T01:42:09.000Z | third_party/python-peachpy/peachpy/x86_64/__init__.py | gautamkmr/caffe2 | cde7f21d1e34ec714bc08dbfab945a1ad30e92ff | [
"MIT"
] | 14 | 2021-06-01T11:52:46.000Z | 2022-03-25T02:13:08.000Z | third_party/python-peachpy/peachpy/x86_64/__init__.py | gautamkmr/caffe2 | cde7f21d1e34ec714bc08dbfab945a1ad30e92ff | [
"MIT"
] | 7 | 2021-07-20T19:34:26.000Z | 2022-03-13T21:07:36.000Z | # This file is part of PeachPy package and is licensed under the Simplified BSD license.
# See license.rst for the full text of the license.
import peachpy.x86_64.abi
import peachpy.x86_64.uarch
| 42.997297 | 117 | 0.680747 | # This file is part of PeachPy package and is licensed under the Simplified BSD license.
# See license.rst for the full text of the license.
import peachpy.x86_64.abi
import peachpy.x86_64.uarch
import peachpy.x86_64.isa
from peachpy.x86_64.registers import GeneralPurposeRegister, \
GeneralPurposeRegister8, ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15,390 | 318 |
7bc5d190441e40498ea28034c4d1a5cdf3ac25e5 | 100 | py | Python | .ignore/old/test.py | souvikdas95/SDN_VideoStreaming | a75a77a1d2a087c96102b2c02f5a67d3a90f1fa2 | [
"Apache-2.0"
] | 4 | 2018-04-26T20:33:15.000Z | 2022-01-20T22:43:08.000Z | .ignore/old/test.py | souvikdas95/SDN_VideoStreaming | a75a77a1d2a087c96102b2c02f5a67d3a90f1fa2 | [
"Apache-2.0"
] | null | null | null | .ignore/old/test.py | souvikdas95/SDN_VideoStreaming | a75a77a1d2a087c96102b2c02f5a67d3a90f1fa2 | [
"Apache-2.0"
] | 3 | 2019-05-02T08:51:20.000Z | 2021-04-02T15:29:52.000Z | #!/usr/bin/python
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
print(dir_path)
| 16.666667 | 54 | 0.76 | #!/usr/bin/python
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
print(dir_path)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0dd775f1314244f942526763de97ccd0c4f8d7b7 | 650 | py | Python | setup.py | danilocgsilva/fast-docker-web | 0ff607a77ab227463d0b97005692570a61ff5380 | [
"MIT"
] | null | null | null | setup.py | danilocgsilva/fast-docker-web | 0ff607a77ab227463d0b97005692570a61ff5380 | [
"MIT"
] | null | null | null | setup.py | danilocgsilva/fast-docker-web | 0ff607a77ab227463d0b97005692570a61ff5380 | [
"MIT"
] | null | null | null | from setuptools import setup
VERSION = "0.0.1"
setup(
name="fast_docker_web",
version=VERSION,
description="Wrapps the php web code with Docker environment",
long_description_content_type="text/markdown",
long_description=readme(),
keywords="Docker web php development",
url="https://github... | 27.083333 | 81 | 0.706154 | from setuptools import setup
VERSION = "0.0.1"
def readme():
with open("README.md") as f:
return f.read()
setup(
name="fast_docker_web",
version=VERSION,
description="Wrapps the php web code with Docker environment",
long_description_content_type="text/markdown",
long_description=read... | 0 | 0 | 0 | 0 | 0 | 49 | 0 | 0 | 23 |
dc7fd28eb18f185c7fecf2b691f9351acaecb42f | 1,125 | py | Python | backup/sql_queries.py | andela/waitress | 55d4b99d2e5263a11609b18d478b2e514d79a7e8 | [
"MIT"
] | 2 | 2018-03-13T13:43:32.000Z | 2019-07-30T02:56:48.000Z | backup/sql_queries.py | waitress-andela/waitress | 55d4b99d2e5263a11609b18d478b2e514d79a7e8 | [
"MIT"
] | 16 | 2016-07-31T16:53:01.000Z | 2020-02-14T00:00:27.000Z | backup/sql_queries.py | andela-osule/waitress | 55d4b99d2e5263a11609b18d478b2e514d79a7e8 | [
"MIT"
] | 2 | 2017-01-15T03:25:00.000Z | 2018-10-29T15:19:27.000Z | from datetime import date
CURRENT_DATE = date.today().strftime("%Y-%m-%e")
# FETCH_MEAL_RECORDS = 'SELECT * FROM app_slackuser;'
FETCH_MEAL_RECORDS = f"""
SELECT
to_char(app_mealservice.date, 'DD-MM-YYYY'),
app_mealservice.date_modified,
app_mealservice.user_id,
app_slackuser.firstname,
app_slacku... | 18.145161 | 53 | 0.718222 | from datetime import date
CURRENT_DATE = date.today().strftime("%Y-%m-%e")
# FETCH_MEAL_RECORDS = 'SELECT * FROM app_slackuser;'
FETCH_MEAL_RECORDS = f"""
SELECT
to_char(app_mealservice.date, 'DD-MM-YYYY'),
app_mealservice.date_modified,
app_mealservice.user_id,
app_slackuser.firstname,
app_slacku... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11a323460158d3aa3bb1cedd9f7de6d9705e2f8c | 3,061 | py | Python | src/scraper_suno.py | mawippel/b3-news-scraper | 17bc8b2e7b5f9fb044ee5d3a91d5232be2873cd3 | [
"MIT"
] | null | null | null | src/scraper_suno.py | mawippel/b3-news-scraper | 17bc8b2e7b5f9fb044ee5d3a91d5232be2873cd3 | [
"MIT"
] | null | null | null | src/scraper_suno.py | mawippel/b3-news-scraper | 17bc8b2e7b5f9fb044ee5d3a91d5232be2873cd3 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from urllib.request import Request, urlopen
from utils.paragraph_utils import ParagraphUtils
db = None
def get_news_content_by_href(href):
""" Returns the paragraphs of the article """
paragraphs = []
hdr = {'User-Agent': 'Mozilla/5.0'}
req = Request(href, header... | 28.607477 | 119 | 0.679516 | import requests
import pytz
from datetime import datetime, timedelta
from bs4 import BeautifulSoup
from model.news import News
from database import Database
import locale
from urllib.request import Request, urlopen
from utils.paragraph_utils import ParagraphUtils
from utils.anchor_utils import AnchorUtils
from utils.lo... | 2 | 0 | 0 | 0 | 0 | 1,719 | 0 | 45 | 337 |
12668b0662a655240742d07e7000fb3f6eab4258 | 1,053 | py | Python | code/ch02/ch02-02.py | takseki/python-machine-learning-book | d7c7a2e0845c6bab153d65a0b945e6d1cc5f61cb | [
"MIT"
] | 2 | 2019-05-21T09:37:21.000Z | 2021-06-01T15:08:57.000Z | code/ch02/ch02-02.py | takseki/python-machine-learning-book | d7c7a2e0845c6bab153d65a0b945e6d1cc5f61cb | [
"MIT"
] | null | null | null | code/ch02/ch02-02.py | takseki/python-machine-learning-book | d7c7a2e0845c6bab153d65a0b945e6d1cc5f61cb | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
# ### Reading-in the Iris data
import pandas as pd
df = pd.read_csv('https://archive.ics.uci.edu/ml/'
'machine-learning-databases/iris/iris.data', header=None)
df.tail()
# select setosa and versicolor
y = df.iloc[0:100, 4].values
y = np.where(y == 'Iris-seto... | 27.710526 | 75 | 0.681861 | from adaline_gd import *
import matplotlib.pyplot as plt
import numpy as np
# ### Reading-in the Iris data
import pandas as pd
df = pd.read_csv('https://archive.ics.uci.edu/ml/'
'machine-learning-databases/iris/iris.data', header=None)
df.tail()
# select setosa and versicolor
y = df.iloc[0:100, 4].values
y =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 22 |
180556b0a5845cd8102334b46c035498dfe38f9a | 1,077 | py | Python | cv/about/templatetags/about_extras.py | Trianglium/artist-cv | 5a742a3998ba8778b2b6ddde2c3f88ff3cc85124 | [
"MIT"
] | 2 | 2022-01-29T00:45:58.000Z | 2022-01-30T22:05:18.000Z | cv/about/templatetags/about_extras.py | Trianglium/artist-cv | 5a742a3998ba8778b2b6ddde2c3f88ff3cc85124 | [
"MIT"
] | 14 | 2022-01-30T17:58:46.000Z | 2022-02-23T14:42:10.000Z | cv/about/templatetags/about_extras.py | Trianglium/artist-cv | 5a742a3998ba8778b2b6ddde2c3f88ff3cc85124 | [
"MIT"
] | null | null | null | from django import template
register = template.Library()
# Rows
# Columns
# Container | 26.268293 | 91 | 0.689879 | from django import template
from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.utils.html import format_html
register = template.Library()
# Rows
@register.simple_tag
def row(extra_classes='', align=''):
if align == '':
return format_html('<div class="row {} m-... | 0 | 725 | 0 | 0 | 0 | 0 | 0 | 59 | 201 |
7dbee70ee3448453d8037574e32b443a6283b9ae | 408 | py | Python | sales/migrations/0016_sale_sale_date.py | destodasoftware/kately_api | 89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd | [
"MIT"
] | null | null | null | sales/migrations/0016_sale_sale_date.py | destodasoftware/kately_api | 89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd | [
"MIT"
] | 10 | 2019-12-04T23:52:31.000Z | 2022-02-10T08:34:15.000Z | sales/migrations/0016_sale_sale_date.py | destodasoftware/kately_api | 89e4e80a93ebf8e5d2f2981d108ce5efde75d0dd | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-08-07 16:56
| 21.473684 | 65 | 0.612745 | # Generated by Django 2.2.3 on 2019-08-07 16:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sales', '0015_remove_saleitem_verify_stock'),
]
operations = [
migrations.AddField(
model_name='sale',
name='sale_da... | 0 | 0 | 0 | 294 | 0 | 0 | 0 | 19 | 46 |
56ea62f1e40bd437cb50bed3e119a8472d5b0982 | 354 | py | Python | base/admin.py | mistadrumma/HeapBackends | a51c59078c93af78131da11ab043466518c1f032 | [
"MIT"
] | null | null | null | base/admin.py | mistadrumma/HeapBackends | a51c59078c93af78131da11ab043466518c1f032 | [
"MIT"
] | null | null | null | base/admin.py | mistadrumma/HeapBackends | a51c59078c93af78131da11ab043466518c1f032 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import Menu
admin.site.register(Menu, BaseAdmin)
| 16.857143 | 73 | 0.632768 | from django.contrib import admin
# Register your models here.
from .models import Menu
class BaseAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['name']}),
('Дополнительная информация', {'fields': ['link', 'css_class']}),
]
list_display = ('name', 'link', 'css_class')
admin... | 48 | 0 | 0 | 174 | 0 | 0 | 0 | 0 | 23 |
9ea94a27923ac2f381b246542f2eed7496ebe8cf | 1,929 | py | Python | demo/demo_onnx.py | jmu201521121021/ssd.pytorch | dd85eda6241495ea36b7d2cbdbdfabe52cbfd12e | [
"MIT"
] | 2 | 2020-01-27T11:27:36.000Z | 2021-03-22T08:57:38.000Z | demo/demo_onnx.py | jmu201521121021/ssd.pytorch | dd85eda6241495ea36b7d2cbdbdfabe52cbfd12e | [
"MIT"
] | null | null | null | demo/demo_onnx.py | jmu201521121021/ssd.pytorch | dd85eda6241495ea36b7d2cbdbdfabe52cbfd12e | [
"MIT"
] | null | null | null | import numpy as np
import onnx
import onnxruntime
from data import voc
import torch
import cv2
if __name__ == '__main__':
from data import VOC_CLASSES as labels
num_classes = 21
cfg = voc
priorbox = PriorBox(cfg)
with torch.no_grad():
priors = priorbox.forward()
print('p... | 31.622951 | 79 | 0.553655 | import numpy as np
import onnx
import onnxruntime
from layers import *
from data import voc, coco
import torch
import cv2
if __name__ == '__main__':
from data import VOC_CLASSES as labels
num_classes = 21
cfg = voc
priorbox = PriorBox(cfg)
with torch.no_grad():
priors = prior... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 23 |
dc9f3ba8792ce072f8fb57b0718f1ecd05f31553 | 36,977 | py | Python | Devialet/CallMeMaybe/GeneratorOptions_pb2.py | fwestenberg/devialet | 4760fafa612e08a97c67301e4086fe4a00311894 | [
"MIT"
] | 2 | 2021-03-13T19:27:07.000Z | 2021-12-23T17:31:58.000Z | Devialet/CallMeMaybe/GeneratorOptions_pb2.py | fwestenberg/devialet | 4760fafa612e08a97c67301e4086fe4a00311894 | [
"MIT"
] | 1 | 2021-08-05T08:21:15.000Z | 2022-01-26T14:18:32.000Z | Devialet/CallMeMaybe/GeneratorOptions_pb2.py | fwestenberg/devialet | 4760fafa612e08a97c67301e4086fe4a00311894 | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Devialet/CallMeMaybe/GeneratorOptions.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | 43.247953 | 4,166 | 0.78254 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Devialet/CallMeMaybe/GeneratorOptions.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ffa28338164025a6fe39a6c24280b2f0e184ee96 | 1,514 | py | Python | tests/test_auth_refresh_response.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | tests/test_auth_refresh_response.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | tests/test_auth_refresh_response.py | s0b0lev/mythx-models | 0fc14fef9e41a68a7d97e0bb170fd0eca5693d9a | [
"MIT"
] | null | null | null | from mythx_models.response import AuthRefreshResponse
ACCESS_TOKEN = "my_fancy_access_token"
REFRESH_TOKEN = "my_fancy_refresh_token"
AUTH_REFRESH = {"access": ACCESS_TOKEN, "refresh": REFRESH_TOKEN}
AUTH_REFRESH_RESPONSE = AuthRefreshResponse(
access_token=ACCESS_TOKEN, refresh_token=REFRESH_TOKEN
)
| 29.115385 | 87 | 0.807133 | import json
import pytest
from mythx_models.exceptions import ValidationError
from mythx_models.response import AuthRefreshResponse
from . import common as testdata
ACCESS_TOKEN = "my_fancy_access_token"
REFRESH_TOKEN = "my_fancy_refresh_token"
AUTH_REFRESH = {"access": ACCESS_TOKEN, "refresh": REFRESH_TOKEN}
AUTH_... | 0 | 0 | 0 | 0 | 0 | 925 | 0 | 23 | 252 |
3318326c02c4b7cd5f1a87c02ef0b02e32a779c5 | 4,101 | py | Python | Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py/trash/024_dup_only_giba.py | hehuanlin123/DeepLearning | 6b7feabbbde9ac9489f76da4c06eeb6703fb165a | [
"MIT"
] | 1 | 2020-02-28T12:03:39.000Z | 2020-02-28T12:03:39.000Z | Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py/trash/024_dup_only_giba.py | hehuanlin123/DeepLearning | 6b7feabbbde9ac9489f76da4c06eeb6703fb165a | [
"MIT"
] | null | null | null | Kaggle/Playgroud/RiskPrediction/Home-Credit-Default-Risk-master/py/trash/024_dup_only_giba.py | hehuanlin123/DeepLearning | 6b7feabbbde9ac9489f76da4c06eeb6703fb165a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 27 02:08:31 2018
@author: Kazuki
"""
import pandas as pd
import numpy as np
import utils, os
#utils.start(__file__)
#==============================================================================
PREF = 'f024_'
path_user_id = '../data/user_id_v5.c... | 29.292857 | 106 | 0.592295 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 27 02:08:31 2018
@author: Kazuki
"""
import pandas as pd
import numpy as np
import utils, os
#utils.start(__file__)
#==============================================================================
PREF = 'f024_'
path_user_id = '../data/user_id_v5.c... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
136581993935c66a2d54b7d45358ba7131ab5982 | 2,352 | py | Python | 02_neural_XOR_opt.py | lepesa/Tensorflow | 9040cc6910923b02a58c95431ed2fff4a8aca27e | [
"MIT"
] | null | null | null | 02_neural_XOR_opt.py | lepesa/Tensorflow | 9040cc6910923b02a58c95431ed2fff4a8aca27e | [
"MIT"
] | null | null | null | 02_neural_XOR_opt.py | lepesa/Tensorflow | 9040cc6910923b02a58c95431ed2fff4a8aca27e | [
"MIT"
] | null | null | null | # Sama kuin 01_neural.xor, paitsi eri syntaksi ja parempi SGD optimoija
import numpy as np
import tensorflow as tf
# Parametrit: 2-4-1 verkko
learning_rate = 0.01
n_hidden1 = 4
n_input = 2
n_ouput = 1
inputs = tf.placeholder("float", [None, n_input])
desired_outputs = tf.placeholder("float", [None, n_ouput])
# Ve... | 39.864407 | 111 | 0.680272 | # Sama kuin 01_neural.xor, paitsi eri syntaksi ja parempi SGD optimoija
import numpy as np
import tensorflow as tf
# Parametrit: 2-4-1 verkko
learning_rate = 0.01
n_hidden1 = 4
n_input = 2
n_ouput = 1
inputs = tf.placeholder("float", [None, n_input])
desired_outputs = tf.placeholder("float", [None, n_ouput])
# Ve... | 26 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
223e111167d6f4b9b8b9d688e6d2bc1d4a386a52 | 2,093 | py | Python | tests/unit/cli_test.py | steenzout/python-viivakoodi | 78716f6fc8403abca1867be66fd94e74fbf4b187 | [
"MIT"
] | 6 | 2016-08-29T17:11:57.000Z | 2020-09-30T11:33:51.000Z | tests/unit/cli_test.py | steenzout/python-viivakoodi | 78716f6fc8403abca1867be66fd94e74fbf4b187 | [
"MIT"
] | 3 | 2016-11-03T17:43:28.000Z | 2017-05-23T13:42:48.000Z | tests/unit/cli_test.py | steenzout/python-viivakoodi | 78716f6fc8403abca1867be66fd94e74fbf4b187 | [
"MIT"
] | 3 | 2017-09-12T23:55:33.000Z | 2018-12-03T16:39:12.000Z | # -*- coding: utf-8 -*-
"""Test cases for the steenzout.barcode.cli package."""
| 27.181818 | 84 | 0.606307 | # -*- coding: utf-8 -*-
"""Test cases for the steenzout.barcode.cli package."""
import abc
import pytest
import unittest
from click.testing import CliRunner
from steenzout import barcode
from steenzout.barcode import cli
@pytest.fixture
def runner():
return CliRunner()
class ClickTestCase(unittest.TestCase):... | 0 | 31 | 0 | 1,718 | 0 | 0 | 0 | 9 | 250 |
4c2f8fd022b49ae1a3d66285dda0ba5430514969 | 103 | py | Python | imagersite/imagerprofile/admin.py | HeyIamJames/django-imager | 645bf0d689a70cc6a39adff23bf6aa8627c381b2 | [
"MIT"
] | null | null | null | imagersite/imagerprofile/admin.py | HeyIamJames/django-imager | 645bf0d689a70cc6a39adff23bf6aa8627c381b2 | [
"MIT"
] | 11 | 2018-05-01T01:01:28.000Z | 2018-05-17T15:45:15.000Z | imagersite/imagerprofile/admin.py | HeyIamJames/django-imager | 645bf0d689a70cc6a39adff23bf6aa8627c381b2 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import ImagerProfile
admin.site.register(ImagerProfile)
| 20.6 | 34 | 0.84466 | from django.contrib import admin
from .models import ImagerProfile
admin.site.register(ImagerProfile)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |