hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
95421c336ab0c839a22267c8bc9f64c8852c6b1f | 1,299 | py | Python | Discord Bots/Boba's Utilities/cogs/invite/tracker.py | LUNA761/Code-Archive | c455ca1b4faa230fbbd86c4222c1589ddb0df964 | [
"MIT"
] | 1 | 2021-10-04T08:30:04.000Z | 2021-10-04T08:30:04.000Z | Discord Bots/Boba's Utilities/cogs/invite/tracker.py | LUNA761/Code-Archive | c455ca1b4faa230fbbd86c4222c1589ddb0df964 | [
"MIT"
] | null | null | null | Discord Bots/Boba's Utilities/cogs/invite/tracker.py | LUNA761/Code-Archive | c455ca1b4faa230fbbd86c4222c1589ddb0df964 | [
"MIT"
] | 2 | 2022-01-06T19:07:19.000Z | 2022-01-07T14:52:15.000Z | import discord, time, asyncio, os, random, json
from discord.ext import commands, tasks
from discord.ext.commands import has_permissions, cooldown, MissingPermissions, check
from discord.utils import get
from datetime import datetime, date
from termcolor import colored
class Utils(commands.Cog):
def __init__(self,... | 35.108108 | 103 | 0.643572 |
cd15131b8a5bb2baa9ba35e5db131fe2570f0c4d | 637 | py | Python | script/echo-client.py | FedeVerstraeten/smn-lidar-controller | 7850fd48702d5f2e00d07b499812b3b2fb2b7676 | [
"MIT"
] | null | null | null | script/echo-client.py | FedeVerstraeten/smn-lidar-controller | 7850fd48702d5f2e00d07b499812b3b2fb2b7676 | [
"MIT"
] | 1 | 2021-10-05T03:53:55.000Z | 2021-10-05T03:53:55.000Z | script/echo-client.py | FedeVerstraeten/smnar-lidar-controller | 7850fd48702d5f2e00d07b499812b3b2fb2b7676 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import socket
HOST = '10.49.234.234'
PORT = 2055
def command_to_licel(licelcommand):
data=None
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
print('Command to execute:',licelcommand)
s.sendall(bytes(licelcommand+'\r\n','utf-8'))
... | 23.592593 | 62 | 0.657771 |
c75a61a479c9427e8b10e7cf1290dbf3dc2c36f2 | 13,657 | py | Python | FMNIST/Deep_AE.py | Sungyeop/IPRL | 6ee17f415998ac5cc058c63cea06a5cad40b267c | [
"MIT"
] | 2 | 2021-02-08T05:34:45.000Z | 2021-03-02T08:36:06.000Z | FMNIST/Deep_AE.py | Sungyeop/IPRL | 6ee17f415998ac5cc058c63cea06a5cad40b267c | [
"MIT"
] | null | null | null | FMNIST/Deep_AE.py | Sungyeop/IPRL | 6ee17f415998ac5cc058c63cea06a5cad40b267c | [
"MIT"
] | null | null | null | import numpy as np
import copy
import torch
import torchvision
from torch import nn, optim
from torchvision import transforms, datasets
from scipy.spatial.distance import pdist, squareform
from scipy.special import expit
import matplotlib.pyplot as plt
# Training Options
#=============================================... | 35.107969 | 122 | 0.580435 |
e86df1682ec167f63feee9194ecd88986182e864 | 1,798 | py | Python | python/vaccine_notifier.py | abishekvashok/vaccine-checker | 1c193db0ff9c13bfc30ffc89ef5ea5661f7b504a | [
"MIT"
] | 9 | 2021-06-03T10:02:49.000Z | 2021-06-16T16:17:51.000Z | python/vaccine_notifier.py | abishekvashok/vaccine-checker | 1c193db0ff9c13bfc30ffc89ef5ea5661f7b504a | [
"MIT"
] | null | null | null | python/vaccine_notifier.py | abishekvashok/vaccine-checker | 1c193db0ff9c13bfc30ffc89ef5ea5661f7b504a | [
"MIT"
] | null | null | null | import time
import requests
from playsound import playsound
print("Select mode: 1 - Pincode, 2 - District: ",end="")
mode = int(input())
pincode = ""
district = ""
district_code = ""
if(mode == 1):
print("Input Pincode: ",end="")
pincode = input()
elif(mode == 2):
print("Enter District Name: ",end="")
... | 29.966667 | 135 | 0.63515 |
004d725f028f98d03fdbf9fe94c3ca5287b621e5 | 4,975 | py | Python | tests/test_webapp.py | rjw57/bdfu | 386d800738e6943ed9063f1bf904ece86410c7c7 | [
"MIT"
] | null | null | null | tests/test_webapp.py | rjw57/bdfu | 386d800738e6943ed9063f1bf904ece86410c7c7 | [
"MIT"
] | null | null | null | tests/test_webapp.py | rjw57/bdfu | 386d800738e6943ed9063f1bf904ece86410c7c7 | [
"MIT"
] | null | null | null | """
Basic functionality tests for web application.
"""
import uuid
from io import BytesIO
from flask import current_app
from flask.ext.testing import TestCase
import pytest
from mock import patch
from bdfu.auth import _jwt_token
from bdfu.webapp import app
def jwt_headers(*args, **kwargs):
"""Like _jwt_token() ... | 34.075342 | 90 | 0.633568 |
e14f1c2bff366a435f187df35d82e1b511ac0486 | 5,883 | py | Python | locations/spiders/calvin_klein.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | locations/spiders/calvin_klein.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | locations/spiders/calvin_klein.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import scrapy
from locations.items import GeojsonPointItem
from locations.hours import OpeningHours
from scrapy.selector import Selector
class CalvinKleinSpider(scrapy.Spider):
name = "calvin_klein"
item_attributes = {"brand": "Calvin Klein"}
allowed_domains = ["gotwww.... | 30.324742 | 103 | 0.432942 |
ff4b7248e63cbc0bcfc0cf9fae33b3943466ff79 | 2,207 | py | Python | haas_lib_bundles/python/libraries/uln2003/uln2003.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/libraries/uln2003/uln2003.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/libraries/uln2003/uln2003.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | """
Copyright (C) 2015-2021 Alibaba Group Holding Limited
MicroPython's driver for ULN2003
Author: HaaS
Date: 2022/03/15
"""
from driver import GPIO
from utime import sleep_ms
from micropython import const
import math
class ULN2003(object):
"""
This class implements uln2003 chip's defs.
"... | 23.231579 | 63 | 0.550974 |
618998507d02efc1d9a11f2200dfdca4c11ecb18 | 3,617 | py | Python | curie/vsan_node_util.py | mike0615/curie | e25691f465c23cf53c39be157fcfa2eea4978b26 | [
"MIT"
] | 4 | 2019-02-26T05:18:13.000Z | 2020-07-15T00:34:41.000Z | curie/vsan_node_util.py | nutanix/curie | e25691f465c23cf53c39be157fcfa2eea4978b26 | [
"MIT"
] | 3 | 2021-03-31T18:55:50.000Z | 2021-04-20T17:13:31.000Z | curie/vsan_node_util.py | mike0615/curie | e25691f465c23cf53c39be157fcfa2eea4978b26 | [
"MIT"
] | 2 | 2020-01-09T02:24:00.000Z | 2020-11-04T23:09:02.000Z | #
# Copyright (c) 2015 Nutanix Inc. All rights reserved.
#
# VSAN Specific node utilities.
#
# VSAN reference:
# http://www.vmware.com/files/pdf/products/vsan/VSAN-Troubleshooting-Reference-Manual.pdf
import logging
from pyVmomi import vmodl
from curie.node_util import NodeUtil
from curie.vsphere_vcenter import Vsp... | 33.803738 | 90 | 0.700304 |
32256d70e67e585b347cd93ba09815b0ffd000d9 | 256 | py | Python | anyflow/err.py | Cologler/anyflow-python | cde20b0c74faf18cb7dc503072d4c2f99d5681de | [
"MIT"
] | null | null | null | anyflow/err.py | Cologler/anyflow-python | cde20b0c74faf18cb7dc503072d4c2f99d5681de | [
"MIT"
] | null | null | null | anyflow/err.py | Cologler/anyflow-python | cde20b0c74faf18cb7dc503072d4c2f99d5681de | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2020~2999 - Cologler <skyoflw@gmail.com>
# ----------
#
# ----------
class Abort(Exception):
def __init__(self, reason, *args, **kwargs):
super().__init__(*args, **kwargs)
self.reason = reason
| 21.333333 | 56 | 0.546875 |
5019e3d715df3bdf6d8dd075785c3a9112295d91 | 13,577 | py | Python | acme/jax/running_statistics.py | ostap-viniavskyi/acme | 8fbae90217557a35e1d773aa63ab80890e799765 | [
"Apache-2.0"
] | 1 | 2022-03-31T17:24:10.000Z | 2022-03-31T17:24:10.000Z | acme/jax/running_statistics.py | ostap-viniavskyi/acme | 8fbae90217557a35e1d773aa63ab80890e799765 | [
"Apache-2.0"
] | null | null | null | acme/jax/running_statistics.py | ostap-viniavskyi/acme | 8fbae90217557a35e1d773aa63ab80890e799765 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2018 DeepMind Technologies Limited. 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
#
# ... | 38.791429 | 105 | 0.716138 |
5bb45a79bb093014d830467491cd6aeaca7a8193 | 14,763 | py | Python | gemini/scripts/gemini_install.py | drmjc/gemini | d735735a9dc506a506f455a1e42ed6aa9cd1c2a5 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | gemini/scripts/gemini_install.py | drmjc/gemini | d735735a9dc506a506f455a1e42ed6aa9cd1c2a5 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | gemini/scripts/gemini_install.py | drmjc/gemini | d735735a9dc506a506f455a1e42ed6aa9cd1c2a5 | [
"MIT"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/env python
"""Installer for gemini: a lightweight db framework for disease and population genetics.
https://github.com/arq5x/gemini
Handles installation of:
- Required third party software
- Required Python libraries
- Gemini application
- Associated data files
Requires: Python 2.7, git, and compilers (g... | 45.146789 | 126 | 0.617354 |
5b10ca17c81fd79b2b5d1638dc56886e76045970 | 101,974 | py | Python | env/Lib/site-packages/plotly/graph_objs/_scatter3d.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 7 | 2022-01-16T12:28:16.000Z | 2022-03-04T15:31:45.000Z | packages/python/plotly/plotly/graph_objs/_scatter3d.py | jiangrongbo/plotly.py | df19fc702b309586cc24e25373b87e8bdbb3ff60 | [
"MIT"
] | 14 | 2021-10-20T23:33:47.000Z | 2021-12-21T04:50:37.000Z | packages/python/plotly/plotly/graph_objs/_scatter3d.py | jiangrongbo/plotly.py | df19fc702b309586cc24e25373b87e8bdbb3ff60 | [
"MIT"
] | 1 | 2021-11-29T22:55:05.000Z | 2021-11-29T22:55:05.000Z | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Scatter3d(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "scatter3d"
_valid_props = {
"connectgaps",
"customdata",
"customdatasrc",
... | 37.203211 | 89 | 0.551346 |
ca819a11e0021c3ffb57bb0edd34a15a32280388 | 666 | py | Python | PINNFramework/models/activations/snake.py | varun1423/NeuralSolvers | 0036319ec3e7cd570a029aa5e154d0bc995ae9ce | [
"MIT"
] | 59 | 2020-07-18T07:22:16.000Z | 2022-03-28T10:50:35.000Z | PINNFramework/models/activations/snake.py | varun1423/NeuralSolvers | 0036319ec3e7cd570a029aa5e154d0bc995ae9ce | [
"MIT"
] | 40 | 2020-07-16T10:03:33.000Z | 2021-12-22T12:13:40.000Z | PINNFramework/models/activations/snake.py | varun1423/NeuralSolvers | 0036319ec3e7cd570a029aa5e154d0bc995ae9ce | [
"MIT"
] | 24 | 2020-10-01T08:50:33.000Z | 2022-03-29T12:48:22.000Z | import torch
import torch.nn as nn
class Snake(nn.Module,):
""" Implementation of the snake activation function as a torch nn module
The result of the activation function a(x) is calculated by a(x) = x + sin^2(x)
With alpha is a trainab
"""
def __init__(self,frequency=10):
"""Construct... | 33.3 | 83 | 0.636637 |
e3d3f5f5565090131ec78975c86e1609a671954e | 11,212 | py | Python | traffic_signs_detection/traffic_signs_classification/code/classification.py | YaelBenShalom/Traffic-Sign-Recognition-and-Classification | cdedeac6ce9d103109c2d7eb53b4a44914f5f9f4 | [
"MIT"
] | 2 | 2021-11-30T15:29:57.000Z | 2022-01-18T22:02:40.000Z | traffic_signs_detection/traffic_signs_classification/code/classification.py | YaelBenShalom/Traffic-Sign-Recognition-and-Classification | cdedeac6ce9d103109c2d7eb53b4a44914f5f9f4 | [
"MIT"
] | null | null | null | traffic_signs_detection/traffic_signs_classification/code/classification.py | YaelBenShalom/Traffic-Sign-Recognition-and-Classification | cdedeac6ce9d103109c2d7eb53b4a44914f5f9f4 | [
"MIT"
] | 1 | 2022-03-30T07:14:37.000Z | 2022-03-30T07:14:37.000Z | import argparse
import os
import numpy as np
import random
import cv2
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
from load_data import load_dataset
from read_data import ReadDataset
from run_model import run_model, pre... | 37.624161 | 124 | 0.62995 |
f864c718d281db027412cce01662761f44fbdc79 | 295 | py | Python | src/App/Python/Lib/site-packages/inputimeout/__version__.py | Shekhar9521/covid-vaccine-booking | 545ec88aadec069278b82a7edfc0aae34bf34ba5 | [
"MIT"
] | 9 | 2019-06-28T10:09:47.000Z | 2022-02-11T19:59:10.000Z | support/App/Python/Lib/site-packages/inputimeout/__version__.py | harshit-gh27/covid-vaccine-booking | 3513bdfcae5890aa8bd7aa9fc69bfdb866e922da | [
"MIT"
] | 8 | 2018-09-02T09:37:07.000Z | 2021-06-25T15:26:29.000Z | support/App/Python/Lib/site-packages/inputimeout/__version__.py | harshit-gh27/covid-vaccine-booking | 3513bdfcae5890aa8bd7aa9fc69bfdb866e922da | [
"MIT"
] | 12 | 2019-11-28T14:11:09.000Z | 2022-02-14T01:47:20.000Z | __title__ = 'inputimeout'
__description__ = 'Multi platform standard input with timeout'
__url__ = 'http://github.com/johejo/inutimeout'
__version__ = '1.0.4'
__author__ = 'Mitsuo Heijo'
__author_email__ = 'mitsuo_h@outlook.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2018 Mitsuo Heijo'
| 32.777778 | 62 | 0.772881 |
e242a997219b0d73bc2993d0a5162e0158ea578a | 3,278 | py | Python | src/pyams_utils/context.py | Py-AMS/pyams-utils | 65b166596a8b9f66fb092a69ce5d53ac6675685e | [
"ZPL-2.1"
] | null | null | null | src/pyams_utils/context.py | Py-AMS/pyams-utils | 65b166596a8b9f66fb092a69ce5d53ac6675685e | [
"ZPL-2.1"
] | null | null | null | src/pyams_utils/context.py | Py-AMS/pyams-utils | 65b166596a8b9f66fb092a69ce5d53ac6675685e | [
"ZPL-2.1"
] | null | null | null | #
# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | 32.137255 | 98 | 0.671141 |
207da5a3bbfd08be32d252b2c9d7d5981aa5f712 | 2,152 | py | Python | managers/operatorsSignaling/reconstructer.py | HarshKhilawala/cerebmodels | d2a2f2ef947ef9dc23ddce6e55159240cd3233cb | [
"BSD-3-Clause"
] | null | null | null | managers/operatorsSignaling/reconstructer.py | HarshKhilawala/cerebmodels | d2a2f2ef947ef9dc23ddce6e55159240cd3233cb | [
"BSD-3-Clause"
] | 9 | 2020-03-24T17:09:03.000Z | 2021-05-17T16:11:17.000Z | managers/operatorsSignaling/reconstructer.py | myHBPwork/cerebmodels | 371ea7f1bbe388f1acade17c7128b8ca6ab8fb7a | [
"BSD-3-Clause"
] | 1 | 2021-05-21T03:08:41.000Z | 2021-05-21T03:08:41.000Z | # ../managers/operatorsSignaling/reconstructer.py
import efel
#from quantities import mV
class Reconstructer(object):
"""
**Available methods:**
+-------------------------------------------------+--------------------+
| Method name | Method type |
+------... | 37.103448 | 111 | 0.392658 |
42cb2acf886e03ff6996407a8d1f83f539ceb7d5 | 653 | py | Python | .history/myblog/views_20200416102151.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/views_20200416102151.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/views_20200416102151.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | from django.shortcuts import render , get_object_or_404
from django.views import generic
from .models import Post
from .forms import CommentForm
class PostList(generic.ListView):
queryset = Post.objects.filter(status=1).order_by('-created_on')
template_name = 'index.html'
class Postdetail(request, slug):
... | 29.681818 | 68 | 0.719755 |
fdcfaeaf4b86130f772b5ba9682e874192eb5b94 | 3,248 | py | Python | ModelUtils/actionlist.py | tema-tut/tema-tg | 9c3f119c8bf5cc565e6a3e8e9e6205037e326d89 | [
"MIT"
] | null | null | null | ModelUtils/actionlist.py | tema-tut/tema-tg | 9c3f119c8bf5cc565e6a3e8e9e6205037e326d89 | [
"MIT"
] | null | null | null | ModelUtils/actionlist.py | tema-tut/tema-tg | 9c3f119c8bf5cc565e6a3e8e9e6205037e326d89 | [
"MIT"
] | 1 | 2021-03-27T21:27:32.000Z | 2021-03-27T21:27:32.000Z | #!/usr/bin/env python
# Copyright (c) 2006-2010 Tampere University of Technology
#
# 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... | 32.48 | 132 | 0.648399 |
ab8a08a28cf41808ca3ee78ee155df8fa78269fc | 491 | py | Python | fxa/5_Machine_Learning/cachedir/joblib/__main__--Users-joelricci-Documents-Doctorado-Proteinas_modelo-ML-Ensemble-Docking-CDK2-ML_ensemble_docking_repo-fxa-5_Machine_Learning-<ipython-input-c9b2d1ca51cc>/_format_results_to_df/func_code.py | jRicciL/ml_and_ensemble_docking | d2bf7010d6df34710e860b0c01f2746b4dc8e09a | [
"MIT"
] | 7 | 2021-05-11T18:39:26.000Z | 2022-01-28T14:41:49.000Z | fxa/5_Machine_Learning/cachedir/joblib/__main__--Users-joelricci-Documents-Doctorado-Proteinas_modelo-ML-Ensemble-Docking-CDK2-ML_ensemble_docking_repo-fxa-5_Machine_Learning-<ipython-input-c9b2d1ca51cc>/_format_results_to_df/func_code.py | jRicciL/ml_and_ensemble_docking | d2bf7010d6df34710e860b0c01f2746b4dc8e09a | [
"MIT"
] | null | null | null | fxa/5_Machine_Learning/cachedir/joblib/__main__--Users-joelricci-Documents-Doctorado-Proteinas_modelo-ML-Ensemble-Docking-CDK2-ML_ensemble_docking_repo-fxa-5_Machine_Learning-<ipython-input-c9b2d1ca51cc>/_format_results_to_df/func_code.py | jRicciL/ml_and_ensemble_docking | d2bf7010d6df34710e860b0c01f2746b4dc8e09a | [
"MIT"
] | 3 | 2021-12-04T13:42:19.000Z | 2022-01-28T14:41:50.000Z | # first line: 1
@memory.cache
def _format_results_to_df(metrics, results, n):
# Format into a dataframe
# Create the metric names and repeat them
n_metrics = len(metrics)
index_names = [*metrics.keys()]*n
# convert to a dataframe
df_res = pd.DataFrame(
results,
index= ... | 25.842105 | 47 | 0.604888 |
ab5c9ad6a0782d8501a307eb53ce0933dcf89d3d | 1,526 | py | Python | scripts/eye/start_capture.py | mpsamurai/neochi | d7920201743a6d86f1f308fa76cbe0d2475ff03c | [
"MIT"
] | null | null | null | scripts/eye/start_capture.py | mpsamurai/neochi | d7920201743a6d86f1f308fa76cbe0d2475ff03c | [
"MIT"
] | 10 | 2019-11-12T13:01:07.000Z | 2022-02-10T00:40:48.000Z | scripts/eye/start_capture.py | mpsamurai/neochi | d7920201743a6d86f1f308fa76cbe0d2475ff03c | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Morning Project Samurai Inc. (MPS)
#
# 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... | 42.388889 | 95 | 0.76671 |
2dbca85a1d76f5f6611458a3f6a6388b1f15eff2 | 9,812 | py | Python | smu/geometry/utilities.py | ParikhKadam/google-research | 00a282388e389e09ce29109eb050491c96cfab85 | [
"Apache-2.0"
] | 2 | 2022-01-21T18:15:34.000Z | 2022-01-25T15:21:34.000Z | smu/geometry/utilities.py | ParikhKadam/google-research | 00a282388e389e09ce29109eb050491c96cfab85 | [
"Apache-2.0"
] | 110 | 2021-10-01T18:22:38.000Z | 2021-12-27T22:08:31.000Z | smu/geometry/utilities.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 1 | 2022-02-10T10:43:10.000Z | 2022-02-10T10:43:10.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | 23.99022 | 80 | 0.68987 |
cb9652a4d6ca6d1f8f1da64cb3dbec2c19d63941 | 20,757 | py | Python | sportsreference/mlb/constants.py | JosephDErwin/sportsreference | f026366bec91fdf4bebef48e3a4bfd7c5bfab4bd | [
"MIT"
] | null | null | null | sportsreference/mlb/constants.py | JosephDErwin/sportsreference | f026366bec91fdf4bebef48e3a4bfd7c5bfab4bd | [
"MIT"
] | null | null | null | sportsreference/mlb/constants.py | JosephDErwin/sportsreference | f026366bec91fdf4bebef48e3a4bfd7c5bfab4bd | [
"MIT"
] | 1 | 2020-07-08T16:05:25.000Z | 2020-07-08T16:05:25.000Z | PARSING_SCHEME = {
'name': 'a',
'league': 'td[data-stat="lg_ID"]:first',
'games': 'td[data-stat="G"]:first',
'wins': 'td[data-stat="W"]:first',
'losses': 'td[data-stat="L"]:first',
'win_percentage': 'td[data-stat="win_loss_perc"]:first',
'streak': 'td[data-stat="winning_streak"]:first',
... | 41.597194 | 79 | 0.65443 |
d1b0ffb6323b7aa0f8d7cbbb04d833a15925a384 | 6,757 | py | Python | test/Root/src/main/validate_results.py | royadityak94/Interview | 40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f | [
"MIT"
] | null | null | null | test/Root/src/main/validate_results.py | royadityak94/Interview | 40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f | [
"MIT"
] | null | null | null | test/Root/src/main/validate_results.py | royadityak94/Interview | 40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Helper scripts to validate the output by the individual implementations against the verified implementation
import warnings
warnings.filterwarnings("ignore")
import pandas as pd
from pandas.util.testing import assert_frame_equal
import os
import mmap
from parse import parse
from utili... | 43.593548 | 113 | 0.60293 |
418f26418ee16694e7fd0f15c8765894b28750b3 | 17,468 | py | Python | examples/imagenet/main_fp16_optimizer.py | bcbcbcbcbcl/apex | 7b3ac7221367dc7b7527a68e34cf08b5eeb0fc47 | [
"BSD-3-Clause"
] | 2 | 2021-06-24T18:31:04.000Z | 2021-06-24T20:34:44.000Z | examples/imagenet/main_fp16_optimizer.py | bcbcbcbcbcl/apex | 7b3ac7221367dc7b7527a68e34cf08b5eeb0fc47 | [
"BSD-3-Clause"
] | null | null | null | examples/imagenet/main_fp16_optimizer.py | bcbcbcbcbcl/apex | 7b3ac7221367dc7b7527a68e34cf08b5eeb0fc47 | [
"BSD-3-Clause"
] | null | null | null | import argparse
import os
import shutil
import time
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torchvision.transforms as transforms
import torchvi... | 35.942387 | 235 | 0.601786 |
ccc6e582a423f88ca9c5986939f8f7c6810dd378 | 6,915 | py | Python | src/azure-cli-testsdk/azure/cli/testsdk/checkers.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 3,287 | 2016-07-26T17:34:33.000Z | 2022-03-31T09:52:13.000Z | src/azure-cli-testsdk/azure/cli/testsdk/checkers.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 19,206 | 2016-07-26T07:04:42.000Z | 2022-03-31T23:57:09.000Z | src/azure-cli-testsdk/azure/cli/testsdk/checkers.py | YuanyuanNi/azure-cli | 63844964374858bfacd209bfe1b69eb456bd64ca | [
"MIT"
] | 2,575 | 2016-07-26T06:44:40.000Z | 2022-03-31T22:56:06.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 46.409396 | 111 | 0.60752 |
3e53c064bff073a8c4e1360bafdd3256b1fa08c5 | 26,671 | py | Python | monk/gluon/finetune/level_3_training_base.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 542 | 2019-11-10T12:09:31.000Z | 2022-03-28T11:39:07.000Z | monk/gluon/finetune/level_3_training_base.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 117 | 2019-11-12T09:39:24.000Z | 2022-03-12T00:20:41.000Z | monk/gluon/finetune/level_3_training_base.py | take2rohit/monk_v1 | 9c567bf2c8b571021b120d879ba9edf7751b9f92 | [
"Apache-2.0"
] | 246 | 2019-11-09T21:53:24.000Z | 2022-03-29T00:57:07.000Z | from monk.gluon.finetune.imports import *
from monk.system.imports import *
from monk.gluon.finetune.level_2_model_base import finetune_model
class finetune_training(finetune_model):
'''
Base class for training and associated functions
Args:
verbose (int): Set verbosity levels
... | 54.319756 | 178 | 0.547898 |
6ff7e41bfbfd74ddcb52806817d87195abbe54c2 | 742 | py | Python | Src/StdLib/Lib/site-packages/win32/lib/winxptheme.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 1,078 | 2016-07-19T02:48:30.000Z | 2022-03-30T21:22:34.000Z | Src/StdLib/Lib/site-packages/win32/lib/winxptheme.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 576 | 2017-05-21T12:36:48.000Z | 2022-03-30T13:47:03.000Z | Src/StdLib/Lib/site-packages/win32/lib/winxptheme.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 269 | 2017-05-21T04:44:47.000Z | 2022-03-31T16:18:13.000Z | """A useful wrapper around the "_winxptheme" module.
Unlike _winxptheme, this module will load on any version of Windows.
If _winxptheme is not available, then this module will have only 2 functions -
IsAppThemed() and IsThemeActive, which will both always return False.
If _winxptheme is available, this module will h... | 30.916667 | 78 | 0.749326 |
1d94cbeafee4ffdc13159ff7f1286c4ea22e0ea5 | 8,337 | py | Python | examples/get_temperatures_inventory.py | jixj5/python-redfish-lenovo | 0b4a5d633a2b1fcee3bf22f06fd35f59b7806d70 | [
"Apache-2.0"
] | null | null | null | examples/get_temperatures_inventory.py | jixj5/python-redfish-lenovo | 0b4a5d633a2b1fcee3bf22f06fd35f59b7806d70 | [
"Apache-2.0"
] | null | null | null | examples/get_temperatures_inventory.py | jixj5/python-redfish-lenovo | 0b4a5d633a2b1fcee3bf22f06fd35f59b7806d70 | [
"Apache-2.0"
] | null | null | null | ###
#
# Lenovo Redfish examples - Get temperatures inventory
#
# Copyright Notice:
#
# Copyright 2018 Lenovo Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.ap... | 50.835366 | 123 | 0.575267 |
3266c36e1b4c28786d2ce29efc95bc06f9195afb | 7,151 | py | Python | src/ginkgo/auxFunctions.py | lbg251/ginkgo | dda16a2525b1b89cb093af65dccb3ee236e043a7 | [
"MIT"
] | 3 | 2021-11-30T14:25:48.000Z | 2022-03-02T15:05:55.000Z | src/ginkgo/auxFunctions.py | lbg251/ginkgo | dda16a2525b1b89cb093af65dccb3ee236e043a7 | [
"MIT"
] | null | null | null | src/ginkgo/auxFunctions.py | lbg251/ginkgo | dda16a2525b1b89cb093af65dccb3ee236e043a7 | [
"MIT"
] | 1 | 2021-06-10T15:42:56.000Z | 2021-06-10T15:42:56.000Z | import numpy as np
import pickle
import time
import logging
import pyro
from .utils import get_logger
logger = get_logger(level=logging.INFO)
def traversePhi(jet, node_id, constPhiList, PhiDeltaList, PhiDeltaListRel):
"""
Recursive function that traverses the tree. Gets leaves angle phi, and delta_parent ... | 31.641593 | 382 | 0.608586 |
d85f367d2100e88473b37e317a32084594c8dd1c | 2,955 | py | Python | tests/test_api.py | OrquestraDigital/aboutcode-toolkit | d9ff859735a72635563fb5a9e265ecd7023d401a | [
"Apache-2.0"
] | 1 | 2021-08-31T10:58:29.000Z | 2021-08-31T10:58:29.000Z | tests/test_api.py | sthagen/aboutcode-toolkit | cd74f15bcc223c7e1b7424f169481af8e55e0f38 | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | sthagen/aboutcode-toolkit | cd74f15bcc223c7e1b7424f169481af8e55e0f38 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
# ============================================================================
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with th... | 37.884615 | 93 | 0.615905 |
3df964f98a6cfcc3da4682ac3de21c34988f878b | 3,118 | py | Python | src/cms/views/users/region_user_list_view.py | Integreat/integreat-cms | b3f80964a6182d714f26ac229342b47e1c7c4f29 | [
"Apache-2.0"
] | 14 | 2020-12-03T07:56:30.000Z | 2021-10-30T13:09:50.000Z | src/cms/views/users/region_user_list_view.py | Integreat/integreat-cms | b3f80964a6182d714f26ac229342b47e1c7c4f29 | [
"Apache-2.0"
] | 367 | 2020-11-20T00:34:20.000Z | 2021-12-14T15:20:42.000Z | src/cms/views/users/region_user_list_view.py | Integreat/integreat-cms | b3f80964a6182d714f26ac229342b47e1c7c4f29 | [
"Apache-2.0"
] | 3 | 2021-02-09T18:46:52.000Z | 2021-12-07T10:41:39.000Z | import logging
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView
from backend.settings import PER_PAGE
from ...forms import ObjectS... | 33.526882 | 101 | 0.661001 |
c6eebf3041086f1831e1395918c648219e498149 | 85,786 | py | Python | lib/spack/spack/installer.py | dreaqdp/spack | 6d22e9cd7b427f2d3d24bf1246215e0b9ba248e2 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/installer.py | dreaqdp/spack | 6d22e9cd7b427f2d3d24bf1246215e0b9ba248e2 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 32 | 2020-12-15T17:29:20.000Z | 2022-03-21T15:08:31.000Z | lib/spack/spack/installer.py | dreaqdp/spack | 6d22e9cd7b427f2d3d24bf1246215e0b9ba248e2 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-07-19T20:31:27.000Z | 2021-07-19T21:14:14.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""
This module encapsulates package installation functionality.
The PackageInstaller coordinates concurrent builds of pa... | 39.459982 | 84 | 0.600914 |
92a48888f3684ea726a941442827c5b22e80e9a9 | 140 | py | Python | cartomap/__init__.py | mrinalghosh/cartomap | 741c5916ad180b382dd1e60e5c8bb5168899c878 | [
"MIT"
] | 1 | 2020-12-09T05:39:28.000Z | 2020-12-09T05:39:28.000Z | cartomap/__init__.py | mrinalghosh/cartomap | 741c5916ad180b382dd1e60e5c8bb5168899c878 | [
"MIT"
] | null | null | null | cartomap/__init__.py | mrinalghosh/cartomap | 741c5916ad180b382dd1e60e5c8bb5168899c878 | [
"MIT"
] | null | null | null | from .geogmap import plotCartoMap # noqa: F401
from .geogmap import plotKeogram # noqa: F401
from .geogmap import plotSlice # noqa: F401
| 35 | 47 | 0.764286 |
cc0aa50c9fe0afe1b684ba1ef4fa942b75f7426b | 4,995 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/aio/operations/_skus_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/aio/operations/_skus_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/aio/operations/_skus_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.825688 | 133 | 0.659459 |
642d8a5b9384d53ce0e4b02c0e32f475f65f65fa | 21,898 | py | Python | httprider/generated/base_window.py | iSWORD/http-rider | 5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9 | [
"MIT"
] | null | null | null | httprider/generated/base_window.py | iSWORD/http-rider | 5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9 | [
"MIT"
] | null | null | null | httprider/generated/base_window.py | iSWORD/http-rider | 5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/ui/base_window.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow... | 64.217009 | 122 | 0.748196 |
841bf574a3042ae0676f4ae1b61d4ea46f357f44 | 3,992 | py | Python | scripts/combine_headers.py | rpavlik/TypePack | 256f3353f458d7423f9a279fdadbb70cb07ccbea | [
"BSL-1.0"
] | null | null | null | scripts/combine_headers.py | rpavlik/TypePack | 256f3353f458d7423f9a279fdadbb70cb07ccbea | [
"BSL-1.0"
] | null | null | null | scripts/combine_headers.py | rpavlik/TypePack | 256f3353f458d7423f9a279fdadbb70cb07ccbea | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2019 Collabora, Ltd
# SPDX-License-Identifier: BSL-1.0
# Author: Ryan Pavlik <ryan.pavlik@collabora.com>
from pathlib import Path
from HeaderMerger import HeaderMergerBase
REPO_ROOT = Path(__file__).resolve().parent.parent
INCLUDE_DIR = REPO_ROOT / 'include' / 'TypePack'
FULL_MERGE... | 32.721311 | 100 | 0.636022 |
26ae28dfed1f748012f8baea0174c8783781d367 | 340 | py | Python | zemfrog/extensions/migrate.py | aprilahijriyan/zemfrog | 0a4ebc303caa8fadf89ca0cc8569de60c61f3252 | [
"MIT"
] | null | null | null | zemfrog/extensions/migrate.py | aprilahijriyan/zemfrog | 0a4ebc303caa8fadf89ca0cc8569de60c61f3252 | [
"MIT"
] | null | null | null | zemfrog/extensions/migrate.py | aprilahijriyan/zemfrog | 0a4ebc303caa8fadf89ca0cc8569de60c61f3252 | [
"MIT"
] | null | null | null | import os
from flask.app import Flask
from flask_migrate import Migrate
from ..globals import db
def init_app(app: Flask):
migrate = Migrate(db=db)
directory = os.path.join(
app.root_path, "migrations/" + os.getenv("ZEMFROG_ENV", "development").lower()
)
migrate.init_app(app, di... | 22.666667 | 87 | 0.673529 |
614ddb13a3cf960d884b7650fee762666fd6095a | 43,241 | py | Python | sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_models.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_models.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/models/_models.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 35.618616 | 138 | 0.63338 |
16de149158e8edcff03da44d91a026b83823412d | 20,049 | py | Python | lib/streamlit/caching.py | domoritz/streamlit | 5e8e0ec1b46ac0b322dc48d27494be674ad238fa | [
"Apache-2.0"
] | 1 | 2020-01-28T06:48:27.000Z | 2020-01-28T06:48:27.000Z | lib/streamlit/caching.py | johnjdailey/streamlit | a178dd3ec5387a85662ae42ad0fe20f6e07390c9 | [
"Apache-2.0"
] | null | null | null | lib/streamlit/caching.py | johnjdailey/streamlit | a178dd3ec5387a85662ae42ad0fe20f6e07390c9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018-2020 Streamlit 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 applicabl... | 31.672986 | 117 | 0.631004 |
042dda74c23cbc90625f811e398a6ebc68b24147 | 1,077 | py | Python | src/sagemaker/xgboost/defaults.py | eitansela/sagemaker-python-sdk | aa54102b5113b1d39bbbd4d9d341775f84641681 | [
"Apache-2.0"
] | 1 | 2021-07-22T00:23:51.000Z | 2021-07-22T00:23:51.000Z | src/sagemaker/xgboost/defaults.py | eitansela/sagemaker-python-sdk | aa54102b5113b1d39bbbd4d9d341775f84641681 | [
"Apache-2.0"
] | 24 | 2021-05-18T07:10:27.000Z | 2021-05-28T13:36:51.000Z | src/sagemaker/xgboost/defaults.py | eitansela/sagemaker-python-sdk | aa54102b5113b1d39bbbd4d9d341775f84641681 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 43.08 | 97 | 0.730734 |
5d513c2e10437019c6cf8822b0d67715e82c575d | 1,952 | py | Python | qf_lib/common/utils/dateutils/get_values_common_dates.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 198 | 2019-08-16T15:09:23.000Z | 2022-03-30T12:44:00.000Z | qf_lib/common/utils/dateutils/get_values_common_dates.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 13 | 2021-01-07T10:15:19.000Z | 2022-03-29T13:01:47.000Z | qf_lib/common/utils/dateutils/get_values_common_dates.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 29 | 2019-08-16T15:21:28.000Z | 2022-02-23T09:53:49.000Z | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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... | 39.04 | 117 | 0.726434 |
dc52e037f5f8f1a9e3f59e662a5d476641f85204 | 2,215 | py | Python | ditto/pinboard/migrations/0007_auto_20150724_1957.py | garrettc/django-ditto | fcf15beb8f9b4d61634efd4a88064df12ee16a6f | [
"MIT"
] | 54 | 2016-08-15T17:32:41.000Z | 2022-02-27T03:32:05.000Z | ditto/pinboard/migrations/0007_auto_20150724_1957.py | garrettc/django-ditto | fcf15beb8f9b4d61634efd4a88064df12ee16a6f | [
"MIT"
] | 229 | 2015-07-23T12:50:47.000Z | 2022-03-24T10:33:20.000Z | ditto/pinboard/migrations/0007_auto_20150724_1957.py | garrettc/django-ditto | fcf15beb8f9b4d61634efd4a88064df12ee16a6f | [
"MIT"
] | 8 | 2015-09-10T17:10:35.000Z | 2022-03-25T13:05:01.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
("pinboard", "0006_auto_20150723_1322"),
]
operations = [
migrations.AlterModelOptions(
name="account", options={"... | 31.642857 | 110 | 0.526862 |
db4c255e2ead377955190e2ec229f43db67d52ce | 3,381 | py | Python | deploy_gh_pages.py | climblinne/docs | 6e404abafcefd096cf33b0ca4dc6a174023d12b9 | [
"MIT"
] | null | null | null | deploy_gh_pages.py | climblinne/docs | 6e404abafcefd096cf33b0ca4dc6a174023d12b9 | [
"MIT"
] | null | null | null | deploy_gh_pages.py | climblinne/docs | 6e404abafcefd096cf33b0ca4dc6a174023d12b9 | [
"MIT"
] | null | null | null | import json
import os
import shutil
import tempfile
def copytree(src, dst, symlinks=False, ignore=None):
for item in os.listdir(src):
s = os.path.join(src, item)
d = os.path.join(dst, item)
if os.path.isdir(s):
shutil.copytree(s, d, symlinks, ignore)
else:
s... | 29.146552 | 98 | 0.60278 |
5f09283249fe35dfe844c7a9865a25b97ca1b2c1 | 10,135 | py | Python | pandas/tests/series/indexing/test_setitem.py | erictleung/pandas | ca52e3968058dce48c20070b3e9efc2ec42d7cf4 | [
"BSD-3-Clause"
] | 3 | 2021-12-13T05:53:26.000Z | 2022-03-07T01:38:02.000Z | pandas/tests/series/indexing/test_setitem.py | erictleung/pandas | ca52e3968058dce48c20070b3e9efc2ec42d7cf4 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/series/indexing/test_setitem.py | erictleung/pandas | ca52e3968058dce48c20070b3e9efc2ec42d7cf4 | [
"BSD-3-Clause"
] | 1 | 2021-12-13T05:53:20.000Z | 2021-12-13T05:53:20.000Z | from datetime import date
import numpy as np
import pytest
from pandas import (
DatetimeIndex,
MultiIndex,
NaT,
Series,
Timestamp,
date_range,
period_range,
)
import pandas._testing as tm
from pandas.core.indexing import IndexingError
from pandas.tseries.offsets import BDay
class TestSe... | 33.013029 | 82 | 0.616083 |
2c1cc0df069c21b21ac0eecac1f8b7d27bdffef4 | 273,172 | py | Python | Configuration/PyReleaseValidation/python/relval_steps.py | m-sedghi/cmssw | 859df8affee372c53be79cdd2d8a5ff001eae841 | [
"Apache-2.0"
] | null | null | null | Configuration/PyReleaseValidation/python/relval_steps.py | m-sedghi/cmssw | 859df8affee372c53be79cdd2d8a5ff001eae841 | [
"Apache-2.0"
] | 1 | 2020-04-02T10:53:40.000Z | 2021-01-12T13:05:14.000Z | Configuration/PyReleaseValidation/python/relval_steps.py | m-sedghi/cmssw | 859df8affee372c53be79cdd2d8a5ff001eae841 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from .MatrixUtil import *
import six
from Configuration.HLT.autoHLT import autoHLT
from Configuration.AlCa.autoPCL import autoPCL
from .upgradeWorkflowComponents import step3_trackingOnly
concurrentLumis = {'--nStreams': 4,
'--nConcurrentLumis': 2,
... | 78.34012 | 937 | 0.70005 |
d8c49909f143e1631d152917c6aaf740ddb9beee | 3,835 | py | Python | Game/Universe.py | NoNotCar/SpaceX | 803390fdf0ed3deee18d8f0d101ae575cf9b55e1 | [
"MIT"
] | null | null | null | Game/Universe.py | NoNotCar/SpaceX | 803390fdf0ed3deee18d8f0d101ae575cf9b55e1 | [
"MIT"
] | null | null | null | Game/Universe.py | NoNotCar/SpaceX | 803390fdf0ed3deee18d8f0d101ae575cf9b55e1 | [
"MIT"
] | null | null | null | from .Player import Player
from . import Area
from Lib import Img,Vector
from . import Generators,Boxes,Registry,Gamemodes,Research
from Engine import Items
from Objects import Transport,Special
from Objects.Machines import Production,Basic
from random import shuffle
import pickle,pygame
Registry.add_recipe({"Iron":2},... | 38.737374 | 127 | 0.61721 |
21004514930074b11f0dd01a835fd2f4a55787f5 | 141,759 | py | Python | pypy/interpreter/astcompiler/ast.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/interpreter/astcompiler/ast.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/interpreter/astcompiler/ast.py | Qointum/pypy | c0ed88efbc135a75a535f4534ca1f3baf0bf39d8 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | # Generated by tools/asdl_py.py
from rpython.tool.pairtype import extendabletype
from rpython.tool.sourcetools import func_with_new_name
from pypy.interpreter import typedef
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import in... | 37.177813 | 143 | 0.647797 |
7b8a421675d544a0b0e1b3b5722a80a25b029581 | 3,665 | py | Python | tools/slabratetop.py | scripts/bcc | 903513e454c9847370f7e54797ff29f12e1de4d9 | [
"Apache-2.0"
] | 1 | 2020-10-27T17:58:28.000Z | 2020-10-27T17:58:28.000Z | tools/slabratetop.py | scripts/bcc | 903513e454c9847370f7e54797ff29f12e1de4d9 | [
"Apache-2.0"
] | null | null | null | tools/slabratetop.py | scripts/bcc | 903513e454c9847370f7e54797ff29f12e1de4d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# slabratetop Summarize kmem_cache_alloc() calls.
# For Linux, uses BCC, eBPF.
#
# USAGE: slabratetop [-h] [-C] [-r MAXROWS] [interval] [count]
#
# This uses in-kernel BPF maps to store cache summaries for efficiency.
#
# SEE ALSO: slabtop(1... | 25.10274 | 76 | 0.649932 |
38e927ac0bbd111e31c51ea124f15bddd7fc0974 | 2,984 | py | Python | setup.py | alfa24/django-image-assets | 053e7a6792b74771b02ebffc7fc983fdc6d8d299 | [
"MIT"
] | 1 | 2021-12-26T02:54:38.000Z | 2021-12-26T02:54:38.000Z | setup.py | alfa24/django-image-assets | 053e7a6792b74771b02ebffc7fc983fdc6d8d299 | [
"MIT"
] | 80 | 2020-03-18T14:58:12.000Z | 2022-02-03T07:55:08.000Z | setup.py | alfa24/django-image-assets | 053e7a6792b74771b02ebffc7fc983fdc6d8d299 | [
"MIT"
] | 2 | 2020-03-18T14:26:34.000Z | 2021-11-10T14:14:29.000Z | import os
import re
import subprocess
from setuptools import setup, find_packages # type: ignore
from pathlib import Path
with open('README.md') as f:
long_description = f.read()
version_re = re.compile('^Version: (.+)$', re.M)
package_name = 'django-image-assets'
def get_version():
"""
Reads version f... | 31.744681 | 73 | 0.591153 |
4e3eea40cb78c72d59466fead45ced0140a82142 | 1,564 | py | Python | venv/Lib/site-packages/setuptools/py27compat.py | jodieritchie/MLHPortfolio | 66d23165c1c3277a6b7320af1cfc353a07385e7a | [
"MIT"
] | 1 | 2020-01-29T13:35:30.000Z | 2020-01-29T13:35:30.000Z | venv/Lib/site-packages/setuptools/py27compat.py | jodieritchie/MLHPortfolio | 66d23165c1c3277a6b7320af1cfc353a07385e7a | [
"MIT"
] | 3 | 2020-06-17T16:01:27.000Z | 2022-01-13T02:52:53.000Z | venv/Lib/site-packages/setuptools/py27compat.py | jodieritchie/MLHPortfolio | 66d23165c1c3277a6b7320af1cfc353a07385e7a | [
"MIT"
] | null | null | null | """
Compatibility Support for Python 2.7 and earlier
"""
import sys
import platform
from setuptools.extern import six
def get_all_headers(message, key):
"""
Given an HTTPMessage, return all headers matching a given key.
"""
return message.get_all(key)
if six.PY2:
def get_all_... | 25.639344 | 80 | 0.613811 |
5644f490d806520d83f7019e5329274fc61f133c | 983 | py | Python | examples/image_helper.py | PNProductions/py-seam-carving | 373a0979201f5c1b9bb418c042e20e6692dd3bf3 | [
"MIT"
] | 3 | 2017-07-06T07:58:59.000Z | 2018-09-26T19:19:23.000Z | utils/image_helper.py | PNProductions/cloud-python-opencv | 572e5820b5d6bbd7ca2c7ddac8a21576a6d0c6c0 | [
"MIT"
] | 1 | 2018-09-26T22:12:48.000Z | 2018-09-26T22:12:48.000Z | utils/image_helper.py | PNProductions/cloud-python-opencv | 572e5820b5d6bbd7ca2c7ddac8a21576a6d0c6c0 | [
"MIT"
] | 2 | 2015-06-09T18:44:04.000Z | 2020-05-25T07:00:13.000Z | import cv2
import os.path
from numpy import clip
def local_path(path):
return os.path.dirname(__file__) + '/' + path
def image_open(filename, mode=None):
if os.path.isfile(filename):
if mode is None:
image = cv2.imread(filename)
else:
image = cv2.imread(filename, mode)
if image is None:
... | 26.567568 | 95 | 0.677518 |
7fd24e53eb039a3e017147e459910fdaca12dd90 | 470 | py | Python | src/learning/migrations/0038_tutorialcomment_body_customized_bleachfield.py | Alirezaja1384/MajazAmooz | 9200e46bed33aeb60d578a5c4c02013a8032cf08 | [
"MIT"
] | 3 | 2021-04-01T19:42:53.000Z | 2022-03-01T09:50:17.000Z | src/learning/migrations/0038_tutorialcomment_body_customized_bleachfield.py | Alirezaja1384/MajazAmooz | 9200e46bed33aeb60d578a5c4c02013a8032cf08 | [
"MIT"
] | null | null | null | src/learning/migrations/0038_tutorialcomment_body_customized_bleachfield.py | Alirezaja1384/MajazAmooz | 9200e46bed33aeb60d578a5c4c02013a8032cf08 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-06-12 20:18
from django.db import migrations
import shared.models.fields
class Migration(migrations.Migration):
dependencies = [
('learning', '0037_tutorial_tutorialcomment_bleachfield'),
]
operations = [
migrations.AlterField(
model_name=... | 23.5 | 88 | 0.651064 |
53d2c7afdfebb645b30d6157fa30040134ff1907 | 9,082 | py | Python | rally/plugins/openstack/context/glance/images.py | sergeygalkin/rally | 8b63ceb10dd36087403f6bbc62f768155ce96c22 | [
"Apache-2.0"
] | null | null | null | rally/plugins/openstack/context/glance/images.py | sergeygalkin/rally | 8b63ceb10dd36087403f6bbc62f768155ce96c22 | [
"Apache-2.0"
] | null | null | null | rally/plugins/openstack/context/glance/images.py | sergeygalkin/rally | 8b63ceb10dd36087403f6bbc62f768155ce96c22 | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing, software
#... | 42.839623 | 79 | 0.528738 |
f2d9f6c71d654a740cb403ecfba9c78f917f8fe5 | 4,873 | py | Python | src/app/aggregation/dag.py | odinlabs-io/odinlabsio-analytics-app-server | 8073edd13a5ac81ba6c3f189859073b2dfd9b6db | [
"MIT"
] | null | null | null | src/app/aggregation/dag.py | odinlabs-io/odinlabsio-analytics-app-server | 8073edd13a5ac81ba6c3f189859073b2dfd9b6db | [
"MIT"
] | null | null | null | src/app/aggregation/dag.py | odinlabs-io/odinlabsio-analytics-app-server | 8073edd13a5ac81ba6c3f189859073b2dfd9b6db | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 OdinLabs IO
#
# 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, m... | 27.845714 | 109 | 0.657911 |
133046163a5353db6b04c902488a7aa258b43efc | 3,536 | py | Python | memory.py | inpg12345/Repozytorium | 7773f28455afc84c56e87914351eb134b188c610 | [
"Unlicense"
] | null | null | null | memory.py | inpg12345/Repozytorium | 7773f28455afc84c56e87914351eb134b188c610 | [
"Unlicense"
] | null | null | null | memory.py | inpg12345/Repozytorium | 7773f28455afc84c56e87914351eb134b188c610 | [
"Unlicense"
] | null | null | null | """
Memory, a game of remembering number pairs.
Copyright (c) 2014 Grant Jenks
http://www.grantjenks.com/
Exercises:
1. Change the image.
2. Change the background color to white and the foreground color to black.
3. Increase the number of tiles to an 8x8 grid.
"""
import sys, pygame, random, time
from pygame.locals ... | 26 | 74 | 0.575509 |
16407e1967d20298e96085552f55a1951ad16ce4 | 350 | py | Python | multilingual_project_blog/app_settings.py | bigee/django-multilingual-project-blog | c62d568ac42b3c7f711624bf7029ac56e7342b6a | [
"MIT"
] | null | null | null | multilingual_project_blog/app_settings.py | bigee/django-multilingual-project-blog | c62d568ac42b3c7f711624bf7029ac56e7342b6a | [
"MIT"
] | 8 | 2020-02-11T23:25:46.000Z | 2022-03-11T23:15:31.000Z | multilingual_project_blog/app_settings.py | bigee/django-multilingual-project-blog | c62d568ac42b3c7f711624bf7029ac56e7342b6a | [
"MIT"
] | null | null | null | """Settings for the ``multilingual_project_blog`` app."""
from django.conf import settings
ENVIRONMENT = getattr(settings, 'ENVIRONMENT', 'prod')
SITE_URL = getattr(settings, 'SITE_URL', 'http://www.example.com')
SITE_URL_NAME = getattr(settings, 'SITE_URL_NAME', 'www.example.com')
INFO_EMAIL = getattr(settings, 'INF... | 38.888889 | 69 | 0.748571 |
966a3f32a499908a269b8e6041c0f2449d543eee | 5,896 | py | Python | src/eeWishart.py | ethuee/earthengine | 9786109a98ed3f7fcad630e1dd69f63591183a37 | [
"MIT"
] | 126 | 2017-03-22T14:20:30.000Z | 2022-03-10T22:05:38.000Z | src/eeWishart.py | ethuee/earthengine | 9786109a98ed3f7fcad630e1dd69f63591183a37 | [
"MIT"
] | 5 | 2017-05-27T14:53:17.000Z | 2020-11-11T12:17:37.000Z | src/eeWishart.py | ethuee/earthengine | 9786109a98ed3f7fcad630e1dd69f63591183a37 | [
"MIT"
] | 57 | 2017-03-23T18:22:06.000Z | 2022-03-17T06:56:38.000Z | '''
Created on 09.01.2017
@author: mort
'''
import ee
from eeMad import chi2cdf
ENL = 4.4
def multbyenl(image):
return ee.Image(image).multiply(ENL)
def log_det_sum(imList,j):
'''return the log of the the determinant of the sum of the first j images in imList'''
imList = ee.List(imList)
nbands = ee... | 42.724638 | 120 | 0.59481 |
ad60ffd0d96784e56d86923b32d96924821555f1 | 1,171 | py | Python | tests/test_asset.py | zallarak/py-stellar-base | e6f3caa3980dbdc88ec17eacdfe6a13a714fb8ad | [
"Apache-2.0"
] | null | null | null | tests/test_asset.py | zallarak/py-stellar-base | e6f3caa3980dbdc88ec17eacdfe6a13a714fb8ad | [
"Apache-2.0"
] | null | null | null | tests/test_asset.py | zallarak/py-stellar-base | e6f3caa3980dbdc88ec17eacdfe6a13a714fb8ad | [
"Apache-2.0"
] | null | null | null | from nose.tools import raises
from stellar_base.asset import Asset
from stellar_base.stellarxdr import Xdr
class TestAsset:
def __init__(self):
self.source = 'GDJVFDG5OCW5PYWHB64MGTHGFF57DRRJEDUEFDEL2SLNIOONHYJWHA3Z'
def test_native(self):
assert 'XLM' == Asset.native().code
assert No... | 27.880952 | 80 | 0.645602 |
56d5b95c4c28b3f549aec3fc7fb6fd1538e0fa56 | 9,059 | py | Python | src/m2_functions.py | delemojw/02-ObjectsFunctionsAndMethods | 29504456a741feb27dfa23bd87f3ef44765db202 | [
"MIT"
] | null | null | null | src/m2_functions.py | delemojw/02-ObjectsFunctionsAndMethods | 29504456a741feb27dfa23bd87f3ef44765db202 | [
"MIT"
] | null | null | null | src/m2_functions.py | delemojw/02-ObjectsFunctionsAndMethods | 29504456a741feb27dfa23bd87f3ef44765db202 | [
"MIT"
] | null | null | null | """
Practice DEFINING and CALLING
FUNCTIONS
Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder,
their colleagues and Jabari-Aman Delemore.
""" # Done: 1. PUT YOUR NAME IN THE ABOVE LINE.
###############################################################################
#
# DONE: 2.
# ... | 33.305147 | 79 | 0.540347 |
10e06640682ecf71e567c60891b929e7e79fdef3 | 447 | py | Python | osrc/config.py | rackerlabs/osrc | a0e4b758e9430ed07490e53f99550efab0dfcb41 | [
"MIT"
] | 1 | 2021-01-05T16:51:12.000Z | 2021-01-05T16:51:12.000Z | osrc/config.py | rackerlabs/osrc | a0e4b758e9430ed07490e53f99550efab0dfcb41 | [
"MIT"
] | null | null | null | osrc/config.py | rackerlabs/osrc | a0e4b758e9430ed07490e53f99550efab0dfcb41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, print_function, absolute_import,
unicode_literals)
import os
DEBUG = False
TESTING = False
SECRET_KEY = os.environ["SECRET_KEY"]
LOG_FILENAME = os.environ["LOG_FILENAME"]
# GitHub API.
GITHUB_ID = os.environ["GIT... | 22.35 | 66 | 0.704698 |
6d1d2e78b5be12203e883f0ced5c9704689d1e4d | 4,245 | py | Python | numba/tests/bytecode/test_indexing.py | glycerine/numba | 4cb9e4f0b3cabd9e6a144fa4f3f7e5d6bee45635 | [
"BSD-2-Clause"
] | 1 | 2019-04-17T10:03:53.000Z | 2019-04-17T10:03:53.000Z | numba/tests/bytecode/test_indexing.py | glycerine/numba | 4cb9e4f0b3cabd9e6a144fa4f3f7e5d6bee45635 | [
"BSD-2-Clause"
] | null | null | null | numba/tests/bytecode/test_indexing.py | glycerine/numba | 4cb9e4f0b3cabd9e6a144fa4f3f7e5d6bee45635 | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python
# ______________________________________________________________________
'''test_indexing
Unit tests for checking Numba's indexing into Numpy arrays.
'''
# ______________________________________________________________________
from numba import double, int_
from numba.decorators import jit
imp... | 32.40458 | 72 | 0.626855 |
3e0f8383c0f8de19969156a627ce4ecba53a2169 | 2,370 | py | Python | src/openweather_api.py | drapaiton/mini_proyecto_next-e | 632877d7c0513e1ff954818373cb6c0f97fa07a2 | [
"MIT"
] | null | null | null | src/openweather_api.py | drapaiton/mini_proyecto_next-e | 632877d7c0513e1ff954818373cb6c0f97fa07a2 | [
"MIT"
] | null | null | null | src/openweather_api.py | drapaiton/mini_proyecto_next-e | 632877d7c0513e1ff954818373cb6c0f97fa07a2 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import List
import requests
from requests import Response
from config import DATE_FORMAT, APPID
from models import OpenWeatherInsight
class BaseApi:
API_DATE_FORMAT = DATE_FORMAT
BASE_URL = "https://api.openweathermap.org/"
APPID = APPID
def __init__(... | 33.857143 | 88 | 0.652321 |
b0046a04818e52d8d1ac3e3469730791a452785c | 6,315 | py | Python | music_assistant/models/enums.py | music-assistant/music-assistant | 7b4fd73b1281f74d61e29c23093d048a9acf541f | [
"Apache-2.0"
] | null | null | null | music_assistant/models/enums.py | music-assistant/music-assistant | 7b4fd73b1281f74d61e29c23093d048a9acf541f | [
"Apache-2.0"
] | null | null | null | music_assistant/models/enums.py | music-assistant/music-assistant | 7b4fd73b1281f74d61e29c23093d048a9acf541f | [
"Apache-2.0"
] | null | null | null | """All enums used by the Music Assistant models."""
from enum import Enum, IntEnum
class MediaType(Enum):
"""Enum for MediaType."""
ARTIST = "artist"
ALBUM = "album"
TRACK = "track"
PLAYLIST = "playlist"
RADIO = "radio"
UNKNOWN = "unknown"
class MediaQuality(IntEnum):
"""Enum for M... | 25.987654 | 86 | 0.609501 |
2df7a56831e4ecc9edbae2845eecb5f61a7474e4 | 111 | py | Python | tudatpy/_version.py | gitter-badger/tudatpy | f5faef4ecfe8667cb9c989dd839185eeed5f9662 | [
"BSD-3-Clause"
] | null | null | null | tudatpy/_version.py | gitter-badger/tudatpy | f5faef4ecfe8667cb9c989dd839185eeed5f9662 | [
"BSD-3-Clause"
] | null | null | null | tudatpy/_version.py | gitter-badger/tudatpy | f5faef4ecfe8667cb9c989dd839185eeed5f9662 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2020 tudatpy development team
#
# This file is part of the tudatpy library.
#
__version__ = "dev"
| 15.857143 | 43 | 0.738739 |
b28b9ae63961548a629a5466519186d022fad871 | 2,160 | py | Python | lisrd/models/backbones/vgg.py | liuyuzhenn/LISRD | bfd890b81defebea971db0b744be617ed58f5ffa | [
"MIT"
] | 225 | 2020-07-20T10:15:41.000Z | 2022-03-04T15:07:26.000Z | lisrd/models/backbones/vgg.py | liuyuzhenn/LISRD | bfd890b81defebea971db0b744be617ed58f5ffa | [
"MIT"
] | 15 | 2020-07-25T02:54:38.000Z | 2022-03-12T13:39:19.000Z | lisrd/models/backbones/vgg.py | liuyuzhenn/LISRD | bfd890b81defebea971db0b744be617ed58f5ffa | [
"MIT"
] | 21 | 2020-07-23T00:33:04.000Z | 2022-03-26T12:48:57.000Z | import torch
class VGGLikeModule(torch.nn.Module):
def __init__(self):
super().__init__()
self._relu = torch.nn.ReLU(inplace=True)
self._pool = torch.nn.AvgPool2d(kernel_size=2, stride=2)
self._conv1_1 = torch.nn.Conv2d(3, 64, kernel_size=3,
... | 45.957447 | 64 | 0.542593 |
4c7fcaa12edb15b940ac47d76dc78726d7c9cd2a | 26,981 | py | Python | scripts/init.py | wivw0306/bk-cmdb | 330bb6e6a5aa40987a26562a740bb8cb37ac1f66 | [
"Apache-2.0"
] | 4,695 | 2016-12-16T02:02:30.000Z | 2022-03-30T03:35:03.000Z | scripts/init.py | 941103git/bk-cmdb | 2915b5512e1444bfa5daa46101e702499189526e | [
"Apache-2.0"
] | 2,318 | 2016-12-17T01:38:52.000Z | 2022-03-31T07:46:14.000Z | scripts/init.py | 941103git/bk-cmdb | 2915b5512e1444bfa5daa46101e702499189526e | [
"Apache-2.0"
] | 1,620 | 2016-12-16T02:13:44.000Z | 2022-03-30T12:17:42.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import getopt
import os
import shutil
from string import Template
class FileTemplate(Template):
delimiter = '$'
def generate_config_file(
rd_server_v, db_name_v, redis_ip_v, redis_port_v,
redis_pass_v, sentinel_pass_v, mongo_ip_v, mongo_port_... | 33.853199 | 206 | 0.608984 |
6d271c8ff69e708027a0aee0c7b1e1ee85a4fe4c | 58,836 | py | Python | tools/make.py | SOCOMD/standing-static-line | 1ae752360db9212b74fd52d43aec2b49e6300d90 | [
"MIT"
] | null | null | null | tools/make.py | SOCOMD/standing-static-line | 1ae752360db9212b74fd52d43aec2b49e6300d90 | [
"MIT"
] | 1 | 2020-08-28T00:42:55.000Z | 2020-08-31T04:07:06.000Z | tools/make.py | SOCOMD/standing-static-line | 1ae752360db9212b74fd52d43aec2b49e6300d90 | [
"MIT"
] | 1 | 2021-09-06T00:48:45.000Z | 2021-09-06T00:48:45.000Z | #!/usr/bin/env python3
# vim: set fileencoding=utf-8 :
# make.py
# An Arma 3 addon build system
###############################################################################
# The MIT License (MIT)
# Copyright (c) 2013-2014 Ryan Schultz
# Permission is hereby granted, free of charge, to any person obtaining a co... | 39.119681 | 227 | 0.57939 |
bf61ccf5129f7b03dcf5240e72a4c45fd13acf7a | 4,346 | py | Python | dataloader/listflowfile.py | mli0603/PSMNet | 52e36b09529225ffd38a1ceef86976087350b987 | [
"MIT"
] | 1 | 2021-09-30T06:41:10.000Z | 2021-09-30T06:41:10.000Z | dataloader/listflowfile.py | mli0603/PSMNet | 52e36b09529225ffd38a1ceef86976087350b987 | [
"MIT"
] | null | null | null | dataloader/listflowfile.py | mli0603/PSMNet | 52e36b09529225ffd38a1ceef86976087350b987 | [
"MIT"
] | null | null | null | import torch.utils.data as data
from PIL import Image
import os
import os.path
IMG_EXTENSIONS = [
'.jpg', '.JPG', '.jpeg', '.JPEG',
'.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP',
]
def is_image_file(filename):
return any(filename.endswith(extension) for extension in IMG_EXTENSIONS)
def dataloader(fil... | 41.390476 | 116 | 0.518178 |
877c0f889eece563290f686bfc114fca996e105e | 521 | py | Python | data/scripts/templates/object/tangible/component/bio/shared_bio_component_clothing_casual_training_2.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/component/bio/shared_bio_component_clothing_casual_training_2.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/component/bio/shared_bio_component_clothing_casual_training_2.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/component/bio/shared_bio_component_clothing_casual_training_2.iff"
... | 30.647059 | 102 | 0.763916 |
13f92e2190439c5da02cfc0647203952d7bdfd3d | 3,522 | py | Python | src/ssp/spark/streaming/analytics/sentiment_analysis.py | gyan42/spark-streaming-playground | 147ef9cbc31b7aed242663dee36143ebf0e8043f | [
"Apache-2.0"
] | 10 | 2020-03-12T11:51:46.000Z | 2022-03-24T04:56:05.000Z | src/ssp/spark/streaming/analytics/sentiment_analysis.py | gyan42/spark-streaming-playground | 147ef9cbc31b7aed242663dee36143ebf0e8043f | [
"Apache-2.0"
] | 12 | 2020-04-23T07:28:14.000Z | 2022-03-12T00:20:24.000Z | src/ssp/spark/streaming/analytics/sentiment_analysis.py | gyan42/spark-streaming-playground | 147ef9cbc31b7aed242663dee36143ebf0e8043f | [
"Apache-2.0"
] | 1 | 2020-04-20T14:48:38.000Z | 2020-04-20T14:48:38.000Z | #!/usr/bin/env python
__author__ = "Mageswaran Dhandapani"
__copyright__ = "Copyright 2020, The Spark Structured Playground Project"
__credits__ = []
__license__ = "Apache License"
__version__ = "2.0"
__maintainer__ = "Mageswaran Dhandapani"
__email__ = "mageswaran1989@gmail.com"
__status__ = "Education Purpose"
impo... | 39.573034 | 96 | 0.657297 |
daa861ca65509966e7e9b4c62676f02a9be6c77c | 977 | py | Python | FileManager/toolbar.py | kartikey-sahu/File-Manager | ad8c08b4d987a131f871d66b8fb7baef23d91ac9 | [
"MIT"
] | null | null | null | FileManager/toolbar.py | kartikey-sahu/File-Manager | ad8c08b4d987a131f871d66b8fb7baef23d91ac9 | [
"MIT"
] | null | null | null | FileManager/toolbar.py | kartikey-sahu/File-Manager | ad8c08b4d987a131f871d66b8fb7baef23d91ac9 | [
"MIT"
] | null | null | null | from tkinter import Frame
import ui.images as img
from ui.button import Button
class Toolbar(Frame):
def __init__(self, master, **kwargs):
super().__init__(master, **kwargs)
self.__draw_tools()
def __draw_tools(self):
self.newfolder = Button(self, text='New Folder', image=img.new_fo... | 34.892857 | 79 | 0.58956 |
4593a09ed083a9a40a6eefcff551e3463346bd4a | 26,833 | py | Python | src/oci/management_agent/models/management_agent.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/management_agent/models/management_agent.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/management_agent/models/management_agent.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 33.457606 | 245 | 0.655126 |
6c5c44565cc4bd05df39dc9b6860b73312d0945d | 1,921 | py | Python | tests/isolated/patcher_fork_after_monkey_patch.py | li-caspar/eventlet_0.30.2 | a431842e29c26e46cfcfff60c93ca92e07663044 | [
"MIT"
] | 1,044 | 2015-01-02T02:01:01.000Z | 2022-03-28T06:19:15.000Z | tests/isolated/patcher_fork_after_monkey_patch.py | li-caspar/eventlet_0.30.2 | a431842e29c26e46cfcfff60c93ca92e07663044 | [
"MIT"
] | 591 | 2015-01-04T14:02:06.000Z | 2022-03-15T09:09:18.000Z | tests/isolated/patcher_fork_after_monkey_patch.py | li-caspar/eventlet_0.30.2 | a431842e29c26e46cfcfff60c93ca92e07663044 | [
"MIT"
] | 269 | 2015-01-04T14:22:31.000Z | 2022-03-12T17:23:51.000Z | # Monkey patching interferes with threading in Python 3.7
# https://github.com/eventlet/eventlet/issues/592
__test__ = False
def check(n, mod, tag):
assert len(mod._active) == n, 'Expected {} {} threads, got {}'.format(n, tag, mod._active)
if __name__ == '__main__':
import eventlet
import eventlet.patch... | 32.016667 | 94 | 0.645497 |
5c06f201e951c5815bfbb285d7b862964613e96e | 32,566 | py | Python | record.py | sugar-activities/4552-activity | 6e261fd900a5be44248eee267e7cd1be03ab0804 | [
"MIT"
] | null | null | null | record.py | sugar-activities/4552-activity | 6e261fd900a5be44248eee267e7cd1be03ab0804 | [
"MIT"
] | null | null | null | record.py | sugar-activities/4552-activity | 6e261fd900a5be44248eee267e7cd1be03ab0804 | [
"MIT"
] | null | null | null | #Copyright (c) 2008, Media Modifications Ltd.
#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,... | 34.571125 | 134 | 0.661825 |
9c04fbbfbf1cc8849ff87a9df3b6e5370db6ecef | 2,818 | py | Python | models/graph_nn.py | princeton-vl/attach-juxtapose-parser | 20e0ebb1bf43fc69b6a4c46a54bb0362fc062eed | [
"BSD-2-Clause"
] | 23 | 2020-10-29T01:53:54.000Z | 2022-03-14T07:39:02.000Z | models/graph_nn.py | princeton-vl/attach-juxtapose-parser | 20e0ebb1bf43fc69b6a4c46a54bb0362fc062eed | [
"BSD-2-Clause"
] | 1 | 2021-06-11T08:29:33.000Z | 2021-06-11T12:28:59.000Z | models/graph_nn.py | princeton-vl/attach-juxtapose-parser | 20e0ebb1bf43fc69b6a4c46a54bb0362fc062eed | [
"BSD-2-Clause"
] | 5 | 2020-12-10T01:46:27.000Z | 2022-03-30T14:39:11.000Z | """
GNNs used for encoding the partial tree
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch_geometric
from torch_geometric.nn import MessagePassing
from torch_geometric.utils import add_self_loops, degree
from typing import List
class SeparateGCNConv(MessagePassing): # type: ignor... | 33.152941 | 89 | 0.64088 |
ecbbc14b94ecde51bc73e82c975e7dbda34c951e | 78 | py | Python | myfirst2021/__init__.py | roan2008/myfirst2021 | e3a82225a8ff625729da572cee04e2942d45fb8f | [
"MIT"
] | null | null | null | myfirst2021/__init__.py | roan2008/myfirst2021 | e3a82225a8ff625729da572cee04e2942d45fb8f | [
"MIT"
] | null | null | null | myfirst2021/__init__.py | roan2008/myfirst2021 | e3a82225a8ff625729da572cee04e2942d45fb8f | [
"MIT"
] | null | null | null | # __init__.py
from myfirst2021.studentclass import Student,Specialstudent
| 19.5 | 60 | 0.820513 |
cd5157dba1af2a45f5ea6d978cd8f38a1ce65429 | 1,455 | py | Python | stanCode_Projects/MyPhotoshop/green_screen.py | gibbs-shih/sc-projects | 12f130c881f8415623224fb20dbef5624fa8dff1 | [
"MIT"
] | null | null | null | stanCode_Projects/MyPhotoshop/green_screen.py | gibbs-shih/sc-projects | 12f130c881f8415623224fb20dbef5624fa8dff1 | [
"MIT"
] | null | null | null | stanCode_Projects/MyPhotoshop/green_screen.py | gibbs-shih/sc-projects | 12f130c881f8415623224fb20dbef5624fa8dff1 | [
"MIT"
] | null | null | null | """
File: green_screen.py
Name: Gibbs
-------------------------------
This file creates a new image that uses
MillenniumFalcon.png as background and
replace the green pixels in ReyGreenScreen.png
"""
from simpleimage import SimpleImage
def combine(background_img, figure_img):
"""
background_img is used as ba... | 32.333333 | 87 | 0.672852 |
e867064f7b037588e70dcf7f61dcd6f42ad3f8b4 | 2,962 | py | Python | learning/Database/accessDatabase.py | ricardodxu/AutoGrading | 1469fe63a546b00bad9fda3af7a5fca499dce789 | [
"MIT"
] | 6 | 2018-05-26T02:47:42.000Z | 2019-12-04T20:06:50.000Z | learning/Database/accessDatabase.py | ricardodxu/AutoGrading | 1469fe63a546b00bad9fda3af7a5fca499dce789 | [
"MIT"
] | 25 | 2017-09-19T20:37:55.000Z | 2019-04-26T21:50:46.000Z | learning/Database/accessDatabase.py | ricardodxu/AutoGrading | 1469fe63a546b00bad9fda3af7a5fca499dce789 | [
"MIT"
] | 9 | 2017-09-16T05:16:00.000Z | 2021-07-17T03:17:47.000Z | from __future__ import print_function
import mysql.connector
from mysql.connector import errorcode
def create_database(cursor):
try:
cursor.execute(
"CREATE DATABASE {} DEFAULT CHARACTER SET 'utf8'".format(DB_NAME))
except mysql.connector.Error as err:
print("Failed creating databas... | 24.479339 | 136 | 0.62289 |
56f52d71c8c095599f6275d0c9e1461977e80ac0 | 276 | py | Python | test/bitcoinstore/api/v1/test_routes.py | robertshuford/bitcoin-store | 894b2d699d9d61aab340b8ca7393f641fb5c5266 | [
"MIT"
] | null | null | null | test/bitcoinstore/api/v1/test_routes.py | robertshuford/bitcoin-store | 894b2d699d9d61aab340b8ca7393f641fb5c5266 | [
"MIT"
] | null | null | null | test/bitcoinstore/api/v1/test_routes.py | robertshuford/bitcoin-store | 894b2d699d9d61aab340b8ca7393f641fb5c5266 | [
"MIT"
] | null | null | null | from flask import url_for
from lib.test import ViewTestMixin
class TestApiV1(ViewTestMixin):
def test_up_api(self):
"""Up api should respond with a success 200."""
response = self.client.get(url_for("api.up"))
assert response.status_code == 200
| 25.090909 | 55 | 0.692029 |
eb12ade5c241a0147dbf445f1cc1a78d2cedff4e | 12,530 | py | Python | ark/are/graph.py | aiplat/ARK | 0d6f232774f51dcaa40b3ee5deab4ef290625655 | [
"MIT"
] | 1 | 2019-04-15T09:41:32.000Z | 2019-04-15T09:41:32.000Z | ark/are/graph.py | aiplat/ARK | 0d6f232774f51dcaa40b3ee5deab4ef290625655 | [
"MIT"
] | null | null | null | ark/are/graph.py | aiplat/ARK | 0d6f232774f51dcaa40b3ee5deab4ef290625655 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
################################################################################
#
# Copyright (c) 2018 Baidu.com, Inc. All Rights Reserved
#
################################################################################
"""
**graph** 模块提供了基于图论的长流程控制模型,封装了两种长流程执行的标准作业流程。
当前普遍的运维操作方法,与最早起的全手工相... | 27.599119 | 102 | 0.553312 |
07e62d47a5940ee4428f668904364bce26f29c7a | 867 | py | Python | app/app.py | cipheraxat/Deploy-Models-with-TensorFlow-Serving-and-Flask | 8786ec8a167f1f36a77af2c4375c2635316549ed | [
"MIT"
] | 1 | 2020-06-15T05:40:17.000Z | 2020-06-15T05:40:17.000Z | app/app.py | cipheraxat/Deploy-Models-with-TensorFlow-Serving-and-Flask | 8786ec8a167f1f36a77af2c4375c2635316549ed | [
"MIT"
] | null | null | null | app/app.py | cipheraxat/Deploy-Models-with-TensorFlow-Serving-and-Flask | 8786ec8a167f1f36a77af2c4375c2635316549ed | [
"MIT"
] | 1 | 2021-05-16T18:04:56.000Z | 2021-05-16T18:04:56.000Z | from flask import Flask, render_template, url_for, request, redirect
from flask_bootstrap import Bootstrap
import os
import inference
app = Flask(__name__)
Bootstrap(app)
"""
Routes
"""
@app.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
uploaded_file = request.files['file'... | 27.09375 | 71 | 0.622837 |
67f471c3ef21146afbbccd4ad32fe21b5d1d7f6f | 1,025 | py | Python | auth_backend/resources/interfaces.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | 1 | 2020-08-16T09:21:58.000Z | 2020-08-16T09:21:58.000Z | auth_backend/resources/interfaces.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | auth_backend/resources/interfaces.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 37.962963 | 115 | 0.776585 |
e0cad48c382ff53262551491e095f15ea01e9884 | 22,724 | py | Python | Berkeley-Pacman-Project-3/utils.py | nassosanagn/Berkeley-Pacman-Projects | 392bff2d31ff4ca1785f46f9bc0d9933ac317ee7 | [
"MIT"
] | 1 | 2021-09-08T17:50:28.000Z | 2021-09-08T17:50:28.000Z | Berkeley-Pacman-Project-3/utils.py | nassosanagn/Berkeley-Pacman-Projects | 392bff2d31ff4ca1785f46f9bc0d9933ac317ee7 | [
"MIT"
] | null | null | null | Berkeley-Pacman-Project-3/utils.py | nassosanagn/Berkeley-Pacman-Projects | 392bff2d31ff4ca1785f46f9bc0d9933ac317ee7 | [
"MIT"
] | null | null | null | """Provides some utilities widely used by other modules"""
import bisect
import collections
import collections.abc
import functools
import heapq
import operator
import os.path
import random
from itertools import chain, combinations
from statistics import mean
#import numpy as np
# ____________________... | 28.801014 | 110 | 0.598222 |
2c90676f6e33b2b16a53c96163796fceb506f952 | 2,142 | py | Python | pytorch_lightning/accelerators/gpu.py | Flash-321/pytorch-lightning | cdb6f979a062a639a6d709a0e1915a07d5ed50f6 | [
"Apache-2.0"
] | 2 | 2021-06-25T08:42:32.000Z | 2021-06-25T08:49:33.000Z | pytorch_lightning/accelerators/gpu.py | Flash-321/pytorch-lightning | cdb6f979a062a639a6d709a0e1915a07d5ed50f6 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/accelerators/gpu.py | Flash-321/pytorch-lightning | cdb6f979a062a639a6d709a0e1915a07d5ed50f6 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 36.305085 | 100 | 0.702614 |
414bb1f2f4907948f108f843e1e22b416c0e89f0 | 7,081 | py | Python | examples/tests/test_loading_mithun_factverification.py | mithunpaul08/transformers | 55d5e0a1d88f0922dc2af3be140e077850c66fee | [
"Apache-2.0"
] | null | null | null | examples/tests/test_loading_mithun_factverification.py | mithunpaul08/transformers | 55d5e0a1d88f0922dc2af3be140e077850c66fee | [
"Apache-2.0"
] | null | null | null | examples/tests/test_loading_mithun_factverification.py | mithunpaul08/transformers | 55d5e0a1d88f0922dc2af3be140e077850c66fee | [
"Apache-2.0"
] | null | null | null | #how to run this file:
#first make sure you are pointing to the expected config file in CONFIG_FILE_TO_TEST_WITH
# if from command line, uncomment the line ./run_tests.sh inside mithun_scripts/run_all.sh and
# from command line do ` bash run_all.sh --epochs_to_run 1 --machine_to_run_on laptop `
#if from IDE like pychar... | 41.409357 | 164 | 0.715436 |
2a79108c44f8b1dbaea335c70717763655725dc2 | 1,808 | py | Python | tests/catalyst/utils/test_config.py | tadejsv/catalyst | 2553ce8fd7cecc025ad88819aea73faf8abb229b | [
"Apache-2.0"
] | 206 | 2018-10-05T19:16:47.000Z | 2019-01-19T21:10:41.000Z | tests/catalyst/utils/test_config.py | tadejsv/catalyst | 2553ce8fd7cecc025ad88819aea73faf8abb229b | [
"Apache-2.0"
] | 20 | 2018-10-07T06:30:49.000Z | 2019-01-17T17:26:15.000Z | tests/catalyst/utils/test_config.py | tadejsv/catalyst | 2553ce8fd7cecc025ad88819aea73faf8abb229b | [
"Apache-2.0"
] | 22 | 2018-10-06T12:34:08.000Z | 2019-01-10T16:00:48.000Z | # flake8: noqa
import io
import json
import numpy as np
# from catalyst.dl.scripts._misc import parse_config_args
from catalyst.utils.config import _load_ordered_yaml
# def test_parse_config_args():
# configuration = {
# "stages": {"one": "uno", "two": "dos", "three": "tres"},
# "key": {"value": ... | 26.202899 | 66 | 0.554204 |
918ddb2d2dadf102a6712184d0957e7212e79b49 | 49 | py | Python | gym_puddle/envs/__init__.py | netanelbi/gym-puddle | 39ab79433d14cadc911f1f7732782b60e690578d | [
"MIT"
] | 9 | 2018-05-09T14:07:08.000Z | 2021-08-20T07:30:27.000Z | gym_puddle/envs/__init__.py | netanelbi/gym-puddle | 39ab79433d14cadc911f1f7732782b60e690578d | [
"MIT"
] | null | null | null | gym_puddle/envs/__init__.py | netanelbi/gym-puddle | 39ab79433d14cadc911f1f7732782b60e690578d | [
"MIT"
] | 2 | 2020-03-19T14:01:42.000Z | 2021-02-17T11:42:12.000Z | from gym_puddle.envs.puddle_env import PuddleEnv
| 24.5 | 48 | 0.877551 |
a11f03a62a6ad93bd15aeb392268fb2be54b75dc | 397 | py | Python | codelieche/wsgi.py | codelieche/codelieche.com | 8f18a9f4064af81a6dd0203fbaa138565065fff5 | [
"MIT"
] | 2 | 2017-06-11T16:41:48.000Z | 2017-06-14T00:32:27.000Z | codelieche/wsgi.py | codelieche/codelieche.com | 8f18a9f4064af81a6dd0203fbaa138565065fff5 | [
"MIT"
] | 13 | 2020-02-11T21:33:40.000Z | 2022-03-11T23:12:16.000Z | codelieche/wsgi.py | codelieche/codelieche.com | 8f18a9f4064af81a6dd0203fbaa138565065fff5 | [
"MIT"
] | null | null | null | """
WSGI config for codelieche 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.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
96054a3e6a883334fd0f9289f9d4a9bd56ae5bfa | 862 | py | Python | z3py/examples/list2.py | rainoftime/rainoftime.github.io | d6316f153db0ed96309d81a5f32af9887c6f1a9a | [
"MIT"
] | 1 | 2021-08-01T07:28:03.000Z | 2021-08-01T07:28:03.000Z | z3py/examples/list2.py | rainoftime/rainoftime.github.io | d6316f153db0ed96309d81a5f32af9887c6f1a9a | [
"MIT"
] | null | null | null | z3py/examples/list2.py | rainoftime/rainoftime.github.io | d6316f153db0ed96309d81a5f32af9887c6f1a9a | [
"MIT"
] | null | null | null | from z3 import *
# Create a solver.
s = Solver()
List = Datatype('List')
# Declare constructors.
List.declare('cons', ('car', IntSort()), ('cdr', List))
List.declare('nil')
# Create the datatype.
List = List.create()
# Create shorthands.
cons = List.cons
car = List.car
cdr = List.cdr
nil = List.nil
# Create an un... | 18.73913 | 68 | 0.605568 |
845289e258f4daf27b60f226cd7a19c2d312ecf2 | 235 | py | Python | Model/Critic/critic.py | swergio/Agent_A2CGAN | 2b284e8a9edae2c7bb177979701f114447631c76 | [
"MIT"
] | 3 | 2017-12-09T08:43:15.000Z | 2018-09-26T05:33:55.000Z | Model/Critic/critic.py | swergio/Agent_A2CGAN | 2b284e8a9edae2c7bb177979701f114447631c76 | [
"MIT"
] | 1 | 2021-09-07T22:05:54.000Z | 2021-09-07T22:05:54.000Z | Model/Critic/critic.py | swergio/Agent_A2CGAN | 2b284e8a9edae2c7bb177979701f114447631c76 | [
"MIT"
] | null | null | null | import tensorflow as tf
from Model.Utility.layers import fc
def Critic(X, reuse = False):
with tf.variable_scope("valuefun", reuse=reuse):
vf = fc(X, 'v', 1, act=lambda x:x)
v0 = vf[:, 0]
return v0, vf | 26.111111 | 52 | 0.6 |
31d05a0f30de55416a9b6d8923de2f0c3de61948 | 8,678 | py | Python | tensorflow_datasets/scripts/download_and_prepare.py | Erik-Tran/datasets | f30d8b975c02e1947f8b74fb790abb9d3ba89f64 | [
"Apache-2.0"
] | 1 | 2020-10-11T19:15:49.000Z | 2020-10-11T19:15:49.000Z | tensorflow_datasets/scripts/download_and_prepare.py | Erik-Tran/datasets | f30d8b975c02e1947f8b74fb790abb9d3ba89f64 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/scripts/download_and_prepare.py | Erik-Tran/datasets | f30d8b975c02e1947f8b74fb790abb9d3ba89f64 | [
"Apache-2.0"
] | 1 | 2022-03-14T16:17:53.000Z | 2022-03-14T16:17:53.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors.
#
# 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 appl... | 35.711934 | 80 | 0.718253 |
e9b41c20e0f2e7968b82873b61c276d7a0c92cd8 | 39,673 | py | Python | python_modules/dagster/dagster/core/execution/api.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/execution/api.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/execution/api.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | import sys
from contextlib import contextmanager
from typing import Any, Dict, FrozenSet, Iterator, List, Optional, Tuple, Union
from dagster import check
from dagster.core.definitions import IPipeline, PipelineDefinition
from dagster.core.definitions.pipeline import PipelineSubsetDefinition
from dagster.core.definiti... | 43.263904 | 103 | 0.666146 |
bac9e9198ab5b7e6a57a206c78f0ae3f927c87ca | 44,551 | py | Python | lib/galaxy/managers/base.py | crashGoBoom/galaxy | bb395a277839465dd490e1cc8c45dd17bddacb23 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/base.py | crashGoBoom/galaxy | bb395a277839465dd490e1cc8c45dd17bddacb23 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/base.py | crashGoBoom/galaxy | bb395a277839465dd490e1cc8c45dd17bddacb23 | [
"CC-BY-3.0"
] | null | null | null | """
Keeps the older BaseController security and fetching methods and also
defines a base ModelManager, ModelSerializer, and ModelDeserializer.
ModelManagers are used for operations on models that occur outside the scope of
a single model object, such as:
- object creation
- object lookup
- interactions between 2+ obj... | 39.114135 | 143 | 0.632556 |
7297791db05ab40bf0827824367abd990f8158d1 | 12,139 | py | Python | src/ref/WGAN_CNN_CNN_DISCRETE/Critic.py | chychen/nba_scrip_generation | 942df59cc0426aa30b54a0e09c0f646aa8fd4f18 | [
"MIT"
] | 1 | 2020-07-09T09:00:09.000Z | 2020-07-09T09:00:09.000Z | src/ref/WGAN_CNN_CNN_DISCRETE/Critic.py | chychen/bball_defensive_strategies_generation | 942df59cc0426aa30b54a0e09c0f646aa8fd4f18 | [
"MIT"
] | null | null | null | src/ref/WGAN_CNN_CNN_DISCRETE/Critic.py | chychen/bball_defensive_strategies_generation | 942df59cc0426aa30b54a0e09c0f646aa8fd4f18 | [
"MIT"
] | null | null | null | """
modeling
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import time
import shutil
import numpy as np
import tensorflow as tf
from tensorflow.contrib import rnn
from tensorflow.contrib import layers
from utils_cnn import Norm
class C_MODE... | 43.199288 | 121 | 0.539583 |
b60237c6854b0d0a83a7b795c3afddfbe7334676 | 8,161 | py | Python | front-end/testsuite-python-lib/Python-3.0/Lib/distutils/command/build_clib.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2020-11-26T18:53:46.000Z | 2020-11-26T18:53:46.000Z | front-end/testsuite-python-lib/Python-3.0/Lib/distutils/command/build_clib.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2015-10-29T20:51:31.000Z | 2015-10-29T20:51:31.000Z | front-end/testsuite-python-lib/Python-3.0/Lib/distutils/command/build_clib.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2019-04-11T11:27:01.000Z | 2019-04-11T11:27:01.000Z | """distutils.command.build_clib
Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module."""
__revision__ = "$Id: build_clib.py 58495 2007-10-16 18:12:55Z guido.van.rossum $"
# XXX this module has *lots* of code ripped-off ... | 39.425121 | 81 | 0.581179 |
7f2852ce37516cea085533915c38c89d579d5b8e | 2,794 | py | Python | modules/runtime/scenario/scenario_generation/scenario_generation.py | Lizhu-Chen/bark | fad029f658e462eb1772c28c2c0971faf5176dc1 | [
"MIT"
] | null | null | null | modules/runtime/scenario/scenario_generation/scenario_generation.py | Lizhu-Chen/bark | fad029f658e462eb1772c28c2c0971faf5176dc1 | [
"MIT"
] | null | null | null | modules/runtime/scenario/scenario_generation/scenario_generation.py | Lizhu-Chen/bark | fad029f658e462eb1772c28c2c0971faf5176dc1 | [
"MIT"
] | 1 | 2020-08-12T17:09:05.000Z | 2020-08-12T17:09:05.000Z | # Copyright (c) 2020 Julian Bernhard, Klemens Esterle, Patrick Hart and
# Tobias Kessler
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import pickle
import os
from modules.runtime.commons.parameters import ParameterServer
class ScenarioGeneratio... | 31.75 | 82 | 0.702935 |
b6e993cb460a6f2f10de8d5fff9797e715e8cdd0 | 4,424 | py | Python | datasets/austin_bikeshare/bikeshare_stations/bikeshare_stations_dag.py | renovate-bot/public-datasets-pipelines | d2b5e527d9d2dcc8e01f5209e7b9409dfe2b62a8 | [
"Apache-2.0"
] | 90 | 2021-04-09T19:20:19.000Z | 2022-03-31T16:03:14.000Z | datasets/austin_bikeshare/bikeshare_stations/bikeshare_stations_dag.py | renovate-bot/public-datasets-pipelines | d2b5e527d9d2dcc8e01f5209e7b9409dfe2b62a8 | [
"Apache-2.0"
] | 125 | 2021-04-19T20:33:26.000Z | 2022-03-30T21:45:49.000Z | datasets/austin_bikeshare/bikeshare_stations/bikeshare_stations_dag.py | renovate-bot/public-datasets-pipelines | d2b5e527d9d2dcc8e01f5209e7b9409dfe2b62a8 | [
"Apache-2.0"
] | 54 | 2021-04-29T23:17:36.000Z | 2022-03-31T05:15:23.000Z | # Copyright 2021 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 51.44186 | 465 | 0.643761 |
934a5b0cd2567ccf419b56afd3c12a081ee3b3db | 7,278 | py | Python | src/data_preprocessing.py | harbenml/Kaggle-Ttitanic | fcce8eca3484a5a46e16af439cc070b3720e6a8b | [
"MIT"
] | 1 | 2020-07-14T10:02:59.000Z | 2020-07-14T10:02:59.000Z | src/data_preprocessing.py | harbenml/Kaggle-Ttitanic | fcce8eca3484a5a46e16af439cc070b3720e6a8b | [
"MIT"
] | null | null | null | src/data_preprocessing.py | harbenml/Kaggle-Ttitanic | fcce8eca3484a5a46e16af439cc070b3720e6a8b | [
"MIT"
] | null | null | null | """This module preprocesses the data for subsequent training and prediction steps.
The following procedure is applied:
1. Load the raw data.
2. Clean data by imputing missing values.
3. Create new features.
4. Encode features.
5. Export processed data and enocders.
"""
import pandas as pd
from sklearn import preproce... | 34.657143 | 123 | 0.624073 |
00a63f271a43fb1a3868f87e60cb750652e847fc | 7,439 | py | Python | construct/expr.py | nrrpinto/construct | cfc980c6edfbe33c56015b736f59fb3155b51317 | [
"MIT"
] | 629 | 2015-01-06T03:01:56.000Z | 2022-03-23T13:13:26.000Z | construct/expr.py | nrrpinto/construct | cfc980c6edfbe33c56015b736f59fb3155b51317 | [
"MIT"
] | 897 | 2015-02-28T15:46:06.000Z | 2022-03-30T08:19:13.000Z | construct/expr.py | nrrpinto/construct | cfc980c6edfbe33c56015b736f59fb3155b51317 | [
"MIT"
] | 151 | 2015-01-08T16:36:24.000Z | 2022-03-10T16:59:49.000Z | import operator
if not hasattr(operator, "div"):
operator.div = operator.truediv
opnames = {
operator.add : "+",
operator.sub : "-",
operator.mul : "*",
operator.div : "/",
operator.floordiv : "//",
operator.mod : "%",
operator.pow : "**",
operator.xor : "^",
operator.lshift : ... | 28.945525 | 103 | 0.602769 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.