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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
56dede1f84776abd68712b1bc66617088bc13c37 | 2,097 | py | Python | images/parse.py | pippinhio/image-recognition | 89569a0d66ae144d2f6e6f2d73a8577ef8b2272b | [
"MIT"
] | 1 | 2022-03-28T08:12:21.000Z | 2022-03-28T08:12:21.000Z | images/parse.py | pippinhio/image-recognition | 89569a0d66ae144d2f6e6f2d73a8577ef8b2272b | [
"MIT"
] | null | null | null | images/parse.py | pippinhio/image-recognition | 89569a0d66ae144d2f6e6f2d73a8577ef8b2272b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Run with e.g. ./parse.py franz
import sys
import os
import matplotlib.pyplot as plt
import numpy as np
import torch
import torchvision
import torchvision.transforms as transforms
def prepare_folder(category):
os.system("rm -rf %s" % category)
os.system("mkdir %s" % category)
def create... | 28.726027 | 106 | 0.65856 |
601f5518aadb6f8a53de564498a2114336bd08c5 | 357 | py | Python | books/common/response.py | jhgdike/books | dde36f4d419d1b3afb2c87c3509d7672d9c07c75 | [
"MIT"
] | null | null | null | books/common/response.py | jhgdike/books | dde36f4d419d1b3afb2c87c3509d7672d9c07c75 | [
"MIT"
] | 3 | 2022-03-09T03:53:43.000Z | 2022-03-09T03:53:48.000Z | books/common/response.py | jhgdike/books | dde36f4d419d1b3afb2c87c3509d7672d9c07c75 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from flask import jsonify
def json_success(data=''):
resp_json = {
'code': 0,
'data': data,
}
return jsonify(**resp_json)
def json_err(err, msg=''):
resp_json = {
'code': err,
'msg': msg or err.label,
... | 16.227273 | 39 | 0.565826 |
700510ac2d47dd8e8e96aa087011e4bba4a2d8d0 | 1,489 | py | Python | forceDAQ/_lib/polling_time_profile.py | raunaqbhirangi/pyForceDAQ | a2a41cd7a4a4f0afd178bc5555ba4e0540902d30 | [
"MIT"
] | 8 | 2016-06-27T12:07:14.000Z | 2022-03-29T08:59:44.000Z | forceDAQ/_lib/polling_time_profile.py | raunaqbhirangi/pyForceDAQ | a2a41cd7a4a4f0afd178bc5555ba4e0540902d30 | [
"MIT"
] | 1 | 2020-01-15T20:29:53.000Z | 2020-07-31T17:35:34.000Z | forceDAQ/_lib/polling_time_profile.py | raunaqbhirangi/pyForceDAQ | a2a41cd7a4a4f0afd178bc5555ba4e0540902d30 | [
"MIT"
] | 3 | 2020-01-14T18:31:39.000Z | 2022-03-25T05:56:40.000Z | from .timer import get_time
import numpy as np
class PollingTimeProfile(object):
def __init__(self, timing_range=10):
self._last = None
self._timing_range = 10
self._zero_cnt = 0
#self._zero_time_polling_frequency = {}
self.profile_frequency = np.array([0] * (timing_range ... | 29.78 | 75 | 0.567495 |
6d25e9ed91a52deabecb134a44b6f9eb4aad016a | 10,641 | py | Python | resources_monitor.py | Livioni/Cloud-Workflow-Scheduling-base-on-Deep-Reinforcement-Learning | eb246ebba160567277c9c1aa226e359f48629dac | [
"MIT"
] | 2 | 2022-03-03T08:52:14.000Z | 2022-03-11T02:27:57.000Z | resources_monitor.py | Livioni/Cloud-Workflow-Scheduling-base-on-Deep-Reinforcement-Learning | eb246ebba160567277c9c1aa226e359f48629dac | [
"MIT"
] | 1 | 2022-03-11T02:51:06.000Z | 2022-03-11T05:02:34.000Z | resources_monitor.py | Livioni/Cloud-Workflow-Scheduling-base-on-Deep-Reinforcement-Learning | eb246ebba160567277c9c1aa226e359f48629dac | [
"MIT"
] | null | null | null | import os
from datetime import datetime
import gym
import numpy as np
import torch
import torch.nn as nn
import xlwt
from torch.distributions import Categorical, MultivariateNormal
def initial_excel():
global worksheet, workbook
# xlwt 库将数据导入Excel并设置默认字符编码为ascii
workbook = xlwt.Workbook(encoding='ascii')
... | 34.436893 | 111 | 0.578235 |
8848857d911b4ab28453bc818aa1aab3174f531c | 2,317 | py | Python | backend/Models/Comment.py | HallWoodZhang/NEUTV_UWP | 6509c79b17c881ecc1247a18f93b256f70b5d077 | [
"MIT"
] | 1 | 2019-03-18T15:37:44.000Z | 2019-03-18T15:37:44.000Z | backend/Models/Comment.py | HallWoodZhang/NEUTV_UWP | 6509c79b17c881ecc1247a18f93b256f70b5d077 | [
"MIT"
] | 3 | 2018-04-16T01:33:30.000Z | 2018-05-04T01:52:00.000Z | backend/Models/Comment.py | HallWoodZhang/NEUTV_UWP | 6509c79b17c881ecc1247a18f93b256f70b5d077 | [
"MIT"
] | 3 | 2018-04-10T09:39:40.000Z | 2018-05-05T02:30:21.000Z | # encoding: utf-8
from __future__ import unicode_literals
import sqlite3
import web
from .Model import Model
class Comment(Model):
def __init__(self, channel_id = u'default', content = u'default', date = u'1111-11-11 00:00:00'):
self.channel_id = channel_id
self.content = content
self.da... | 31.310811 | 101 | 0.587829 |
1a4f232eaa685ad4b14da1056abfb7951f97d169 | 19,098 | py | Python | jax/_src/lib/xla_bridge.py | mkovaxx/jax | 7ce55684356253859928728c82916ac373e283f9 | [
"Apache-2.0"
] | 1 | 2020-01-13T18:55:49.000Z | 2020-01-13T18:55:49.000Z | jax/_src/lib/xla_bridge.py | mkovaxx/jax | 7ce55684356253859928728c82916ac373e283f9 | [
"Apache-2.0"
] | 6 | 2021-11-25T07:58:40.000Z | 2022-01-31T21:15:49.000Z | jax/_src/lib/xla_bridge.py | abattery/jax | 62c7744e68c66fae9faf9d8d00fea8aad4418cf3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.083495 | 96 | 0.716986 |
f9be8c78e39fdf74c899bd9190d5de7898efe2ff | 379 | py | Python | TestDemo/test1.py | XiMuYouZi/PythonDemo | 476d4d814338f37148bbf1504c0dd94a68f55a05 | [
"MIT"
] | null | null | null | TestDemo/test1.py | XiMuYouZi/PythonDemo | 476d4d814338f37148bbf1504c0dd94a68f55a05 | [
"MIT"
] | 1 | 2020-12-11T06:21:32.000Z | 2020-12-11T06:21:32.000Z | TestDemo/test1.py | XiMuYouZi/PythonDemo | 476d4d814338f37148bbf1504c0dd94a68f55a05 | [
"MIT"
] | null | null | null | import re
_matches = lambda url, regexs: any(r.search(url) for r in regexs)
url = 'https://book.douban.com/tag/BL?start=500&type=R>'
patten = re.compile(r'start=\d+\&type=')
allow_res = []
allow_res.append(patten)
def match(url, allow_res):
if allow_res and not _matches(url, allow_res):
return False
... | 19.947368 | 65 | 0.672823 |
c7207703f3fd93b06322e53c83ac35058ddc8ac4 | 4,467 | py | Python | contacts.py | MrInternauta/Python-CRUD-a-CSV | ebc9f92c5ed1537ce3330cafdc6c51ca4dfd14c4 | [
"MIT"
] | null | null | null | contacts.py | MrInternauta/Python-CRUD-a-CSV | ebc9f92c5ed1537ce3330cafdc6c51ca4dfd14c4 | [
"MIT"
] | null | null | null | contacts.py | MrInternauta/Python-CRUD-a-CSV | ebc9f92c5ed1537ce3330cafdc6c51ca4dfd14c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import csv
class Contact:
def __init__(self, name, phone, email):
self.name = name
self.phone = phone
self.email = email
class ContactBook:
def __init__(self):
self._contacts = []
def add(self, name, phone, email):
contact = Contact(name, pho... | 29.979866 | 77 | 0.49071 |
0ebd057e450e1f0162848fa8f312826c2100fc45 | 3,959 | py | Python | test-struts2.py | Cymmetria/StrutsHoneypot | 8be5370aa070d5fc39c48b2060d2513c5617525f | [
"MIT"
] | 74 | 2017-03-20T21:55:11.000Z | 2022-03-03T15:56:37.000Z | test-struts2.py | Cymmetria/StrutsHoneypot | 8be5370aa070d5fc39c48b2060d2513c5617525f | [
"MIT"
] | 1 | 2017-09-08T11:44:05.000Z | 2017-09-10T10:27:15.000Z | test-struts2.py | Cymmetria/StrutsHoneypot | 8be5370aa070d5fc39c48b2060d2513c5617525f | [
"MIT"
] | 21 | 2017-03-21T10:50:10.000Z | 2022-01-24T13:33:48.000Z | #!/usr/bin/python
import urllib2
import requests
import httplib
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
#uso: python script.py <url> "<command>"
def exploit_ct(url):
payload = "%{(#_='multipart/form-data')."
payl... | 37 | 152 | 0.687547 |
954b7a2b4ac5339d8353223b10e205ca8472d905 | 19,043 | py | Python | pypeln/process/api.py | sackh/pypeln | 4bbfb23d8fb7581e9c7511fdf4316e34b7a2a075 | [
"MIT"
] | 1 | 2020-07-22T18:19:21.000Z | 2020-07-22T18:19:21.000Z | pypeln/process/api.py | sackh/pypeln | 4bbfb23d8fb7581e9c7511fdf4316e34b7a2a075 | [
"MIT"
] | null | null | null | pypeln/process/api.py | sackh/pypeln | 4bbfb23d8fb7581e9c7511fdf4316e34b7a2a075 | [
"MIT"
] | null | null | null | """
The `process` module lets you create pipelines using objects from python's [multiprocessing](https://docs.python.org/3/library/multiprocessing.html) module according to Pypeln's general [architecture](https://cgarciae.github.io/pypeln/advanced/#architecture). Use this module when you are in need of true parallelism... | 34.560799 | 375 | 0.60899 |
b8f7f02ca721b2c2f8034f2d68772722f1c0f5ac | 592 | py | Python | earthshotsoil/env_data.py | qAp/earthshotsoil | 29386e80f4e0188cd69334d7ddb526d923732f14 | [
"Apache-2.0"
] | null | null | null | earthshotsoil/env_data.py | qAp/earthshotsoil | 29386e80f4e0188cd69334d7ddb526d923732f14 | [
"Apache-2.0"
] | null | null | null | earthshotsoil/env_data.py | qAp/earthshotsoil | 29386e80f4e0188cd69334d7ddb526d923732f14 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_environ_covariates.ipynb (unless otherwise specified).
__all__ = ['URLs', 'n', 'n']
# Cell
import os
from urlpath import URL
import easydict
import requests
import math
import numpy as np
import xarray as xr
import rioxarray
# Cell
URLs = easydict.EasyDict()
# Cell... | 22.769231 | 105 | 0.733108 |
b39dba5b4eab1c27a07e95bdff765b5c9c70885f | 4,381 | py | Python | airflow/providers/amazon/aws/sensors/glue_catalog_partition.py | augusto-herrmann/airflow | 7ee4295dd3f7dba4fcd763286c7823bb1707fe99 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2021-06-26T13:37:35.000Z | 2022-01-11T15:49:44.000Z | airflow/providers/amazon/aws/sensors/glue_catalog_partition.py | augusto-herrmann/airflow | 7ee4295dd3f7dba4fcd763286c7823bb1707fe99 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 33 | 2021-07-25T10:29:30.000Z | 2022-03-30T04:39:06.000Z | airflow/providers/amazon/aws/sensors/glue_catalog_partition.py | augusto-herrmann/airflow | 7ee4295dd3f7dba4fcd763286c7823bb1707fe99 | [
"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... | 38.429825 | 135 | 0.688884 |
8cab8cad858eaa54991104c33aa0adee1d6a9ee0 | 265 | py | Python | ex10.py | Ma-Min-Min/python-exercises | 1b0d63456d88b4750f89821782812becf4177375 | [
"MIT"
] | null | null | null | ex10.py | Ma-Min-Min/python-exercises | 1b0d63456d88b4750f89821782812becf4177375 | [
"MIT"
] | null | null | null | ex10.py | Ma-Min-Min/python-exercises | 1b0d63456d88b4750f89821782812becf4177375 | [
"MIT"
] | null | null | null | tabby_cat = "\tI'm tabbed in."
persian_cat = "\I'm split \non a line."
backslash_cat = "I'm \\ a \\ cat."
fat_cat = """
I'll do a list:
\t* Cat food
\t* Fishies
\t* Catnip\n\t* Grass
"""
print (tabby_cat)
print (persian_cat)
print (backslash_cat)
print (fat_cat)
| 16.5625 | 39 | 0.649057 |
e2e250ae8f857a236eb45b9a13ccca433ea81fc8 | 11,011 | py | Python | thonny/plugins/autocomplete.py | aroberge/thonny | 919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28 | [
"MIT"
] | null | null | null | thonny/plugins/autocomplete.py | aroberge/thonny | 919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28 | [
"MIT"
] | null | null | null | thonny/plugins/autocomplete.py | aroberge/thonny | 919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import messagebox
from thonny import get_runner, get_workbench
from thonny.codeview import CodeViewText
from thonny.common import InlineCommand
from thonny.shell import ShellText
# TODO: adjust the window position in cases where it's too close to bottom or right edge - but make sure... | 31.731988 | 130 | 0.593407 |
fc13e2f330dbcc1f63bbf4a3976928b70e6368a5 | 4,447 | py | Python | DataVisulization.py | Islanderrobotics/data-visulization | b3e66073b65554a0ffd63918a75c4e13bca591f8 | [
"MIT"
] | null | null | null | DataVisulization.py | Islanderrobotics/data-visulization | b3e66073b65554a0ffd63918a75c4e13bca591f8 | [
"MIT"
] | null | null | null | DataVisulization.py | Islanderrobotics/data-visulization | b3e66073b65554a0ffd63918a75c4e13bca591f8 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
from PyQt5 import QtWidgets
import math
import sys
class NotAnOpption(Exception):
pass
class NeedsToBeATuple(Exception):
pass
class MissingColumnNames(Exception):
pass
class DataVisulization:
def __init__(self, data = None,type_of_plot = "", column_v... | 37.686441 | 123 | 0.53969 |
7e9e8d89aaa35444aee0dc3a001cc53d16e8d4f9 | 16,346 | py | Python | scripts/ocof/filters/common.py | wolfram2012/ros_track_ssd | c98d54eb923e5bae5fde4abbedda2fe5ba716606 | [
"MIT"
] | null | null | null | scripts/ocof/filters/common.py | wolfram2012/ros_track_ssd | c98d54eb923e5bae5fde4abbedda2fe5ba716606 | [
"MIT"
] | null | null | null | scripts/ocof/filters/common.py | wolfram2012/ros_track_ssd | c98d54eb923e5bae5fde4abbedda2fe5ba716606 | [
"MIT"
] | null | null | null | # Copyright 2010, David S. Bolme, Colorado State University Research
# Foundation
#
# Colorado State University Software Evaluation License Agreement
#
# This license agreement ("License"), effective today, is made by and between
# you (hereinafter referred to as the "Licensee") and the Board of Governors of
# the C... | 38.28103 | 193 | 0.617643 |
b4640cd42f81db86c34b5fc2981d8d05cf3de419 | 1,229 | py | Python | src/ds/queue/queue_abc.py | MitraThakker/DataStructuresInPython | 96bd661821e5aa082caf55f027090f8a2c602158 | [
"MIT"
] | 2 | 2019-03-28T07:46:52.000Z | 2019-03-28T07:46:52.000Z | src/ds/queue/queue_abc.py | MitraThakker/DataStructuresInPython | 96bd661821e5aa082caf55f027090f8a2c602158 | [
"MIT"
] | null | null | null | src/ds/queue/queue_abc.py | MitraThakker/DataStructuresInPython | 96bd661821e5aa082caf55f027090f8a2c602158 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from src.errors import (
QueueOverflow,
QueueUnderflow
)
class Queue(ABC):
def __init__(self, capacity: int = 16):
self.__q = list()
self.capacity = capacity
@property
def q(self):
return self.__q
@abstractmethod
def enqueue(se... | 20.147541 | 43 | 0.57201 |
89ea0503d4c57583aafa4e13c30ce7035bb79660 | 73 | py | Python | location/__init__.py | ohahlev/ahlev-django-location | 7d6060ab7b21509f53790f5863b596f2b95c286a | [
"BSD-3-Clause"
] | null | null | null | location/__init__.py | ohahlev/ahlev-django-location | 7d6060ab7b21509f53790f5863b596f2b95c286a | [
"BSD-3-Clause"
] | null | null | null | location/__init__.py | ohahlev/ahlev-django-location | 7d6060ab7b21509f53790f5863b596f2b95c286a | [
"BSD-3-Clause"
] | null | null | null | __version__ = '0.0.1'
default_app_config = 'location.apps.LocationConfig' | 36.5 | 51 | 0.794521 |
b44012476dcbb844bbfc20d20557a77c55b1cc84 | 13,262 | py | Python | machine_learning/k_means_clust.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | machine_learning/k_means_clust.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | machine_learning/k_means_clust.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | """README, Author - Anurag Kumar(mailto:anuragkumarak95@gmail.com)
Requirements:
- sklearn
- numpy
- matplotlib
Python:
- 3.5
Inputs:
- X , a 2D numpy array of features.
- k , number of clusters to create.
- initial_centroids , initial centroid values generated by utility function(mentioned
... | 37.463277 | 89 | 0.57661 |
da66865ef4504b413d256162bc5ab22b217c46d1 | 4,451 | py | Python | dm_control/suite/wrappers/pixels.py | hzm2016/dm_control | c24ec9f5f3cb3c25c6571c89c9f60bf3350f5711 | [
"Apache-2.0"
] | 2 | 2019-02-14T23:41:45.000Z | 2022-02-10T04:08:44.000Z | dm_control/suite/wrappers/pixels.py | jiajunhua/deepmind-dm_control | c24ec9f5f3cb3c25c6571c89c9f60bf3350f5711 | [
"Apache-2.0"
] | 1 | 2019-03-02T13:37:17.000Z | 2019-03-02T13:37:17.000Z | dm_control/suite/wrappers/pixels.py | svikramank/dm_control | c24ec9f5f3cb3c25c6571c89c9f60bf3350f5711 | [
"Apache-2.0"
] | 1 | 2018-11-20T04:39:05.000Z | 2018-11-20T04:39:05.000Z | # Copyright 2017 The dm_control 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 applicable law or agreed to i... | 36.186992 | 80 | 0.722759 |
fefd085238abf72e3dddfcd2ba0f9969aea664cc | 7,104 | py | Python | kuka_arm/scripts/kinematics/kinematics.py | TheoKanning/RoboND-Kinematics-Project | f7c8d622b21db68174f4bb251ca3757a74d15db6 | [
"MIT"
] | null | null | null | kuka_arm/scripts/kinematics/kinematics.py | TheoKanning/RoboND-Kinematics-Project | f7c8d622b21db68174f4bb251ca3757a74d15db6 | [
"MIT"
] | null | null | null | kuka_arm/scripts/kinematics/kinematics.py | TheoKanning/RoboND-Kinematics-Project | f7c8d622b21db68174f4bb251ca3757a74d15db6 | [
"MIT"
] | null | null | null | import numpy as np
from sympy import symbols, cos, sin, pi, simplify, Transpose
from math import atan2, sqrt, acos
from sympy.matrices import Matrix
# Symbols
q1, q2, q3, q4, q5, q6, q7 = symbols('q1:8')
d1, d2, d3, d4, d5, d6, d7 = symbols('d1:8')
a0, a1, a2, a3, a4, a5, a6 = symbols('a0:7')
alpha0, alpha1, alpha2, a... | 31.856502 | 115 | 0.586149 |
113795df6298a28b96a9970379646d5627f1ba5e | 21,823 | py | Python | tensorflow/python/ops/string_ops.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 57 | 2017-09-03T07:08:31.000Z | 2022-02-28T04:33:42.000Z | tensorflow/python/ops/string_ops.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 58 | 2021-11-22T05:41:28.000Z | 2022-01-19T01:33:40.000Z | tensorflow/python/ops/string_ops.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 66 | 2020-05-15T10:05:12.000Z | 2022-02-14T07:28:18.000Z | # -*- coding: utf-8 -*-
# Copyright 2015 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
#
# Un... | 37.432247 | 100 | 0.680704 |
54ae8c29dc0b79ef643b52c18e7c2540f8426a26 | 147 | py | Python | test.py | cfreeman/hota-alinta | 70f07a853800bf051e17a51e099b9d8069a35561 | [
"Unlicense"
] | null | null | null | test.py | cfreeman/hota-alinta | 70f07a853800bf051e17a51e099b9d8069a35561 | [
"Unlicense"
] | null | null | null | test.py | cfreeman/hota-alinta | 70f07a853800bf051e17a51e099b9d8069a35561 | [
"Unlicense"
] | null | null | null | from gpiozero import LED
from time import sleep
led = LED(14)
while True:
led.on()
sleep(0.1)
led.off()
sleep(1)
| 13.363636 | 24 | 0.55102 |
a07c2964d8db6638677a8cff4f67c2d16ebc116d | 10,886 | py | Python | detectron2/modeling/postprocessing.py | sksmslhy/InstanceShadowDetection | 44f9910fb3e14bb03e0a30576021943bff8e4120 | [
"Apache-2.0"
] | 100 | 2020-06-10T08:34:20.000Z | 2022-03-28T17:08:46.000Z | detectron2/modeling/postprocessing.py | temperrain/InstanceShadowDetection | 1bcf911ba5dfdefbd22397409cd56e169040abe5 | [
"Apache-2.0"
] | 17 | 2020-06-12T13:13:42.000Z | 2022-03-12T00:34:37.000Z | detectron2/modeling/postprocessing.py | temperrain/InstanceShadowDetection | 1bcf911ba5dfdefbd22397409cd56e169040abe5 | [
"Apache-2.0"
] | 18 | 2020-06-20T04:05:53.000Z | 2022-03-01T06:58:47.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from torch.nn import functional as F
import math
import numpy as np
from detectron2.layers import paste_masks_in_image
from detectron2.structures import Boxes, BoxMode, Instances
import pysobatools.sobaeval as eval
def decode(segm):
return ev... | 34.55873 | 160 | 0.593331 |
1fc57994749a3a64e86cace471d7de063b4cdaca | 4,180 | py | Python | duetwebapi/api/dwc_api.py | AndyEveritt/DuetWebAPI | 7b4826b24716b7de6bd87f7ab1fcd1f8f4b3c3cd | [
"MIT"
] | 8 | 2021-01-28T16:29:12.000Z | 2022-03-27T04:15:01.000Z | duetwebapi/api/dwc_api.py | AndyEveritt/DuetWebAPI | 7b4826b24716b7de6bd87f7ab1fcd1f8f4b3c3cd | [
"MIT"
] | 1 | 2021-04-14T14:54:08.000Z | 2021-04-21T15:54:41.000Z | duetwebapi/api/dwc_api.py | AndyEveritt/DuetWebAPI | 7b4826b24716b7de6bd87f7ab1fcd1f8f4b3c3cd | [
"MIT"
] | 1 | 2021-02-05T03:40:50.000Z | 2021-02-05T03:40:50.000Z | import logging
import os
from typing import Dict, List, Union
from io import StringIO, TextIOWrapper, BytesIO
import requests
from .base import DuetAPI
class DWCAPI(DuetAPI):
"""
Duet Web Control REST API Interface.
Used with a Duet 2/3 in standalone mode.
Must use RRF3.
"""
api_name = 'DWC... | 32.913386 | 155 | 0.566029 |
73bb7606df83d72c9922408e611480a60d2e0717 | 3,036 | py | Python | contrib/linearize/linearize-hashes.py | RottenCoin/agouti | 745e1c8bffe286a517dff6d5ba69e39630e772e3 | [
"MIT"
] | 6 | 2018-10-31T10:43:13.000Z | 2021-05-02T15:41:26.000Z | contrib/linearize/linearize-hashes.py | RottenCoin/agouti | 745e1c8bffe286a517dff6d5ba69e39630e772e3 | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | RottenCoin/agouti | 745e1c8bffe286a517dff6d5ba69e39630e772e3 | [
"MIT"
] | 4 | 2018-09-18T15:42:38.000Z | 2019-10-27T19:02:53.000Z | #!/usr/bin/python
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import pri... | 26.631579 | 90 | 0.682477 |
680389e6a402a9694bd5e5c9ad07f1d8a0b920ba | 2,026 | py | Python | src/Python/qsharp-core/setup.py | jond01/iqsharp | 4324d1d6de03102edf5fd210b6f22655ee9b6fa2 | [
"MIT"
] | 115 | 2019-07-11T16:41:24.000Z | 2022-02-06T13:30:32.000Z | src/Python/qsharp-core/setup.py | jond01/iqsharp | 4324d1d6de03102edf5fd210b6f22655ee9b6fa2 | [
"MIT"
] | 346 | 2019-07-11T17:26:31.000Z | 2022-03-30T06:52:51.000Z | src/Python/qsharp-core/setup.py | jond01/iqsharp | 4324d1d6de03102edf5fd210b6f22655ee9b6fa2 | [
"MIT"
] | 50 | 2019-07-23T16:03:02.000Z | 2022-03-29T21:01:14.000Z | #!/bin/env python
# -*- coding: utf-8 -*-
##
# setup.py: Installs Python host functionality for Q#.
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
## IMPORTS ##
import setuptools
import os
## VERSION INFORMATION ##
# Our build process sets the PYTHON_VERSION envir... | 29.794118 | 87 | 0.699408 |
03074b875c107a69650d8885bf8e3b0d83c216f9 | 20,505 | py | Python | selfdrive/car/honda/interface.py | shoes22/openpilot | a965de3c96a53b67d106cfa775e3407db82dd0e1 | [
"MIT"
] | 53 | 2018-07-31T04:26:48.000Z | 2022-03-29T08:50:06.000Z | selfdrive/car/honda/interface.py | shoes22/openpilot | a965de3c96a53b67d106cfa775e3407db82dd0e1 | [
"MIT"
] | 47 | 2018-07-21T15:31:51.000Z | 2022-03-25T10:21:24.000Z | selfdrive/car/honda/interface.py | shoes22/openpilot | a965de3c96a53b67d106cfa775e3407db82dd0e1 | [
"MIT"
] | 124 | 2018-09-05T18:32:30.000Z | 2022-03-13T16:30:50.000Z | #!/usr/bin/env python3
from cereal import car
from panda import Panda
from common.numpy_fast import interp
from common.params import Params
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, HondaFlags, CAR, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_ALT_BRAKE_SIGNAL
from selfdrive.c... | 45.465632 | 163 | 0.674762 |
4a7b23dde1a5c9845c0a9350805145cd32c7dbf0 | 396 | py | Python | steelscript/steelhead/core/__init__.py | riverbed/steelscript-steelhead | 7158578f7ad97eaff9968b2aca82da2d322284ba | [
"MIT"
] | 3 | 2016-04-08T03:27:08.000Z | 2019-08-14T07:01:54.000Z | steelscript/steelhead/core/__init__.py | riverbed/steelscript-steelhead | 7158578f7ad97eaff9968b2aca82da2d322284ba | [
"MIT"
] | null | null | null | steelscript/steelhead/core/__init__.py | riverbed/steelscript-steelhead | 7158578f7ad97eaff9968b2aca82da2d322284ba | [
"MIT"
] | 3 | 2018-05-22T14:52:47.000Z | 2020-09-23T01:07:00.000Z | # Copyright (c) 2019 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License"). This software is distributed "AS IS"
# as set forth in the License.
"""
The SteelHead package offers a set of interfaces to control and work with
a S... | 28.285714 | 78 | 0.762626 |
cc423c2d3a5e722e189db55f69a7b391acde6dbf | 1,087 | py | Python | addons/account/models/res_users.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | addons/account/models/res_users.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | addons/account/models/res_users.py | jjiege/odoo | fd5b8ad387c1881f349d125cbd56433f4d49398f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, _
from odoo.exceptions import ValidationError
class Users(models.Model):
_inherit = "res.users"
@api.multi
@api.constrains('groups_id')
def _check_one_user_type(self):
... | 38.821429 | 111 | 0.620975 |
599f56583bc4faa499d44931c73abfb965a9026e | 16,081 | py | Python | code/model/mlp/logistic_sgd.py | fegonda/icon_demo | d2d1b0148989187c1433597f9c3ae4357178c082 | [
"MIT"
] | 92 | 2016-03-05T23:33:13.000Z | 2022-01-12T11:44:16.000Z | logistic_sgd.py | deepanjanroy/aml3 | e70999c77a8d4d9c40cdceb1168922e5cd5ea40d | [
"MIT"
] | 4 | 2016-06-03T14:07:19.000Z | 2018-11-18T14:04:57.000Z | logistic_sgd.py | deepanjanroy/aml3 | e70999c77a8d4d9c40cdceb1168922e5cd5ea40d | [
"MIT"
] | 46 | 2016-05-25T13:59:30.000Z | 2022-02-08T12:10:33.000Z | """
This tutorial introduces logistic regression using Theano and stochastic
gradient descent.
Logistic regression is a probabilistic, linear classifier. It is parametrized
by a weight matrix :math:`W` and a bias vector :math:`b`. Classification is
done by projecting data points onto a set of hyperplanes, the distance... | 36.714612 | 79 | 0.582551 |
5d4842c1e6e59a91e18bae3634209faf45079985 | 6,225 | py | Python | ciftify/bin/ciftify_meants.py | lgrennan/ciftify | 8488423bd081370614b676a2e1d1a8dbfd9aba1c | [
"MIT"
] | null | null | null | ciftify/bin/ciftify_meants.py | lgrennan/ciftify | 8488423bd081370614b676a2e1d1a8dbfd9aba1c | [
"MIT"
] | null | null | null | ciftify/bin/ciftify_meants.py | lgrennan/ciftify | 8488423bd081370614b676a2e1d1a8dbfd9aba1c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Produces a csv file mean voxel/vertex time series from a functional file <func>
within a seed mask <seed>.
Usage:
ciftify_meants [options] <func> <seed>
Arguments:
<func> functional data can be (nifti or cifti)
<seed> seed mask (nifti, cifti or gifti)
Options:
... | 36.403509 | 110 | 0.675823 |
981c68d18cfcc3f32b5687822cdb7f1db3df0edb | 3,505 | py | Python | demo/face_img_demo.py | ssumin6/buob | 4fb4537423a993cd2894f54cb12f5f3b3fb73141 | [
"Apache-2.0"
] | 367 | 2022-01-14T03:32:25.000Z | 2022-03-31T04:48:20.000Z | demo/face_img_demo.py | ssumin6/buob | 4fb4537423a993cd2894f54cb12f5f3b3fb73141 | [
"Apache-2.0"
] | 27 | 2022-01-27T07:12:49.000Z | 2022-03-31T04:31:13.000Z | demo/face_img_demo.py | ssumin6/buob | 4fb4537423a993cd2894f54cb12f5f3b3fb73141 | [
"Apache-2.0"
] | 53 | 2022-01-18T11:21:43.000Z | 2022-03-31T06:42:41.000Z | import os
from argparse import ArgumentParser
from mmpose.apis import (inference_top_down_pose_model, init_pose_model,
vis_pose_result)
try:
import face_recognition
has_face_det = True
except (ImportError, ModuleNotFoundError):
has_face_det = False
def process_face_det_results(f... | 30.215517 | 79 | 0.650214 |
072cf80dba250eb8e6807e736868104e759ce0a0 | 33,276 | py | Python | site-packages/sklearn/gaussian_process/_gpc.py | linusg/Pyto | eab3c3e093a8cace53d5b9425d1af2f535d456ee | [
"MIT"
] | 2 | 2020-08-25T13:55:00.000Z | 2020-08-25T16:36:03.000Z | site-packages/sklearn/gaussian_process/_gpc.py | linusg/Pyto | eab3c3e093a8cace53d5b9425d1af2f535d456ee | [
"MIT"
] | 1 | 2020-04-25T20:36:07.000Z | 2020-04-25T20:36:07.000Z | site-packages/sklearn/gaussian_process/_gpc.py | Wristlebane/Pyto | 901ac307b68486d8289105c159ca702318bea5b0 | [
"MIT"
] | null | null | null | """Gaussian processes classification."""
# Authors: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
#
# License: BSD 3 clause
from operator import itemgetter
import numpy as np
from scipy.linalg import cholesky, cho_solve, solve
import scipy.optimize
from scipy.special import erf, expit
from ..base import BaseEst... | 42.992248 | 79 | 0.617532 |
9fa5048233526e2d2c16a52a195f0721cc9bbea8 | 298 | py | Python | micone/pipelines/templates/otu_processing/export/biom2tsv.py | segrelab/MiCoNE | 91e0c5173293fc6584115036bba599097e4632da | [
"MIT"
] | 6 | 2020-09-23T20:07:13.000Z | 2021-04-20T22:10:07.000Z | micone/pipelines/templates/otu_processing/export/biom2tsv.py | segrelab/MiCoNE | 91e0c5173293fc6584115036bba599097e4632da | [
"MIT"
] | 36 | 2020-07-24T17:03:27.000Z | 2022-03-28T13:13:18.000Z | micone/pipelines/templates/otu_processing/export/biom2tsv.py | segrelab/MiCoNE | 91e0c5173293fc6584115036bba599097e4632da | [
"MIT"
] | 2 | 2020-06-07T23:17:39.000Z | 2021-03-28T15:04:19.000Z | #!/usr/bin/env python
from micone import Otu
def main(biom_file, base_name):
otu_biom = Otu.load_data(biom_file)
otu_biom.write(base_name=base_name, file_type="tsv")
if __name__ == "__main__":
BIOM_FILE = "${otu_file}"
BASE_NAME = "${tax_level}"
main(BIOM_FILE, BASE_NAME)
| 19.866667 | 56 | 0.691275 |
36dd41adef683dcf3b70cb3e1855492cb7786d09 | 762 | py | Python | spot_check_regression_algorithm_linear_regression.py | PacktPublishing/Machine-Learning-and-Data-Science-with-Python-A-Complete-Beginners-Guide | 1ffe8bbbd1963e5bea4a37a79dd87aa0d54b298f | [
"MIT"
] | 9 | 2019-12-23T22:25:11.000Z | 2022-02-25T14:54:43.000Z | spot_check_regression_algorithm_linear_regression.py | PacktPublishing/Machine-Learning-and-Data-Science-with-Python-A-Complete-Beginners-Guide | 1ffe8bbbd1963e5bea4a37a79dd87aa0d54b298f | [
"MIT"
] | 1 | 2019-09-22T14:05:42.000Z | 2020-12-31T11:55:42.000Z | spot_check_regression_algorithm_linear_regression.py | PacktPublishing/Machine-Learning-and-Data-Science-with-Python-A-Complete-Beginners-Guide | 1ffe8bbbd1963e5bea4a37a79dd87aa0d54b298f | [
"MIT"
] | 9 | 2019-08-01T22:54:08.000Z | 2022-01-05T13:57:17.000Z | # -*- coding: utf-8 -*-
"""
@author: abhilash
"""
# Cross Validation Regression MAE
from pandas import read_csv
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.linear_model import LinearRegression
filename = 'BostonHousing.csv'
names = ['CRIM', 'ZN', ... | 38.1 | 113 | 0.704724 |
9790eecd9b84a3146c5067028bd5cff041711070 | 1,413 | py | Python | src/pyrin/security/__init__.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/pyrin/security/__init__.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/pyrin/security/__init__.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
security package.
"""
import pyrin.application.services as application_services
from pyrin.packaging.base import Package
class SecurityPackage(Package):
"""
security package class.
"""
NAME = __name__
COMPONENT_NAME = 'security.component'
CONFIG_STORE_NAMES = ['s... | 35.325 | 90 | 0.577495 |
7327e9469b555c05baba7059e277643180491c33 | 2,361 | py | Python | meetbot/one.py | satyamx/meetbot | 90f1ace6be5135a9789e194484b69eaad3389f18 | [
"MIT"
] | 24 | 2021-01-20T20:49:15.000Z | 2022-03-27T16:44:51.000Z | meetbot/one.py | satyamx/meetbot | 90f1ace6be5135a9789e194484b69eaad3389f18 | [
"MIT"
] | 3 | 2022-01-27T03:53:08.000Z | 2022-01-27T23:15:34.000Z | meetbot/one.py | satyamx/meetbot | 90f1ace6be5135a9789e194484b69eaad3389f18 | [
"MIT"
] | 1 | 2022-01-27T09:06:21.000Z | 2022-01-27T09:06:21.000Z | from selenium import webdriver
import os
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException, Tim... | 35.772727 | 115 | 0.740364 |
5711e836cfe7b222b19312234efd389e9332d208 | 42,800 | py | Python | pytgf/logic/event.py | Youlixx/pytgf | ea0b5e45afb6da3368ef8e9f340dab26202caddb | [
"MIT"
] | 2 | 2020-07-07T00:23:29.000Z | 2021-03-16T18:42:04.000Z | pytgf/logic/event.py | Youlixx/pytgf | ea0b5e45afb6da3368ef8e9f340dab26202caddb | [
"MIT"
] | null | null | null | pytgf/logic/event.py | Youlixx/pytgf | ea0b5e45afb6da3368ef8e9f340dab26202caddb | [
"MIT"
] | null | null | null | """
Contains every class related to events and some basic key handlers
"""
import numpy
import json
class Event:
"""
The top level event type.
Any event that occurs in the game can be represented using an Event. It can represents the entity interactions with
the level, or the user external inputs. C... | 27.955585 | 120 | 0.593902 |
6bd69aefb8753456fe6243ada8bcc8b569036450 | 912 | py | Python | main/strings/validation/input_plus.py | catalinprescure/python-pages | 93df3b22df2cfa269127e803a1b6c6a34bae6745 | [
"MIT"
] | null | null | null | main/strings/validation/input_plus.py | catalinprescure/python-pages | 93df3b22df2cfa269127e803a1b6c6a34bae6745 | [
"MIT"
] | null | null | null | main/strings/validation/input_plus.py | catalinprescure/python-pages | 93df3b22df2cfa269127e803a1b6c6a34bae6745 | [
"MIT"
] | 1 | 2021-12-24T15:58:32.000Z | 2021-12-24T15:58:32.000Z | """Pyinputplus
Contains functions similar to input() for other kind of data:
number, date, email, adress
Pyinputplus is not part of the standard distribution.
pip install pyinputplus
Import as pyip save us from typing pyinputplus every time.
"""
import pyinputplus as pyip
response = pyip.inputNum('What is your age? '... | 30.4 | 65 | 0.674342 |
cb666a17551be48cc70883bb60cccf0da07f315b | 6,988 | py | Python | recipes/LibriSpeech/LM/train.py | anonymspeechbrain/speechbrain | 9a0632ddb066f5bceffb71fb971552fb542f7b7e | [
"Apache-2.0"
] | null | null | null | recipes/LibriSpeech/LM/train.py | anonymspeechbrain/speechbrain | 9a0632ddb066f5bceffb71fb971552fb542f7b7e | [
"Apache-2.0"
] | null | null | null | recipes/LibriSpeech/LM/train.py | anonymspeechbrain/speechbrain | 9a0632ddb066f5bceffb71fb971552fb542f7b7e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""Recipe for training a Language Model with librispeech train-960 transcript and lm_corpus.
To run this recipe, do the following:
> pip install datasets
> python train.py hparams/<hparam_file>.yaml --data_folder <local_path_to_librispeech_dataset>
Authors
* Anonymous
"""
import os
import sys
... | 32.807512 | 94 | 0.647825 |
2dbf49c3c682c3a675a48c9aad656349ff7f2784 | 12,478 | py | Python | pypy/module/zlib/interp_zlib.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/zlib/interp_zlib.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/zlib/interp_zlib.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | import sys
from pypy.interpreter.gateway import interp2app, unwrap_spec
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.typedef import TypeDef, interp_attrproperty
from pypy.interpreter.error import OperationError, oefmt
from rpython.rlib.rarithmetic import intmask, r_uint
from rpython.rlib.objec... | 35.050562 | 83 | 0.626543 |
446457d16d65753f9acb5e516d09fa9367eeddf3 | 3,847 | py | Python | tests/rbac/common/role/propose_admin_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | tests/rbac/common/role/propose_admin_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | tests/rbac/common/role/propose_admin_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 32.058333 | 88 | 0.706005 |
92d72026931063ce5b08b18abe6c3b3e04c42a13 | 2,429 | py | Python | AttendanceBot/discordbot.py | Aadityaprabu002/GoogleMeet_Attendance_Bot | 86aee5072d3c4035a051c51fe2c00e9c739e90af | [
"MIT"
] | 1 | 2021-11-28T17:43:39.000Z | 2021-11-28T17:43:39.000Z | AttendanceBot/discordbot.py | Aadityaprabu002/GoogleMeet_Attendance_Bot | 86aee5072d3c4035a051c51fe2c00e9c739e90af | [
"MIT"
] | null | null | null | AttendanceBot/discordbot.py | Aadityaprabu002/GoogleMeet_Attendance_Bot | 86aee5072d3c4035a051c51fe2c00e9c739e90af | [
"MIT"
] | null | null | null | from discord_webhook import DiscordWebhook
from discord_webhook import DiscordEmbed
URL = 'https://discord.com/api/webhooks/774702675114983466/ToCCEVBBr6R5deNpixqkSbIFM_Z_VAXeBDqP57c-iYumLVIiucrv9I4-BA-Dj8GqVoI2'
def send_start_details(SUBJECT,NAME):
webhook = DiscordWebhook(url = URL)
embed = DiscordEmbed(titl... | 44.981481 | 128 | 0.735282 |
3086520031a94358fd79da558b632ebb6cdec06c | 885 | py | Python | tests/clustering_system/corpus/test_FolderAggregatedBowNewsCorpora.py | vanam/clustering | 6e3d3ce7e60e31519b81547bc4afdf6ef3b0079f | [
"MIT"
] | 5 | 2019-05-28T15:45:46.000Z | 2020-10-05T17:48:27.000Z | tests/clustering_system/corpus/test_FolderAggregatedBowNewsCorpora.py | vanam/clustering | 6e3d3ce7e60e31519b81547bc4afdf6ef3b0079f | [
"MIT"
] | null | null | null | tests/clustering_system/corpus/test_FolderAggregatedBowNewsCorpora.py | vanam/clustering | 6e3d3ce7e60e31519b81547bc4afdf6ef3b0079f | [
"MIT"
] | 2 | 2019-07-16T14:13:19.000Z | 2020-11-23T01:53:44.000Z | import os
import tempfile
from gensim.corpora import Dictionary
from clustering_system.corpus.FolderAggregatedBowNewsCorpora import FolderAggregatedBowNewsCorpora
class TestFolderAggregatedBowNewsCorpora:
def test_create(self):
# Current directory
dir_path = os.path.dirname(os.path.realpath(__f... | 27.65625 | 101 | 0.662147 |
26a831742bba45b470c99fd19937852f548ebc95 | 25,611 | py | Python | src/unity/python/turicreate/toolkits/recommender/ranking_factorization_recommender.py | LeeCenY/turicreate | fb2f3bf313e831ceb42a2e10aacda6e472ea8d93 | [
"BSD-3-Clause"
] | null | null | null | src/unity/python/turicreate/toolkits/recommender/ranking_factorization_recommender.py | LeeCenY/turicreate | fb2f3bf313e831ceb42a2e10aacda6e472ea8d93 | [
"BSD-3-Clause"
] | null | null | null | src/unity/python/turicreate/toolkits/recommender/ranking_factorization_recommender.py | LeeCenY/turicreate | fb2f3bf313e831ceb42a2e10aacda6e472ea8d93 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
"""
Methods for performing doing matrix factorization and factorization machines
for... | 46.229242 | 105 | 0.640233 |
a5c6bf8b12b083488ccb5fddf9ee20aeaf816653 | 3,918 | py | Python | copilot/events/api_models.py | febsn/djangocms-copilot | e4b268ad522d972333b037ef8a1c317cc537da9e | [
"MIT"
] | null | null | null | copilot/events/api_models.py | febsn/djangocms-copilot | e4b268ad522d972333b037ef8a1c317cc537da9e | [
"MIT"
] | null | null | null | copilot/events/api_models.py | febsn/djangocms-copilot | e4b268ad522d972333b037ef8a1c317cc537da9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime, date
from copilot.conf import settings
from copilot.api import CopilotClient
from copilot.base_api_models import BaseApiManager
class EventManager(BaseApiManager):
ALL_ENDPOINT = 'events/'
ARTIST_ENDPOINT = 'artis... | 31.596774 | 116 | 0.545942 |
658ef5156c6bc6fe60a06664d23eead8bb8a47b5 | 1,214 | py | Python | api/mfwgallery/urls-dev.py | ankkamies/mfwgallery-api | c03d20b24fd4ef5d3e9be173b917eea493a5c3d6 | [
"MIT"
] | null | null | null | api/mfwgallery/urls-dev.py | ankkamies/mfwgallery-api | c03d20b24fd4ef5d3e9be173b917eea493a5c3d6 | [
"MIT"
] | null | null | null | api/mfwgallery/urls-dev.py | ankkamies/mfwgallery-api | c03d20b24fd4ef5d3e9be173b917eea493a5c3d6 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from mfwgallery import settings
from rest_framework.routers import SimpleRouter
from rest_framework_nested import routers
from posts import views
# Initialize routes
router = routers.SimpleRouter()
router.register(r'posts... | 35.705882 | 74 | 0.76112 |
371f52e69d239065ca75793860fd46c1cbdfb669 | 5,426 | py | Python | sdks/python/apache_beam/testing/load_tests/combine_test.py | a-satyateja/beam | 30a04b912979adf5f316cc8ace334d921ca71838 | [
"Apache-2.0"
] | 2 | 2019-06-03T02:47:29.000Z | 2019-06-12T21:22:41.000Z | sdks/python/apache_beam/testing/load_tests/combine_test.py | a-satyateja/beam | 30a04b912979adf5f316cc8ace334d921ca71838 | [
"Apache-2.0"
] | 7 | 2020-01-28T22:46:48.000Z | 2022-02-10T00:10:51.000Z | sdks/python/apache_beam/testing/load_tests/combine_test.py | a-satyateja/beam | 30a04b912979adf5f316cc8ace334d921ca71838 | [
"Apache-2.0"
] | 6 | 2019-06-02T16:18:52.000Z | 2020-11-04T04:17:08.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 32.491018 | 78 | 0.697383 |
a28ce3c76b96b4f00e948f99fed3718c672500f0 | 3,388 | py | Python | training.py | Utkarsh-Shakya/Capstone_Project | ac9b85e9b50f7f15a3ab6dc6d98539b3763e6536 | [
"MIT"
] | null | null | null | training.py | Utkarsh-Shakya/Capstone_Project | ac9b85e9b50f7f15a3ab6dc6d98539b3763e6536 | [
"MIT"
] | null | null | null | training.py | Utkarsh-Shakya/Capstone_Project | ac9b85e9b50f7f15a3ab6dc6d98539b3763e6536 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
#Importing required libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# In[ ]:
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression, LogisticRegression
from sklearn.cluster import KMean... | 26.677165 | 124 | 0.655549 |
70a893143160b49be182df7c4eb9ac945bd79def | 399 | py | Python | postfixadmin/postfixadmin/wsgi.py | fretscha/django-postfix-admin | 0474370fdd837ab34c8bf6ef03e02b66a54f3119 | [
"MIT"
] | 1 | 2015-01-24T13:29:58.000Z | 2015-01-24T13:29:58.000Z | postfixadmin/postfixadmin/wsgi.py | fretscha/django-postfix-admin | 0474370fdd837ab34c8bf6ef03e02b66a54f3119 | [
"MIT"
] | null | null | null | postfixadmin/postfixadmin/wsgi.py | fretscha/django-postfix-admin | 0474370fdd837ab34c8bf6ef03e02b66a54f3119 | [
"MIT"
] | 3 | 2015-01-25T19:48:31.000Z | 2021-01-08T20:49:50.000Z | """
WSGI config for postfixadmin 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/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "postfixadmin.settings")
from dja... | 26.6 | 78 | 0.796992 |
552155a5f9d277c63da557d30cfee54197f2b773 | 12,557 | py | Python | anyex/xbtce.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/xbtce.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | anyex/xbtce.py | ttwishing/anyex | cfd1f2f04ab992b790add4843aafff91e5773cbf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/anyex/anyex/blob/master/CONTRIBUTING.md#how-to-contribute-code
from anyex.base.exchange import Exchange
import hashlib
from anyex.base.errors import ExchangeError
from anyex.base.errors import NotSupp... | 38.636923 | 137 | 0.474317 |
dfc02ccdbc69fc9f6304f50138076a131d580512 | 2,333 | py | Python | havepassword.py | weixiangnan/OneDriveShareLinkPushAria2 | a415959a5e39e93b6ce8d417b7ad500368f8dc15 | [
"Apache-2.0"
] | 1 | 2021-09-03T03:47:41.000Z | 2021-09-03T03:47:41.000Z | havepassword.py | weixiangnan/OneDriveShareLinkPushAria2 | a415959a5e39e93b6ce8d417b7ad500368f8dc15 | [
"Apache-2.0"
] | null | null | null | havepassword.py | weixiangnan/OneDriveShareLinkPushAria2 | a415959a5e39e93b6ce8d417b7ad500368f8dc15 | [
"Apache-2.0"
] | null | null | null | import os
import asyncio
from main import getFiles, downloadFiles, header
from pprint import pprint
OneDriveShareURL = "https://jia666-my.sharepoint.com/:f:/g/personal/1025_xkx_me/EsqNMFlDoyZKt-RGcsI1F2EB6AiQMBIpQM4Ka247KkyOQw?e=oC1y7r"
OneDriveSharePwd = "xkx"
aria2Link = "http://localhost:5800/jsonrpc"
a... | 30.298701 | 137 | 0.666952 |
99d2a3f3236264b7b98fe02443c3c249a71ae82d | 1,785 | py | Python | plugins/miscellaneous/misc_namer.py | almazboot/sketal | c36a415d2cf007cc85091a4637e8cda74ad88ca1 | [
"MIT"
] | 43 | 2017-10-29T11:05:47.000Z | 2018-09-25T19:05:13.000Z | plugins/miscellaneous/misc_namer.py | almazboot/sketal | c36a415d2cf007cc85091a4637e8cda74ad88ca1 | [
"MIT"
] | 38 | 2017-10-28T12:29:58.000Z | 2018-09-25T19:38:02.000Z | plugins/miscellaneous/misc_namer.py | almazboot/sketal | c36a415d2cf007cc85091a4637e8cda74ad88ca1 | [
"MIT"
] | 35 | 2017-10-30T05:35:28.000Z | 2018-10-01T10:45:41.000Z | from handler.base_plugin import CommandPlugin
from utils import Message
class NamerPlugin(CommandPlugin):
__slots__ = ("old_answer",)
def __init__(self, *commands, prefixes=None, strict=False):
"""Answers with information about bot. Requires: StoragePlugin."""
if not commands:
com... | 36.428571 | 91 | 0.579272 |
53139cfad7edcacf26ce373fb36d0003c0a48156 | 1,594 | py | Python | elasticmodelspy/types.py | g20ready/ElasticModelsPy | 4222cd8586384650a66e39fb830d5bcd5f8d5831 | [
"MIT"
] | null | null | null | elasticmodelspy/types.py | g20ready/ElasticModelsPy | 4222cd8586384650a66e39fb830d5bcd5f8d5831 | [
"MIT"
] | null | null | null | elasticmodelspy/types.py | g20ready/ElasticModelsPy | 4222cd8586384650a66e39fb830d5bcd5f8d5831 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from elasticmodelspy.analysis.base import Serializable
class ElasticBaseType(Serializable):
def __init__(self, name):
super(ElasticBaseType, self).__init__(name)
def __analysis_data__(self):
return dict()
class Text(ElasticBaseType):
field_... | 21.835616 | 129 | 0.69197 |
32bbca8ff7efe071ff8fdcab2e4a0df6a8a02cf3 | 4,427 | py | Python | code/get_priors.py | ajoer/Cultural-Recommendation | cfb2c8d8c63c4b7604fea173644c5fac16c92044 | [
"MIT"
] | null | null | null | code/get_priors.py | ajoer/Cultural-Recommendation | cfb2c8d8c63c4b7604fea173644c5fac16c92044 | [
"MIT"
] | null | null | null | code/get_priors.py | ajoer/Cultural-Recommendation | cfb2c8d8c63c4b7604fea173644c5fac16c92044 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Get prior probabilities for event type and language links.
Query Wikidata using SPARQL.
1) Prior probability of event type P(Et): # events of type T / total # of events
2) Prior probability of lanugage link P(Ll): # ll to language L / total # of language links to all language
Also need:
... | 26.041176 | 162 | 0.702281 |
682394209be4ca9fc032aefc7829d6dc5ee3f6b0 | 2,551 | py | Python | viewer.py | BoyuanChen/visual_behavior_modeling | 8b6eb0516c562306c5d775632223ad0de775f170 | [
"MIT"
] | 9 | 2019-12-04T12:50:43.000Z | 2021-02-28T13:45:30.000Z | viewer.py | BoyuanChen/visual_behavior_modeling | 8b6eb0516c562306c5d775632223ad0de775f170 | [
"MIT"
] | null | null | null | viewer.py | BoyuanChen/visual_behavior_modeling | 8b6eb0516c562306c5d775632223ad0de775f170 | [
"MIT"
] | 2 | 2020-07-09T20:35:15.000Z | 2020-11-16T14:03:10.000Z |
"""
This code is for plotting real size output image. For high resolution images for demonstration and paper, please refer to
demonstration_viewer.py
"""
import os
import sys
import shutil
import numpy as np
from PIL import Image
from tqdm import tqdm
test_results_folder = './test_results'
test_results_img_folder ... | 34.013333 | 121 | 0.626421 |
83974620d21bef9f5bce02694199d5803d802da1 | 2,146 | py | Python | app.py | AzureAdvocateBit/Hackathon-CaptureImageForComputerVision-1 | 7583dbc8fcb1afd2d4c7c498ca88e5fd63e08f7d | [
"MIT"
] | 1 | 2022-03-03T20:51:27.000Z | 2022-03-03T20:51:27.000Z | app.py | AzureAdvocateBit/Hackathon-CaptureImageForComputerVision-1 | 7583dbc8fcb1afd2d4c7c498ca88e5fd63e08f7d | [
"MIT"
] | null | null | null | app.py | AzureAdvocateBit/Hackathon-CaptureImageForComputerVision-1 | 7583dbc8fcb1afd2d4c7c498ca88e5fd63e08f7d | [
"MIT"
] | 3 | 2020-05-25T05:57:07.000Z | 2020-11-14T10:02:15.000Z | import os, io, base64
from flask import Flask, render_template, request, jsonify
from azure.cognitiveservices.vision.computervision import ComputerVisionClient
from azure.cognitiveservices.vision.computervision.models import TextOperationStatusCodes
from azure.cognitiveservices.vision.computervision.models import TextR... | 44.708333 | 119 | 0.679404 |
1395376f9b395e4b39c034a6d9d886d02e7ff356 | 1,364 | py | Python | python/benchmark/function/test_activation.py | daniel-falk/nnabla | 3fe132ea52dc10521cc029a5d6ba8f565cf65ccf | [
"Apache-2.0"
] | 2,792 | 2017-06-26T13:05:44.000Z | 2022-03-28T07:55:26.000Z | python/benchmark/function/test_activation.py | daniel-falk/nnabla | 3fe132ea52dc10521cc029a5d6ba8f565cf65ccf | [
"Apache-2.0"
] | 138 | 2017-06-27T07:04:44.000Z | 2022-02-28T01:37:15.000Z | python/benchmark/function/test_activation.py | daniel-falk/nnabla | 3fe132ea52dc10521cc029a5d6ba8f565cf65ccf | [
"Apache-2.0"
] | 380 | 2017-06-26T13:23:52.000Z | 2022-03-25T16:51:30.000Z | # Copyright 2017,2018,2019,2020,2021 Sony 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.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 33.268293 | 81 | 0.709677 |
47aacbe7332e3b8f2de658635efa7783a771f68e | 1,495 | py | Python | tools/debugging/matrix/api_shell.py | tirkarthi/raiden | dbd03ddda039332b54ec0c02d81cbe1100bc8028 | [
"MIT"
] | 2,101 | 2016-06-01T11:31:49.000Z | 2022-03-27T20:13:19.000Z | tools/debugging/matrix/api_shell.py | tirkarthi/raiden | dbd03ddda039332b54ec0c02d81cbe1100bc8028 | [
"MIT"
] | 5,291 | 2016-06-01T18:14:04.000Z | 2022-03-31T11:19:09.000Z | tools/debugging/matrix/api_shell.py | tirkarthi/raiden | dbd03ddda039332b54ec0c02d81cbe1100bc8028 | [
"MIT"
] | 484 | 2016-06-01T18:21:06.000Z | 2022-03-22T10:29:45.000Z | #!/usr/bin/env python
import os
import click
import IPython
from eth_utils import encode_hex, to_normalized_address
from raiden.accounts import AccountManager
from raiden.network.transport.matrix.client import GMatrixHttpApi
from raiden.utils.cli import ADDRESS_TYPE
from raiden.utils.formatting import to_checksum_add... | 33.222222 | 96 | 0.747157 |
a9ff5eee96d3ddf89b5b67ffcdbf9370093ab44a | 7,851 | py | Python | models/baseline/baseline_train.py | Sharp-rookie/seedcup | 27a001c43459ec9bb69ab7596e0efbab93ed7708 | [
"Apache-2.0"
] | 1 | 2021-11-18T23:52:14.000Z | 2021-11-18T23:52:14.000Z | models/baseline/baseline_train.py | Sharp-rookie/seedcup | 27a001c43459ec9bb69ab7596e0efbab93ed7708 | [
"Apache-2.0"
] | null | null | null | models/baseline/baseline_train.py | Sharp-rookie/seedcup | 27a001c43459ec9bb69ab7596e0efbab93ed7708 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import Dataset, DataLoader
from colorama import Fore
from baseline_model import Fake1DAttention
from metric import *
import pandas as pd
import os
import argparse
from hyp_evol import *
rate = "0.5" # 默认为6:4的正负样本比例,若要改为1:1则取rate=“0.... | 35.524887 | 144 | 0.562221 |
8eab8d0032392a0fdc73fd6f2e75ce07c249e85d | 3,751 | py | Python | test/project/settings.py | tylerlacy/bootstrap-uploadprogress | f563b1e6b55a6d6a4601ed4996a2429bb353a1a3 | [
"MIT"
] | null | null | null | test/project/settings.py | tylerlacy/bootstrap-uploadprogress | f563b1e6b55a6d6a4601ed4996a2429bb353a1a3 | [
"MIT"
] | null | null | null | test/project/settings.py | tylerlacy/bootstrap-uploadprogress | f563b1e6b55a6d6a4601ed4996a2429bb353a1a3 | [
"MIT"
] | null | null | null | """
Django settings for progress project.
Generated by 'django-admin startproject' using Django 1.10.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import o... | 25.006667 | 91 | 0.696614 |
eca7615206e300f7c6681200e12935bba8ba3826 | 20,631 | py | Python | pymongo/topology_description.py | tony/mongo-python-driver | d43ca118f91dda373356802ee8ec976d96c366b9 | [
"Apache-2.0"
] | 46 | 2019-03-01T02:19:18.000Z | 2021-12-18T12:37:02.000Z | pymongo/topology_description.py | tony/mongo-python-driver | d43ca118f91dda373356802ee8ec976d96c366b9 | [
"Apache-2.0"
] | 9 | 2019-12-05T00:49:12.000Z | 2021-09-08T01:31:25.000Z | pymongo/topology_description.py | tony/mongo-python-driver | d43ca118f91dda373356802ee8ec976d96c366b9 | [
"Apache-2.0"
] | 67 | 2018-10-29T09:50:49.000Z | 2022-01-06T07:35:56.000Z | # Copyright 2014-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 37.785714 | 79 | 0.643255 |
de20db9d20b3fea301e302fd208e22c155e603ef | 23,323 | py | Python | venv/Lib/site-packages/pyscreeze/__init__.py | SteevenBrunner/gmail-generator | 0ab6f047faad48c388c6d7d2b887f33b6839b6f9 | [
"MIT"
] | 102 | 2018-11-06T21:54:27.000Z | 2022-02-26T16:35:06.000Z | venv/Lib/site-packages/pyscreeze/__init__.py | AsterLaoWhy/Navi | 819e4cc9e70721d65da5979e0c7a6fead9eb9d6e | [
"MIT"
] | 26 | 2018-10-09T13:40:18.000Z | 2021-10-16T23:28:26.000Z | venv/Lib/site-packages/pyscreeze/__init__.py | AsterLaoWhy/Navi | 819e4cc9e70721d65da5979e0c7a6fead9eb9d6e | [
"MIT"
] | 36 | 2018-08-08T03:43:00.000Z | 2022-02-02T16:29:55.000Z | # PyScreeze
"""
NOTE:
Apparently Pillow support on Ubuntu 64-bit has several additional steps since it doesn't have JPEG/PNG support out of the box. Description here:
https://stackoverflow.com/questions/7648200/pip-install-pil-e-tickets-1-no-jpeg-png-support
http://ubuntuforums.org/showthread.php?t=1751455
"""
__ver... | 38.171849 | 174 | 0.648673 |
4fcf9bb01e0eb8a58b1e7521096ed04c70a219ff | 1,076 | py | Python | setup.py | DoctorJohn/eponym | dad6ebdf7f463d1ceee9c7804fb0c6b52d7a529a | [
"MIT"
] | 1 | 2019-11-19T21:06:43.000Z | 2019-11-19T21:06:43.000Z | setup.py | DoctorJohn/eponym | dad6ebdf7f463d1ceee9c7804fb0c6b52d7a529a | [
"MIT"
] | 1 | 2019-11-19T19:35:29.000Z | 2019-11-19T19:35:29.000Z | setup.py | DoctorJohn/eponym | dad6ebdf7f463d1ceee9c7804fb0c6b52d7a529a | [
"MIT"
] | null | null | null | import os
from setuptools import find_packages, setup
from eponym import __version__
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='eponym',
version=__version__,
packages... | 30.742857 | 78 | 0.724907 |
2b06991a3be00249a7eb90ca63f5b5604ae67b14 | 6,185 | py | Python | jdcloud_sdk/core/signer.py | jdcloud-demo/jdcloud-sdk-python | fddc2af24031c597948b8b8091978ac7e01a2695 | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/core/signer.py | jdcloud-demo/jdcloud-sdk-python | fddc2af24031c597948b8b8091978ac7e01a2695 | [
"Apache-2.0"
] | null | null | null | jdcloud_sdk/core/signer.py | jdcloud-demo/jdcloud-sdk-python | fddc2af24031c597948b8b8091978ac7e01a2695 | [
"Apache-2.0"
] | null | null | null | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 35.142045 | 110 | 0.575424 |
1a4f527e408506ad2bef95c1c008b12e97f72aa4 | 285 | py | Python | it168/it168/pipelines.py | ripples-alive/Crawler | 61f7c253deb196fddc254f9603706589af79ed3f | [
"MIT"
] | 1 | 2017-02-24T03:34:03.000Z | 2017-02-24T03:34:03.000Z | it168/it168/pipelines.py | JayvicWen/Crawler | 61f7c253deb196fddc254f9603706589af79ed3f | [
"MIT"
] | null | null | null | it168/it168/pipelines.py | JayvicWen/Crawler | 61f7c253deb196fddc254f9603706589af79ed3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class It168Pipeline(object):
def process_item(self, item, spider):
return item
| 23.75 | 65 | 0.708772 |
c92def7193a320a21f1cbe2239ba52cd86236901 | 601 | py | Python | stella_api/core/models/app.py | InterStella0/stella_api | 3ab33767de8fac4cec23db87900c8eea6905adcc | [
"MIT"
] | null | null | null | stella_api/core/models/app.py | InterStella0/stella_api | 3ab33767de8fac4cec23db87900c8eea6905adcc | [
"MIT"
] | null | null | null | stella_api/core/models/app.py | InterStella0/stella_api | 3ab33767de8fac4cec23db87900c8eea6905adcc | [
"MIT"
] | 1 | 2022-03-08T14:50:27.000Z | 2022-03-08T14:50:27.000Z | from __future__ import annotations
from typing import TYPE_CHECKING
from fastapi import FastAPI
from stella_api.core.utils.errors import FailureLoadVersion
if TYPE_CHECKING:
from stella_api.core.models import RouteBase
__all__ = ("StellaAPI",)
class StellaAPI(FastAPI):
def __init__(self) -> None:
... | 24.04 | 68 | 0.705491 |
f153ab57d43ae44c48f5e61396700dcb09e5342a | 1,363 | py | Python | s2e_env/commands/project_creation/__init__.py | lzto/s2e-env-1 | e7d26b9c5b0f0b203fb335de0a952e70440e7d0a | [
"BSD-3-Clause"
] | 55 | 2019-12-20T03:25:14.000Z | 2022-01-16T07:19:47.000Z | s2e_env/commands/project_creation/__init__.py | lzto/s2e-env-1 | e7d26b9c5b0f0b203fb335de0a952e70440e7d0a | [
"BSD-3-Clause"
] | 2 | 2020-11-02T08:01:00.000Z | 2022-03-27T02:59:18.000Z | s2e_env/commands/project_creation/__init__.py | lzto/s2e-env-1 | e7d26b9c5b0f0b203fb335de0a952e70440e7d0a | [
"BSD-3-Clause"
] | 11 | 2020-08-06T03:59:45.000Z | 2022-02-25T02:31:59.000Z | """
Copyright (c) 2017 Cyberhaven
Copyright (c) 2017 Dependable Systems Laboratory, EPFL
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 right... | 43.967742 | 78 | 0.807043 |
cdbccb8f6348c1557ac207e7ad254dc7d3afc47b | 428 | py | Python | nuplan/database/utils/label/test/test_label.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | nuplan/database/utils/label/test/test_label.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | nuplan/database/utils/label/test/test_label.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | import json
import unittest
from nuplan.database.utils.label.label import Label
class TestLabel(unittest.TestCase):
def test_serialize(self) -> None:
""" Tests a serialized label are still the same after serializing. """
label = Label('my_name', (1, 3, 4, 1))
self.assertEqual(label, Lab... | 23.777778 | 93 | 0.686916 |
dba5ba1835c02ae65c97733030f3ccce9d5d4f46 | 747 | py | Python | tests/test_stats.py | LBJ-Wade/powerbox | 491047f2cac516dc800fc9a3ef052ced8d0805fe | [
"MIT"
] | null | null | null | tests/test_stats.py | LBJ-Wade/powerbox | 491047f2cac516dc800fc9a3ef052ced8d0805fe | [
"MIT"
] | null | null | null | tests/test_stats.py | LBJ-Wade/powerbox | 491047f2cac516dc800fc9a3ef052ced8d0805fe | [
"MIT"
] | null | null | null | import numpy as np
from scipy.ndimage import gaussian_filter
import os
import inspect
import sys
from nose.tools import nottest
LOCATION = "/".join(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))).split("/")[:-1])
sys.path.insert(0, LOCATION)
from powerbox import PowerBox
@nottest ... | 35.571429 | 137 | 0.680054 |
c7669aa0c36a21c08102c025455be69fef5029da | 27,165 | py | Python | squeezeDet/src/nn_skeleton.py | Walter1218/Self_Driving_Car_ND | 526a9583a2bc616cb19cdfc7921b5e1c0f9711bd | [
"MIT"
] | 2 | 2017-05-25T01:26:41.000Z | 2019-08-16T13:38:57.000Z | squeezeDet/src/nn_skeleton.py | Walter1218/Self_Driving_Car_ND | 526a9583a2bc616cb19cdfc7921b5e1c0f9711bd | [
"MIT"
] | null | null | null | squeezeDet/src/nn_skeleton.py | Walter1218/Self_Driving_Car_ND | 526a9583a2bc616cb19cdfc7921b5e1c0f9711bd | [
"MIT"
] | 1 | 2019-02-17T05:19:29.000Z | 2019-02-17T05:19:29.000Z | # Author: Bichen Wu (bichen@berkeley.edu) 08/25/2016
"""Neural network model base class."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
from utils import util
from easydict import EasyDict as edict
import numpy as np
import tensor... | 37.009537 | 86 | 0.632726 |
b2cfd67059757453f3efd232290f4dbff7a288f5 | 4,637 | py | Python | test/programytest/parser/template/node_tests/test_sraix.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 2 | 2018-06-16T09:32:22.000Z | 2019-07-21T13:16:00.000Z | test/programytest/parser/template/node_tests/test_sraix.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 3 | 2020-07-16T04:00:42.000Z | 2021-03-31T18:52:22.000Z | test/programytest/parser/template/node_tests/test_sraix.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 4 | 2018-06-29T23:50:44.000Z | 2020-11-05T08:13:47.000Z | import xml.etree.ElementTree as ET
from programy.parser.template.nodes.base import TemplateNode
from programy.parser.template.nodes.sraix import TemplateSRAIXNode
from programy.parser.template.nodes.word import TemplateWordNode
from programy.services.service import Service, ServiceFactory
from programy.config.brain.br... | 30.30719 | 92 | 0.665516 |
61bcadfbacc9c80eacf0c436a591c67f484a5da4 | 11,105 | py | Python | paddlex/ppdet/modeling/backbones/darknet.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 3,655 | 2020-03-28T09:19:50.000Z | 2022-03-31T13:28:39.000Z | paddlex/ppdet/modeling/backbones/darknet.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 829 | 2020-03-28T04:03:18.000Z | 2022-03-31T14:34:30.000Z | paddlex/ppdet/modeling/backbones/darknet.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 738 | 2020-03-28T03:56:46.000Z | 2022-03-31T13:11:03.000Z | # Copyright (c) 2020 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... | 32.565982 | 88 | 0.533093 |
c060c08d639cb61ab85b481e8967a95e1313a62c | 2,945 | py | Python | modular_test.py | ndebuhr/gear-params | ca683bc98d6ecde557f1f60f20f8fe18693707b6 | [
"MIT"
] | null | null | null | modular_test.py | ndebuhr/gear-params | ca683bc98d6ecde557f1f60f20f8fe18693707b6 | [
"MIT"
] | null | null | null | modular_test.py | ndebuhr/gear-params | ca683bc98d6ecde557f1f60f20f8fe18693707b6 | [
"MIT"
] | null | null | null | import subprocess
import sys
class module_test:
def __init__(self, module_char, input_file, output_file, expected_file):
self.m = module_char
self.i = input_file
self.o = output_file
self.e = expected_file
subprocess.call('make',shell=True)
spur_test = module_test('S',
... | 36.8125 | 76 | 0.49983 |
16a420497cbc2838885d99cdb809ed834438bdec | 261 | py | Python | server-admin/model/user.py | yafraorg/yapki | 66ab6f2db2efa7e0c5dbb85fa7c05e6446518129 | [
"Apache-2.0"
] | 3 | 2015-06-24T10:59:28.000Z | 2017-09-10T16:49:09.000Z | server-admin/model/user.py | yafraorg/yapki | 66ab6f2db2efa7e0c5dbb85fa7c05e6446518129 | [
"Apache-2.0"
] | 2 | 2020-04-20T21:06:33.000Z | 2020-05-06T10:15:31.000Z | server-admin/model/user.py | yafraorg/yapki | 66ab6f2db2efa7e0c5dbb85fa7c05e6446518129 | [
"Apache-2.0"
] | 1 | 2016-12-02T10:12:42.000Z | 2016-12-02T10:12:42.000Z | from typing import List
from pydantic import BaseModel
class UserBase(BaseModel):
email: str
name: str
class UserCreate(UserBase):
password: str
class User(UserBase):
id: int
is_active: bool
class Config:
orm_mode = True
| 12.428571 | 30 | 0.67433 |
8ea7b92be0bbf63a79053f5f71804d03461f2518 | 253 | py | Python | tests/stack_frame_analyzer/utils/parent.py | cesarmerjan/stack_frame_analyzer | 4e9f1899016423ca7c3b919221ff9b4778f0e82c | [
"MIT"
] | null | null | null | tests/stack_frame_analyzer/utils/parent.py | cesarmerjan/stack_frame_analyzer | 4e9f1899016423ca7c3b919221ff9b4778f0e82c | [
"MIT"
] | null | null | null | tests/stack_frame_analyzer/utils/parent.py | cesarmerjan/stack_frame_analyzer | 4e9f1899016423ca7c3b919221ff9b4778f0e82c | [
"MIT"
] | null | null | null | from .main import stack_frame_analyzer
class Parent:
@property
def context(self):
return stack_frame_analyzer.get_caller_context(1)
@classmethod
def _get_context(cls):
return stack_frame_analyzer.get_caller_context(1)
| 21.083333 | 57 | 0.735178 |
77c1866a018a430988f7df5152dcc6fe41e4f03c | 737 | py | Python | webapp/urls.py | westerjn/cfready-django | 2e0f87c9359d67a8535f81b5d74ac5d43ec1b035 | [
"MIT"
] | null | null | null | webapp/urls.py | westerjn/cfready-django | 2e0f87c9359d67a8535f81b5d74ac5d43ec1b035 | [
"MIT"
] | null | null | null | webapp/urls.py | westerjn/cfready-django | 2e0f87c9359d67a8535f81b5d74ac5d43ec1b035 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='home'),
path('polls/', views.index, name='index'),
# ex: /polls/5/
path('<int:question_id>/', views.detail, name='detail'),
# ex: /polls/5/results/
path('<int:question_id>/results/', views.re... | 36.85 | 71 | 0.601085 |
2f02503f54270021b825b963770248475b992bf6 | 2,025 | py | Python | test/mockupdb/test_rsghost.py | infinite-skx/mongo-python-driver | bdafc357331813222b1e677b66041dad1fc852a5 | [
"Apache-2.0"
] | null | null | null | test/mockupdb/test_rsghost.py | infinite-skx/mongo-python-driver | bdafc357331813222b1e677b66041dad1fc852a5 | [
"Apache-2.0"
] | 1 | 2021-12-24T11:32:17.000Z | 2021-12-24T11:32:17.000Z | test/mockupdb/test_rsghost.py | Surfndez/mongo-python-driver | 51691246e9b2ef8446f3716c9ba7bab1a9f4e1ad | [
"Apache-2.0"
] | null | null | null | # Copyright 2021-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 38.207547 | 77 | 0.687901 |
f6e37d74fe9d7940c17297dc80908a58c165981c | 8,605 | py | Python | dhalsim/parser/input_parser.py | Daveonwave/DHALSIM | c8739e45b87b1b1a9879e2694c94e3d6a0218b59 | [
"MIT"
] | null | null | null | dhalsim/parser/input_parser.py | Daveonwave/DHALSIM | c8739e45b87b1b1a9879e2694c94e3d6a0218b59 | [
"MIT"
] | null | null | null | dhalsim/parser/input_parser.py | Daveonwave/DHALSIM | c8739e45b87b1b1a9879e2694c94e3d6a0218b59 | [
"MIT"
] | 2 | 2021-06-22T20:16:08.000Z | 2021-06-22T20:21:03.000Z | import sys
import pandas as pd
import wntr
from antlr4 import *
from dhalsim.parser.antlr.controlsLexer import controlsLexer
from dhalsim.parser.antlr.controlsParser import controlsParser
class Error(Exception):
"""Base class for exceptions in this module."""
class NoInpFileGiven(Error):
"""Raised when ta... | 36.773504 | 117 | 0.59756 |
826c1e2053a7354e3b2519acb79022433b1a13ca | 18,311 | py | Python | theano/typed_list/basic.py | bridgeland/Theano-PyMC | ddfbde2d03061dead7190a99b78c7cef7896bd04 | [
"BSD-3-Clause"
] | null | null | null | theano/typed_list/basic.py | bridgeland/Theano-PyMC | ddfbde2d03061dead7190a99b78c7cef7896bd04 | [
"BSD-3-Clause"
] | null | null | null | theano/typed_list/basic.py | bridgeland/Theano-PyMC | ddfbde2d03061dead7190a99b78c7cef7896bd04 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from .type import TypedListType
import theano
from theano.gof import Apply, Constant, Op, Variable
from theano.tensor.type_other import SliceType
from theano import tensor as T
from theano.compile.debugmode import _lessbroken_deepcopy
class _typed_list_py_operators:
def __getitem__(self, index... | 26.614826 | 133 | 0.551253 |
a123565e0a473b72f9d3347219d699f273753192 | 2,566 | py | Python | tests/py/test_communities.py | webmaven/gratipay.com | 31f6bcf903029895a4c56290aedde755e852c82f | [
"CC0-1.0"
] | 1 | 2019-10-09T10:13:53.000Z | 2019-10-09T10:13:53.000Z | tests/py/test_communities.py | webmaven/gratipay.com | 31f6bcf903029895a4c56290aedde755e852c82f | [
"CC0-1.0"
] | null | null | null | tests/py/test_communities.py | webmaven/gratipay.com | 31f6bcf903029895a4c56290aedde755e852c82f | [
"CC0-1.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
from gratipay.testing import Harness
class Tests(Harness):
def setUp(self):
Harness.setUp(self)
# Alice joins a community.
self.alice = self.make_participant("alice", claimed_time='now', last_bill_result=... | 38.298507 | 92 | 0.641076 |
6b9f8a72b072dc7b30c9a5d98f4e41f96f7135da | 475 | py | Python | spacy/tests/lang/hr/test_lemma.py | jaydeepborkar/spaCy | 16aa092fb5cffb5ec7079951ea0c04cb96733b3e | [
"MIT"
] | 1 | 2020-01-29T19:02:04.000Z | 2020-01-29T19:02:04.000Z | spacy/tests/lang/hr/test_lemma.py | jaydeepborkar/spaCy | 16aa092fb5cffb5ec7079951ea0c04cb96733b3e | [
"MIT"
] | 1 | 2021-08-16T13:39:17.000Z | 2021-08-16T13:39:40.000Z | spacy/tests/lang/hr/test_lemma.py | jaydeepborkar/spaCy | 16aa092fb5cffb5ec7079951ea0c04cb96733b3e | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize(
"string,lemma",
[
("trčao", "trčati"),
("adekvatnim", "adekvatan"),
("dekontaminacijama", "dekontaminacija"),
("filologovih", "filologov"),
("je", "biti"),
("se", "s... | 22.619048 | 67 | 0.612632 |
2500c43c5e6f390a46ae0ff53464de95586d2b77 | 28,775 | py | Python | sockeye/lexical_constraints.py | tholiao/sockeye | f33b600dc77ae9f295c05015e2af9045f3a74088 | [
"Apache-2.0"
] | 8 | 2019-10-02T09:14:31.000Z | 2020-07-07T09:40:04.000Z | sockeye/lexical_constraints.py | tholiao/sockeye | f33b600dc77ae9f295c05015e2af9045f3a74088 | [
"Apache-2.0"
] | 2 | 2021-03-07T08:34:42.000Z | 2021-03-25T22:57:37.000Z | sockeye/lexical_constraints.py | tholiao/sockeye | f33b600dc77ae9f295c05015e2af9045f3a74088 | [
"Apache-2.0"
] | 4 | 2019-10-10T06:34:41.000Z | 2021-07-19T09:11:20.000Z | # Copyright 2018 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" file acc... | 40.990028 | 119 | 0.625856 |
47dd13a1f9a3cacc2e773f17563dcf302f925b6e | 5,932 | py | Python | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/disks/Disks.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 1 | 2020-10-05T08:53:57.000Z | 2020-10-05T08:53:57.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/disks/Disks.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 17 | 2019-11-14T08:41:37.000Z | 2020-05-27T09:23:51.000Z | sandbox/lib/jumpscale/JumpscaleLibsExtra/sal_zos/disks/Disks.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
from ..abstracts import Mountable
from .Partition import Partition
from Jumpscale import j
class StorageType(Enum):
SSD = "SSD"
HDD = "HDD"
NVME = "NVME"
ARCHIVE = "ARCHIVE"
CDROM = "CDROM"
class Disks:
"""Subobject to list disks"""
def __init__(self, node):
... | 30.57732 | 86 | 0.568105 |
667bcf9e07a82b5019713d95c61d2a69286d7b9b | 249 | py | Python | build/lib/crowdkit/aggregation/image_segmentation/__init__.py | artinmajdi/crowd-kit | 174e15f256a4929ed71699ffc1797ea87e0e8a99 | [
"Apache-2.0"
] | 91 | 2021-03-02T19:29:04.000Z | 2022-03-24T15:25:06.000Z | build/lib/crowdkit/aggregation/image_segmentation/__init__.py | artinmajdi/crowd-kit | 174e15f256a4929ed71699ffc1797ea87e0e8a99 | [
"Apache-2.0"
] | 5 | 2021-07-01T07:24:08.000Z | 2021-09-19T19:15:40.000Z | src/aggregation/image_segmentation/__init__.py | Toloka/crowd-kit | 126942242781073235ca292aed9f496b614e9516 | [
"Apache-2.0"
] | 6 | 2021-05-21T12:40:29.000Z | 2022-03-28T06:23:24.000Z | from .segmentation_em import SegmentationEM
from .segmentation_rasa import SegmentationRASA
from .segmentation_majority_vote import SegmentationMajorityVote
__all__ = [
'SegmentationEM',
'SegmentationRASA',
'SegmentationMajorityVote'
]
| 24.9 | 64 | 0.815261 |
31c224b008de2a99bcc894b8a0b8c31a9b450a16 | 3,690 | py | Python | edb/server/http_graphql_port/compiler.py | pnijhara/edgedb | 04e47118ef4d2af5dca1a6bd937bb737873329c9 | [
"Apache-2.0"
] | 4 | 2020-04-25T13:52:13.000Z | 2020-09-23T19:14:07.000Z | edb/server/http_graphql_port/compiler.py | pnijhara/edgedb | 04e47118ef4d2af5dca1a6bd937bb737873329c9 | [
"Apache-2.0"
] | null | null | null | edb/server/http_graphql_port/compiler.py | pnijhara/edgedb | 04e47118ef4d2af5dca1a6bd937bb737873329c9 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2019-present MagicStack Inc. and the EdgeDB 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... | 28.167939 | 76 | 0.649593 |
090cd2d1629e8f800772c74341be56047a035cb3 | 882 | py | Python | setup.py | alxmamaev/kekas | f0d8f9643e89757ae44a679ecba64454b1236e10 | [
"MIT"
] | 1 | 2019-03-13T13:58:40.000Z | 2019-03-13T13:58:40.000Z | setup.py | alxmamaev/kekas | f0d8f9643e89757ae44a679ecba64454b1236e10 | [
"MIT"
] | null | null | null | setup.py | alxmamaev/kekas | f0d8f9643e89757ae44a679ecba64454b1236e10 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="kekas",
version="0.1.8",
author="Aleksandr Belskikh",
author_email="belskikh.aleksandr@gmail.com",
description="Jast another DL library.",
long_description=long_description,
long_... | 25.941176 | 50 | 0.602041 |
686da7dff3cdf3899c62281f75d6dbd9570f5cf2 | 64,833 | py | Python | auth3/identity/admin/admin_pb2_grpc.py | auth3-dev/python-sdk | 0a31cf3307441c5ba8220ab5e1f8b30dc3780ee9 | [
"Apache-2.0"
] | null | null | null | auth3/identity/admin/admin_pb2_grpc.py | auth3-dev/python-sdk | 0a31cf3307441c5ba8220ab5e1f8b30dc3780ee9 | [
"Apache-2.0"
] | null | null | null | auth3/identity/admin/admin_pb2_grpc.py | auth3-dev/python-sdk | 0a31cf3307441c5ba8220ab5e1f8b30dc3780ee9 | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from auth3.identity.admin import admin_pb2 as devtools_dot_auth_dot_v0_dot_proto_dot_identity_dot_admin_dot_admin__pb2
class AdminStub(object):
"""Missing ... | 59.479817 | 164 | 0.725896 |
7eef7523932b29f9861b14ba707a8cb4e97912eb | 442 | py | Python | Modulo_5/semana_2/dataframe/iteracion/iteracion2.py | AutodidactaMx/cocid_python | 11628f465ff362807a692c79ede26bf30dd8e26a | [
"MIT"
] | null | null | null | Modulo_5/semana_2/dataframe/iteracion/iteracion2.py | AutodidactaMx/cocid_python | 11628f465ff362807a692c79ede26bf30dd8e26a | [
"MIT"
] | null | null | null | Modulo_5/semana_2/dataframe/iteracion/iteracion2.py | AutodidactaMx/cocid_python | 11628f465ff362807a692c79ede26bf30dd8e26a | [
"MIT"
] | 1 | 2022-03-04T00:57:18.000Z | 2022-03-04T00:57:18.000Z | # importing pandas as pd
import pandas as pd
# Listas
dict = {'nombre':["luis", "marcos", "marta", "pedro"],
'grado': ["LIC", "MTA", "DOC", "LIC"],
'puntaje':[90, 40, 80, 98]}
# Creando un marco de datos a partir de un diccionario
df = pd.DataFrame(dict)
# creando una lista de columnas de marco... | 24.555556 | 54 | 0.624434 |
206ca457a4dd0d48dbf0260038c61b742b39e238 | 639 | py | Python | config/urls.py | rigelk/magiciendose | d2613f6a548dd620f101f6533bf7bea71a5ab3b0 | [
"MIT"
] | 2 | 2021-04-23T21:35:02.000Z | 2021-04-24T15:17:16.000Z | config/urls.py | rigelk/magiciendose | d2613f6a548dd620f101f6533bf7bea71a5ab3b0 | [
"MIT"
] | 1 | 2021-04-24T17:20:33.000Z | 2021-04-24T17:23:15.000Z | config/urls.py | rigelk/magiciendose | d2613f6a548dd620f101f6533bf7bea71a5ab3b0 | [
"MIT"
] | 1 | 2021-04-23T14:35:58.000Z | 2021-04-23T14:35:58.000Z | from django.conf import settings
from django.contrib import admin
from django.urls import path, include
from rest_framework.schemas import get_schema_view
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('', include('pages.urls')),
path('api/', include('... | 27.782609 | 56 | 0.672926 |
fc7fc9a4cc19f323eb62cbd94f36a6b02b797f58 | 442 | py | Python | Fun Excercise/decorator5.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 32 | 2020-04-05T08:29:40.000Z | 2022-01-08T03:10:00.000Z | Fun Excercise/decorator5.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 3 | 2021-06-02T04:09:11.000Z | 2022-03-02T14:55:03.000Z | Fun Excercise/decorator5.py | NirmalSilwal/Python- | 6d23112db8366360f0b79bdbf21252575e8eab3e | [
"MIT"
] | 3 | 2020-07-13T05:44:04.000Z | 2021-03-03T07:07:58.000Z | def decorator_func(say_hello_func):
def wrapper_func(hello_var, world_var):
hello = "Hello, "
world = "World"
if not hello_var:
hello_var = hello
if not world_var:
world_var = world
return say_hello_func(hello_var, world_var)
return wrapper_f... | 18.416667 | 51 | 0.626697 |
e3526c5e2d24166b71b1bfbdd443659a10f1061d | 26 | py | Python | python/test.py | chaleaoch/code | eba44be0b3d9a31434f32d0fd38332bf75a93130 | [
"MIT"
] | null | null | null | python/test.py | chaleaoch/code | eba44be0b3d9a31434f32d0fd38332bf75a93130 | [
"MIT"
] | null | null | null | python/test.py | chaleaoch/code | eba44be0b3d9a31434f32d0fd38332bf75a93130 | [
"MIT"
] | null | null | null | import json
import django
| 8.666667 | 13 | 0.846154 |
698765451946f2f554a12a324a494b51a576394d | 127 | py | Python | src/main/python/app/style.py | kevinyu/soundsep | 58f8100e101a6302533626d2f141c86748c8dc10 | [
"MIT"
] | 1 | 2020-10-03T18:35:52.000Z | 2020-10-03T18:35:52.000Z | src/main/python/app/style.py | theunissenlab/soundsep | 58f8100e101a6302533626d2f141c86748c8dc10 | [
"MIT"
] | null | null | null | src/main/python/app/style.py | theunissenlab/soundsep | 58f8100e101a6302533626d2f141c86748c8dc10 | [
"MIT"
] | 1 | 2020-08-12T17:16:15.000Z | 2020-08-12T17:16:15.000Z | qss = """
#Window{
background-color: white
}
QPushButton[flat="true"]{
background-color: black;
border: 0px;
}
"""
| 12.7 | 28 | 0.606299 |
385e2d026e5155bee5296a2c879aba6bcf7f2d01 | 3,849 | pyde | Python | font_fingerprints_square/font_fingerprints_square.pyde | cclauss/generative_art | fc179177badd8b54b4faefd6f36f3d974ff0ca65 | [
"MIT"
] | 11 | 2019-06-05T04:37:38.000Z | 2021-08-30T13:40:47.000Z | font_fingerprints_square/font_fingerprints_square.pyde | cclauss/generative_art | fc179177badd8b54b4faefd6f36f3d974ff0ca65 | [
"MIT"
] | null | null | null | font_fingerprints_square/font_fingerprints_square.pyde | cclauss/generative_art | fc179177badd8b54b4faefd6f36f3d974ff0ca65 | [
"MIT"
] | 1 | 2020-05-07T13:16:43.000Z | 2020-05-07T13:16:43.000Z | ################################################################################
# Aaron Penne
# 2018-08-28
# https://github.com/aaronpenne
################################################################################
import datetime
import string
import sys
# Define globals here
rand_seed = 1138
frame_rate = 1
w... | 29.381679 | 90 | 0.573655 |
68e00a03e4f49ca331f71aea8400f20f79447ee6 | 175 | py | Python | utils/stupid_timer.py | vladimirgamalyan/pictools | cfcda3f4a1272d8469f2dc604a8afc585929b0eb | [
"MIT"
] | null | null | null | utils/stupid_timer.py | vladimirgamalyan/pictools | cfcda3f4a1272d8469f2dc604a8afc585929b0eb | [
"MIT"
] | 1 | 2017-04-08T20:40:21.000Z | 2017-04-08T20:51:40.000Z | utils/stupid_timer.py | vladimirgamalian/pictools | cfcda3f4a1272d8469f2dc604a8afc585929b0eb | [
"MIT"
] | null | null | null | #!/usr/bin/python
import time
class StupidTimer:
def __init__(self, t):
self.t = time.clock() + t
def finished(self):
return time.clock() > self.t
| 14.583333 | 36 | 0.594286 |
09c319e4797542156f892f954e07dcae37673af5 | 468 | py | Python | books_api/core/models.py | kennyaires/olist-challenge | ec0194c9b48d4ec8693d3d39498f63f42dfaf251 | [
"MIT"
] | 1 | 2022-01-16T23:29:39.000Z | 2022-01-16T23:29:39.000Z | books_api/core/models.py | kennyaires/olist-challenge | ec0194c9b48d4ec8693d3d39498f63f42dfaf251 | [
"MIT"
] | 5 | 2021-03-19T12:18:04.000Z | 2021-09-22T19:43:58.000Z | books_api/core/models.py | kennyaires/olist-challenge | ec0194c9b48d4ec8693d3d39498f63f42dfaf251 | [
"MIT"
] | null | null | null | from django.db import models
class Author(models.Model):
name = models.CharField(max_length=255, unique=True)
def __str__(self):
return self.name
class Book(models.Model):
name = models.CharField(max_length=255)
edition = models.CharField(max_length=255, null=True)
publication_year = mo... | 24.631579 | 78 | 0.720085 |
a467c22a3332ab7726d2d639c1f2cc140293cac0 | 13,377 | py | Python | src/whylogs/core/statistics/constraints.py | whylabs/whylogs-python | 937c43ea87946ec294e6d7ec9f3c35cfa0b7a22b | [
"Apache-2.0"
] | 327 | 2020-08-18T17:09:44.000Z | 2021-02-25T11:03:57.000Z | src/whylogs/core/statistics/constraints.py | whylabs/whylogs-core | 80cce9d652553adc674d647e00ea8f414b75a95a | [
"Apache-2.0"
] | 66 | 2020-08-25T15:18:16.000Z | 2021-02-22T21:25:35.000Z | src/whylogs/core/statistics/constraints.py | whylabs/whylogs-python | 937c43ea87946ec294e6d7ec9f3c35cfa0b7a22b | [
"Apache-2.0"
] | 13 | 2020-09-08T22:44:10.000Z | 2021-01-28T00:32:58.000Z | import logging
import re
from typing import List, Mapping, Optional
from google.protobuf.json_format import Parse
from whylogs.proto import (
DatasetConstraintMsg,
DatasetProperties,
NumberSummary,
Op,
SummaryConstraintMsg,
SummaryConstraintMsgs,
ValueConstraintMsg,
ValueConstraintMsgs... | 36.252033 | 138 | 0.614488 |
d7587a7b5a88339a0cd5d11099e6abfd34795602 | 2,499 | py | Python | ResourceBasedSentimentClassification.py | nishii-singh/Sentiment-analysis | efd75687ccf79e8aac44328c0cb999a9c14000c4 | [
"Apache-2.0"
] | null | null | null | ResourceBasedSentimentClassification.py | nishii-singh/Sentiment-analysis | efd75687ccf79e8aac44328c0cb999a9c14000c4 | [
"Apache-2.0"
] | null | null | null | ResourceBasedSentimentClassification.py | nishii-singh/Sentiment-analysis | efd75687ccf79e8aac44328c0cb999a9c14000c4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
# NISHI SINGH
# HOOMACL201900025
# MA COMPUTATIONAL LINGUISTICS
# This module is written to do a Resource Based Semantic analyasis using hindi sentiwordnet.
import pandas as pd
import codecs
from nltk.tokenize import word_tokenize
import sklearn.metrics
import re
fiel... | 30.108434 | 112 | 0.615046 |
7d323d85e7c9ca9325c77f12c3a95d259459ede7 | 39,780 | py | Python | fairseq/sequence_generator.py | dumpmemory/fairseq | c39fefccb013bfb8b1dc6cbbfabe1fd7ad4344a7 | [
"MIT"
] | 1 | 2021-11-10T06:17:44.000Z | 2021-11-10T06:17:44.000Z | fairseq/sequence_generator.py | EricWangCN/fairseq | 321589988bc05038f927cf5e887e8c60f46d9c2a | [
"MIT"
] | null | null | null | fairseq/sequence_generator.py | EricWangCN/fairseq | 321589988bc05038f927cf5e887e8c60f46d9c2a | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import math
import sys
from typing import Dict, List, Optional
import torch
import torch.nn as nn
from torch import Tensor
from fairseq impo... | 39.859719 | 110 | 0.574837 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.