hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4962f14d7aebf6b2527a227274f71ac4af8c4389 | 584 | py | Python | test/test_utils.py | ColCarroll/pete | 066bc5c6e5706bc215038f835202d8fb5162033f | [
"MIT"
] | 1 | 2020-10-28T03:39:56.000Z | 2020-10-28T03:39:56.000Z | test/test_utils.py | ColCarroll/pete | 066bc5c6e5706bc215038f835202d8fb5162033f | [
"MIT"
] | 2 | 2016-07-10T17:09:05.000Z | 2021-04-20T17:58:12.000Z | test/test_utils.py | ColCarroll/pete | 066bc5c6e5706bc215038f835202d8fb5162033f | [
"MIT"
] | 1 | 2016-08-15T13:33:15.000Z | 2016-08-15T13:33:15.000Z | import os
from pete import Broadcaster, Task
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
class GatheringBroadcaster(Broadcaster):
name = 'gathering broadcaster'
def __init__(self):
self.messages = []
def send(self, messages):
self.messages += messages
class NamedTask(Task):
... | 19.466667 | 54 | 0.635274 |
1aad3969f3eb5889dfc07bcc14450b230526dff2 | 1,852 | py | Python | pref/webapp/urls.py | ahampt/Pref | 6a6b44c751da4358d97c7f170237b8fc0a4bc3d0 | [
"MIT"
] | null | null | null | pref/webapp/urls.py | ahampt/Pref | 6a6b44c751da4358d97c7f170237b8fc0a4bc3d0 | [
"MIT"
] | 7 | 2015-08-02T20:58:23.000Z | 2016-05-02T03:25:21.000Z | pref/webapp/urls.py | ahampt/Pref | 6a6b44c751da4358d97c7f170237b8fc0a4bc3d0 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
('^' + settings.PREFIX_URL + r'$', 'webapp.views.site.access'),
('^' + settings.PREFIX_URL + r... | 61.733333 | 112 | 0.661447 |
b637401353d6971f7d1ee31be54324f0b91a027b | 21,534 | py | Python | neutorch/dataset/transform.py | brain-map/neutorch | 0fc0c2845e8d513b0a130b6d001a26833c89a63a | [
"Apache-2.0"
] | null | null | null | neutorch/dataset/transform.py | brain-map/neutorch | 0fc0c2845e8d513b0a130b6d001a26833c89a63a | [
"Apache-2.0"
] | 1 | 2022-03-07T15:47:53.000Z | 2022-03-07T15:47:53.000Z | neutorch/dataset/transform.py | brain-map/neutorch | 0fc0c2845e8d513b0a130b6d001a26833c89a63a | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
import random
from functools import lru_cache
from chunkflow.lib.bounding_boxes import Cartesian
# from copy import deepcopy
import numpy as np
from scipy.ndimage.filters import gaussian_filter
# from scipy.ndimage import affine_transform
import cv2
from skimage.util import ran... | 39.43956 | 224 | 0.605322 |
e9bd07bef97a0cb7c8b9b8613104005b7b5a6165 | 13,717 | py | Python | packaging/wheel/relocate.py | Licht-T/vision | 052edcecef3eb0ae9fe9e4b256fa2a488f9f395b | [
"BSD-3-Clause"
] | 1 | 2020-10-20T12:31:36.000Z | 2020-10-20T12:31:36.000Z | packaging/wheel/relocate.py | Licht-T/vision | 052edcecef3eb0ae9fe9e4b256fa2a488f9f395b | [
"BSD-3-Clause"
] | 3 | 2021-11-20T09:20:18.000Z | 2021-12-13T09:19:25.000Z | packaging/wheel/relocate.py | Licht-T/vision | 052edcecef3eb0ae9fe9e4b256fa2a488f9f395b | [
"BSD-3-Clause"
] | 1 | 2021-12-17T18:13:39.000Z | 2021-12-17T18:13:39.000Z | # -*- coding: utf-8 -*-
"""Helper script to package wheels and relocate binaries."""
# Standard library imports
import os
import io
import sys
import glob
import shutil
import zipfile
import hashlib
import platform
import subprocess
import os.path as osp
from base64 import urlsafe_b64encode
# Third party imports
if ... | 32.815789 | 79 | 0.61267 |
cae3fab06f0357e4c9c7481724cbd2eadce13603 | 1,514 | py | Python | car/iot_connection.py | akesiraju/raspberrypi | e8ae5e535a9953631ffa2d1e7de926c9dc19f961 | [
"MIT"
] | 2 | 2019-03-26T23:47:40.000Z | 2020-03-28T03:23:31.000Z | car/iot_connection.py | akesiraju/raspberrypi | e8ae5e535a9953631ffa2d1e7de926c9dc19f961 | [
"MIT"
] | 1 | 2019-03-27T10:59:14.000Z | 2019-03-27T10:59:14.000Z | car/iot_connection.py | akesiraju/raspberrypi | e8ae5e535a9953631ffa2d1e7de926c9dc19f961 | [
"MIT"
] | 1 | 2018-07-14T23:55:14.000Z | 2018-07-14T23:55:14.000Z | import json
# from flask_cors import CORS, cross_origin
import logging
# Import SDK packages
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
import os
class IotConnection:
def __init__(self):
self.config = self._load_config('.vscode/config.json')
self.logger = logging.getLogger('... | 38.820513 | 103 | 0.678336 |
8899160c25ce54488ae99a342978ec42890413fc | 49,104 | py | Python | stretchSenseLibrary.py | jeremyLabrado/Rasbian-Library | 7b0789ca687e837f768f922887cfc84e573b6c14 | [
"MIT"
] | null | null | null | stretchSenseLibrary.py | jeremyLabrado/Rasbian-Library | 7b0789ca687e837f768f922887cfc84e573b6c14 | [
"MIT"
] | null | null | null | stretchSenseLibrary.py | jeremyLabrado/Rasbian-Library | 7b0789ca687e837f768f922887cfc84e573b6c14 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
- Website : https://www.stretchsense.com
- Important : This StretchSense Library has been designed to enable the connection of one or more "StretchSense Sensor" and "StretchSense IC Boards" to your Raspberry Pi
- Author : Louis Germain
- Copyright : 2017 StretchSense
... | 32.262812 | 173 | 0.617832 |
d9ce3930a37d21c590c0e8b622357f85a4085151 | 3,306 | py | Python | GitSvnServer/vcs/git/db.py | cespedes/git-svnserver | 97741e064f9473423e7a80260d2e09a4596384b9 | [
"BSD-3-Clause"
] | 1 | 2016-01-24T11:59:25.000Z | 2016-01-24T11:59:25.000Z | GitSvnServer/vcs/git/db.py | slonopotamus/git_svn_server | 80889d9557c99873ceaa58e5260b8edfa30bcffb | [
"BSD-3-Clause"
] | null | null | null | GitSvnServer/vcs/git/db.py | slonopotamus/git_svn_server | 80889d9557c99873ceaa58e5260b8edfa30bcffb | [
"BSD-3-Clause"
] | null | null | null | import os
import sqlite3
class GitDb(object):
def __init__(self, git, location):
self.git = git
self.map_file = os.path.join(location, 'svnserver', 'db')
def connect(self):
conn = sqlite3.connect(self.map_file)
conn.row_factory = sqlite3.Row
return conn
def execut... | 29 | 80 | 0.541742 |
39dca290842160b320878c8db27f1c3a43c3b468 | 6,419 | py | Python | 3.3.1/gdal-utils/osgeo_utils/auxiliary/raster_creation.py | PROgram52bc/pygdal | ea3722f8b887d74877c267ad9a1b722ec203f93c | [
"MIT"
] | 1 | 2020-11-13T09:22:12.000Z | 2020-11-13T09:22:12.000Z | 3.3.1/gdal-utils/osgeo_utils/auxiliary/raster_creation.py | PROgram52bc/pygdal | ea3722f8b887d74877c267ad9a1b722ec203f93c | [
"MIT"
] | null | null | null | 3.3.1/gdal-utils/osgeo_utils/auxiliary/raster_creation.py | PROgram52bc/pygdal | ea3722f8b887d74877c267ad9a1b722ec203f93c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ******************************************************************************
#
# Project: GDAL utils.auxiliary
# Purpose: raster creation utility functions
# Author: Idan Miara <idan@miara.com>
#
# ****************************************************************... | 42.230263 | 124 | 0.649478 |
7e0f203c1fefb14718a67fc54db60c6486dc6f13 | 2,412 | py | Python | chatBOT-Final/chat_app/venv/lib/python3.6/site-packages/py2neo/packages/httpstream/packages/urimagic/util.py | ashokupd81/Django-Chatbot | 0d199390b22b294830c1a68ad270c688517e7b11 | [
"MIT"
] | 9 | 2017-07-15T08:45:22.000Z | 2021-07-06T08:32:03.000Z | chatBOT-Final/chat_app/venv/lib/python3.6/site-packages/py2neo/packages/httpstream/packages/urimagic/util.py | ashokupd81/Django-Chatbot | 0d199390b22b294830c1a68ad270c688517e7b11 | [
"MIT"
] | 6 | 2017-05-05T13:11:51.000Z | 2019-01-25T22:46:30.000Z | chatBOT-Final/chat_app/venv/lib/python3.6/site-packages/py2neo/packages/httpstream/packages/urimagic/util.py | ashokupd81/Django-Chatbot | 0d199390b22b294830c1a68ad270c688517e7b11 | [
"MIT"
] | 3 | 2018-03-16T14:11:52.000Z | 2020-03-04T02:08:31.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2013-2014, Nigel Small
#
# 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
#
# Unle... | 28.714286 | 74 | 0.597844 |
e9b529eb2618abc6fff4ccd5e4f5f32ffb365532 | 1,092 | py | Python | setup.py | keflavich/pyavm | 9fe8081466bafdc4e5fe3e42439535eb209ec466 | [
"MIT"
] | null | null | null | setup.py | keflavich/pyavm | 9fe8081466bafdc4e5fe3e42439535eb209ec466 | [
"MIT"
] | null | null | null | setup.py | keflavich/pyavm | 9fe8081466bafdc4e5fe3e42439535eb209ec466 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
try: # Python 3.x
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError: # Python 2.x
from distutils.command.build_py import build_py
version = '0.9.3.dev'
setup(name='PyAVM',
version=version,
description='Sim... | 35.225806 | 199 | 0.667582 |
0e14366f95ea858a96daf37a143c5f7d39c7c53d | 13,868 | py | Python | amino/socket.py | Domasgtuz/Amino.py | fbfb981e8a28b49dde0ed8ef4caff99417f022a4 | [
"MIT"
] | null | null | null | amino/socket.py | Domasgtuz/Amino.py | fbfb981e8a28b49dde0ed8ef4caff99417f022a4 | [
"MIT"
] | null | null | null | amino/socket.py | Domasgtuz/Amino.py | fbfb981e8a28b49dde0ed8ef4caff99417f022a4 | [
"MIT"
] | null | null | null | import time
import json
import websocket
import concurrent.futures
import contextlib
import ssl
from random import randint
from sys import _getframe as getframe
from .lib.util import objects, helpers
class SocketHandler:
def __init__(self, client, socket_trace = False, debug = False, security = True):
se... | 47.493151 | 137 | 0.655466 |
adfedb8cedb10ea3ec6091e5cce510c8b041f87d | 27,294 | py | Python | scripts/release-notes.py | jmininger/cockroach | 97dbd6cccf01256c36cd1b61c8ff983a65f29b95 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | scripts/release-notes.py | jmininger/cockroach | 97dbd6cccf01256c36cd1b61c8ff983a65f29b95 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2018-09-28T20:11:45.000Z | 2018-10-01T09:05:49.000Z | scripts/release-notes.py | jmininger/cockroach | 97dbd6cccf01256c36cd1b61c8ff983a65f29b95 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python3
#
# Show a compact release note summary of a range of Git commits.
#
# Example use: release-notes.py --help
#
# Note: the first commit in the range is excluded!
#
# Requires:
# - GitPython https://pypi.python.org/pypi/GitPython/
# - You need to configure your local repo to pull the PR refs f... | 34.462121 | 198 | 0.625009 |
751675da127fe79df625591e58b137a9405d6ac6 | 2,414 | py | Python | utils/test_zensie/test_check.py | alan-turing-institute/CROP | 467956ba8e273daa6afbfafd89bd2c3462a8156e | [
"MIT"
] | 9 | 2020-02-11T17:57:47.000Z | 2022-03-22T14:24:55.000Z | utils/test_zensie/test_check.py | alan-turing-institute/CROP | 467956ba8e273daa6afbfafd89bd2c3462a8156e | [
"MIT"
] | 64 | 2020-02-11T17:35:36.000Z | 2022-03-31T13:19:08.000Z | utils/test_zensie/test_check.py | alan-turing-institute/CROP | 467956ba8e273daa6afbfafd89bd2c3462a8156e | [
"MIT"
] | 2 | 2020-08-16T06:10:24.000Z | 2021-04-15T10:11:51.000Z | import os
import requests
import json
import pandas as pd
from datetime import datetime, timedelta
CONST_CROP_30MHZ_APIKEY = os.environ["CROP_30MHZ_APIKEY"].strip()
CONST_CROP_30MHZ_TEST_T_RH_CHECKID = os.environ["CROP_30MHZ_TEST_T_RH_CHECKID"].strip()
def main():
"""
Main test routine
"""
test_ch... | 24.886598 | 96 | 0.63256 |
e53c48ce163d123b8687ba601d36605e645ac897 | 44,211 | py | Python | lib/network.py | quietnan/electrum-ftc | 5f72cadd777d80a7235e4860589c425287a67fe9 | [
"MIT"
] | null | null | null | lib/network.py | quietnan/electrum-ftc | 5f72cadd777d80a7235e4860589c425287a67fe9 | [
"MIT"
] | null | null | null | lib/network.py | quietnan/electrum-ftc | 5f72cadd777d80a7235e4860589c425287a67fe9 | [
"MIT"
] | null | null | null | # Electrum - Lightweight Bitcoin Client
# Copyright (c) 2011-2016 Thomas Voegtlin
#
# 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 rig... | 40.191818 | 138 | 0.588428 |
a8316f1f480ef7df9d30247922c839c4e6561390 | 6,256 | py | Python | dsl_parser/import_resolver/default_import_resolver.py | mistio/cloudify-dsl-parser | 212864f77591a91ea401c4cfcf99f260d8e41ab3 | [
"Apache-2.0"
] | null | null | null | dsl_parser/import_resolver/default_import_resolver.py | mistio/cloudify-dsl-parser | 212864f77591a91ea401c4cfcf99f260d8e41ab3 | [
"Apache-2.0"
] | null | null | null | dsl_parser/import_resolver/default_import_resolver.py | mistio/cloudify-dsl-parser | 212864f77591a91ea401c4cfcf99f260d8e41ab3 | [
"Apache-2.0"
] | null | null | null | #########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 43.144828 | 79 | 0.61429 |
4b3ba6f2a634e28fb4083437308feb8eddaefbd8 | 394 | py | Python | your_project_name/config/wsgi.py | peadejay/initial-django | d32f6ff8d65be6835369dbe88cf471f3a023a5bb | [
"MIT"
] | null | null | null | your_project_name/config/wsgi.py | peadejay/initial-django | d32f6ff8d65be6835369dbe88cf471f3a023a5bb | [
"MIT"
] | null | null | null | your_project_name/config/wsgi.py | peadejay/initial-django | d32f6ff8d65be6835369dbe88cf471f3a023a5bb | [
"MIT"
] | null | null | null | """
WSGI config for config project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTIN... | 23.176471 | 78 | 0.784264 |
6fb9c67ca3207ae9835c1184740a0f544c41779f | 492 | py | Python | play.py | wallinslax/stable-baselines3 | 511221d5a85ecf657f5ed1654a6995977c4913cf | [
"MIT"
] | null | null | null | play.py | wallinslax/stable-baselines3 | 511221d5a85ecf657f5ed1654a6995977c4913cf | [
"MIT"
] | null | null | null | play.py | wallinslax/stable-baselines3 | 511221d5a85ecf657f5ed1654a6995977c4913cf | [
"MIT"
] | null | null | null | import gym
from stable_baselines3 import PPO
from stable_baselines3 import DDPG
ENV_NAME = 'Pendulum-v0'
#ENV_NAME = 'CartPole-v1'
env = gym.make(ENV_NAME)
#model = PPO('MlpPolicy', env, verbose=1)
model = DDPG('MlpPolicy', env, verbose=1)
model.learn(total_timesteps=10000)
obs = env.reset()
for i in range(1000):
... | 23.428571 | 60 | 0.703252 |
64cef9b6c910e179bb0f9fa3b512192bfcefddc9 | 3,108 | py | Python | blackbox/gen_combos.py | yangzhou6666/error_recovery_experiment | 24af528524629eef30bf185def9f0e0b194d4953 | [
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | blackbox/gen_combos.py | yangzhou6666/error_recovery_experiment | 24af528524629eef30bf185def9f0e0b194d4953 | [
"Apache-2.0",
"MIT-0",
"MIT"
] | 18 | 2018-04-09T09:50:17.000Z | 2020-05-18T19:45:23.000Z | blackbox/gen_combos.py | yangzhou6666/error_recovery_experiment | 24af528524629eef30bf185def9f0e0b194d4953 | [
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-12-24T14:07:57.000Z | 2020-01-12T15:41:35.000Z | #! /usr/bin/env python2.7
import mysql.connector, os, subprocess, sys, tempfile
from Queue import Full, Queue
from threading import Thread
from atomicint import AtomicInt
GENERATE = 200000 # How many combos to generate?
cnx = mysql.connector.connect(user="",
password="",
... | 34.153846 | 162 | 0.498713 |
7cf3d2123ea95257fce184d7365802fa7419fcc2 | 672 | py | Python | Chapter 06/Chap06_Example6.11.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 06/Chap06_Example6.11.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | Chapter 06/Chap06_Example6.11.py | bpbpublications/Programming-Techniques-using-Python | 49b785f37e95a3aad1d36cef51e219ac56e5e9f0 | [
"MIT"
] | null | null | null | import re
mytxt = '123 \n123 gfh'
mypattern = '\s'
myreplace = ''
mystr = re.sub(mypattern, myreplace, mytxt)
print(mystr) # SUB1
print("-------------")
mystr = re.sub(mypattern, myreplace, mytxt,count =1)
print(mystr) # SUB2
print("-------------")
print(re.sub('st', '*#' , 'Stay safe, stay healthy', flags ... | 35.368421 | 88 | 0.550595 |
d572a9fc50d28b6a6a5a90bfe7a0a6dfa84b315b | 7,014 | py | Python | model/train_tune_cv.py | demattox/glyBERT | c44ca9dcc6223cc6d92b532d803af818f521adba | [
"MIT"
] | null | null | null | model/train_tune_cv.py | demattox/glyBERT | c44ca9dcc6223cc6d92b532d803af818f521adba | [
"MIT"
] | null | null | null | model/train_tune_cv.py | demattox/glyBERT | c44ca9dcc6223cc6d92b532d803af818f521adba | [
"MIT"
] | null | null | null | import os
import torch
from torch import nn
import torch.nn.functional as F
from torch.utils.data import DataLoader, random_split
import pytorch_lightning as pl
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.loggers import CSVLogger
import numpy as np
from fairseq.modules import LayerN... | 27.944223 | 132 | 0.596806 |
9244ea4206cdcabe1d803fd6edffbfe646855512 | 5,796 | py | Python | thecodebase/thecodebase/settings.py | elmeriniemela/thecodebase | 6ab55231acee78c861baf78b1db3162b16a7316b | [
"MIT"
] | null | null | null | thecodebase/thecodebase/settings.py | elmeriniemela/thecodebase | 6ab55231acee78c861baf78b1db3162b16a7316b | [
"MIT"
] | null | null | null | thecodebase/thecodebase/settings.py | elmeriniemela/thecodebase | 6ab55231acee78c861baf78b1db3162b16a7316b | [
"MIT"
] | null | null | null | """
Django settings for thecodebase project.
Generated by 'django-admin startproject' using Django 2.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import o... | 29.42132 | 112 | 0.683402 |
9322f1100c5ffe7c6cc1d70d8cefd768b0aea117 | 4,022 | py | Python | engine.py | teamoptimusai/homeio-nlu | 920052320df74f2ae6f66d6e88e7443cd99617ef | [
"MIT"
] | null | null | null | engine.py | teamoptimusai/homeio-nlu | 920052320df74f2ae6f66d6e88e7443cd99617ef | [
"MIT"
] | null | null | null | engine.py | teamoptimusai/homeio-nlu | 920052320df74f2ae6f66d6e88e7443cd99617ef | [
"MIT"
] | null | null | null | import torch
import joblib
import argparse
from flask import Flask, request, jsonify
import utils.config as config
from utils.inference import entity_extraction, classification, simplify_entities, simplify_intent, simplify_scenario
class NLUEngine:
def __init__(self, weights):
self.tokenizer = config.TOK... | 36.899083 | 116 | 0.676778 |
efe02c8458d1e055df6f74b03127c9b2915d9452 | 3,565 | py | Python | segregation/multigroup/multi_relative_diversity.py | noahbouchier/segregation | 88bd9608251b8bc42eae9265adb7941279b9868c | [
"BSD-3-Clause"
] | null | null | null | segregation/multigroup/multi_relative_diversity.py | noahbouchier/segregation | 88bd9608251b8bc42eae9265adb7941279b9868c | [
"BSD-3-Clause"
] | null | null | null | segregation/multigroup/multi_relative_diversity.py | noahbouchier/segregation | 88bd9608251b8bc42eae9265adb7941279b9868c | [
"BSD-3-Clause"
] | null | null | null | """Multigroup Relative Diversity index"""
__author__ = "Renan X. Cortes <renanc@ucr.edu>, Sergio J. Rey <sergio.rey@ucr.edu> and Elijah Knaap <elijah.knaap@ucr.edu>"
import numpy as np
from geopandas import GeoDataFrame
from .._base import MultiGroupIndex, SpatialImplicitIndex
np.seterr(divide="ignore", invalid="ig... | 30.732759 | 209 | 0.661711 |
633373b60ec48b45ef318dbd97117b441a7314a7 | 2,687 | py | Python | tests/contrib/operators/test_wasb_delete_blob_operator.py | ankit-shrivastava/airflow | 77b1bdc12ca5ddf043d4550d36948766b59f60ce | [
"Apache-2.0"
] | 2 | 2021-07-30T17:37:15.000Z | 2021-08-03T13:50:56.000Z | tests/contrib/operators/test_wasb_delete_blob_operator.py | larryzhu2018/airflow-1 | 1bb12f31585c36661fe30c11c9b3e0f67586a93a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contrib/operators/test_wasb_delete_blob_operator.py | larryzhu2018/airflow-1 | 1bb12f31585c36661fe30c11c9b3e0f67586a93a | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 31.611765 | 86 | 0.659099 |
79de40edad99bc82c14cbf36bdf99042ce708b5e | 2,279 | py | Python | demos/QCBP_TV/demo_stab_re_nesta_tv_fourier.py | mneyrane/AS-NESTA-net | 0142097b4d9dd0daadd94d876fb4bf73e9984921 | [
"MIT"
] | null | null | null | demos/QCBP_TV/demo_stab_re_nesta_tv_fourier.py | mneyrane/AS-NESTA-net | 0142097b4d9dd0daadd94d876fb4bf73e9984921 | [
"MIT"
] | null | null | null | demos/QCBP_TV/demo_stab_re_nesta_tv_fourier.py | mneyrane/AS-NESTA-net | 0142097b4d9dd0daadd94d876fb4bf73e9984921 | [
"MIT"
] | null | null | null | import math
import torch
import numpy as np
import operators as op
import stability
import nn
from PIL import Image
with Image.open("../demo_images/test_image.png") as im:
im.save("stab-ground-truth.png")
X = np.asarray(im).astype(np.float64) / 255
# parameters
eta = 1e-1
N, _ = X.shape
inner_iters = 5
outer_... | 27.457831 | 105 | 0.67047 |
e01ec87fe739acf44899a91ea43263bd0fb5fa84 | 21,525 | py | Python | packages/python/plotly/plotly/express/_doc.py | santapresent/plotly.py | 96967d7937fed1777f737f8c3302af48252b4e7a | [
"MIT"
] | 2 | 2019-11-08T07:01:11.000Z | 2019-11-17T10:10:49.000Z | packages/python/plotly/plotly/express/_doc.py | santapresent/plotly.py | 96967d7937fed1777f737f8c3302af48252b4e7a | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/express/_doc.py | santapresent/plotly.py | 96967d7937fed1777f737f8c3302af48252b4e7a | [
"MIT"
] | null | null | null | import inspect
from textwrap import TextWrapper
# TODO contents of columns
# TODO explain categorical
# TODO handle color
# TODO handle details of box/violin/histogram
# TODO handle details of column selection with `dimensions`
# TODO document "or `None`, default `None`" in various places
# TODO standardize positioni... | 46.490281 | 413 | 0.632985 |
fd230cb8d8bfa5c27c769b9a60cd451dbd9abfa9 | 12,818 | py | Python | server/.vim/plugged/python-mode/submodules/pylint/tests/test_functional.py | hkdb/sysconf | 99d334f7309657647059c4b37f25e33dffc81fc3 | [
"MIT"
] | 10 | 2020-07-21T21:59:54.000Z | 2021-07-19T11:01:47.000Z | server/.vim/plugged/python-mode/submodules/pylint/tests/test_functional.py | hkdb/sysconf | 99d334f7309657647059c4b37f25e33dffc81fc3 | [
"MIT"
] | null | null | null | server/.vim/plugged/python-mode/submodules/pylint/tests/test_functional.py | hkdb/sysconf | 99d334f7309657647059c4b37f25e33dffc81fc3 | [
"MIT"
] | 1 | 2021-01-30T18:17:01.000Z | 2021-01-30T18:17:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2014-2017 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Google, Inc.
# Copyright (c) 2014 Michal Nowikowski <godfryd@gmail.com>
# Copyright (c) 2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro>
# Cop... | 31.727723 | 88 | 0.616477 |
0226e1684fe2c18bf97609f5d0a5986baa69f904 | 1,515 | py | Python | orders/models.py | guilhermelopeseng/django-ecommerce | 2f0f3ccd325aef124b27bc86494f546eed2c3cf3 | [
"MIT"
] | null | null | null | orders/models.py | guilhermelopeseng/django-ecommerce | 2f0f3ccd325aef124b27bc86494f546eed2c3cf3 | [
"MIT"
] | null | null | null | orders/models.py | guilhermelopeseng/django-ecommerce | 2f0f3ccd325aef124b27bc86494f546eed2c3cf3 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
from localflavor.br.models import BRCPFField, BRPostalCodeField, BRStateField
from model_utils.models import TimeStampedModel
from products.models import Product
class Order(TimeStamp... | 32.934783 | 77 | 0.712211 |
539c3cc6fc76096f77846383b9682f39cdbed61b | 1,032 | py | Python | Menta/Profiles/migrations/0003_remove_skill_gender_skill_level_skill_profile_and_more.py | reembot/Menta | 7da11e28d6d9f61075ab835548956168671b509d | [
"MIT"
] | 2 | 2022-03-26T03:04:45.000Z | 2022-03-26T08:49:32.000Z | Menta/Profiles/migrations/0003_remove_skill_gender_skill_level_skill_profile_and_more.py | reembot/Menta | 7da11e28d6d9f61075ab835548956168671b509d | [
"MIT"
] | null | null | null | Menta/Profiles/migrations/0003_remove_skill_gender_skill_level_skill_profile_and_more.py | reembot/Menta | 7da11e28d6d9f61075ab835548956168671b509d | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-03-26 19:10
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Profiles', '0002_alter_profile_website_skill'),
]
operations = [
migrations.RemoveField(
model_... | 30.352941 | 161 | 0.58624 |
e52f60b5e5dab57c1af10b6bef990b221ad2ac9a | 2,107 | py | Python | common/middleware/keystone.py | escudocloud/encswift_server | 90a5a999c06b40da89d5f785795f80bd9d990640 | [
"Apache-2.0"
] | null | null | null | common/middleware/keystone.py | escudocloud/encswift_server | 90a5a999c06b40da89d5f785795f80bd9d990640 | [
"Apache-2.0"
] | null | null | null | common/middleware/keystone.py | escudocloud/encswift_server | 90a5a999c06b40da89d5f785795f80bd9d990640 | [
"Apache-2.0"
] | 1 | 2016-09-27T09:08:24.000Z | 2016-09-27T09:08:24.000Z | #!/usr/bin/env python
from keystoneclient.exceptions import NotFound, Conflict
import keystoneclient.v2_0.client as kc
import logging
# set logger info to INFO
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
logger.addHandler(ch)
class SimpleK... | 37.625 | 79 | 0.623636 |
dfe79e902c7fa3433fd2c3f19ad615675e7b3756 | 1,068 | py | Python | databricks_cli/oauth/__init__.py | sweisdb/databricks-cli | 5444cb8b94ef481e1656845f588d8d118bc352db | [
"Apache-2.0"
] | null | null | null | databricks_cli/oauth/__init__.py | sweisdb/databricks-cli | 5444cb8b94ef481e1656845f588d8d118bc352db | [
"Apache-2.0"
] | null | null | null | databricks_cli/oauth/__init__.py | sweisdb/databricks-cli | 5444cb8b94ef481e1656845f588d8d118bc352db | [
"Apache-2.0"
] | null | null | null | # Databricks CLI
# Copyright 2021 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"), except
# that the use of services to which certain application programming
# interfaces (each, an "API") connect requires that the user first obtain
# a license for the use of the APIs from Databricks,... | 46.434783 | 75 | 0.764045 |
76b9af6500748d912b85c6751b6b954d2abac287 | 2,482 | py | Python | util/scale.py | kaidisn/carvana-challenge | cba536657714df7c1c33150b92e3e152195b68db | [
"MIT"
] | 24 | 2017-10-09T03:05:10.000Z | 2021-11-28T14:36:34.000Z | util/scale.py | kaidisn/carvana-challenge | cba536657714df7c1c33150b92e3e152195b68db | [
"MIT"
] | null | null | null | util/scale.py | kaidisn/carvana-challenge | cba536657714df7c1c33150b92e3e152195b68db | [
"MIT"
] | 3 | 2018-05-20T17:07:16.000Z | 2021-09-08T15:40:13.000Z | import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
import cv2
def resize_image(im, sz):
'''
input:
im: numpy array of shape (num of channels, height, width)
output:
I_out: (num of channels, height, width)
'''
im = np.swapaxes(im, 0, 2)
h = im.shape[0]
w = im.shape... | 34.957746 | 155 | 0.624093 |
c601e77acff5ff210c2ded468e06f32f86d6fb52 | 327 | py | Python | tests/EagerPendulumTest.py | dinies/SpikingCNN | 3ab4df25da77de2719f1b0f0f813b7d71d28c132 | [
"MIT"
] | 12 | 2019-03-09T02:36:05.000Z | 2021-07-05T18:50:02.000Z | tests/EagerPendulumTest.py | dinies/SpikingCNN | 3ab4df25da77de2719f1b0f0f813b7d71d28c132 | [
"MIT"
] | null | null | null | tests/EagerPendulumTest.py | dinies/SpikingCNN | 3ab4df25da77de2719f1b0f0f813b7d71d28c132 | [
"MIT"
] | 3 | 2019-04-11T14:03:09.000Z | 2020-02-26T00:09:14.000Z | import unittest
from context import models
from models.EagerPendulum import EagerPendulum
class EagerPendulumTest( unittest.TestCase):
def setUp(self):
self.p = EagerPendulum()
self.epsilon = 0.0001
def test_dummy(self):
self.assertTrue( True)
if __name__ == '__main__':
unittest.... | 20.4375 | 46 | 0.697248 |
4ed1898733268fb1dd7561f47af9fca1d1087b95 | 80 | py | Python | insert.py | joshavenue/python_notebook | 8d46ba88ef4f05dea6801364bc134edb981df02e | [
"Unlicense"
] | null | null | null | insert.py | joshavenue/python_notebook | 8d46ba88ef4f05dea6801364bc134edb981df02e | [
"Unlicense"
] | null | null | null | insert.py | joshavenue/python_notebook | 8d46ba88ef4f05dea6801364bc134edb981df02e | [
"Unlicense"
] | null | null | null | x = [1,2,3]
x.insert(1, 1) // Insert 1 into the list 1 //
x = [1,1,2,3]
| 16 | 52 | 0.4625 |
abdd65c0515dbcd41b962df28321b5781b863f49 | 944 | py | Python | DesignerInterface/manageDesign.py | a-b-h-i-97/BlockchainForAM | a204cab4e07e68301f10874b34d0f6c6eb5c3fab | [
"BSD-3-Clause"
] | null | null | null | DesignerInterface/manageDesign.py | a-b-h-i-97/BlockchainForAM | a204cab4e07e68301f10874b34d0f6c6eb5c3fab | [
"BSD-3-Clause"
] | null | null | null | DesignerInterface/manageDesign.py | a-b-h-i-97/BlockchainForAM | a204cab4e07e68301f10874b34d0f6c6eb5c3fab | [
"BSD-3-Clause"
] | null | null | null | from web3 import Web3
import os
import sys
sys.path.append(os.path.abspath('../DesignDatabase'))
import designHelpers as dh
print("\nWelcome to the manage design interface\n")
provider = Web3.IPCProvider(os.path.join(os.path.dirname(__file__), '../DesignNode/geth.ipc'))
w3 = Web3(provider)
choice = 0
while(choice != ... | 26.971429 | 94 | 0.628178 |
c68bb8ace29742a3af1a243af2e207f2350a6d83 | 474 | py | Python | vqa/feature_extractor/_init_feat_paths.py | zjuchenlong/faster-rcnn.pytorch | 71555e8c9306a19c7e2f8a49c14027a3c056aaf8 | [
"MIT"
] | 11 | 2018-09-26T06:39:45.000Z | 2021-02-22T11:09:54.000Z | vqa/feature_extractor/_init_feat_paths.py | zjuchenlong/faster-rcnn.pytorch | 71555e8c9306a19c7e2f8a49c14027a3c056aaf8 | [
"MIT"
] | null | null | null | vqa/feature_extractor/_init_feat_paths.py | zjuchenlong/faster-rcnn.pytorch | 71555e8c9306a19c7e2f8a49c14027a3c056aaf8 | [
"MIT"
] | 3 | 2019-05-13T16:29:46.000Z | 2020-04-10T04:41:01.000Z | import os.path as osp
import sys
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
this_dir = osp.dirname(__file__)
# Add lib to PYTHONPATH
faster_rcnn_path = osp.join(this_dir, '..', '..')
# add_path(faster_rcnn_path)
tools_path = osp.join(faster_rcnn_path, 'tools')
ad... | 22.571429 | 50 | 0.700422 |
1c5f0beb22042e6f0bde5a5c7aa6836d7c918ec1 | 638 | py | Python | qcloudsdkmonitor/BindAlarmRuleObjectsRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | qcloudsdkmonitor/BindAlarmRuleObjectsRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | qcloudsdkmonitor/BindAlarmRuleObjectsRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from qcloudsdkcore.request import Request
class BindAlarmRuleObjectsRequest(Request):
def __init__(self):
super(BindAlarmRuleObjectsRequest, self).__init__(
'monitor', 'qcloudcliV1', 'BindAlarmRuleObjects', 'monitor.api.qcloud.com')
def get_alarmRuleId(self):
... | 29 | 87 | 0.695925 |
db35bf555c1c5b322e390aee09cb1f957ade2ee6 | 23,202 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/dhcpv4server_a0d174266d4c9a35774364ccc4dfccb3.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/dhcpv4server_a0d174266d4c9a35774364ccc4dfccb3.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/dhcpv4server_a0d174266d4c9a35774364ccc4dfccb3.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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, ... | 46.496994 | 326 | 0.645979 |
6638f9069fb1429e4daa1bcc01a914de9f803837 | 552 | py | Python | adaptoctree/types.py | Excalibur-SLE/AdapOctree | 27e49e142463eb0114fb37aad013f51680aa0c0f | [
"BSD-3-Clause"
] | 4 | 2020-12-22T17:34:56.000Z | 2021-04-27T10:58:52.000Z | adaptoctree/types.py | Excalibur-SLE/AdapOctree | 27e49e142463eb0114fb37aad013f51680aa0c0f | [
"BSD-3-Clause"
] | 6 | 2020-12-21T17:10:28.000Z | 2021-06-08T15:32:22.000Z | adaptoctree/types.py | Excalibur-SLE/AdaptOctree | 27e49e142463eb0114fb37aad013f51680aa0c0f | [
"BSD-3-Clause"
] | null | null | null | """
Type aliases.
"""
import numba
Key = numba.int64
Keys = numba.int64[:]
KeySet = numba.types.Set(Key)
KeyList = numba.types.ListType(Key)
Anchor = numba.int64[:]
Anchors = numba.int64[:]
Single = numba.float32
Double = numba.float64
Int = numba.int32
Long = numba.int64
LongArray = numba.int64[:]
LongArray2D = numb... | 22.08 | 40 | 0.719203 |
15485780d55d6a56f551ff052991b2007a98791d | 1,446 | py | Python | river/stats/summing.py | Styren/river | 128a5ffe9f80df85e23d9ae871e02bea6dc9c100 | [
"BSD-3-Clause"
] | 1 | 2021-04-19T10:47:11.000Z | 2021-04-19T10:47:11.000Z | river/stats/summing.py | Styren/river | 128a5ffe9f80df85e23d9ae871e02bea6dc9c100 | [
"BSD-3-Clause"
] | null | null | null | river/stats/summing.py | Styren/river | 128a5ffe9f80df85e23d9ae871e02bea6dc9c100 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T15:18:39.000Z | 2021-01-22T15:18:39.000Z | from .. import utils
from . import base
class Sum(base.Univariate):
"""Running sum.
Attributes
----------
sum : float
The running sum.
Examples
--------
>>> from river import stats
>>> X = [-5, -3, -1, 1, 3, 5]
>>> mean = stats.Sum()
>>> for x in X:
... pri... | 15.89011 | 55 | 0.48686 |
b24038e262bb7ad802706cd7f06a002259b747f3 | 3,875 | py | Python | test/test_basic.py | letmerecall/nameko-grpc | 4fa602831aac92218fad975a51e4f41f3a34699e | [
"Apache-2.0"
] | 44 | 2019-02-28T15:07:11.000Z | 2021-11-09T07:17:19.000Z | test/test_basic.py | letmerecall/nameko-grpc | 4fa602831aac92218fad975a51e4f41f3a34699e | [
"Apache-2.0"
] | 10 | 2019-06-10T08:56:41.000Z | 2021-08-04T14:28:54.000Z | test/test_basic.py | letmerecall/nameko-grpc | 4fa602831aac92218fad975a51e4f41f3a34699e | [
"Apache-2.0"
] | 8 | 2019-02-11T16:42:30.000Z | 2020-07-29T06:46:12.000Z | # -*- coding: utf-8 -*-
import pytest
@pytest.mark.equivalence
class TestStandard:
def test_unary_unary(self, client, protobufs):
response = client.unary_unary(protobufs.ExampleRequest(value="A"))
assert response.message == "A"
def test_unary_stream(self, client, protobufs):
responses... | 34.598214 | 88 | 0.615226 |
4c440eeeb86e0f73f7c98c4666c241c537c03bd7 | 64 | py | Python | test_hello.py | DJprime127/cs4843 | ec20ca2042f981761936f5659fa44a8c3aee9a5e | [
"Apache-2.0"
] | null | null | null | test_hello.py | DJprime127/cs4843 | ec20ca2042f981761936f5659fa44a8c3aee9a5e | [
"Apache-2.0"
] | null | null | null | test_hello.py | DJprime127/cs4843 | ec20ca2042f981761936f5659fa44a8c3aee9a5e | [
"Apache-2.0"
] | null | null | null | from hello import add
def test_add():
assert add(1,2) == 3
| 12.8 | 24 | 0.640625 |
9189f468dcd32bc0eedd62bccdc8a3c807704c76 | 255 | py | Python | weather_api/urls.py | Josephchinedu/python-rest-weather-api | 27986db99d0b7af0c2778cbbd650c7bfcd8db03f | [
"MIT"
] | null | null | null | weather_api/urls.py | Josephchinedu/python-rest-weather-api | 27986db99d0b7af0c2778cbbd650c7bfcd8db03f | [
"MIT"
] | null | null | null | weather_api/urls.py | Josephchinedu/python-rest-weather-api | 27986db99d0b7af0c2778cbbd650c7bfcd8db03f | [
"MIT"
] | null | null | null | from django.urls import path, include
from weather_api import views
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('descriptions', views.DescriptionViewSet)
urlpatterns = [
path('', include(router.urls))
]
| 23.181818 | 57 | 0.788235 |
3034bf230219be6e85114fbbe8e600d01a843c42 | 591 | py | Python | main.py | stevommmm/runningwheel | f905a682da23ec0f93c5e54b10292dd5bb03d5fc | [
"MIT"
] | null | null | null | main.py | stevommmm/runningwheel | f905a682da23ec0f93c5e54b10292dd5bb03d5fc | [
"MIT"
] | null | null | null | main.py | stevommmm/runningwheel | f905a682da23ec0f93c5e54b10292dd5bb03d5fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from aiohttp import web
from pathlib import Path
import aiodocker
import logging
import runningwheel
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
app = web.Application()
app['root'] = Path(__file__).parent.absolute()
app['docker'] = aiodocker.Docker()
app.router.add... | 24.625 | 56 | 0.754653 |
b3f93c27c5f9c9c92683171840192ad7a3d18d9d | 14,108 | py | Python | tests/unit/states/test_boto_s3_bucket.py | nizD/salt | bbe135d62d8d8b4e4a7d0362097e1b3a3b092bed | [
"Apache-2.0"
] | 5 | 2017-02-07T05:39:29.000Z | 2020-06-13T02:07:33.000Z | tests/unit/states/test_boto_s3_bucket.py | nizD/salt | bbe135d62d8d8b4e4a7d0362097e1b3a3b092bed | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | tests/unit/states/test_boto_s3_bucket.py | nizD/salt | bbe135d62d8d8b4e4a7d0362097e1b3a3b092bed | [
"Apache-2.0"
] | 11 | 2017-01-26T19:36:29.000Z | 2021-12-11T07:54:16.000Z | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
from copy import deepcopy
import logging
import random
import string
# Import Salt Testing libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase
f... | 35.007444 | 199 | 0.532606 |
a4e1b64a9d4427367e163de31572a970658eff90 | 567 | py | Python | src/data/Note.py | A-fume/A.fume.Analysis | 064eb453aceccca435d361d890b3f3cc7449e10d | [
"MIT"
] | null | null | null | src/data/Note.py | A-fume/A.fume.Analysis | 064eb453aceccca435d361d890b3f3cc7449e10d | [
"MIT"
] | null | null | null | src/data/Note.py | A-fume/A.fume.Analysis | 064eb453aceccca435d361d890b3f3cc7449e10d | [
"MIT"
] | null | null | null | class Note:
TYPE_TOP = 1
TYPE_MIDDLE = 2
TYPE_BASE = 3
TYPE_SINGLE = 4
def __init__(self, perfume_idx, ingredient_idx, type):
self.perfume_idx = perfume_idx
self.ingredient_idx = ingredient_idx
self.type = type
def __str__(self):
return 'Note({}, {}, {})'.format... | 25.772727 | 90 | 0.599647 |
b5b1e11585f418df79341715001d4f9f73978fa6 | 3,291 | py | Python | apps/tinyosGW/sensor_val_tx.py | jeonghoonkang/BerePi | e04283a94a6a0487ab0049dc3e514d6c5dda39cc | [
"BSD-2-Clause"
] | 22 | 2015-06-03T06:28:27.000Z | 2022-03-18T08:02:45.000Z | apps/tinyosGW/sensor_val_tx.py | jeonghoonkang/BerePi | e04283a94a6a0487ab0049dc3e514d6c5dda39cc | [
"BSD-2-Clause"
] | 14 | 2015-06-08T01:31:53.000Z | 2020-08-30T02:19:15.000Z | apps/tinyosGW/sensor_val_tx.py | jeonghoonkang/BerePi | e04283a94a6a0487ab0049dc3e514d6c5dda39cc | [
"BSD-2-Clause"
] | 26 | 2015-05-12T09:33:55.000Z | 2021-08-30T05:41:00.000Z | #-*- coding: utf-8 -*-
#!/usr/bin/python
# Author : jeonghoonkang, https://github.com/jeonghoonkang
from __future__ import print_function
from subprocess import *
from types import *
import platform
import sys
import os
import datetime
import tailer
def run_cmd(cmd):
p = Popen(cmd, shell=True, stdout=PIPE)
o... | 25.315385 | 108 | 0.576117 |
9ab1a2a67e899324228115982ea3369492d20fa8 | 11,743 | py | Python | next_builder_sdk/model/easy_flow/target_info_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | next_builder_sdk/model/easy_flow/target_info_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | next_builder_sdk/model/easy_flow/target_info_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: target_info.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.protobuf... | 46.972 | 1,163 | 0.763093 |
436c4f947fde6da4d0af51a690f6aa7105c9bad1 | 8,636 | py | Python | scales/loadbalancer/aperture.py | steveniemitz/scales | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 48 | 2015-06-04T00:08:44.000Z | 2021-02-27T16:00:50.000Z | scales/loadbalancer/aperture.py | steveniemitz/pynagle | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 10 | 2015-07-30T20:54:02.000Z | 2020-02-24T15:39:49.000Z | scales/loadbalancer/aperture.py | steveniemitz/pynagle | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 11 | 2015-06-10T19:44:34.000Z | 2020-02-14T02:02:40.000Z | """Aperture Load Balancer.
Based on work from finagle's aperture load balancer.
See https://github.com/twitter/finagle/blob/master/finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/Aperture.scala
The aperture balancer attempts to keep the average load going into the underlying
server set between a load band... | 35.24898 | 126 | 0.706114 |
86d485dc916b65bdef1c9224da6e5f65256c6a10 | 2,179 | py | Python | zcrmsdk/src/com/zoho/crm/api/related_lists/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | zcrmsdk/src/com/zoho/crm/api/related_lists/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | zcrmsdk/src/com/zoho/crm/api/related_lists/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | try:
from zcrmsdk.src.com.zoho.crm.api.exception import SDKException
from zcrmsdk.src.com.zoho.crm.api.util import Constants
from zcrmsdk.src.com.zoho.crm.api.related_lists.response_handler import ResponseHandler
except Exception:
from ..exception import SDKException
from ..util import Constants
from .response_ha... | 27.935897 | 102 | 0.744837 |
cc9bab1bc843fe49b77671f96954b0e08769d3e2 | 2,688 | py | Python | SVR_test.py | jakobhaggstrom/JCA-21-1579 | 30ce251b2caf2f23066980e839f39470bfa4ed3f | [
"MIT"
] | null | null | null | SVR_test.py | jakobhaggstrom/JCA-21-1579 | 30ce251b2caf2f23066980e839f39470bfa4ed3f | [
"MIT"
] | null | null | null | SVR_test.py | jakobhaggstrom/JCA-21-1579 | 30ce251b2caf2f23066980e839f39470bfa4ed3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 19 22:10:37 2021
@author: Jakob Häggström
For more information see:
Journal of Chromatography A, xxx (2022) xxxx–xxxx
doi:xxx
The following program is more or less a user interface that uses the trained
models to predict retentiontimes for a given oligonucle... | 23.787611 | 83 | 0.606399 |
046aab0c037a7cb22979f0a3a0d6da8724ddb4c4 | 16,186 | py | Python | trestle/core/models/elements.py | jrdoran/compliance-trestle | 0b0b6c4a3dad51bdce921099906347abc0a4d7df | [
"Apache-2.0"
] | 1 | 2021-03-10T13:29:22.000Z | 2021-03-10T13:29:22.000Z | trestle/core/models/elements.py | aNebula/compliance-trestle | a2949e15b79bfc8ee13dd9822aa49e708548c62d | [
"Apache-2.0"
] | null | null | null | trestle/core/models/elements.py | aNebula/compliance-trestle | a2949e15b79bfc8ee13dd9822aa49e708548c62d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 IBM Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 38.630072 | 120 | 0.64043 |
fccdccc6d634227d047895181f016bc7e617b149 | 669 | py | Python | scripts/find_car.py | ahou8288/self-driving-car-1 | ea436a563ed6fe7668533ad77039e0580a912a31 | [
"MIT"
] | 5 | 2018-09-24T13:05:16.000Z | 2019-03-05T18:15:36.000Z | scripts/find_car.py | ahou8288/self-driving-car-1 | ea436a563ed6fe7668533ad77039e0580a912a31 | [
"MIT"
] | 1 | 2019-05-22T11:02:45.000Z | 2019-05-22T11:02:45.000Z | scripts/find_car.py | ahou8288/self-driving-car-1 | ea436a563ed6fe7668533ad77039e0580a912a31 | [
"MIT"
] | 4 | 2018-02-17T05:30:34.000Z | 2019-03-26T11:51:36.000Z | """
Convienience script to find your Raspberry Pi on a local network.
Usage:
find_car.py [--ip=<ip>]
Options:
--ip=<ip> Base ip address of your network [default: 192.168.1.0]
"""
from docopt import docopt
import os
import socket
args = docopt(__doc__)
ip = args['--ip']
print('Looking up your computer IP ... | 19.114286 | 79 | 0.660688 |
87334f0dd237df4acfd5f41b8bca159512c9245c | 3,333 | py | Python | examples/visualize/animate.py | cg31/cule | 6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c | [
"BSD-3-Clause"
] | 208 | 2019-05-25T21:35:35.000Z | 2022-03-28T17:33:13.000Z | examples/visualize/animate.py | cg31/cule | 6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c | [
"BSD-3-Clause"
] | 30 | 2019-07-27T08:23:54.000Z | 2022-03-24T18:17:36.000Z | examples/visualize/animate.py | cg31/cule | 6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c | [
"BSD-3-Clause"
] | 27 | 2019-07-27T05:42:23.000Z | 2022-03-05T03:08:52.000Z | import os
import sys
_path = os.path.abspath(os.path.pardir)
if not _path in sys.path:
sys.path = [_path] + sys.path
import argparse
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import torch
from torchcule.atari import Env, Rom
from utils.openai.envs import create_v... | 37.033333 | 125 | 0.654065 |
e5c5174fa09d7007f7d459f98a169f144cb18b4a | 436 | py | Python | fitapp/migrations/0003_add_refresh_token_field.py | thesignalcenter/django-fitbit | aa17ee5dacbbf4ad1edea85f480829185e6f39f9 | [
"Apache-2.0"
] | null | null | null | fitapp/migrations/0003_add_refresh_token_field.py | thesignalcenter/django-fitbit | aa17ee5dacbbf4ad1edea85f480829185e6f39f9 | [
"Apache-2.0"
] | null | null | null | fitapp/migrations/0003_add_refresh_token_field.py | thesignalcenter/django-fitbit | aa17ee5dacbbf4ad1edea85f480829185e6f39f9 | [
"Apache-2.0"
] | 2 | 2018-06-21T20:12:01.000Z | 2019-06-11T23:32:07.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fitapp', '0002_initial_data'),
]
operations = [
migrations.AddField(
model_name='userfitbit',
name='r... | 21.8 | 47 | 0.598624 |
bcbc5e0252a9bf13b45ca42b9ec85156aae3c752 | 11,185 | py | Python | models.py | kevinddchen/FCN-PascalVOC | 2b7bfbcc0d8d237388a7ea70ee062069e3c32af6 | [
"MIT"
] | 5 | 2021-04-30T16:54:16.000Z | 2022-01-14T06:54:39.000Z | models.py | kevinddchen/FCN-PascalVOC | 2b7bfbcc0d8d237388a7ea70ee062069e3c32af6 | [
"MIT"
] | null | null | null | models.py | kevinddchen/FCN-PascalVOC | 2b7bfbcc0d8d237388a7ea70ee062069e3c32af6 | [
"MIT"
] | 3 | 2021-05-28T03:27:23.000Z | 2022-03-27T05:56:34.000Z | '''
This file contains the FCN models.
'''
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
def vgg16(l2=0, dropout=0):
'''Convolutionized VGG16 network.
Args:
l2 (float): L2 regularization strength
dropout (float): Dropout rate
Returns:
(keras Model)
... | 51.307339 | 114 | 0.598391 |
fa1f7c8eb32f18c39216e57bb12a222820092595 | 1,803 | py | Python | src/transformers/models/led/tokenization_led.py | kct22aws/transformers | 04cddaf402591e9f5bdb5f116a111d829a0ce4f4 | [
"Apache-2.0"
] | 31 | 2022-02-02T13:13:41.000Z | 2022-03-29T08:37:20.000Z | src/transformers/models/led/tokenization_led.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 2 | 2022-03-14T10:13:16.000Z | 2022-03-14T11:50:27.000Z | src/transformers/models/led/tokenization_led.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 2 | 2022-03-21T04:32:39.000Z | 2022-03-22T01:02:49.000Z | # coding=utf-8
# Copyright 2021 Iz Beltagy, Matthew E. Peters, Arman Cohan and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... | 35.352941 | 114 | 0.738769 |
242d1803e77888bc97f6c659ba1d77eac0440c9b | 74 | py | Python | core/manager.py | xreaad/GetSiteScript | f40b72941c7e50392e9f1b655faea40dc2918cb5 | [
"MIT"
] | null | null | null | core/manager.py | xreaad/GetSiteScript | f40b72941c7e50392e9f1b655faea40dc2918cb5 | [
"MIT"
] | null | null | null | core/manager.py | xreaad/GetSiteScript | f40b72941c7e50392e9f1b655faea40dc2918cb5 | [
"MIT"
] | null | null | null | import os
import sys
class Manager:
def __init__(self):
pass
| 10.571429 | 23 | 0.648649 |
aa78424a710f3e046752f4fbea9b7ddbe57f3e69 | 7,693 | py | Python | monailabel/interfaces/datastore.py | IntroAI-termproject/MONAILabel | 6a0fcc797e24aff1a1582088bae71973b2b6582e | [
"Apache-2.0"
] | 214 | 2021-04-30T15:37:47.000Z | 2022-03-27T12:38:58.000Z | monailabel/interfaces/datastore.py | IntroAI-termproject/MONAILabel | 6a0fcc797e24aff1a1582088bae71973b2b6582e | [
"Apache-2.0"
] | 325 | 2021-04-30T15:59:16.000Z | 2022-03-31T19:39:38.000Z | monailabel/interfaces/datastore.py | IntroAI-termproject/MONAILabel | 6a0fcc797e24aff1a1582088bae71973b2b6582e | [
"Apache-2.0"
] | 50 | 2021-05-05T13:57:45.000Z | 2022-03-16T21:01:25.000Z | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 29.030189 | 112 | 0.614065 |
253b6de596da4b2a054c70b2f0d60a9634fa1e77 | 2,552 | py | Python | tests/parser/dictionary/encoder/record/test_interested_party_agreement.py | orenyodfat/CWR-DataApi | f3b6ba8308c901b6ab87073c155c08e30692333c | [
"MIT"
] | 37 | 2015-04-21T15:33:53.000Z | 2022-02-07T00:02:29.000Z | tests/parser/dictionary/encoder/record/test_interested_party_agreement.py | orenyodfat/CWR-DataApi | f3b6ba8308c901b6ab87073c155c08e30692333c | [
"MIT"
] | 86 | 2015-02-01T22:26:02.000Z | 2021-07-09T08:49:36.000Z | tests/parser/dictionary/encoder/record/test_interested_party_agreement.py | orenyodfat/CWR-DataApi | f3b6ba8308c901b6ab87073c155c08e30692333c | [
"MIT"
] | 27 | 2015-01-26T16:01:09.000Z | 2021-11-08T23:53:55.000Z | # -*- coding: utf-8 -*-
import unittest
from cwr.parser.encoder.dictionary import \
InterestedPartyForAgreementDictionaryEncoder
from cwr.agreement import InterestedPartyForAgreementRecord
"""
InterestedPartyForAgreementRecord to dictionary encoding tests.
The following cases are tested:
"""
__author__ = 'Bern... | 43.254237 | 83 | 0.53174 |
916fbd0eb1115bc296798fc2698bfb4b39566a56 | 9,025 | py | Python | src/Summary/get_possible_diplotypes.py | Genomic-Medicine-Linkoping/pgx_module | 0254071a2e2d9fdb74a5ad70fcec2845a53fb087 | [
"MIT"
] | null | null | null | src/Summary/get_possible_diplotypes.py | Genomic-Medicine-Linkoping/pgx_module | 0254071a2e2d9fdb74a5ad70fcec2845a53fb087 | [
"MIT"
] | null | null | null | src/Summary/get_possible_diplotypes.py | Genomic-Medicine-Linkoping/pgx_module | 0254071a2e2d9fdb74a5ad70fcec2845a53fb087 | [
"MIT"
] | null | null | null | import pandas as pd
import re
import argparse
import sys
import numpy as np
class ArrangeHaplotype:
"""
Get possible haplotypes from variant combinations detected in file.
Add clinical guidelines based on the haplotypes detected
"""
def __init__(self,
detected_variants,
... | 41.022727 | 112 | 0.58903 |
4e4fdcd6310f0c1150f45896ccd1d5a6b6cd2e49 | 2,627 | py | Python | site_scons/site_tools/abilink.py | MartinNeupauer/mongo | 6cc2dfe7edd312b8596355edef454e15988e350e | [
"Apache-2.0"
] | 1 | 2015-11-08T17:16:08.000Z | 2015-11-08T17:16:08.000Z | site_scons/site_tools/abilink.py | MartinNeupauer/mongo | 6cc2dfe7edd312b8596355edef454e15988e350e | [
"Apache-2.0"
] | 2 | 2021-03-26T00:01:11.000Z | 2021-03-26T00:02:19.000Z | site_scons/site_tools/abilink.py | MartinNeupauer/mongo | 6cc2dfe7edd312b8596355edef454e15988e350e | [
"Apache-2.0"
] | 1 | 2021-06-18T05:00:06.000Z | 2021-06-18T05:00:06.000Z | # Copyright 2015 MongoDB 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, sof... | 31.650602 | 101 | 0.687096 |
2003e1b11126e1f0bbd412d6d4196770feec97d6 | 1,804 | py | Python | modules/action/apt2_whois.py | Marx314/apt2 | f0782ec121057bd5d8c0c5fa438d0a13dc4dd448 | [
"MIT"
] | 2 | 2017-05-11T22:08:47.000Z | 2020-04-07T06:31:26.000Z | modules/action/apt2_whois.py | Marx314/apt2 | f0782ec121057bd5d8c0c5fa438d0a13dc4dd448 | [
"MIT"
] | null | null | null | modules/action/apt2_whois.py | Marx314/apt2 | f0782ec121057bd5d8c0c5fa438d0a13dc4dd448 | [
"MIT"
] | 1 | 2020-04-07T06:31:27.000Z | 2020-04-07T06:31:27.000Z | import re
import sys
try:
import whois
except ImportError:
raise ImportError('Missing whois library. To install run: pip install whois')
from core.actionModule import actionModule
from core.keystore import KeyStore as kb
from core.utils import Utils
class apt2_whois(actionModule):
def __init__(self, confi... | 32.8 | 108 | 0.576497 |
6f6eb2d3cb0743e8458276c48c132c8a69fe7c76 | 29 | py | Python | anubis-management-api/anubis/version.py | orchestracities/anubis | 34cfeeef4485f2e011da6e6216d8c67041366c63 | [
"Apache-2.0"
] | null | null | null | anubis-management-api/anubis/version.py | orchestracities/anubis | 34cfeeef4485f2e011da6e6216d8c67041366c63 | [
"Apache-2.0"
] | 21 | 2022-02-21T14:07:04.000Z | 2022-03-29T14:19:37.000Z | anubis-management-api/anubis/version.py | orchestracities/anubis | 34cfeeef4485f2e011da6e6216d8c67041366c63 | [
"Apache-2.0"
] | null | null | null | ANUBIS_VERSION = '0.3.0-dev'
| 14.5 | 28 | 0.689655 |
607b8097713bcea13b07f082bceeebcc2fb0a7eb | 1,100 | py | Python | setup.py | violafanfani/github_settings_tool | 64143112ee99266dea0c250880e3324313570169 | [
"MIT"
] | null | null | null | setup.py | violafanfani/github_settings_tool | 64143112ee99266dea0c250880e3324313570169 | [
"MIT"
] | null | null | null | setup.py | violafanfani/github_settings_tool | 64143112ee99266dea0c250880e3324313570169 | [
"MIT"
] | null | null | null | import os
from setuptools import find_packages, setup
# determining the directory containing setup.py
setup_path = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(setup_path, 'README.rst'), encoding='utf-8') as f:
readme = f.read()
setup(
# package information
name = 'github_settings_to... | 25 | 73 | 0.671818 |
899f10ff91da824ee133cb54a85fc2654652f249 | 5,737 | py | Python | docs/conf.py | cffbots/flamingo | 647df63b75443d3a56643e2bfdc623ebb203d850 | [
"Apache-2.0"
] | 1 | 2021-01-12T21:52:06.000Z | 2021-01-12T21:52:06.000Z | docs/conf.py | cffbots/flamingo | 647df63b75443d3a56643e2bfdc623ebb203d850 | [
"Apache-2.0"
] | 61 | 2020-11-04T17:17:35.000Z | 2022-02-03T14:02:56.000Z | docs/conf.py | cffbots/flamingo | 647df63b75443d3a56643e2bfdc623ebb203d850 | [
"Apache-2.0"
] | 1 | 2022-02-03T13:43:50.000Z | 2022-02-03T13:43:50.000Z | # -*- coding: utf-8 -*-
#
# flamingo documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 02 09:45:25 2020.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 30.844086 | 79 | 0.678926 |
67b910dfd27a7747893b089964174ac061399519 | 587 | py | Python | keyvalue.py | nanspro/nuBox-CLI | 5e4d906a49378f3a9968cc627668dec1ae5d8e32 | [
"MIT"
] | null | null | null | keyvalue.py | nanspro/nuBox-CLI | 5e4d906a49378f3a9968cc627668dec1ae5d8e32 | [
"MIT"
] | null | null | null | keyvalue.py | nanspro/nuBox-CLI | 5e4d906a49378f3a9968cc627668dec1ae5d8e32 | [
"MIT"
] | null | null | null | import requests
import urllib.parse
api_key = '52f33b0158c319fd8afe53610f55289965993970164ea71212fe63'
def set_value(key, value):
key = urllib.parse.quote(key)
url = f"https://meeiot.org/put/{api_key}/{key}"
x = requests.post(url, json=value, verify=False)
res = x.text
if res[0] == "0":
... | 21.740741 | 66 | 0.635434 |
82741c6fbf304bc99295d7bdcc1e7ac965b0493b | 1,856 | py | Python | core/domain/platform_parameter_list.py | swyuan27/oppia | da4c733659b8813eccf738ff8be19123ebcdeb15 | [
"Apache-2.0"
] | 5,422 | 2015-08-14T01:56:44.000Z | 2022-03-31T23:31:56.000Z | core/domain/platform_parameter_list.py | omprakash1999mina/oppia | 00282e533b5832cb763100de1a5cc727644d64ef | [
"Apache-2.0"
] | 14,178 | 2015-08-14T05:21:45.000Z | 2022-03-31T23:54:10.000Z | core/domain/platform_parameter_list.py | omprakash1999mina/oppia | 00282e533b5832cb763100de1a5cc727644d64ef | [
"Apache-2.0"
] | 3,574 | 2015-08-14T04:20:06.000Z | 2022-03-29T01:52:37.000Z | # coding: utf-8
#
# Copyright 2020 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 33.745455 | 88 | 0.77694 |
bc364f14cceed2bc41fadf8a479fe0a72249abde | 3,078 | py | Python | test/test_docinit.py | mesca/docinit | b2d1c3bc4b2fc510497530d645e81b52d10a56c9 | [
"MIT"
] | null | null | null | test/test_docinit.py | mesca/docinit | b2d1c3bc4b2fc510497530d645e81b52d10a56c9 | [
"MIT"
] | null | null | null | test/test_docinit.py | mesca/docinit | b2d1c3bc4b2fc510497530d645e81b52d10a56c9 | [
"MIT"
] | null | null | null | import os
import pytest
from datetime import datetime
from docinit.docinit import Parse, Config, Git
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'setup.cfg')
def test_parse_bool():
assert Parse.option('tRUe') == True
assert Parse.option('1') == True
assert Parse.option('yEs') == True
... | 33.096774 | 89 | 0.64165 |
88fd4af0a125097cd4f2dda0b9c90b0a7d1ba326 | 988 | py | Python | src/param_scan/fns/calc_full_scan.py | nt409/HRHR | 62ab397650f4e2a1b1d0e6ef289b4e73790c777e | [
"MIT"
] | null | null | null | src/param_scan/fns/calc_full_scan.py | nt409/HRHR | 62ab397650f4e2a1b1d0e6ef289b4e73790c777e | [
"MIT"
] | null | null | null | src/param_scan/fns/calc_full_scan.py | nt409/HRHR | 62ab397650f4e2a1b1d0e6ef289b4e73790c777e | [
"MIT"
] | null | null | null | from tqdm import tqdm
import numpy as np
from param_scan.fns.calc_sing_ps_run import SinglePSRun, ScanOutput
class ParameterScan:
"""
Inputs:
- config: param scan config detailing runs to do and bounds on params
- seed: random seed for these runs
Outputs:
- ScanOutput object
"""
def... | 21.021277 | 73 | 0.62753 |
68a44b72c551b7b2e240efdfc52defb199d0905d | 432 | py | Python | game-watch-api/games/migrations/0011_alter_game_game_engines.py | fouadsan/game_watch | ca38d283ef8f55499ea520eb52a78ebfac8a77a4 | [
"MIT"
] | null | null | null | game-watch-api/games/migrations/0011_alter_game_game_engines.py | fouadsan/game_watch | ca38d283ef8f55499ea520eb52a78ebfac8a77a4 | [
"MIT"
] | null | null | null | game-watch-api/games/migrations/0011_alter_game_game_engines.py | fouadsan/game_watch | ca38d283ef8f55499ea520eb52a78ebfac8a77a4 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2022-03-21 09:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('games', '0010_alter_engine_name_alter_mode_name_and_more'),
]
operations = [
migrations.AlterField(
model_name='game',
... | 22.736842 | 72 | 0.62963 |
f59778064500ae4744ea6ea2ca9758744eee39f1 | 5,247 | py | Python | pytest_bdd/cucumber_json.py | Prisma-Saas-Dev/public-repo1 | f7850807e7302effe6b654e2b3fecf2851d8dfca | [
"MIT"
] | 1 | 2015-11-21T17:46:49.000Z | 2015-11-21T17:46:49.000Z | pytest_bdd/cucumber_json.py | The-Compiler/pytest-bdd | 30076d478c34afc67c41460a2956b430f15e7f90 | [
"MIT"
] | null | null | null | pytest_bdd/cucumber_json.py | The-Compiler/pytest-bdd | 30076d478c34afc67c41460a2956b430f15e7f90 | [
"MIT"
] | null | null | null | """Cucumber json output formatter."""
import json
import math
import os
import time
import py
import six
from .feature import force_unicode
if six.PY3:
long = int
def add_options(parser):
"""Add pytest-bdd options."""
group = parser.getgroup("bdd", "Cucumber JSON")
group.addoption(
"--cucu... | 32.590062 | 107 | 0.554031 |
eafa493c7a8f949da66341d4ea1dd7380f645dbf | 318 | py | Python | py/orbit/py_linac/linac_parsers/__init__.py | LeoRya/py-orbit | 340b14b6fd041ed8ec2cc25b0821b85742aabe0c | [
"MIT"
] | 17 | 2018-02-09T23:39:06.000Z | 2022-03-04T16:27:04.000Z | py/orbit/py_linac/linac_parsers/__init__.py | LeoRya/py-orbit | 340b14b6fd041ed8ec2cc25b0821b85742aabe0c | [
"MIT"
] | 22 | 2017-05-31T19:40:14.000Z | 2021-09-24T22:07:47.000Z | py/orbit/py_linac/linac_parsers/__init__.py | LeoRya/py-orbit | 340b14b6fd041ed8ec2cc25b0821b85742aabe0c | [
"MIT"
] | 37 | 2016-12-08T19:39:35.000Z | 2022-02-11T19:59:34.000Z | ## \namespace orbit::py_linac::linac_parsers
## \Classes and packages of ORBIT Linac.
##
from sns_linac_lattice_factory import SNS_LinacLatticeFactory
from jparc_linac_lattice_factory import JPARC_LinacLatticeFactory
__all__ = []
__all__.append("SNS_LinacLatticeFactory")
__all__.append("JPARC_LinacLatticeFactory")
| 28.909091 | 65 | 0.836478 |
0a37ce52a1774ee36652cf5b531f6bf94f74d271 | 915 | py | Python | caluma/core/jexl.py | czosel/caluma | 4a3e81b2000961ab934bfc1c6840ec00f0ba2c19 | [
"MIT"
] | null | null | null | caluma/core/jexl.py | czosel/caluma | 4a3e81b2000961ab934bfc1c6840ec00f0ba2c19 | [
"MIT"
] | null | null | null | caluma/core/jexl.py | czosel/caluma | 4a3e81b2000961ab934bfc1c6840ec00f0ba2c19 | [
"MIT"
] | null | null | null | import pyjexl
from pyjexl.analysis import ValidatingAnalyzer
from pyjexl.exceptions import ParseError
class JEXL(pyjexl.JEXL):
def validate(self, expression, ValidatingAnalyzerClass=ValidatingAnalyzer):
try:
for res in self.analyze(expression, ValidatingAnalyzerClass):
yield re... | 30.5 | 80 | 0.702732 |
f05334c5e7e4e88c6659366d392314df39af0590 | 474 | py | Python | app/urls.py | AbdulAhadSiddiqui011/covidTracker | b8a1d2ba40c4e271db3b2e1814a88afd9b35ba1f | [
"MIT"
] | null | null | null | app/urls.py | AbdulAhadSiddiqui011/covidTracker | b8a1d2ba40c4e271db3b2e1814a88afd9b35ba1f | [
"MIT"
] | 2 | 2021-06-04T23:43:52.000Z | 2021-09-22T19:29:13.000Z | app/urls.py | AbdulAhadSiddiqui011/covidTracker | b8a1d2ba40c4e271db3b2e1814a88afd9b35ba1f | [
"MIT"
] | 1 | 2020-10-01T06:04:55.000Z | 2020-10-01T06:04:55.000Z | # -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
from django.urls import path, re_path
from app import views
urlpatterns = [
# Matches any html file - to be used for gentella
# Avoid using your .html in your resources.
# Or create a separate django app.
re_path(r'... | 23.7 | 53 | 0.64135 |
235fa5da3fd2a097c39a861cab2a6c7b3962db14 | 1,248 | py | Python | utils/email_helper.py | bobjiangps/python3_test_framework | cfcdc10f5bcf96bb31e417b800d829c61fbba07f | [
"MIT"
] | 2 | 2019-06-28T07:33:36.000Z | 2020-01-12T12:47:20.000Z | utils/email_helper.py | bobjiangps/python3_test_framework | cfcdc10f5bcf96bb31e417b800d829c61fbba07f | [
"MIT"
] | null | null | null | utils/email_helper.py | bobjiangps/python3_test_framework | cfcdc10f5bcf96bb31e417b800d829c61fbba07f | [
"MIT"
] | null | null | null | import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
def send_email(content, subject, email_setting, filename=None):
msg = MIMEMultipart("alternative")
# msg = MIMEText(content,"html")
msg["Subject"] = subject
... | 49.92 | 178 | 0.660256 |
e44b6d5d718b305e33a1f2532215181c1c048738 | 4,140 | py | Python | app/api/install_endpoint.py | ryomahan/read-tracardi-api | d0a012fb097ca81daf046b314000301eb54bfad8 | [
"MIT"
] | null | null | null | app/api/install_endpoint.py | ryomahan/read-tracardi-api | d0a012fb097ca81daf046b314000301eb54bfad8 | [
"MIT"
] | null | null | null | app/api/install_endpoint.py | ryomahan/read-tracardi-api | d0a012fb097ca81daf046b314000301eb54bfad8 | [
"MIT"
] | null | null | null | import logging
from typing import Optional
from fastapi import APIRouter, Depends, HTTPException
from app.config import server
from elasticsearch import ElasticsearchException
from tracardi.config import tracardi
from tracardi.domain.credentials import Credentials
from tracardi.domain.user import User
from tracardi.e... | 36.637168 | 125 | 0.665942 |
a1a681c626cb39382777f5aee07c9228b47ca12b | 12,487 | py | Python | Codigos/NYT FQ/NYT 2007 FQ.py | rafgui12/Newspaper-Library | 96de4f91a25fa06e7bfb8b8f5981b032fb7b8bf8 | [
"Unlicense"
] | null | null | null | Codigos/NYT FQ/NYT 2007 FQ.py | rafgui12/Newspaper-Library | 96de4f91a25fa06e7bfb8b8f5981b032fb7b8bf8 | [
"Unlicense"
] | null | null | null | Codigos/NYT FQ/NYT 2007 FQ.py | rafgui12/Newspaper-Library | 96de4f91a25fa06e7bfb8b8f5981b032fb7b8bf8 | [
"Unlicense"
] | null | null | null | # importing the requests library
import requests
import numpy as np
import os
# Cadenas de Pais Y Palabras
country = ["Colombia","Canada","Cuba","China","Cameroon","Cambodia","Costa Rica","Croatia","Czech Republic","Argentina"]
country2 = ["Afghanistan","Australia","Algeria","Austria","Brazil","Bolivia","Belgium","... | 33.932065 | 137 | 0.509009 |
e87cfd05afa018c844278a2e0406b0a215b3292b | 1,801 | py | Python | ai4good/webapp/cm_admin_page.py | kariso2000/model-server | 2a7cbc433d5bd71cfc334450ddc227babfb0dc1c | [
"MIT"
] | 1 | 2020-07-17T11:37:33.000Z | 2020-07-17T11:37:33.000Z | ai4good/webapp/cm_admin_page.py | kariso2000/model-server | 2a7cbc433d5bd71cfc334450ddc227babfb0dc1c | [
"MIT"
] | 2 | 2020-09-24T06:57:43.000Z | 2020-09-24T08:19:52.000Z | ai4good/webapp/cm_admin_page.py | kariso2000/model-server | 2a7cbc433d5bd71cfc334450ddc227babfb0dc1c | [
"MIT"
] | 1 | 2020-09-24T03:56:48.000Z | 2020-09-24T03:56:48.000Z | import dash_html_components as html
from ai4good.webapp.apps import dash_app, facade, _redis, cache, local_cache
from ai4good.models.cm.cm_model import CompartmentalModel
from dash.dependencies import Input, Output
import dash
def layout():
return html.Div(
[
html.H3('Admin page'),
... | 28.140625 | 90 | 0.608551 |
737ae5392afe84f7d30aa0c0d3dff2f2a9ad0c81 | 6,861 | py | Python | lm_perplexity/models.py | EleutherAI/lm_perplexity | 24c5a04beb2f073b2230c7c7420bd1ec7776f513 | [
"MIT"
] | 42 | 2021-01-02T00:15:59.000Z | 2022-03-04T10:59:58.000Z | lm_perplexity/models.py | EleutherAI/lm_perplexity | 24c5a04beb2f073b2230c7c7420bd1ec7776f513 | [
"MIT"
] | null | null | null | lm_perplexity/models.py | EleutherAI/lm_perplexity | 24c5a04beb2f073b2230c7c7420bd1ec7776f513 | [
"MIT"
] | 7 | 2021-01-02T12:57:19.000Z | 2022-03-01T15:23:59.000Z | import numpy as np
import os
from typing import Optional
import openai
import torch
import torch.nn as nn
import transformers
import lm_perplexity.utils as utils
class LM:
def get_perplexity_data(self, text) -> Optional[dict]:
raise NotImplementedError
@classmethod
def create_from_config(cls, p... | 34.827411 | 102 | 0.63533 |
ccf3e84481404af3c4b3cd4070a56149409c72b0 | 326 | py | Python | ReadingGauges/ComputerSide/GrabberGaugesOutput_python3/ScriptRunGrabber.py | jerabaul29/PaddleAndUltrasonicGauges | 5c6ba80ddfd44190eb21d5c61979ac802a54cb99 | [
"MIT"
] | 2 | 2021-02-03T12:55:57.000Z | 2021-02-11T07:07:06.000Z | ReadingGauges/ComputerSide/GrabberGaugesOutput_python3/ScriptRunGrabber.py | jerabaul29/PaddleAndUltrasonicGauges | 5c6ba80ddfd44190eb21d5c61979ac802a54cb99 | [
"MIT"
] | null | null | null | ReadingGauges/ComputerSide/GrabberGaugesOutput_python3/ScriptRunGrabber.py | jerabaul29/PaddleAndUltrasonicGauges | 5c6ba80ddfd44190eb21d5c61979ac802a54cb99 | [
"MIT"
] | null | null | null | import Grabber
gauge_grabber = Grabber.grabb_serial_values()
gauge_grabber.init()
gauge_grabber.grabb(10)
gauge_grabber.convert_grabbed_to_numpy()
gauge_grabber.plot_grabbed_data()
gauge_grabber.clean_numpy_dict()
gauge_grabber.save_cleaned_dict_numpy('test_saving')
gauge_grabber.save_cleaned_dict_numpy_csv('test_sav... | 27.166667 | 56 | 0.868098 |
727426a462f51e7b311ba94555308f578f95ef1b | 492 | py | Python | Bugscan_exploits-master/exp_list/exp-1770.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-1770.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-1770.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#refer: http://www.wooyun.org/bugs/wooyun-2010-0121875
def assign(service, arg):
if service == "ewebs":
return True, arg
def audit(arg):
vul_url = arg + 'testweb.php'
code, _, body, _, _ = curl.curl2(vul_url)
if code == 200 and '<td>acce... | 28.941176 | 59 | 0.595528 |
6e6cccd5189caffb66ec8db09e94af5e6bcaf47f | 45,600 | py | Python | lib/python2.7/site-packages/coverage/parser.py | DPNT-Sourcecode/CHK-uimw01 | 87144ae10115d7a8df565f5109666f00bc001ce4 | [
"Apache-2.0"
] | 15 | 2018-04-09T00:44:22.000Z | 2021-08-03T08:08:07.000Z | lib/python2.7/site-packages/coverage/parser.py | DPNT-Sourcecode/CHK-uimw01 | 87144ae10115d7a8df565f5109666f00bc001ce4 | [
"Apache-2.0"
] | 22 | 2018-04-23T13:52:20.000Z | 2019-09-20T15:11:32.000Z | lib/python2.7/site-packages/coverage/parser.py | DPNT-Sourcecode/CHK-uimw01 | 87144ae10115d7a8df565f5109666f00bc001ce4 | [
"Apache-2.0"
] | 4 | 2018-07-07T16:45:56.000Z | 2019-06-09T13:30:13.000Z | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Code parsing for coverage.py."""
import ast
import collections
import os
import re
import token
import tokenize
from coverage import env
from coverage.backward... | 38.742566 | 99 | 0.594846 |
aa31df183eb96b22bd3d1b4b73cf3a55aeb444af | 1,231 | py | Python | mobile_payments/defaults.py | ZendaInnocent/mobile-payments | d3e7e9321c39bde2e7e368e78c096b36cf66dd3b | [
"MIT"
] | 1 | 2020-11-19T05:22:39.000Z | 2020-11-19T05:22:39.000Z | mobile_payments/defaults.py | ZendaInnocent/mobile-payments | d3e7e9321c39bde2e7e368e78c096b36cf66dd3b | [
"MIT"
] | null | null | null | mobile_payments/defaults.py | ZendaInnocent/mobile-payments | d3e7e9321c39bde2e7e368e78c096b36cf66dd3b | [
"MIT"
] | null | null | null | MPESA_PUBLIC_KEY = 'MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEArv9yxA69XQKBo24BaF/D+fvlqmGdYjqLQ5WtNBb5tquqGvAvG3WMFETVUSow/LizQalxj2ElMVrUmzu5mGGkxK08bWEXF7a1DEvtVJs6nppIlFJc2SnrU14AOrIrB28ogm58JjAl5BOQawOXD5dfSk7MaAA82pVHoIqEu0FxA8BOKU+RGTihRU+ptw1j4bsAJYiPbSX6i71gfPvwHPYamM0bfI4CmlsUUR3KvCG24rB6FNPcRBhM3jDuv8ae2kC3... | 102.583333 | 758 | 0.907392 |
315db687b09a63ab4808173544184decb14fb3e5 | 463 | py | Python | setup.py | OpenPeerPower/frontend | e61601f2e664ba743853bac550da8f28671ba4c0 | [
"Apache-2.0"
] | null | null | null | setup.py | OpenPeerPower/frontend | e61601f2e664ba743853bac550da8f28671ba4c0 | [
"Apache-2.0"
] | null | null | null | setup.py | OpenPeerPower/frontend | e61601f2e664ba743853bac550da8f28671ba4c0 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="openpeerpower-frontend",
version="20210523.2",
description="The Open Peer Power frontend",
url="https://github.com/openpeerpower/openpeerpower-polymer",
author="The Open Peer Power Authors",
author_email="hello@openpeerpower.io",
lice... | 30.866667 | 71 | 0.721382 |
f89f7fb66ed4f6ff815ca011b45420ea52af58ba | 4,362 | py | Python | aws_management/rds.py | mbisahaTG/aws-management | 52f8633458866778abc4bb187057a5aee6e134b4 | [
"MIT"
] | null | null | null | aws_management/rds.py | mbisahaTG/aws-management | 52f8633458866778abc4bb187057a5aee6e134b4 | [
"MIT"
] | null | null | null | aws_management/rds.py | mbisahaTG/aws-management | 52f8633458866778abc4bb187057a5aee6e134b4 | [
"MIT"
] | null | null | null | import boto3, botocore
from os import environ
import logging
import jsonschema
class AwsRdsProvisionError(Exception):
pass
class AwsRdsManager:
log = logging.getLogger(__name__)
db_schema = dict(
type="object",
properties=dict(
database=dict(type="string"),
passwo... | 35.177419 | 104 | 0.574278 |
59c541071ced586b31313b7d9db4cfba9243a615 | 39,964 | py | Python | devito/types/basic.py | Geophysics-OpenSource/devito | ef96319eaab0735316c75b0825681f37a8a923f0 | [
"MIT"
] | 1 | 2020-06-08T20:44:35.000Z | 2020-06-08T20:44:35.000Z | devito/types/basic.py | Geophysics-OpenSource/devito | ef96319eaab0735316c75b0825681f37a8a923f0 | [
"MIT"
] | null | null | null | devito/types/basic.py | Geophysics-OpenSource/devito | ef96319eaab0735316c75b0825681f37a8a923f0 | [
"MIT"
] | 1 | 2021-01-05T07:27:35.000Z | 2021-01-05T07:27:35.000Z | import abc
from collections import namedtuple
from ctypes import POINTER, Structure, byref
from functools import reduce
from math import ceil
from operator import mul
import numpy as np
import sympy
from sympy.core.assumptions import _assume_rules
from cached_property import cached_property
from cgen import Struct, Va... | 30.765204 | 89 | 0.598263 |
19bfd46142d964bb4e5bb8d10337d8a4007ff7fe | 594 | py | Python | doc/source/ReleaseNotes/generate.py | PaulDoessel/gaffer-play | 8b72dabb388e12424c230acfb0bd209049b01bd6 | [
"BSD-3-Clause"
] | null | null | null | doc/source/ReleaseNotes/generate.py | PaulDoessel/gaffer-play | 8b72dabb388e12424c230acfb0bd209049b01bd6 | [
"BSD-3-Clause"
] | null | null | null | doc/source/ReleaseNotes/generate.py | PaulDoessel/gaffer-play | 8b72dabb388e12424c230acfb0bd209049b01bd6 | [
"BSD-3-Clause"
] | 1 | 2020-02-15T16:15:54.000Z | 2020-02-15T16:15:54.000Z | import re
index = open( "./index.md", "w" )
index.write( "Release Notes\n" )
index.write( "=============\n\n" )
changes = open( "../../../Changes" )
versionFile = None
for line in changes :
m = re.match( r"^(Gaffer )?(([0-9]+\.){2,3}[0-9]+)", line )
if m :
print m.group( 2 )
index.write( "- [{0}]({0}.md)\n".... | 22 | 86 | 0.543771 |
48c6b64d62ccc2ee9b90404725503b0d5d9faa50 | 339,338 | py | Python | manila-8.0.0/manila/tests/share/test_manager.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | manila-8.0.0/manila/tests/share/test_manager.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | manila-8.0.0/manila/tests/share/test_manager.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2014 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 47.493072 | 79 | 0.640515 |
57d3914639b7f5850aecce044bd00f2dd53a6324 | 16,162 | py | Python | examples/advanced_operations/add_dynamic_page_feed.py | infectious/google-ads-python | 599541be2ab625c7aeb84b8622a8614a6c1703d9 | [
"Apache-2.0"
] | null | null | null | examples/advanced_operations/add_dynamic_page_feed.py | infectious/google-ads-python | 599541be2ab625c7aeb84b8622a8614a6c1703d9 | [
"Apache-2.0"
] | null | null | null | examples/advanced_operations/add_dynamic_page_feed.py | infectious/google-ads-python | 599541be2ab625c7aeb84b8622a8614a6c1703d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2019 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 38.028235 | 80 | 0.70375 |
5c82724eee29fcdc639ddf1ecba31ccc48527851 | 21,369 | py | Python | test/unit/data_operations/test_data_operations_implementations.py | technocreep/FEDOT | c11f19d1d231bd9c1d96d6e39d14697a028f6272 | [
"BSD-3-Clause"
] | null | null | null | test/unit/data_operations/test_data_operations_implementations.py | technocreep/FEDOT | c11f19d1d231bd9c1d96d6e39d14697a028f6272 | [
"BSD-3-Clause"
] | null | null | null | test/unit/data_operations/test_data_operations_implementations.py | technocreep/FEDOT | c11f19d1d231bd9c1d96d6e39d14697a028f6272 | [
"BSD-3-Clause"
] | null | null | null | import os
import numpy as np
from examples.simple.classification.classification_with_tuning import get_classification_dataset
from examples.simple.regression.regression_with_tuning import get_regression_dataset
from examples.simple.time_series_forecasting.gapfilling import generate_synthetic_data
from fedot.core.data.... | 41.736328 | 107 | 0.63784 |
f32b5b6b6db60d6338c2768f55bd984bd3473500 | 206 | pyw | Python | akhelper-gui.pyw | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 18 | 2022-03-18T08:20:28.000Z | 2022-03-31T15:19:15.000Z | akhelper-gui.pyw | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 2 | 2022-03-23T12:04:28.000Z | 2022-03-29T09:30:26.000Z | akhelper-gui.pyw | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 1 | 2022-03-20T05:52:38.000Z | 2022-03-20T05:52:38.000Z | if __name__ == '__main__':
import multiprocessing
multiprocessing.freeze_support()
import util.early_logs
import util.unfuck_https_proxy
import webgui2.server
webgui2.server.start()
| 25.75 | 36 | 0.742718 |
ba6321cdc68274bd007af1c378ec9e9884252c04 | 3,210 | py | Python | tfdiffeq/odeint.py | morgatron/tfdiffeq | ef646f85cbd0821749a03e7ab51e03e16798fab1 | [
"MIT"
] | 214 | 2019-02-10T08:24:12.000Z | 2022-03-31T06:15:05.000Z | tfdiffeq/odeint.py | morgatron/tfdiffeq | ef646f85cbd0821749a03e7ab51e03e16798fab1 | [
"MIT"
] | 14 | 2019-03-02T14:56:29.000Z | 2021-12-28T13:06:45.000Z | tfdiffeq/odeint.py | morgatron/tfdiffeq | ef646f85cbd0821749a03e7ab51e03e16798fab1 | [
"MIT"
] | 40 | 2019-03-03T12:55:09.000Z | 2022-02-11T02:14:47.000Z | from .adams import VariableCoefficientAdamsBashforth
from .dopri5 import Dopri5Solver
from .dopri8 import Dopri8Solver
from .fixed_adams import AdamsBashforth, AdamsBashforthMoulton
from .fixed_grid import Euler, Midpoint, RK4, Heun
from .adaptive_huen import AdaptiveHeunSolver
from .bosh3 import Bosh3Solver
from .misc... | 39.146341 | 86 | 0.673832 |
0640ff5ad415acffbe6d99948b1f33fd9fb7ac74 | 479 | py | Python | swagger_server/__main__.py | garagonc/optimization-framework | 1ca57699d6a3f2f98dcaea96430e75c3f847b49f | [
"Apache-2.0"
] | null | null | null | swagger_server/__main__.py | garagonc/optimization-framework | 1ca57699d6a3f2f98dcaea96430e75c3f847b49f | [
"Apache-2.0"
] | null | null | null | swagger_server/__main__.py | garagonc/optimization-framework | 1ca57699d6a3f2f98dcaea96430e75c3f847b49f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import connexion
import logging
from swagger_server import encoder
def create_app():
#logging.getLogger('connexion.operation').setLevel('ERROR')
app = connexion.App(__name__, specification_dir='./swagger/')
app.app.json_encoder = encoder.JSONEncoder
app.add_api('swagger.yaml', ... | 25.210526 | 86 | 0.722338 |
d03d6c741bfbc579e2f65fd2204e971c2aa362f0 | 553 | py | Python | WorkflowManager/scripts/run_wildfire.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | 1 | 2021-10-31T08:41:58.000Z | 2021-10-31T08:41:58.000Z | WorkflowManager/scripts/run_wildfire.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | null | null | null | WorkflowManager/scripts/run_wildfire.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | 1 | 2022-02-08T16:57:05.000Z | 2022-02-08T16:57:05.000Z | import sys
sys.path.append("../")
sys.path.append("../../")
from manager import workflow
if __name__ == "__main__":
upperLeft = "1.8347167968750002/53.38332836757156"
lowerRight = "11.744384765625/48.75618876280552"
workflow.OpenConnection()
id = workflow.CreateIncident(name="wildfire",kind="WILDFIRE",... | 30.722222 | 136 | 0.734177 |
583b71b855d5c7fb8d166823623a09e360f3e2b9 | 3,948 | py | Python | test/Fortran/FORTRANSUFFIXES.py | andrewyoung1991/scons | 7517c277e23bc04e3809a9bf0793cdfe00097a58 | [
"MIT"
] | 1 | 2015-11-04T22:22:10.000Z | 2015-11-04T22:22:10.000Z | test/Fortran/FORTRANSUFFIXES.py | azverkan/scons | 704ddb9270e14c7771d0c58c04c7afa7bc009603 | [
"MIT"
] | null | null | null | test/Fortran/FORTRANSUFFIXES.py | azverkan/scons | 704ddb9270e14c7771d0c58c04c7afa7bc009603 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, merge, publish,
... | 22.820809 | 75 | 0.635512 |
ec63f5cd80834b53a7f86ae0bab1389e7cd8829b | 8,261 | py | Python | project/q_learning_2.0.py | jooncco/coindrop-game-ai-agent | b15b34b61c518f23c2813f53bf18b866c54b4cb4 | [
"BSD-2-Clause"
] | 1 | 2019-04-29T13:55:17.000Z | 2019-04-29T13:55:17.000Z | project/q_learning_2.0.py | jooncco/coindrop-game-ai-agent | b15b34b61c518f23c2813f53bf18b866c54b4cb4 | [
"BSD-2-Clause"
] | null | null | null | project/q_learning_2.0.py | jooncco/coindrop-game-ai-agent | b15b34b61c518f23c2813f53bf18b866c54b4cb4 | [
"BSD-2-Clause"
] | null | null | null | """
The original code is from https://github.com/dennybritz/reinforcement-learning/tree/master/TD
"""
import sys
import numpy as np
import itertools
import pickle
from collections import defaultdict
from game import Game
# states
STAY = 0
LEFT = 1
RIGHT = 2
TIME_STAY = 3
TIME_LEFT = 4
TIME_RIGHT = 5
... | 33.044 | 134 | 0.608643 |
77232f053c9aa3273f532f50e69d9e4bfe4a1adf | 2,731 | py | Python | osd_client.py | kwj1399/ryu_app | df094994e09788053b47aad1c6164033e6bd4c14 | [
"MIT"
] | null | null | null | osd_client.py | kwj1399/ryu_app | df094994e09788053b47aad1c6164033e6bd4c14 | [
"MIT"
] | null | null | null | osd_client.py | kwj1399/ryu_app | df094994e09788053b47aad1c6164033e6bd4c14 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import re
import psutil
import subprocess
from socket import *
# get host network delay
def _get_delay(ip):
time_str = []
delay_time = 0
for i in range(15):
p = subprocess.Popen(["ping -c 1 "+ ip], stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subp... | 33.716049 | 139 | 0.602343 |
3fe846d26e8d8149bd818a59cf37f60045aed7b9 | 366 | py | Python | src/affe/io/CTE.py | eliavw/affe | 0e57d7f40cb67f9a300292e03e3f83b4b591d1e3 | [
"MIT"
] | 1 | 2020-12-02T06:16:00.000Z | 2020-12-02T06:16:00.000Z | src/affe/io/CTE.py | eliavw/affe | 0e57d7f40cb67f9a300292e03e3f83b4b591d1e3 | [
"MIT"
] | null | null | null | src/affe/io/CTE.py | eliavw/affe | 0e57d7f40cb67f9a300292e03e3f83b4b591d1e3 | [
"MIT"
] | null | null | null | # Suggested Defaults
SEPARATOR = "-"
KEYCHAIN_SEPARATOR = "."
LABELS = dict(query="q", exp="e", fold="f", experiment="e")
DEFAULT_CHILDREN = dict(
root=["cli", "data", "out", "scripts"],
out=["manual", "preprocessing", "fit", "predict"],
model=["models", "logs", "timings"],
flow=["config", "logs", "resu... | 33.272727 | 76 | 0.592896 |
e4b8f3f79c32991351e0a9da5e2d4f22cc83a0d4 | 19,807 | py | Python | networkapi/util/__init__.py | treviza153/GloboNetworkAPI | 9ca8ba7febdef0eb716514196b1bda1afdccd851 | [
"Apache-2.0"
] | 73 | 2015-04-13T17:56:11.000Z | 2022-03-24T06:13:07.000Z | networkapi/util/__init__.py | treviza153/GloboNetworkAPI | 9ca8ba7febdef0eb716514196b1bda1afdccd851 | [
"Apache-2.0"
] | 99 | 2015-04-03T01:04:46.000Z | 2021-10-03T23:24:48.000Z | networkapi/util/__init__.py | treviza153/GloboNetworkAPI | 9ca8ba7febdef0eb716514196b1bda1afdccd851 | [
"Apache-2.0"
] | 64 | 2015-08-05T21:26:29.000Z | 2022-03-22T01:06:28.000Z | # -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lic... | 29.562687 | 191 | 0.634422 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.