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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8c3395795b6929f51754760db712079df5a4932e | 17,042 | py | Python | python/process_map.py | lg9/Tn-seq | b8514826fa63cb5257eb65e336629282dcba0030 | [
"MIT"
] | null | null | null | python/process_map.py | lg9/Tn-seq | b8514826fa63cb5257eb65e336629282dcba0030 | [
"MIT"
] | null | null | null | python/process_map.py | lg9/Tn-seq | b8514826fa63cb5257eb65e336629282dcba0030 | [
"MIT"
] | 2 | 2018-09-04T08:27:30.000Z | 2020-03-09T19:28:45.000Z | #!/usr/bin/env python
# Purpose: Run the Tn-seq mapping pipeline. Produces files
# listing reads per location. The output files can be fed
# to the annotation script for analysis.
#
# Copyright (c) 2014 University of Washington
#-----------------------------------------------------
# modules
#-------------------------... | 47.736695 | 224 | 0.603392 |
ee31bfa9806b500f64b1da14da16e3670095003c | 2,884 | py | Python | Lib/json/tests/test_fail.py | leepro/unladen-swallow | 8175e37eaea7ca66ed03283b46bc1d2db0d3f9c3 | [
"PSF-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/src/Lib/json/tests/test_fail.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/src/Lib/json/tests/test_fail.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | from unittest import TestCase
import json
# Fri Dec 30 18:57:26 2005
JSONDOCS = [
# http://json.org/JSON_checker/test/fail1.json
'"A JSON payload should be an object or array, not a string."',
# http://json.org/JSON_checker/test/fail2.json
'["Unclosed array"',
# http://json.org/JSON_checker/test/f... | 37.454545 | 78 | 0.611304 |
7c15b11296685313e1facaa598c0b3e3ed58594a | 4,022 | py | Python | devilry/apps/core/models/filemeta.py | devilry/devilry-django | 9ae28e462dfa4cfee966ebacbca04ade9627e715 | [
"BSD-3-Clause"
] | 29 | 2015-01-18T22:56:23.000Z | 2020-11-10T21:28:27.000Z | devilry/apps/core/models/filemeta.py | devilry/devilry-django | 9ae28e462dfa4cfee966ebacbca04ade9627e715 | [
"BSD-3-Clause"
] | 786 | 2015-01-06T16:10:18.000Z | 2022-03-16T11:10:50.000Z | devilry/apps/core/models/filemeta.py | devilry/devilry-django | 9ae28e462dfa4cfee966ebacbca04ade9627e715 | [
"BSD-3-Clause"
] | 15 | 2015-04-06T06:18:43.000Z | 2021-02-24T12:28:30.000Z | import logging
from datetime import datetime
from django.db import models
from django.db.models import Q
from django.db.models.signals import pre_delete
from .abstract_is_admin import AbstractIsAdmin
from .abstract_is_examiner import AbstractIsExaminer
from .abstract_is_candidate import AbstractIsCandidate
from ..del... | 32.967213 | 101 | 0.692939 |
8f195405d890ab465be4345fe32c93f17a7680ba | 1,465 | py | Python | integration/fom/test_namespaces.py | fluidinfo/fluiddb | b5a8c8349f3eaf3364cc4efba4736c3e33b30d96 | [
"Apache-2.0"
] | 3 | 2021-05-10T14:41:30.000Z | 2021-12-16T05:53:30.000Z | integration/fom/test_namespaces.py | fluidinfo/fluiddb | b5a8c8349f3eaf3364cc4efba4736c3e33b30d96 | [
"Apache-2.0"
] | null | null | null | integration/fom/test_namespaces.py | fluidinfo/fluiddb | b5a8c8349f3eaf3364cc4efba4736c3e33b30d96 | [
"Apache-2.0"
] | 2 | 2018-01-24T09:03:21.000Z | 2021-06-25T08:34:54.000Z | import os
import unittest
from fom.session import Fluid
from fom.mapping import Namespace
class TestNamespaces(unittest.TestCase):
def setUp(self):
endpoint = os.environ.get('FLUIDDB_ENDPOINT', 'http://localhost:9000')
username = os.environ.get('FLUIDDB_ADMIN_USERNAME', 'fluiddb')
passwo... | 34.880952 | 78 | 0.635495 |
b7bb32493eb1c9648133d5e6ae4596e9f1d0c8ae | 280 | py | Python | app/ch16_mongodb/starter/pypi_org/viewmodels/cms/page_viewmodel.py | tbensonwest/data-driven-web-apps-with-flask | be025c1c0190419019924f7516f49b3b8452cdf8 | [
"MIT"
] | 496 | 2019-07-03T05:13:24.000Z | 2022-03-27T01:15:10.000Z | app/ch16_mongodb/starter/pypi_org/viewmodels/cms/page_viewmodel.py | tbensonwest/data-driven-web-apps-with-flask | be025c1c0190419019924f7516f49b3b8452cdf8 | [
"MIT"
] | 20 | 2019-07-07T22:09:49.000Z | 2021-12-28T03:03:09.000Z | app/ch16_mongodb/starter/pypi_org/viewmodels/cms/page_viewmodel.py | tbensonwest/data-driven-web-apps-with-flask | be025c1c0190419019924f7516f49b3b8452cdf8 | [
"MIT"
] | 562 | 2019-07-03T14:35:21.000Z | 2022-03-31T06:23:58.000Z | from pypi_org.services import user_service, cms_service
from pypi_org.viewmodels.shared.viewmodelbase import ViewModelBase
class PageViewModel(ViewModelBase):
def __init__(self, full_url: str):
super().__init__()
self.page = cms_service.get_page(full_url)
| 25.454545 | 66 | 0.764286 |
4cc6d512a56205010eede9a8397495c628dcd47d | 3,117 | py | Python | loader.py | sarwarislammoon/ESP_FLASH_TOOL | 7d3bfad66544516e1f605f490fc1b60866ab536d | [
"Apache-2.0"
] | null | null | null | loader.py | sarwarislammoon/ESP_FLASH_TOOL | 7d3bfad66544516e1f605f490fc1b60866ab536d | [
"Apache-2.0"
] | null | null | null | loader.py | sarwarislammoon/ESP_FLASH_TOOL | 7d3bfad66544516e1f605f490fc1b60866ab536d | [
"Apache-2.0"
] | null | null | null |
from tkinter import *
from tkinter import filedialog
from tkinter import filedialog,messagebox
import os
root = Tk()
root.geometry("300x130")
root.resizable(0,0)
root.title('ESP FW Loader 0.0.1')
def openFile():
global filepath
filepath = StringVar()
#Fetch the file path of the hex f... | 34.252747 | 330 | 0.662817 |
e5be5a6b6d21a7405d585a213923b97ee851feb2 | 106,498 | py | Python | wpoium/plugins/networking/Utils/base.py | elihe999/LAN-autotest-webium | 355d3abfe3104690f8f6c574e64fd9927748c6e7 | [
"Apache-2.0"
] | null | null | null | wpoium/plugins/networking/Utils/base.py | elihe999/LAN-autotest-webium | 355d3abfe3104690f8f6c574e64fd9927748c6e7 | [
"Apache-2.0"
] | null | null | null | wpoium/plugins/networking/Utils/base.py | elihe999/LAN-autotest-webium | 355d3abfe3104690f8f6c574e64fd9927748c6e7 | [
"Apache-2.0"
] | null | null | null | # region Description
"""
base.py: Base class for Raw-packet project (base)
Author: Vladimir Ivanov
License: MIT
Copyright 2020, Raw-packet Project
"""
# endregion
# region Import
from wpoium.plugins.networking.Utils.vendors import vendors_dictionary
try:
from platform import system, release, linux_distribution
exc... | 46.998235 | 133 | 0.533785 |
8aefea93929d0b4ef76b55434320daaeec40dc24 | 98,676 | py | Python | python/ccxt/async_support/aax.py | sky1008/ccxt | dc094a17dddb2f5fd703901f0b0a08d3fa2618f4 | [
"MIT"
] | 1 | 2022-03-20T07:15:44.000Z | 2022-03-20T07:15:44.000Z | python/ccxt/async_support/aax.py | sky1008/ccxt | dc094a17dddb2f5fd703901f0b0a08d3fa2618f4 | [
"MIT"
] | null | null | null | python/ccxt/async_support/aax.py | sky1008/ccxt | dc094a17dddb2f5fd703901f0b0a08d3fa2618f4 | [
"MIT"
] | 2 | 2022-03-15T22:31:00.000Z | 2022-03-23T06:08:29.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticatio... | 42.241438 | 379 | 0.450819 |
6641973dcbb1c140049737620604aaae9f68af2a | 1,007 | py | Python | python_exercicios/desafio115a.py | sourcery-ai-bot/Python-Curso-em-Video | 426fd6a0427f0d7674daf26e4be06cde9b7e618c | [
"MIT"
] | 1 | 2020-12-22T00:55:47.000Z | 2020-12-22T00:55:47.000Z | python_exercicios/desafio115a.py | sourcery-ai-bot/Python-Curso-em-Video | 426fd6a0427f0d7674daf26e4be06cde9b7e618c | [
"MIT"
] | null | null | null | python_exercicios/desafio115a.py | sourcery-ai-bot/Python-Curso-em-Video | 426fd6a0427f0d7674daf26e4be06cde9b7e618c | [
"MIT"
] | 1 | 2020-12-22T00:55:49.000Z | 2020-12-22T00:55:49.000Z | # 115a Vamos criar um menu em Python, usando modularização.
# 115b Vamos ver como fazer acesso a arquivos usando o Python.
# 115c Vamos finalizar o projeto de acesso a arquivos em Python.
from ex115.lib.interface import *
from ex115.lib.arquivo import *
from time import sleep
arq = 'cursoemvideo.txt'
if not arquivoE... | 31.46875 | 92 | 0.652433 |
5fbec6e10fe763b10fa4759b819e0b04586a56ea | 6,103 | py | Python | pkwscraper/lib/region.py | msmiglo/pkwscraper | ff50498ffa8c5f2fcbb013b07d8d8c6792f35d98 | [
"MIT"
] | null | null | null | pkwscraper/lib/region.py | msmiglo/pkwscraper | ff50498ffa8c5f2fcbb013b07d8d8c6792f35d98 | [
"MIT"
] | 22 | 2021-12-19T14:21:46.000Z | 2022-02-18T21:54:44.000Z | pkwscraper/lib/region.py | msmiglo/pkwscraper | ff50498ffa8c5f2fcbb013b07d8d8c6792f35d98 | [
"MIT"
] | null | null | null |
from decimal import Decimal
import json
from matplotlib.collections import PatchCollection
from matplotlib.patches import PathPatch
from matplotlib.path import Path
import svg.path
from svg.path import parse_path
"""
EXPLANATION OF GEO/REGION DATA:
geo - description of region as accepted by "d" attribute in "svg" H... | 32.291005 | 75 | 0.577257 |
15ba27dc2a1c6dfc02517255e39658772290a9f7 | 1,204 | py | Python | scripts/fb/BestTimeToBuyAndSellStocks.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/fb/BestTimeToBuyAndSellStocks.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/fb/BestTimeToBuyAndSellStocks.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
Best Time to Buy and Sell Stock
You are given an array prices where prices[i] is the price of a given stock on the ith day.
You want to maximize your profit by choosing a single day to buy one stock and choosing a
different day in the future to sell that stock.
Return the maximum profit you can achieve from t... | 23.153846 | 108 | 0.631229 |
f175a46d971b9458c669f964f43ebcbbc521fc2b | 8,713 | py | Python | pyvcloud/vcd/exceptions.py | gpooja3/pyvcloud | 89ce4907847b99faf7d8480a187c5523d0b39bdc | [
"Apache-2.0"
] | 168 | 2015-01-01T07:15:03.000Z | 2022-01-27T00:27:49.000Z | pyvcloud/vcd/exceptions.py | gpooja3/pyvcloud | 89ce4907847b99faf7d8480a187c5523d0b39bdc | [
"Apache-2.0"
] | 392 | 2015-01-08T10:03:01.000Z | 2022-03-28T02:12:02.000Z | pyvcloud/vcd/exceptions.py | gpooja3/pyvcloud | 89ce4907847b99faf7d8480a187c5523d0b39bdc | [
"Apache-2.0"
] | 246 | 2015-01-13T01:52:58.000Z | 2022-03-28T09:34:47.000Z | # VMware vCloud Director Python SDK
# Copyright (c) 2018 VMware, 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
#... | 33.771318 | 78 | 0.640652 |
145af670c32947903d6ee554daffe4f98e2959c6 | 3,983 | py | Python | buy.py | chen-solodev/SupremeBot | 61f6c94025aca4e97841754ad49e7db31ba63ab0 | [
"Apache-2.0"
] | null | null | null | buy.py | chen-solodev/SupremeBot | 61f6c94025aca4e97841754ad49e7db31ba63ab0 | [
"Apache-2.0"
] | null | null | null | buy.py | chen-solodev/SupremeBot | 61f6c94025aca4e97841754ad49e7db31ba63ab0 | [
"Apache-2.0"
] | null | null | null | from cookiespoof import CookieSpoof
from payload import Payload
from autofill import Autofill
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import requests
import time
class Buy:
'''
I made the Buy class to contain all the other classes I wrote. This way, everyth... | 39.04902 | 121 | 0.648757 |
bd88ff405f764d456f45bbbc69ce406916c6aff1 | 1,725 | py | Python | py_ms_cognitive/py_ms_cognitive_search/chinese painting.py | mfridson/msf-image-capstone | c338eaf6ef401a8c70000775d0bfafdc5ce3f79c | [
"MIT"
] | null | null | null | py_ms_cognitive/py_ms_cognitive_search/chinese painting.py | mfridson/msf-image-capstone | c338eaf6ef401a8c70000775d0bfafdc5ce3f79c | [
"MIT"
] | null | null | null | py_ms_cognitive/py_ms_cognitive_search/chinese painting.py | mfridson/msf-image-capstone | c338eaf6ef401a8c70000775d0bfafdc5ce3f79c | [
"MIT"
] | null | null | null | import pandas as pd
import json
import attr
import sys
from py_ms_cognitive import PyMsCognitiveImageSearch
values=[]
cont_sz=[]
thumb=[]
token=[]
host_page=[]
search_url=[]
jsn=[]
image_id=[]
cont_url=[]
cont_name=[]
search_term = "chinese painting"
search_service = PyMsCognitiveImageSearch(search_term)
first_fifty_re... | 33.823529 | 225 | 0.752464 |
d575994276546461f787ed3219bee57ac51d3181 | 9,397 | py | Python | models/segnet.py | Ankur-Deka/pytorch_segmentation | 27f5f0213e2ade7441aa8892e8734e3f00e05ec3 | [
"MIT"
] | 8 | 2020-02-13T09:21:54.000Z | 2021-08-13T08:33:04.000Z | models/segnet.py | Ankur-Deka/pytorch_segmentation | 27f5f0213e2ade7441aa8892e8734e3f00e05ec3 | [
"MIT"
] | 5 | 2021-06-08T22:01:01.000Z | 2022-03-19T02:31:19.000Z | models/segnet.py | Ankur-Deka/pytorch_segmentation | 27f5f0213e2ade7441aa8892e8734e3f00e05ec3 | [
"MIT"
] | 4 | 2020-02-13T09:22:02.000Z | 2021-04-27T09:10:46.000Z | from base import BaseModel
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision import models
from itertools import chain
from math import ceil
class SegNet(BaseModel):
def __init__(self, num_classes, in_channels=3, pretrained=True, freeze_bn=False, **_):
super(SegNet, self).... | 38.199187 | 119 | 0.59934 |
aa9c9783b6e837c8da0d01b90ed4c47096f78167 | 470 | py | Python | Day01/fuelcalc.py | skysdottir/AOC2019 | d2ba127e6f38d3955dfa41d820e5302348797421 | [
"MIT"
] | null | null | null | Day01/fuelcalc.py | skysdottir/AOC2019 | d2ba127e6f38d3955dfa41d820e5302348797421 | [
"MIT"
] | null | null | null | Day01/fuelcalc.py | skysdottir/AOC2019 | d2ba127e6f38d3955dfa41d820e5302348797421 | [
"MIT"
] | null | null | null | import math;
def fuel_for(payload_mass):
total_fuel_mass = 0
mass_iter = payload_mass
while(mass_iter >= 9):
fuel_iter = math.floor(mass_iter / 3) - 2
total_fuel_mass += fuel_iter
mass_iter = fuel_iter
return total_fuel_mass
with open("Day01/input.txt", "r") as input:... | 23.5 | 53 | 0.625532 |
8a4bc096abff5886b6d50986f0ad490484efdf12 | 2,124 | py | Python | src/resources.py | Emil1337Elite/rpg-fighter | f470f681b1aea85079223a39ece1921d36f67f3a | [
"MIT"
] | null | null | null | src/resources.py | Emil1337Elite/rpg-fighter | f470f681b1aea85079223a39ece1921d36f67f3a | [
"MIT"
] | null | null | null | src/resources.py | Emil1337Elite/rpg-fighter | f470f681b1aea85079223a39ece1921d36f67f3a | [
"MIT"
] | null | null | null | class Character:
def __init__(self, name, health, attack, armor):
self.name = name
self.health = health
self.attack = attack
self.armor = armor
def __str__(self) -> str:
return f"Name: {self.name}\nHealth: {self.health}\nAttack: {self.attack}\nArmor: {self.a... | 29.09589 | 102 | 0.570621 |
f7625530d8d71b8a7aaf40461f2c8c8b40468cbc | 5,138 | py | Python | image_lite/filters_wand.py | rcrowther/django-image-lite | b9f21b8630907752fab4231f1d498e4cde4a4a3a | [
"BSD-3-Clause"
] | null | null | null | image_lite/filters_wand.py | rcrowther/django-image-lite | b9f21b8630907752fab4231f1d498e4cde4a4a3a | [
"BSD-3-Clause"
] | null | null | null | image_lite/filters_wand.py | rcrowther/django-image-lite | b9f21b8630907752fab4231f1d498e4cde4a4a3a | [
"BSD-3-Clause"
] | null | null | null | from wand.image import WandImage
from io import BytesIO
from image_lite.filters import (
Filter,
FormatMixin,
PhotoFXMixin,
ResizeCropMixin,
ResizeCropSmartMixin,
)
from image_lite import image_ops_wand
from image_lite.constants import FORMAT_APP_TO_UCLIB, FORMAT_UCLIB_TO_APP
from image_lite.decisio... | 28.544444 | 76 | 0.56306 |
2422784bd825dc6f58784e640b33504be7c60146 | 19,310 | py | Python | ansible/lib/ansible/module_utils/cloudstack.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/module_utils/cloudstack.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/module_utils/cloudstack.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the aut... | 36.093458 | 129 | 0.576696 |
d3bc53997554f4c9b7a09446621d46a8de7cf28c | 5,668 | py | Python | gametable.py | jerradgenson/game-theory-tools | 9f5a81d321aa35313e05743a25a1775a82601cc2 | [
"BSD-3-Clause"
] | null | null | null | gametable.py | jerradgenson/game-theory-tools | 9f5a81d321aa35313e05743a25a1775a82601cc2 | [
"BSD-3-Clause"
] | null | null | null | gametable.py | jerradgenson/game-theory-tools | 9f5a81d321aa35313e05743a25a1775a82601cc2 | [
"BSD-3-Clause"
] | 1 | 2018-08-12T16:36:43.000Z | 2018-08-12T16:36:43.000Z | """
BSD 3-Clause License
Copyright (c) 2018, Jerrad Genson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of condit... | 40.485714 | 113 | 0.627029 |
99692fccbf63354894ea25a2fe6ee78f2ad8718e | 49,243 | py | Python | deep_learning/keras/keras/engine/sequential.py | xpennec/applications | 50aefdf14de308fc3c132784ebba9d329e47b087 | [
"MIT"
] | 21 | 2019-01-12T17:59:41.000Z | 2022-03-08T17:42:56.000Z | deep_learning/keras/keras/engine/sequential.py | farrell236/applications | 0e1ab139ade2a0b3ba6f04f6fd93822b1dd5ae2f | [
"MIT"
] | 7 | 2019-01-24T11:44:58.000Z | 2020-04-21T21:13:37.000Z | deep_learning/keras/keras/engine/sequential.py | farrell236/applications | 0e1ab139ade2a0b3ba6f04f6fd93822b1dd5ae2f | [
"MIT"
] | 8 | 2019-01-24T11:36:05.000Z | 2021-06-15T20:59:50.000Z | """Sequential model class.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import warnings
import copy
import os
from . import base_layer
from . import network
from . import saving
from .training import Model
from .base_layer import Layer
from .input_la... | 43.006987 | 88 | 0.561298 |
bbeb92dab182794e506bf1b8976ad2a0c429e49b | 2,134 | py | Python | Practice7/code2/train.py | kiseyno92/SNU_ML | be48a5c570ef59dc2b5a782c828536e100d7f0eb | [
"MIT"
] | 1 | 2017-08-10T10:16:32.000Z | 2017-08-10T10:16:32.000Z | Practice7/code2/train.py | kiseyno92/SNU_ML | be48a5c570ef59dc2b5a782c828536e100d7f0eb | [
"MIT"
] | null | null | null | Practice7/code2/train.py | kiseyno92/SNU_ML | be48a5c570ef59dc2b5a782c828536e100d7f0eb | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import models
from tensorflow.examples.tutorials.mnist import input_data
from IPython import embed
from tensorflow import flags
FLAGS = flags.FLAGS
flags.DEFINE_string("log_dir", "./logs/default", "default summary/checkpoint directory")
def main(_):
mnist = input_data.read_d... | 36.169492 | 89 | 0.727741 |
55bd3df655689180d6f97beba841a7f3fbe3e416 | 4,949 | py | Python | src/climsoft_api/api/stationlocationhistory/schema.py | opencdms/climsoft-api | 860656423f78a2360ea7a581ea1642f6c3acb442 | [
"MIT"
] | null | null | null | src/climsoft_api/api/stationlocationhistory/schema.py | opencdms/climsoft-api | 860656423f78a2360ea7a581ea1642f6c3acb442 | [
"MIT"
] | 2 | 2022-01-16T15:41:27.000Z | 2022-01-30T18:37:13.000Z | src/climsoft_api/api/stationlocationhistory/schema.py | opencdms/climsoft-api | 860656423f78a2360ea7a581ea1642f6c3acb442 | [
"MIT"
] | 2 | 2021-12-22T21:50:19.000Z | 2022-01-28T12:53:32.000Z | from typing import List, Optional
import climsoft_api.api.station.schema as station_schema
from climsoft_api.api.schema import BaseSchema, Response
from pydantic import constr, Field, validator
class CreateStationLocationHistory(BaseSchema):
belongsTo: constr(max_length=255) = Field(title="Belongs To")
openin... | 39.277778 | 79 | 0.689634 |
cfc0a82dc9bd932b99b9cc4c746664c2f7f007be | 53 | py | Python | bencode/__init__.py | Martynas-P/bencode | d4b2a406e07aa828bfc02eb1ed3bd68efbe1c6cb | [
"Apache-2.0"
] | null | null | null | bencode/__init__.py | Martynas-P/bencode | d4b2a406e07aa828bfc02eb1ed3bd68efbe1c6cb | [
"Apache-2.0"
] | null | null | null | bencode/__init__.py | Martynas-P/bencode | d4b2a406e07aa828bfc02eb1ed3bd68efbe1c6cb | [
"Apache-2.0"
] | null | null | null | from .encode import encode
from .decode import decode | 26.5 | 26 | 0.830189 |
bdc41a1c9012443b69a150cb1ec3fb7c0347da9d | 2,672 | py | Python | apportionpy/methods/hamilton.py | btror/apportionpy | 5b70dbeee4b197e41794bed061ea4a11f128d1c8 | [
"MIT"
] | null | null | null | apportionpy/methods/hamilton.py | btror/apportionpy | 5b70dbeee4b197e41794bed061ea4a11f128d1c8 | [
"MIT"
] | null | null | null | apportionpy/methods/hamilton.py | btror/apportionpy | 5b70dbeee4b197e41794bed061ea4a11f128d1c8 | [
"MIT"
] | null | null | null | import math
def calculate_hamilton(num_seats, populations):
"""
Calculate the initial fair shares, final fair shares, initial quotas, final quotas, initial divisor, and modified
divisor using Hamilton's method of apportionment.
:return: A list of initial fair shares, final fair shares, initial quotas... | 36.60274 | 118 | 0.702096 |
80b67130ad2821663b34cc886eb4c955adb64eff | 4,662 | py | Python | nikola/plugins/compile/html.py | djmattyg007/nikola | 3b7c48bf8c7a930ebc22045d5b6eac3523cd4716 | [
"MIT"
] | null | null | null | nikola/plugins/compile/html.py | djmattyg007/nikola | 3b7c48bf8c7a930ebc22045d5b6eac3523cd4716 | [
"MIT"
] | null | null | null | nikola/plugins/compile/html.py | djmattyg007/nikola | 3b7c48bf8c7a930ebc22045d5b6eac3523cd4716 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2012-2020 Roberto Alsina and others.
# 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 t... | 38.528926 | 120 | 0.634492 |
a90e41c18cd7ec4cae8837f45bb748d30189003b | 354 | py | Python | setup.py | Kristianuruplarsen/toolbox | 27c17c293b489d134006677a6ee48fca9e0f95b7 | [
"MIT"
] | null | null | null | setup.py | Kristianuruplarsen/toolbox | 27c17c293b489d134006677a6ee48fca9e0f95b7 | [
"MIT"
] | null | null | null | setup.py | Kristianuruplarsen/toolbox | 27c17c293b489d134006677a6ee48fca9e0f95b7 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='toolbox',
version='0.1',
description='A box of personalized utility functions.',
url='http://github.com/KristianUrupLarsen/toolbox',
author='Kristian Urup Olesen Larsen',
license='MIT',
packages=['toolbox'],
install_requires=[
'... | 25.285714 | 61 | 0.638418 |
64d5b2fa0bd2e1db398cf0323eb9717e23e722ea | 2,056 | py | Python | python/erdos/utils.py | objorkman/erdos | 13b3be477d6674e9e377a56dec484f80ba41e915 | [
"Apache-2.0"
] | null | null | null | python/erdos/utils.py | objorkman/erdos | 13b3be477d6674e9e377a56dec484f80ba41e915 | [
"Apache-2.0"
] | null | null | null | python/erdos/utils.py | objorkman/erdos | 13b3be477d6674e9e377a56dec484f80ba41e915 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import Union
def setup_logging(name: str, log_file: Union[str, None] = None) -> logging.Logger:
"""Create a logger with the given name and attach the given handler.
Args:
name: The name of the logger.
log_file: The name of the file to log to. (console if None)
... | 30.686567 | 88 | 0.655156 |
f8aba24fc37dca086756766387d1eb0427ffb5d8 | 189 | py | Python | test_project/select2_outside_admin/urls.py | dr-rompecabezas/django-autocomplete-light | 4adff74ac4b20a644f57d2a40a283ed79264543d | [
"MIT"
] | null | null | null | test_project/select2_outside_admin/urls.py | dr-rompecabezas/django-autocomplete-light | 4adff74ac4b20a644f57d2a40a283ed79264543d | [
"MIT"
] | null | null | null | test_project/select2_outside_admin/urls.py | dr-rompecabezas/django-autocomplete-light | 4adff74ac4b20a644f57d2a40a283ed79264543d | [
"MIT"
] | null | null | null | from django.urls import re_path as url
from .views import UpdateView
urlpatterns = [
url(
r'^$',
UpdateView.as_view(),
name='select2_outside_admin',
),
]
| 14.538462 | 38 | 0.603175 |
2bfe1642826ca6bfadd39b30c9fd277327ecbaf3 | 15,198 | py | Python | aiogram/contrib/fsm_storage/redis.py | Latand/aiogram | 78aee861bb77601691916feb5a9c8efbdb65956b | [
"MIT"
] | 3 | 2020-12-06T16:55:53.000Z | 2021-11-19T19:25:57.000Z | aiogram/contrib/fsm_storage/redis.py | Latand/aiogram | 78aee861bb77601691916feb5a9c8efbdb65956b | [
"MIT"
] | null | null | null | aiogram/contrib/fsm_storage/redis.py | Latand/aiogram | 78aee861bb77601691916feb5a9c8efbdb65956b | [
"MIT"
] | 2 | 2020-12-30T09:51:30.000Z | 2021-11-10T16:50:28.000Z | """
This module has redis storage for finite-state machine based on `aioredis <https://github.com/aio-libs/aioredis>`_ driver
"""
import asyncio
import logging
import typing
import aioredis
from ...dispatcher.storage import BaseStorage
from ...utils import json
STATE_KEY = 'state'
STATE_DATA_KEY = 'data'
STATE_BUCK... | 37.618812 | 121 | 0.584748 |
b542a7018f754e7464871980e5609d7556662153 | 785 | py | Python | tensor2tensor/bin/summarize_all.py | cgebe/tensor2tensor | 8e2389021643774f81a3af643e55a856896aef5c | [
"Apache-2.0"
] | null | null | null | tensor2tensor/bin/summarize_all.py | cgebe/tensor2tensor | 8e2389021643774f81a3af643e55a856896aef5c | [
"Apache-2.0"
] | null | null | null | tensor2tensor/bin/summarize_all.py | cgebe/tensor2tensor | 8e2389021643774f81a3af643e55a856896aef5c | [
"Apache-2.0"
] | 1 | 2018-07-26T18:31:58.000Z | 2018-07-26T18:31:58.000Z | import os
TRANSLATE_PROBLEMS = [
#"summarize_cs_legal32k",
#"summarize_de_legal32k",
#"summarize_en_legal32k",
#"summarize_es_legal32k",
#"summarize_fr_legal32k",
#"summarize_it_legal32k",
"summarize_sv_legal32k",
]
def main():
for problem in TRANSLATE_PROBLEMS:
os.system("mkd... | 32.708333 | 290 | 0.677707 |
0d114e80997cc751e02cc717f894784c5bbb260f | 9,912 | py | Python | appimagebuilder/app_dir/deploy/apt/venv.py | anupam-git/appimage-builder | 044644946e34435b5a1db1c9d4c59641b56bcb71 | [
"MIT"
] | null | null | null | appimagebuilder/app_dir/deploy/apt/venv.py | anupam-git/appimage-builder | 044644946e34435b5a1db1c9d4c59641b56bcb71 | [
"MIT"
] | null | null | null | appimagebuilder/app_dir/deploy/apt/venv.py | anupam-git/appimage-builder | 044644946e34435b5a1db1c9d4c59641b56bcb71 | [
"MIT"
] | null | null | null | # Copyright 2020 Alexis Lopez Zubieta
#
# 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, ... | 36.847584 | 99 | 0.609262 |
84f3c6661549303c63945b738e354e05cc7cc546 | 331 | py | Python | run_tests.py | bibikar/optimizations_bench | 683767e7caaae804f95220feee5a76b016199d21 | [
"MIT"
] | 3 | 2017-05-10T11:09:17.000Z | 2019-05-14T14:04:19.000Z | run_tests.py | bibikar/optimizations_bench | 683767e7caaae804f95220feee5a76b016199d21 | [
"MIT"
] | 4 | 2017-04-15T12:03:23.000Z | 2019-07-25T18:01:57.000Z | run_tests.py | bibikar/optimizations_bench | 683767e7caaae804f95220feee5a76b016199d21 | [
"MIT"
] | 4 | 2017-04-15T12:07:42.000Z | 2020-04-16T01:36:19.000Z | # Copyright (C) 2017 Intel Corporation
#
# SPDX-License-Identifier: MIT
import os
# warning: this is sanity test for Travis CI. The arguments are really bad for real perf testing, use default arguments instead
os.system('miniconda3/envs/intel3/bin/python numpy/umath/umath_mem_bench.py -v --size 10 --goal-time 0.01 --r... | 41.375 | 127 | 0.767372 |
8d472d718e6c7e753b6e95b5164381428cacd139 | 1,124 | py | Python | multi_goal_pure_pursuit/scripts/datacollector_update_rate.py | szenergy/szenergy-path-tracking | 83cccd326d9999234e289507e35e65531a86bed9 | [
"MIT"
] | null | null | null | multi_goal_pure_pursuit/scripts/datacollector_update_rate.py | szenergy/szenergy-path-tracking | 83cccd326d9999234e289507e35e65531a86bed9 | [
"MIT"
] | null | null | null | multi_goal_pure_pursuit/scripts/datacollector_update_rate.py | szenergy/szenergy-path-tracking | 83cccd326d9999234e289507e35e65531a86bed9 | [
"MIT"
] | null | null | null | import rospy
from std_msgs.msg import Float64
class TimeOfCalcDataCollector():
def cbTimeOfCalc(self, data):
if (not self.initialized):
self.avg_time_of_calc = data.data
self.max_time_of_calc = data.data
self.initialized = True
else:
self.avg_time_of_... | 34.060606 | 115 | 0.672598 |
13c64a4b8de2167859b65a731b92ef08c2837bab | 1,197 | py | Python | Curso Udemy 2022/Curso_Luiz_Otavio/Calculadora simples.py | Matheusfarmaceutico/Exercicios-Python | d1821bd9d11ea0707074c5fe11dead2e85476ebd | [
"MIT"
] | null | null | null | Curso Udemy 2022/Curso_Luiz_Otavio/Calculadora simples.py | Matheusfarmaceutico/Exercicios-Python | d1821bd9d11ea0707074c5fe11dead2e85476ebd | [
"MIT"
] | null | null | null | Curso Udemy 2022/Curso_Luiz_Otavio/Calculadora simples.py | Matheusfarmaceutico/Exercicios-Python | d1821bd9d11ea0707074c5fe11dead2e85476ebd | [
"MIT"
] | null | null | null | program_name = "Matheus's Calculator"
print(f'{program_name:#^30}')
numeric_operator = ''
sair = ''
while True:
try:
number_1 = float(input('Enter a number:'))
except:
print('Invalid character')
continue
try:
number_2 = float(input('Enter another number: '))
except:
... | 37.40625 | 106 | 0.609858 |
bbf3aee87a9c9d0443224b5b01a96cdd4c6648fd | 11,309 | py | Python | Model/model.py | JoshuaMeza/SupportBot | 72fae97b7237d1a86591ca7a35077e8e080308c6 | [
"MIT"
] | null | null | null | Model/model.py | JoshuaMeza/SupportBot | 72fae97b7237d1a86591ca7a35077e8e080308c6 | [
"MIT"
] | null | null | null | Model/model.py | JoshuaMeza/SupportBot | 72fae97b7237d1a86591ca7a35077e8e080308c6 | [
"MIT"
] | null | null | null | import discord
from Model.fileHandler import *
from Model.guildNode import *
class Model:
def __init__(self):
self.errColor = discord.Colour.from_rgb(225, 7, 0)
self.defColor = discord.Colour.from_rgb(0, 239, 134)
self.prefix = '!'
self.fileName = 'memory.json'
self.noInfoAn... | 29.297927 | 116 | 0.542577 |
ce0ba2bb6957285981cdacd1ee05dc2d93502a93 | 1,589 | py | Python | Lib/test/test_compiler/test_static/__init__.py | isabella232/cinder-1 | 428669a9a925287f192ab361226e5a8ca3fb74d9 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/test/test_compiler/test_static/__init__.py | isabella232/cinder-1 | 428669a9a925287f192ab361226e5a8ca3fb74d9 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/test/test_compiler/test_static/__init__.py | isabella232/cinder-1 | 428669a9a925287f192ab361226e5a8ca3fb74d9 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | # flake8: noqa
from .annotated import AnnotatedTests
from .array import ArrayTests
from .augassign import AugAssignTests
from .binop import BinopTests
from .cached_property import CachedPropertyTests
from .checked_list import CheckedListTests
from .classmethod import ClassMethodTests
from .compile import StaticCompilat... | 38.756098 | 61 | 0.874135 |
c5baf1f23910b53628729395d1f62a07e06679aa | 2,964 | py | Python | manage.py | ChenfengLiu/test_flask | b29dd2ca6e287dc268390c077b3ebcc581dde6b9 | [
"MIT"
] | null | null | null | manage.py | ChenfengLiu/test_flask | b29dd2ca6e287dc268390c077b3ebcc581dde6b9 | [
"MIT"
] | null | null | null | manage.py | ChenfengLiu/test_flask | b29dd2ca6e287dc268390c077b3ebcc581dde6b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import subprocess
from flask_migrate import Migrate
from flask_script import Manager, Shell, Server
from redis import Redis
from rq import Connection, Queue, Worker
from app import create_app, db
from app.models import Role, User
from config import Config
app = create_app(os.getenv('F... | 24.295082 | 74 | 0.655533 |
291e4e7da4e6b37b23fadadc81b01f8fd0fe38cd | 7,744 | py | Python | kubernetes/client/models/v1beta1_daemon_set.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_daemon_set.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_daemon_set.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 32.401674 | 281 | 0.617381 |
9009f843a5f16489df839fee65c62cff92369a8b | 3,164 | py | Python | owtf/api/handlers/report.py | Lonewolf-Information-systems/owtf | 65355ce8bf4a4ea0177e24ee106f77e2f87c17fa | [
"BSD-3-Clause"
] | 1 | 2018-02-05T12:10:28.000Z | 2018-02-05T12:10:28.000Z | owtf/api/handlers/report.py | Lonewolf-Information-systems/owtf | 65355ce8bf4a4ea0177e24ee106f77e2f87c17fa | [
"BSD-3-Clause"
] | 2 | 2021-03-11T03:35:23.000Z | 2022-02-10T23:40:23.000Z | owtf/api/handlers/report.py | Lonewolf-Information-systems/owtf | 65355ce8bf4a4ea0177e24ee106f77e2f87c17fa | [
"BSD-3-Clause"
] | null | null | null | """
owtf.api.handlers.report
~~~~~~~~~~~~~~~~~~~~~
"""
import collections
from time import gmtime, strftime
from collections import defaultdict
import tornado.gen
import tornado.web
import tornado.httpclient
from owtf.lib import exceptions
from owtf.constants import RANKS
from owtf.lib.general import cprint
from ow... | 37.223529 | 123 | 0.658976 |
2b934459d5a51d3bf3d924c40b93951e25d938e8 | 19,631 | py | Python | tools/generate-gavgpool-test.py | yzhuo1992/XNNPACK | 980d8835025f18c1fac6339c52759f919e311494 | [
"BSD-3-Clause"
] | null | null | null | tools/generate-gavgpool-test.py | yzhuo1992/XNNPACK | 980d8835025f18c1fac6339c52759f919e311494 | [
"BSD-3-Clause"
] | null | null | null | tools/generate-gavgpool-test.py | yzhuo1992/XNNPACK | 980d8835025f18c1fac6339c52759f919e311494 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2020 Google LLC
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import codecs
import math
import os
import re
import sys
import yaml
sys.path.insert(0, os.path.dirname(os.path.abspath(... | 33.104553 | 132 | 0.618817 |
1e15b24e67ed3290ea4e367a1243147af991fb5e | 1,319 | py | Python | code/kittens/v2_initial_async/__init__.py | leesdolphin/await-kittens | 46582130f065594d9bb5df70b44b2b9217e30fb9 | [
"MIT"
] | null | null | null | code/kittens/v2_initial_async/__init__.py | leesdolphin/await-kittens | 46582130f065594d9bb5df70b44b2b9217e30fb9 | [
"MIT"
] | null | null | null | code/kittens/v2_initial_async/__init__.py | leesdolphin/await-kittens | 46582130f065594d9bb5df70b44b2b9217e30fb9 | [
"MIT"
] | null | null | null | from kittens.flickr_helpers import FlickrApiError, get_image_url_from_sizes, get_photo_data
from kittens import get_api_key
async def api_call(session, api_method, **api_params):
api_params.update(method=api_method, format='json',
nojsoncallback=1, api_key=get_api_key())
async with session.ge... | 36.638889 | 91 | 0.699014 |
d9e89989f24ddd8018772c7d57dea385966e9438 | 18,731 | py | Python | qcdb/textables.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | 1 | 2019-02-20T20:18:02.000Z | 2019-02-20T20:18:02.000Z | qcdb/textables.py | vivacebelles/qcdb | 5bbdcb5c833277647a36bb0a5982abb56bf29b20 | [
"BSD-3-Clause"
] | null | null | null | qcdb/textables.py | vivacebelles/qcdb | 5bbdcb5c833277647a36bb0a5982abb56bf29b20 | [
"BSD-3-Clause"
] | null | null | null | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | 51.743094 | 5,563 | 0.508515 |
68d53a779d05043fc578cdfd2640db98973a3e3e | 8,954 | py | Python | cat/cat_attn.py | mkmysk123456789/Informer2020 | ad4b895169a17db580aab6d2c09fd07e06c9b6fa | [
"Apache-2.0"
] | 1 | 2021-07-05T11:20:07.000Z | 2021-07-05T11:20:07.000Z | cat/cat_attn.py | mkmysk123456789/Informer2020 | ad4b895169a17db580aab6d2c09fd07e06c9b6fa | [
"Apache-2.0"
] | null | null | null | cat/cat_attn.py | mkmysk123456789/Informer2020 | ad4b895169a17db580aab6d2c09fd07e06c9b6fa | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from math import sqrt
from utils.masking import TriangularCausalMask, ProbMask, CAT_TriangularCausalMask
class CAT_FullAttention(nn.Module):
def __init__(self, mask_flag=False, factor=5, scale=None, attention_dropout=0.1, outp... | 35.391304 | 109 | 0.57237 |
a9c5d78d242e43886ee6a106a1f823fb1a187c38 | 23,498 | py | Python | pytorch-frontend/torch/onnx/symbolic_helper.py | AndreasKaratzas/stonne | 2915fcc46cc94196303d81abbd1d79a56d6dd4a9 | [
"MIT"
] | 40 | 2021-06-01T07:37:59.000Z | 2022-03-25T01:42:09.000Z | pytorch-frontend/torch/onnx/symbolic_helper.py | AndreasKaratzas/stonne | 2915fcc46cc94196303d81abbd1d79a56d6dd4a9 | [
"MIT"
] | 14 | 2021-06-01T11:52:46.000Z | 2022-03-25T02:13:08.000Z | pytorch-frontend/torch/onnx/symbolic_helper.py | AndreasKaratzas/stonne | 2915fcc46cc94196303d81abbd1d79a56d6dd4a9 | [
"MIT"
] | 7 | 2021-07-20T19:34:26.000Z | 2022-03-13T21:07:36.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
import torch
from torch._C import ListType
import warnings
from sys import maxsize as maxsize
import torch.onnx
# This import monkey-patches graph manipulation methods on Graph, used for the
# ONNX symbolics
import torch.onnx.utils
fr... | 39.033223 | 124 | 0.656992 |
12e8ed8443db816267cbff55ec17722d7c581a59 | 628 | bzl | Python | bazel/bbai_component.bzl | rnburn/stackext | 41ae025bd27d3738d6277b0d34843a83c77be36d | [
"Apache-2.0"
] | 27 | 2019-05-19T08:21:17.000Z | 2021-01-17T23:52:15.000Z | bazel/bbai_component.bzl | rnburn/bbai-lib | 3a985793c34857ede615092e1efc7934d6d49a5b | [
"Apache-2.0"
] | null | null | null | bazel/bbai_component.bzl | rnburn/bbai-lib | 3a985793c34857ede615092e1efc7934d6d49a5b | [
"Apache-2.0"
] | null | null | null | def bbai_cc_component(
name, with_test=True, test_deps=[], deps=[], impl_deps = [], **kwargs):
native.cc_library(
name = name,
hdrs = [
name + ".h",
],
srcs = [
name + ".cc",
],
deps = deps + impl_deps,
visibility = ["//visibility:public"],
**kwa... | 23.259259 | 75 | 0.437898 |
8941e2ac804d16238d68c8152d4e7509d02ee5dd | 3,356 | py | Python | courses/data-engineering/kubeflow-examples/mnist/testing/deploy_test.py | Joseph-ML/training-data-analyst | a96d73f0b9630935337bab7bb624da87160d1865 | [
"Apache-2.0"
] | null | null | null | courses/data-engineering/kubeflow-examples/mnist/testing/deploy_test.py | Joseph-ML/training-data-analyst | a96d73f0b9630935337bab7bb624da87160d1865 | [
"Apache-2.0"
] | 1 | 2022-02-07T16:03:53.000Z | 2022-02-07T16:21:03.000Z | courses/data-engineering/kubeflow-examples/mnist/testing/deploy_test.py | Joseph-ML/training-data-analyst | a96d73f0b9630935337bab7bb624da87160d1865 | [
"Apache-2.0"
] | null | null | null | """Test deploying the mnist model.
This file tests that we can deploy the model.
It is an integration test as it depends on having access to
a Kubeflow deployment to deploy on. It also depends on having a model.
Python Path Requirements:
kubeflow/testing/py - https://github.com/kubeflow/testing/tree/master/py
... | 32.582524 | 85 | 0.650477 |
1f3f1a64311e7e2caa7700e2e04026f696519bc5 | 410 | py | Python | s3-angular-website/python/cdk/s3_angular_website/s3_angular_website_stack.py | mttfarmer/serverless | e7b28421708cd4643ce61d28940357c3664ed2a8 | [
"MIT"
] | 1,627 | 2020-01-12T10:35:06.000Z | 2022-03-31T13:12:51.000Z | s3-angular-website/python/cdk/s3_angular_website/s3_angular_website_stack.py | mttfarmer/serverless | e7b28421708cd4643ce61d28940357c3664ed2a8 | [
"MIT"
] | 58 | 2020-02-09T06:57:35.000Z | 2022-02-26T23:25:10.000Z | s3-angular-website/python/cdk/s3_angular_website/s3_angular_website_stack.py | mttfarmer/serverless | e7b28421708cd4643ce61d28940357c3664ed2a8 | [
"MIT"
] | 240 | 2020-01-19T09:09:44.000Z | 2022-03-30T19:12:17.000Z | from aws_cdk import core
from spa_deploy import SPADeploy
class S3AngularWebsiteStack(core.Stack):
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
SPADeploy(self, 'S3AngularDeploy').create_basic_site(index_doc='index.html',
... | 37.272727 | 102 | 0.619512 |
bd9f0b91352dd2ef9f411ef0742efb955621cbcb | 17,607 | py | Python | pymatgen/io/abinit/netcdf.py | munrojm/pymatgen | 95514da2c1f4bd0ee897e657de768ca987fe05e9 | [
"MIT"
] | 921 | 2015-01-25T22:17:05.000Z | 2022-03-27T20:58:38.000Z | pymatgen/io/abinit/netcdf.py | munrojm/pymatgen | 95514da2c1f4bd0ee897e657de768ca987fe05e9 | [
"MIT"
] | 1,631 | 2015-01-05T21:05:04.000Z | 2022-03-31T18:40:17.000Z | pymatgen/io/abinit/netcdf.py | munrojm/pymatgen | 95514da2c1f4bd0ee897e657de768ca987fe05e9 | [
"MIT"
] | 851 | 2015-01-01T17:38:00.000Z | 2022-03-31T02:14:07.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
#
# pylint: disable=no-member
"""Wrapper for netCDF readers."""
import logging
import os.path
import warnings
from collections import OrderedDict
import numpy as np
from monty.collections import AttrDict
from ... | 35.143713 | 117 | 0.62106 |
0ce87a559f5a3ec832341fb68243d5efb5109f51 | 77 | py | Python | src/__init__.py | josipklaric/python-playground | 7f4e1da4e96de6df617d016864670bcb3f54a4c2 | [
"MIT"
] | 1 | 2019-02-13T05:52:06.000Z | 2019-02-13T05:52:06.000Z | src/__init__.py | josipklaric/python-playground | 7f4e1da4e96de6df617d016864670bcb3f54a4c2 | [
"MIT"
] | null | null | null | src/__init__.py | josipklaric/python-playground | 7f4e1da4e96de6df617d016864670bcb3f54a4c2 | [
"MIT"
] | 1 | 2020-02-11T05:30:14.000Z | 2020-02-11T05:30:14.000Z | #import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__))) | 77 | 77 | 0.766234 |
78d937e80fb7680d19eced0c856b4bc03c78dbbe | 571 | py | Python | info.py | luvl/unified-trading-framework | 3efd533beeb0a34b8bac0e7132981ab636d3719b | [
"MIT"
] | null | null | null | info.py | luvl/unified-trading-framework | 3efd533beeb0a34b8bac0e7132981ab636d3719b | [
"MIT"
] | null | null | null | info.py | luvl/unified-trading-framework | 3efd533beeb0a34b8bac0e7132981ab636d3719b | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
loc = "/home/linhdn/Developer/unified-framework-for-trading/data/stock-data/vnm-data.csv"
dat = pd.read_csv(loc)
print(dat.head())
print(len(dat['Close']))
plt.figure(figsize=(12,7))
plt.plot(range(1500), dat['Close'][:1500].values, color='b', label="Train set")
... | 35.6875 | 123 | 0.700525 |
e72fb0cff1af9f7e9e74beaaba2a7747d09aba5e | 1,069 | py | Python | part3.py | michaelyeg/cmput206lab1 | 25c1253f2076e750cda09aa855d7824a336a23c1 | [
"Apache-2.0"
] | null | null | null | part3.py | michaelyeg/cmput206lab1 | 25c1253f2076e750cda09aa855d7824a336a23c1 | [
"Apache-2.0"
] | null | null | null | part3.py | michaelyeg/cmput206lab1 | 25c1253f2076e750cda09aa855d7824a336a23c1 | [
"Apache-2.0"
] | null | null | null | import cv2, numpy as np
# from matplotlib import pyplot as plt
class image:
def __init__(self):
self.image = []
self.histogram = []
def loadgrayscale(self, filename):
self.image = cv2.imread(filename, 0)
def createhist(self):
if len(self.image) != 0:
self.hist... | 24.860465 | 88 | 0.637044 |
174bc750c603c1054eed164ecedf302fa8cbf72a | 5,972 | py | Python | storage.py | alicekre/Python_Muehle | 358fcc4c12319a0c9bb107fe6b2d432e31f3037d | [
"Apache-2.0"
] | null | null | null | storage.py | alicekre/Python_Muehle | 358fcc4c12319a0c9bb107fe6b2d432e31f3037d | [
"Apache-2.0"
] | null | null | null | storage.py | alicekre/Python_Muehle | 358fcc4c12319a0c9bb107fe6b2d432e31f3037d | [
"Apache-2.0"
] | null | null | null | #
# @author: Christian Birker
#
# storage module for the board game mill
# saves and loads games
#
import mill
import time
import json
import logging
# create logger for module
module_log = logging.getLogger('application.storage')
class Storage:
"""
The Storage class
Attributes:
filename (str):... | 28.990291 | 93 | 0.599464 |
06775e03a8d70bae0d733caf39fdce6557403011 | 204 | py | Python | src/genie/libs/parser/ios/show_run_ip_route.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/ios/show_run_ip_route.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/ios/show_run_ip_route.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | from genie.libs.parser.iosxe.show_run_ip_route import ShowRunIpRoute as ShowRunIpRoute__iosxe
class ShowRunIpRoute(ShowRunIpRoute__iosxe):
"""Parser for: show running-config | ^ip route"""
pass
| 29.142857 | 93 | 0.789216 |
8e6879a592be540f49e222b3cd67f95b1976d657 | 185 | py | Python | 5a. Favorable Odds.py | Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers | 231d17ad2224fc616c022b515bc14e78ec5822f9 | [
"MIT"
] | 1 | 2021-02-25T16:43:08.000Z | 2021-02-25T16:43:08.000Z | 5a. Favorable Odds.py | Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers | 231d17ad2224fc616c022b515bc14e78ec5822f9 | [
"MIT"
] | null | null | null | 5a. Favorable Odds.py | Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers | 231d17ad2224fc616c022b515bc14e78ec5822f9 | [
"MIT"
] | null | null | null | # Attack both ogres and grab the gem.
hero.moveRight()
hero.attack("Krug")
hero.attack("Krug")
hero.moveRight()
hero.moveUp()
hero.attack("Grump")
hero.attack("Grump")
hero.moveLeft(2)
| 18.5 | 37 | 0.72973 |
0dcbf33db57b9addc674c45ad4f24c7f56f53867 | 175 | py | Python | setup.py | NREL/K_Road | ec8049cf1b81c58dd3b95f8298a362d863cd4a68 | [
"BSD-3-Clause"
] | 1 | 2021-04-19T23:28:26.000Z | 2021-04-19T23:28:26.000Z | setup.py | NREL/K_Road | ec8049cf1b81c58dd3b95f8298a362d863cd4a68 | [
"BSD-3-Clause"
] | null | null | null | setup.py | NREL/K_Road | ec8049cf1b81c58dd3b95f8298a362d863cd4a68 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(name='cavs_environments',
version='0.0.1',
install_requires=['gym', 'pymunk', 'pygame', 'spinup'] # list dependencies
)
| 25 | 81 | 0.651429 |
0d022ae0ccc508eff5396d664707e754528aed21 | 173 | py | Python | pythonW3/fourteen.py | pouyapanahandeh/python3-ref | b8865ebb6da8065754a4df341cedfccdf3b3d2c5 | [
"MIT"
] | null | null | null | pythonW3/fourteen.py | pouyapanahandeh/python3-ref | b8865ebb6da8065754a4df341cedfccdf3b3d2c5 | [
"MIT"
] | null | null | null | pythonW3/fourteen.py | pouyapanahandeh/python3-ref | b8865ebb6da8065754a4df341cedfccdf3b3d2c5 | [
"MIT"
] | null | null | null | # Date function
import datetime
i = datetime.datetime.now()
print(i)
# also there is a lot of methods you can see at https://www.w3schools.com/python/python_datetime.asp | 21.625 | 100 | 0.757225 |
ea4292de7cf5cedb5b3ae53916a825188ffc20c5 | 852 | py | Python | codes/Constant.py | YasserDaho/Saliency-3DSal | 4a8ff399c8b24ccc88bb04311d6f9797d0cae2d1 | [
"MIT"
] | 2 | 2020-04-19T13:25:47.000Z | 2020-05-08T17:14:38.000Z | codes/Constant.py | YasserDaho/Saliency-3DSal | 4a8ff399c8b24ccc88bb04311d6f9797d0cae2d1 | [
"MIT"
] | null | null | null | codes/Constant.py | YasserDaho/Saliency-3DSal | 4a8ff399c8b24ccc88bb04311d6f9797d0cae2d1 | [
"MIT"
] | 1 | 2019-09-24T17:42:08.000Z | 2019-09-24T17:42:08.000Z | """""
Path to the Image Dataset directories
"""""
TR_IMG_DIR = './WORKSPACE/DATASET/annotation/'
GT_IMG_DIR = './WORKSPACE/DATASET/annotation/'
"""""
Path to Numpy Video directories
"""""
TR_VID_DIR = './WORKSPACE/DATA/TR_DATA/'
GT_VID_DIR = './WORKSPACE/DATA/GT_DATA/'
"""""
Path to Numpy batches directories
""""... | 17.75 | 57 | 0.676056 |
7622b05f17853a5db5cdd3ece20cb12e49cd03fe | 217 | py | Python | src/pretix/base/exporters/__init__.py | prereg/prereg | 5000c279a801fa2260009b15dd90e3bd4f447785 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/base/exporters/__init__.py | prereg/prereg | 5000c279a801fa2260009b15dd90e3bd4f447785 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/base/exporters/__init__.py | prereg/prereg | 5000c279a801fa2260009b15dd90e3bd4f447785 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from .answers import * # noqa
from .dekodi import * # noqa
from .invoices import * # noqa
from .json import * # noqa
from .mail import * # noqa
from .orderlist import * # noqa
from .waitinglist import * # noqa
| 27.125 | 34 | 0.677419 |
42e784db5430baacc9ae5e363b470d37d1891387 | 7,226 | py | Python | tests/model_fields/tests.py | Fak3/django | 1ae8014a0bbae0cc1d951c1ee0f7888b6141f582 | [
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2020-11-02T13:49:52.000Z | 2021-07-27T08:58:38.000Z | tests/model_fields/tests.py | Fak3/django | 1ae8014a0bbae0cc1d951c1ee0f7888b6141f582 | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2021-03-25T10:06:20.000Z | 2021-03-25T11:13:53.000Z | tests/model_fields/tests.py | Fak3/django | 1ae8014a0bbae0cc1d951c1ee0f7888b6141f582 | [
"PSF-2.0",
"BSD-3-Clause"
] | 145 | 2019-03-14T18:54:45.000Z | 2022-03-04T20:25:31.000Z | import pickle
from django import forms
from django.db import models
from django.test import SimpleTestCase, TestCase
from django.utils.functional import lazy
from .models import (
Bar, Foo, RenamedField, VerboseNameField, Whiz, WhizIter, WhizIterEmpty,
)
class Nested:
class Field(models.Field):
pass... | 37.247423 | 98 | 0.61943 |
57557a1f3462feef93363b0c8ec1316f70c95efd | 16,078 | py | Python | log_mito/model_208.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito/model_208.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito/model_208.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', 'BaxA'])
M... | 87.857923 | 710 | 0.803458 |
98a60c53249410258e27e16f17c6bf4773ac5726 | 2,550 | py | Python | tests/test_ops/test_merge_cells.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | 1 | 2022-03-18T02:41:11.000Z | 2022-03-18T02:41:11.000Z | tests/test_ops/test_merge_cells.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | null | null | null | tests/test_ops/test_merge_cells.py | BIGWangYuDong/mmcv | c46deb0576edaff5cd5a7d384c617478c7a73a70 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
"""
CommandLine:
pytest tests/test_merge_cells.py
"""
import torch
import torch.nn.functional as F
from mmcv.ops.merge_cells import (BaseMergeCell, ConcatCell, GlobalPoolingCell,
SumCell)
def test_sum_cell():
inputs_x = torch.r... | 38.059701 | 79 | 0.681569 |
88e7388647ceb12bfecc70f76c179c8b4f24b690 | 3,239 | py | Python | libqtile/widget/image.py | kiniou/qtile | da482ad27a9d14ef881b246ca11e4bf1c67368b2 | [
"MIT"
] | 1 | 2015-07-18T09:10:17.000Z | 2015-07-18T09:10:17.000Z | libqtile/widget/image.py | kiniou/qtile | da482ad27a9d14ef881b246ca11e4bf1c67368b2 | [
"MIT"
] | null | null | null | libqtile/widget/image.py | kiniou/qtile | da482ad27a9d14ef881b246ca11e4bf1c67368b2 | [
"MIT"
] | null | null | null | # Copyright (c) 2013 dequis
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 Adi Sieker
#
# 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 t... | 36.806818 | 79 | 0.670886 |
e39fb3073c6686bdbb91780f9b28f841d5511337 | 12,173 | py | Python | client/verta/tests/conftest.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | null | null | null | client/verta/tests/conftest.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | null | null | null | client/verta/tests/conftest.py | stefan-petrov-toptal/modeldb | a8a9b9da6ed964c91351230b2f0d2703c75794de | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import six
from six.moves import filterfalse
import datetime
import itertools
import os
import pickle
import random
import shutil
import string
import tempfile
import subprocess
import sys
import requests
import verta
from verta import Client
from verta._internal_utils import _utils
... | 24.297405 | 96 | 0.66705 |
26087a309c8fa6c9a4ebf2966b0a8417ddb33fb7 | 7,545 | py | Python | flink-ai-flow/ai_flow/test/airflow/test_dag_generator.py | MarvinMiao/flink-ai-extended | e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-12-12T15:21:05.000Z | 2020-12-12T15:21:05.000Z | flink-ai-flow/ai_flow/test/airflow/test_dag_generator.py | MarvinMiao/flink-ai-extended | e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-30T11:28:37.000Z | 2021-01-30T11:28:37.000Z | flink-ai-flow/ai_flow/test/airflow/test_dag_generator.py | MarvinMiao/flink-ai-extended | e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 49.638158 | 112 | 0.598144 |
9b1a99974731144f28f4b0f3f1c90fddc9fd9711 | 3,947 | py | Python | mkauthdocs/__main__.py | CTXz/mkauthdocs | 4a325fe098cd9b8007d5ba413df9b1bfc35be617 | [
"MIT"
] | 6 | 2020-06-09T15:29:10.000Z | 2021-12-15T11:32:32.000Z | mkauthdocs/__main__.py | CTXz/mkauthdocs | 4a325fe098cd9b8007d5ba413df9b1bfc35be617 | [
"MIT"
] | 2 | 2019-10-11T17:56:16.000Z | 2021-02-05T02:14:33.000Z | mkauthdocs/__main__.py | CTXz/mkauthdocs | 4a325fe098cd9b8007d5ba413df9b1bfc35be617 | [
"MIT"
] | 3 | 2020-03-09T06:22:19.000Z | 2022-02-05T21:10:46.000Z | # Copyright (c) 2018 Patrick Pedersen <ctx.xda@gmail.com>
# 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,... | 42.902174 | 140 | 0.655435 |
5925c199bd4a5b013a063616b05252848b5f5ed1 | 428 | py | Python | algorithms/strings/two_strings/prithaj.py | prithajnath/HackerRank | 4e28acd140d4ebc26db6fcf1dcaefb975a9cc3ae | [
"MIT"
] | 4 | 2017-09-11T13:21:17.000Z | 2018-02-02T03:18:26.000Z | algorithms/strings/two_strings/prithaj.py | prithajnath/HackerRank | 4e28acd140d4ebc26db6fcf1dcaefb975a9cc3ae | [
"MIT"
] | 10 | 2017-01-05T06:03:51.000Z | 2018-10-06T03:35:20.000Z | algorithms/strings/two_strings/prithaj.py | PlattsSEC/HackerRank | f8951c8cd1cd7f5b520d2c66e17e43b3729b8a80 | [
"MIT"
] | 8 | 2016-05-05T00:46:31.000Z | 2018-03-30T01:52:50.000Z | #!/bin/python
from itertools import combinations
def check_if_t(s):
chars = list(set(s))
return True if s == "".join([chars[i%2] for i in range(len(s))]) or s == "".join([chars[::-1][i%2] for i in range(len(s))]) else False
n = input()
s = raw_input()
chars = combinations(set(s),2)
try:
print max(map(len,... | 28.533333 | 138 | 0.609813 |
89ff59d6c51d98dfe4b3195329bff2ef9b64a28a | 2,587 | py | Python | MakeDifferntTypeDataSet.py | gyungchan2110/ImageUtils | 618d032122d6eadeec4afc9fc6c6906fa71f0ff6 | [
"MIT"
] | null | null | null | MakeDifferntTypeDataSet.py | gyungchan2110/ImageUtils | 618d032122d6eadeec4afc9fc6c6906fa71f0ff6 | [
"MIT"
] | null | null | null | MakeDifferntTypeDataSet.py | gyungchan2110/ImageUtils | 618d032122d6eadeec4afc9fc6c6906fa71f0ff6 | [
"MIT"
] | null | null | null | # In[]
import cv2
import numpy as np
import os
from operator import eq
import time
os.environ["CUDA_VISIBLE_DEVICES"]="0"
srcbase = "D:/[Data]/[Cardiomegaly]/1_ChestPA_Labeled_Baeksongyi/[PNG]_2_Generated_Data(2k)/Generated_Data_20180125_103950/Imgs"
dstbase = "D:/[Data]/[Cardiomegaly]/1_ChestPA_Labeled_Baekso... | 26.947917 | 131 | 0.645535 |
2849048b90ed4a3a67ef6992e347531ebb363cec | 1,672 | py | Python | app/suppliers/migrations/0002_auto_20210918_2129.py | swelanauguste/treasury_seo_system_1 | 13bb95156257652c235927a18bf70c92ab798f32 | [
"MIT"
] | null | null | null | app/suppliers/migrations/0002_auto_20210918_2129.py | swelanauguste/treasury_seo_system_1 | 13bb95156257652c235927a18bf70c92ab798f32 | [
"MIT"
] | null | null | null | app/suppliers/migrations/0002_auto_20210918_2129.py | swelanauguste/treasury_seo_system_1 | 13bb95156257652c235927a18bf70c92ab798f32 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-19 01:29
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('suppliers', '0001_initia... | 40.780488 | 180 | 0.622608 |
6f21f94b40dccbdb220804a30fb389d68312389c | 5,550 | py | Python | PyPortal_GCP_IOT_Planter/gcp_gfx_helper.py | AlabasterAxe/Adafruit_Learning_System_Guides | 2ee47890599f936c8d5d5efabcc785185512d233 | [
"MIT"
] | 3 | 2019-09-25T17:32:15.000Z | 2019-10-04T18:31:34.000Z | PyPortal_GCP_IOT_Planter/gcp_gfx_helper.py | AlabasterAxe/Adafruit_Learning_System_Guides | 2ee47890599f936c8d5d5efabcc785185512d233 | [
"MIT"
] | null | null | null | PyPortal_GCP_IOT_Planter/gcp_gfx_helper.py | AlabasterAxe/Adafruit_Learning_System_Guides | 2ee47890599f936c8d5d5efabcc785185512d233 | [
"MIT"
] | 1 | 2019-10-04T18:29:17.000Z | 2019-10-04T18:29:17.000Z | """
GFX Helper for PyPortal GCP IoT Plant Monitor
"""
import board
import displayio
import terminalio
from adafruit_display_text.label import Label
# the current working directory (where this file is)
cwd = ("/"+__file__).rsplit('/', 1)[0]
# GFX Font
font = terminalio.FONT
class Google_GFX(displayio.Group):
def... | 36.754967 | 91 | 0.613153 |
916e492cd614a6911d73be7671d5dcbd3e2c1f80 | 144 | py | Python | tf_metric_learning/utils/constants.py | Ximilar-com/tf-metric-learning | 74917e01a1c074da04046dbae89eb2b31b3e460b | [
"MIT"
] | 28 | 2020-09-03T16:14:31.000Z | 2021-12-22T05:45:16.000Z | tf_metric_learning/utils/constants.py | Ximilar-com/tf-metric-learning | 74917e01a1c074da04046dbae89eb2b31b3e460b | [
"MIT"
] | 1 | 2021-06-18T08:16:10.000Z | 2021-06-18T08:28:56.000Z | tf_metric_learning/utils/constants.py | Ximilar-com/tf-metric-learning | 74917e01a1c074da04046dbae89eb2b31b3e460b | [
"MIT"
] | 3 | 2020-10-03T04:30:33.000Z | 2021-07-08T01:27:02.000Z | ANCHOR = "anchor"
POSITIVE = "positive"
NEGATIVE = "negative"
EMBEDDINGS = "embeddings"
LABELS = "labels"
PREDICTION = "pred"
TARGET = "target"
| 18 | 25 | 0.708333 |
595cee26f3ecf21507563cabcc2affe54d56a9f4 | 3,341 | py | Python | tests/sentry/api/endpoints/test_organization_sentry_app_installation_details.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/api/endpoints/test_organization_sentry_app_installation_details.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | 1 | 2019-03-13T06:05:24.000Z | 2019-03-13T06:05:24.000Z | tests/sentry/api/endpoints/test_organization_sentry_app_installation_details.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import APITestCase
from sentry.testutils.helpers import with_feature
class SentryAppInstallationDetailsTest(APITestCase):
def setUp(self):
self.superuser = self.create_user(email='a@example.com', is... | 32.436893 | 83 | 0.641724 |
10e445240e832c584e3d50131d8d23325d7c0d8d | 193 | py | Python | src/app_config.py | saraikium/hush-hush | ede305c60c7f4bf6bc027c079c49947d35a3cee0 | [
"BSD-3-Clause"
] | null | null | null | src/app_config.py | saraikium/hush-hush | ede305c60c7f4bf6bc027c079c49947d35a3cee0 | [
"BSD-3-Clause"
] | 4 | 2021-10-31T10:41:48.000Z | 2021-12-19T12:20:33.000Z | src/app_config.py | saraikium/hush-hush | ede305c60c7f4bf6bc027c079c49947d35a3cee0 | [
"BSD-3-Clause"
] | 1 | 2021-12-18T20:32:05.000Z | 2021-12-18T20:32:05.000Z | import json
from dotenv import load_dotenv, find_dotenv
class AppConfig:
def __init__(self) -> None:
load_dotenv(find_dotenv())
f = open('config.json', 'r')
self.data = json.load(f)
| 16.083333 | 43 | 0.704663 |
2471de2d1fb93e36e9c73b1f57ea05024ea5a814 | 5,544 | py | Python | sdk/python/pulumi_azure_nextgen/appplatform/v20200701/custom_domain.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/appplatform/v20200701/custom_domain.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/appplatform/v20200701/custom_domain.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 44.352 | 342 | 0.654221 |
a5eb563aab9fa0e777dbb497c2b8d3e9d32a0a89 | 3,847 | py | Python | data/crime_data_scripts.py | edchrepo/project-team-11-pedestrians | 3d9c5b13cacb0f57dc7dc9736e453e7584f99b63 | [
"BSD-3-Clause"
] | 1 | 2021-03-19T15:16:17.000Z | 2021-03-19T15:16:17.000Z | data/crime_data_scripts.py | edchrepo/project-team-11-pedestrians | 3d9c5b13cacb0f57dc7dc9736e453e7584f99b63 | [
"BSD-3-Clause"
] | null | null | null | data/crime_data_scripts.py | edchrepo/project-team-11-pedestrians | 3d9c5b13cacb0f57dc7dc9736e453e7584f99b63 | [
"BSD-3-Clause"
] | 2 | 2019-11-05T19:12:49.000Z | 2019-12-22T11:27:14.000Z | import pandas as pd
import csv
import numpy as np
from datetime import datetime
import json
import os
from shapely.geometry import shape, Point
from fuzzywuzzy import process
## TODO implement string similarity for crime categories
## TODO reiterate through this data set once a week for discrepancies
## Aggregating L... | 36.292453 | 231 | 0.673772 |
1341fd7b2e698679eba17f2687213ece8e954811 | 1,692 | py | Python | tools/find_unused_blocks.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | 1 | 2021-06-05T09:15:15.000Z | 2021-06-05T09:15:15.000Z | tools/find_unused_blocks.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | tools/find_unused_blocks.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | # Copyright (c) 2018-2020 Manfred Moitzi
# License: MIT License
import ezdxf
from ezdxf import recover
from pathlib import Path
def _find_unused_blocks(doc):
references = doc.query('INSERT')
# block names are case insensitive!
used_block_names = set(entity.dxf.name.lower() for entity in references)
#... | 31.333333 | 76 | 0.68026 |
37621c1ec9ba775ac5138f2d70d673d0f9a403fb | 53,619 | py | Python | python/ray/data/tests/test_dataset.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | null | null | null | python/ray/data/tests/test_dataset.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 24 | 2021-12-11T08:13:01.000Z | 2022-03-26T07:09:46.000Z | python/ray/data/tests/test_dataset.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | null | null | null | import os
import random
import requests
import shutil
import time
from unittest.mock import patch
import math
import numpy as np
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
import pytest
from fsspec.implementations.local import LocalFileSystem
import ray
from ray.tests.conftest import * # ... | 37.522043 | 79 | 0.596803 |
1741042e6c5b575c20ce03310d2ec952365c7c9d | 94,612 | py | Python | main.py | TangentFoxy/YeenerBot | 13a43b7fc22763a1aaff2fe312bca3db217a4845 | [
"MIT"
] | null | null | null | main.py | TangentFoxy/YeenerBot | 13a43b7fc22763a1aaff2fe312bca3db217a4845 | [
"MIT"
] | null | null | null | main.py | TangentFoxy/YeenerBot | 13a43b7fc22763a1aaff2fe312bca3db217a4845 | [
"MIT"
] | null | null | null | #!/usr/env/python3
# coding=utf-8
#
# This file is part of YeenerBot, licensed under MIT
#
# Copyright (c) 2018 Emily Lau
# Copyright (c) 2018 Sylvia van Os
#
# See LICENSE for more information
import configparser
import datetime
import io
import json
import logging
import random
import re
import threading
import time... | 43.519779 | 632 | 0.650689 |
9d7a0860abef20cd098b39768db0bd3e36a10485 | 16,086 | py | Python | binary/codec.py | uon-language/uon-parser | 666894cf4917d8da01512918a147882550382269 | [
"MIT"
] | 1 | 2020-05-29T06:47:16.000Z | 2020-05-29T06:47:16.000Z | binary/codec.py | Cell00phane/uon-parser | 666894cf4917d8da01512918a147882550382269 | [
"MIT"
] | 1 | 2020-07-16T08:19:08.000Z | 2020-07-16T08:19:08.000Z | binary/codec.py | uon-language/uon-parser | 666894cf4917d8da01512918a147882550382269 | [
"MIT"
] | null | null | null | import numpy as np
import struct
from uontypes.scalars.uon_bool import UonBoolean
from uontypes.scalars.uon_float import (
Float32, Float64, Float128
)
from uontypes.scalars.uon_integer import (
Integer32, Integer64, Integer128
)
from uontypes.scalars.uon_uint import (
Uint32, Uint64, Uint128
)
from uontyp... | 33.304348 | 79 | 0.705023 |
aaeccd799437ce25440df176a3a52ac0ddf525eb | 366 | py | Python | videospider/domains/easyvideo.py | Faianca/video-spider | b3b2e74302e326413f7b617caa8c423bd1f23e98 | [
"MIT"
] | null | null | null | videospider/domains/easyvideo.py | Faianca/video-spider | b3b2e74302e326413f7b617caa8c423bd1f23e98 | [
"MIT"
] | null | null | null | videospider/domains/easyvideo.py | Faianca/video-spider | b3b2e74302e326413f7b617caa8c423bd1f23e98 | [
"MIT"
] | null | null | null | __author__ = 'jmeireles'
import re, urllib
from fetcher import AbstractFetcher
class Fetcher(AbstractFetcher):
def fetch(self, url):
soup = self.requester.get(url)
test = re.search(r"(?<=url:\s)([\"'])(?P<url>https?.+)\1", soup.text)
if test is None:
return
return ur... | 24.4 | 77 | 0.612022 |
8966e3ea960dbc761b47f4c2c6f20ef241221304 | 7,897 | py | Python | tests/core/test_alloc.py | gameduell/simcompyl | d54b7fe297cfb843c1c36b52a3b1fee449d04e6e | [
"MIT"
] | 3 | 2019-05-29T12:28:37.000Z | 2019-06-24T07:19:06.000Z | tests/core/test_alloc.py | gameduell/simcompyl | d54b7fe297cfb843c1c36b52a3b1fee449d04e6e | [
"MIT"
] | 3 | 2019-05-13T06:00:30.000Z | 2019-09-30T14:19:33.000Z | tests/core/test_alloc.py | gameduell/simcompyl | d54b7fe297cfb843c1c36b52a3b1fee449d04e6e | [
"MIT"
] | null | null | null | import simcompyl as sim
from simcompyl.core.alloc import Param, Alloc
import pytest
from collections import Counter
def test_alloc():
class Foo(sim.Allocation):
s = sim.Param("string", 'a string')
n = sim.Param("number", 42, descr="A natural number", options=(1, None))
class Bar(sim.Allocati... | 25.392283 | 80 | 0.546283 |
f090070e9fea9d1533923d5f0e112b6b6d672fcc | 3,383 | py | Python | yt_dlp/extractor/gaythebest.py | atgarcia78/yt-dlp | 70e59f1456b244e549bcd9f39744c70fb53b6cbb | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/gaythebest.py | atgarcia78/yt-dlp | 70e59f1456b244e549bcd9f39744c70fb53b6cbb | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/gaythebest.py | atgarcia78/yt-dlp | 70e59f1456b244e549bcd9f39744c70fb53b6cbb | [
"Unlicense"
] | 1 | 2022-03-25T21:51:45.000Z | 2022-03-25T21:51:45.000Z | from __future__ import unicode_literals
import threading
from .commonwebdriver import SeleniumInfoExtractor
from ..utils import (
ExtractorError,
sanitize_filename,
int_or_none,
std_headers
)
import httpx
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.commo... | 27.064 | 120 | 0.469997 |
4228fefb2841902958417e774424574dd44c098e | 3,009 | py | Python | grr/client/setup.py | syth3/grr | 0e03976c5c5b694c210c0f392581364ddefa1f4b | [
"Apache-2.0"
] | null | null | null | grr/client/setup.py | syth3/grr | 0e03976c5c5b694c210c0f392581364ddefa1f4b | [
"Apache-2.0"
] | 3 | 2020-06-18T15:33:21.000Z | 2022-03-02T08:51:18.000Z | grr/client/setup.py | suraj-testing2/Plants_Book | b6254df20850d0a3f4b5ee2ae12f38d7063b7c14 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Lint as: python3
"""This is the setup.py file for the GRR client.
This is just a meta-package which pulls in the minimal requirements to create a
client.
This package needs to stay simple so that it can be installed on windows and
ancient versions of linux to build clients.
"""
from __future__... | 29.5 | 80 | 0.692589 |
53828f057eedc1698527d5e787932c7428567a13 | 1,754 | py | Python | django_event/migrations/0001_initial.py | ailove-dev/django-event | 2d82cee0b3b86209850cbb6e382d597d2624251d | [
"MIT"
] | 3 | 2015-08-31T00:46:12.000Z | 2017-12-13T01:32:32.000Z | django_event/migrations/0001_initial.py | ailove-dev/django-event | 2d82cee0b3b86209850cbb6e382d597d2624251d | [
"MIT"
] | 8 | 2015-01-20T12:27:24.000Z | 2015-05-29T12:29:53.000Z | django_event/migrations/0001_initial.py | ailove-dev/django-event | 2d82cee0b3b86209850cbb6e382d597d2624251d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 40.790698 | 114 | 0.575257 |
9abacff40d7c8a5e6efc92ad8807733f7098f375 | 2,543 | py | Python | accelbyte_py_sdk/api/iam/wrappers/_sso.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/iam/wrappers/_sso.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/iam/wrappers/_sso.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# pylint: disable=duplicate-code
# pylint: disable=li... | 36.328571 | 147 | 0.770743 |
efaf44bfefd3587996c543cfe02b32baa5f032ec | 29,011 | py | Python | lingvo/core/conformer_layer_test.py | lukasbindreiter/lingvo | d6f2e6901fadc8440a9e6222ac54b68a8b6faf02 | [
"Apache-2.0"
] | 1 | 2021-04-18T18:17:02.000Z | 2021-04-18T18:17:02.000Z | lingvo/core/conformer_layer_test.py | lukasbindreiter/lingvo | d6f2e6901fadc8440a9e6222ac54b68a8b6faf02 | [
"Apache-2.0"
] | null | null | null | lingvo/core/conformer_layer_test.py | lukasbindreiter/lingvo | d6f2e6901fadc8440a9e6222ac54b68a8b6faf02 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2020 The TensorFlow 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 ... | 36.26375 | 80 | 0.633415 |
f6506f723a1f70b44b397c969af9324f9d873641 | 1,493 | py | Python | run/runSS_Prec.py | huppd/PINTimpact | 766b2ef4d2fa9e6727965e48a3fba7b752074850 | [
"MIT"
] | null | null | null | run/runSS_Prec.py | huppd/PINTimpact | 766b2ef4d2fa9e6727965e48a3fba7b752074850 | [
"MIT"
] | null | null | null | run/runSS_Prec.py | huppd/PINTimpact | 766b2ef4d2fa9e6727965e48a3fba7b752074850 | [
"MIT"
] | null | null | null | import os
import numpy as np
import platform_paths as pp
EXE = 'stat_stokes'
EXE = 'peri_stokes'
sol = 'GMRES'
#sol='GCRODR'
os.chdir(pp.EXE_PATH)
os.system('make -j4')
woms = np.array([0.01, 0.05, 0.1, 0.5, 1., 5, 10., 50, 100., 225])
woms = 10**np.linspace(-1, 2, 5)
oms = woms
CASE_PATH = ['']*3
for i in rang... | 33.177778 | 102 | 0.584729 |
6970ee06599d31637fd72367a5e0083e91070f5c | 6,353 | py | Python | tests/test_sqlcommon.py | sasano8/sqlcommon | 2f145a826d6c8958af1230dcee52da457461c3f9 | [
"MIT"
] | null | null | null | tests/test_sqlcommon.py | sasano8/sqlcommon | 2f145a826d6c8958af1230dcee52da457461c3f9 | [
"MIT"
] | null | null | null | tests/test_sqlcommon.py | sasano8/sqlcommon | 2f145a826d6c8958af1230dcee52da457461c3f9 | [
"MIT"
] | null | null | null | import pytest
from lark.exceptions import UnexpectedCharacters as _UnexpectedCharacters
from sqlcommon import get_parser
# http://teiid.github.io/teiid-documents/9.0.x/content/reference/BNF_for_SQL_Grammar.html
def UnexpectedCharacters():
return _UnexpectedCharacters(" ", 0, 0, 0)
@pytest.fixture(scope="sessi... | 30.543269 | 99 | 0.524004 |
8d02dbd3562d346ea58b3a00f6d053a2039c85bc | 16,889 | py | Python | orchid_python_api/examples/low_level/auto_pick_and_create_stage_attribute.py | Reveal-Energy-Services/orchid | 4c177ac5a511a80a3588ab8da873fc2d74358da8 | [
"Apache-2.0"
] | null | null | null | orchid_python_api/examples/low_level/auto_pick_and_create_stage_attribute.py | Reveal-Energy-Services/orchid | 4c177ac5a511a80a3588ab8da873fc2d74358da8 | [
"Apache-2.0"
] | null | null | null | orchid_python_api/examples/low_level/auto_pick_and_create_stage_attribute.py | Reveal-Energy-Services/orchid | 4c177ac5a511a80a3588ab8da873fc2d74358da8 | [
"Apache-2.0"
] | null | null | null | #
# This file is part of Orchid and related technologies.
#
# Copyright (c) 2017-2022 Reveal Energy Services. All Rights Reserved.
#
# LEGAL NOTICE:
# Orchid contains trade secrets and otherwise confidential information
# owned by Reveal Energy Services. Access to and use of this information is
# strictly limited and... | 40.501199 | 122 | 0.723133 |
07dafd9d43f0b2f6d5158d8a97425af357a6aea6 | 15,590 | py | Python | darling_ansible/python_venv/lib/python3.7/site-packages/oci/container_engine/models/node_pool.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | null | null | null | darling_ansible/python_venv/lib/python3.7/site-packages/oci/container_engine/models/node_pool.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | null | null | null | darling_ansible/python_venv/lib/python3.7/site-packages/oci/container_engine/models/node_pool.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | 1 | 2020-06-25T03:12:58.000Z | 2020-06-25T03:12:58.000Z | # coding: utf-8
# Copyright (c) 2016, 2020, 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... | 29.085821 | 245 | 0.619243 |
e5850a9211e00f3a6740f0315a5568a33ad65d01 | 14,090 | py | Python | deepchem/data/data_loader.py | sebastiano-saccani/deepchem | 7b4d20413ec067c4d736b33be7932f6bcae2f835 | [
"MIT"
] | null | null | null | deepchem/data/data_loader.py | sebastiano-saccani/deepchem | 7b4d20413ec067c4d736b33be7932f6bcae2f835 | [
"MIT"
] | null | null | null | deepchem/data/data_loader.py | sebastiano-saccani/deepchem | 7b4d20413ec067c4d736b33be7932f6bcae2f835 | [
"MIT"
] | null | null | null | """
Process an input dataset into a format suitable for machine learning.
"""
from __future__ import division
from __future__ import unicode_literals
import os
import gzip
import pandas as pd
import numpy as np
import csv
import numbers
import tempfile
import time
import sys
from deepchem.utils.save import log
from dee... | 32.997658 | 96 | 0.677502 |
7f88037a0c75e395ea925842bf2a07133a33d6a3 | 3,686 | py | Python | sdk/lusid/models/upsert_credit_support_annex_request.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | sdk/lusid/models/upsert_credit_support_annex_request.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | sdk/lusid/models/upsert_credit_support_annex_request.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3192
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class UpsertCreditSupportAnnexRequest(object):
"""N... | 29.488 | 116 | 0.607434 |
dd3f9cd7bb1c00df8b8c845e7a1d6552e2c5c46b | 309 | py | Python | test0.py | ritaaylward/raec | 684f83dcb2a619ac1934ae64fe8a2945a608e1fe | [
"MIT"
] | null | null | null | test0.py | ritaaylward/raec | 684f83dcb2a619ac1934ae64fe8a2945a608e1fe | [
"MIT"
] | null | null | null | test0.py | ritaaylward/raec | 684f83dcb2a619ac1934ae64fe8a2945a608e1fe | [
"MIT"
] | null | null | null | """
This code is to test calling a function.
"""
import numpy as np # do imports first
def my_fun(x): # function to compute the sine of the square
y = np.sin(x**2)
return y
for xx in np.linspace(0, 2*np.pi, 12):
yy = my_fun(xx)
print('x = %0.2f, y = %0.2f' % (xx, yy))
# that's it!
| 19.3125 | 59 | 0.582524 |
ac07ebb7d6a37d4e5e82058ef37d1371dc67b125 | 9,449 | py | Python | code_commands.py | hunternotes/tinyshell | c0f7888762927ccdeb153e3672a70b049dc59242 | [
"RSA-MD"
] | null | null | null | code_commands.py | hunternotes/tinyshell | c0f7888762927ccdeb153e3672a70b049dc59242 | [
"RSA-MD"
] | null | null | null | code_commands.py | hunternotes/tinyshell | c0f7888762927ccdeb153e3672a70b049dc59242 | [
"RSA-MD"
] | 1 | 2022-03-21T18:45:01.000Z | 2022-03-21T18:45:01.000Z | ## Title: code_commands.py
## Author: Joe Vest
## Description: Webshell code and commands references
import base64
def remote_command(language, cmd_type, mode, rsp_header, rsp_footer, command):
"""
language Webshell language
cmd_type Command type
mode Traffic Encodi... | 49.213542 | 359 | 0.508731 |
040ce4ca9c038e06849c1dec86f0a81f3170cda2 | 3,844 | py | Python | data/external/repositories/255834/cooking-master/utils.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/255834/cooking-master/utils.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/255834/cooking-master/utils.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | from functools import reduce
import pandas as pd
import numpy as np
from sklearn.preprocessing import LabelEncoder
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.cross_validation import StratifiedKFold
class Data:
def __init__(self, test=False):
data = pd.read_j... | 40.463158 | 77 | 0.626171 |
3130cbf458467acfc70d38a438aa845c40584469 | 5,172 | py | Python | python/paddle/fluid/tests/unittests/hybrid_parallel_pp_layer.py | lijunming1234/Paddle | 42aad3045fba7d790a6a21224cbbe16464466eca | [
"Apache-2.0"
] | 1 | 2021-04-28T13:47:27.000Z | 2021-04-28T13:47:27.000Z | python/paddle/fluid/tests/unittests/hybrid_parallel_pp_layer.py | lijunming1234/Paddle | 42aad3045fba7d790a6a21224cbbe16464466eca | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/hybrid_parallel_pp_layer.py | lijunming1234/Paddle | 42aad3045fba7d790a6a21224cbbe16464466eca | [
"Apache-2.0"
] | 1 | 2021-06-17T06:52:01.000Z | 2021-06-17T06:52:01.000Z | # Copyright (c) 2021 PaddlePaddle 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 required by appli... | 34.711409 | 76 | 0.601508 |
78aa7e9c9bf445a84bae3e615d5b20c14439a69f | 11,064 | py | Python | tensorflow/python/ops/structured/structured_tensor_slice_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 7 | 2022-03-04T21:14:47.000Z | 2022-03-22T23:07:39.000Z | tensorflow/python/ops/structured/structured_tensor_slice_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 19 | 2021-12-28T12:44:55.000Z | 2022-01-13T08:11:28.000Z | tensorflow/python/ops/structured/structured_tensor_slice_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 1 | 2021-11-21T02:32:27.000Z | 2021-11-21T02:32:27.000Z | # Copyright 2019 The TensorFlow 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 required by applica... | 40.826568 | 80 | 0.671819 |
5bc7e81beea9706790ee15a3a7d187f9fb59687f | 32,459 | py | Python | ProjE_sigmoid.py | trishav96/projectData | 76fce3abeca930c6cda6f0cb43c43db2470afa16 | [
"MIT"
] | null | null | null | ProjE_sigmoid.py | trishav96/projectData | 76fce3abeca930c6cda6f0cb43c43db2470afa16 | [
"MIT"
] | null | null | null | ProjE_sigmoid.py | trishav96/projectData | 76fce3abeca930c6cda6f0cb43c43db2470afa16 | [
"MIT"
] | null | null | null | import argparse
import math
import os.path
import timeit
from multiprocessing import JoinableQueue, Queue, Process
import numpy as np
import tensorflow as tf
class ProjE:
@property
def n_entity(self):
return self.__n_entity
@property
def n_train(self):
return self.__train_triple.shap... | 46.838384 | 132 | 0.552451 |
bf0f6ed1529fcc90f785d0a6905b509eefb770ef | 2,218 | py | Python | shell/inject/Windowsx86/codecaveinjector.py | vasco2016/shellsploit-framework | 04eb4a0449acaba0b70c40a78c61a0d5e2527406 | [
"MIT"
] | 61 | 2017-06-13T13:48:38.000Z | 2022-03-02T17:43:45.000Z | shell/inject/Windowsx86/codecaveinjector.py | T0mcat3r/shellsploit-framework | 04eb4a0449acaba0b70c40a78c61a0d5e2527406 | [
"MIT"
] | null | null | null | shell/inject/Windowsx86/codecaveinjector.py | T0mcat3r/shellsploit-framework | 04eb4a0449acaba0b70c40a78c61a0d5e2527406 | [
"MIT"
] | 28 | 2017-08-15T05:38:27.000Z | 2020-12-31T03:39:38.000Z | from pefile import PE
from struct import pack
import os
import re
from random import randint
#REF : http://www.debasish.in/2013/06/injecting-shellcode-into-portable.html
#https://github.com/b3mb4m/PythonVIRUS/blob/master/BombermansLAB/CodeCave/finder.py
def covecavelenght( pe):
#pe = pefile.PE( exe)
db = ""
for ... | 28.805195 | 113 | 0.723174 |
007550aae7f1494d38896eb2a4d3d34d18405d7f | 2,788 | py | Python | src/tac/core/tacotron/models/modules/CBHG.py | stefantaubert/Tacotron-2 | 710a3b39b48147307fa8eef2c9f635562f48d49a | [
"MIT"
] | null | null | null | src/tac/core/tacotron/models/modules/CBHG.py | stefantaubert/Tacotron-2 | 710a3b39b48147307fa8eef2c9f635562f48d49a | [
"MIT"
] | null | null | null | src/tac/core/tacotron/models/modules/CBHG.py | stefantaubert/Tacotron-2 | 710a3b39b48147307fa8eef2c9f635562f48d49a | [
"MIT"
] | null | null | null | import tensorflow as tf
from src.tac.core.tacotron.models.modules.helpers import *
from src.tac.core.tacotron.models.modules.HighwayNet import HighwayNet
class CBHG:
def __init__(self, K, conv_channels, pool_size, projections, projection_kernel_size, n_highwaynet_layers, highway_units, rnn_units, bnorm, is_training, ... | 42.892308 | 164 | 0.754663 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.