hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4fd942f47c9a6e05b9480b1f959e5865d239a867 | 5,414 | py | Python | mjmpc/control/gaussian_dmd.py | mohakbhardwaj/mjmpc | 097e8d9bdaf0b3a15afa39030b2f53b00dfa25de | [
"Apache-2.0"
] | 2 | 2021-08-15T22:23:50.000Z | 2021-12-03T13:09:13.000Z | mjmpc/control/gaussian_dmd.py | mohakbhardwaj/mjmpc | 097e8d9bdaf0b3a15afa39030b2f53b00dfa25de | [
"Apache-2.0"
] | null | null | null | mjmpc/control/gaussian_dmd.py | mohakbhardwaj/mjmpc | 097e8d9bdaf0b3a15afa39030b2f53b00dfa25de | [
"Apache-2.0"
] | 1 | 2022-02-18T10:22:49.000Z | 2022-02-18T10:22:49.000Z | #!/usr/bin/env python
"""
A version of DMD-MPC with Gaussian sampling,
exponential utility cost function and
covariance adaptation
Author - Mohak Bhardwaj
Date - Jan 19, 2020
"""
from mjmpc.utils.control_utils import cost_to_go
from .olgaussian_mpc import OLGaussianMPC
import copy
import numpy as np
import scipy.s... | 38.397163 | 109 | 0.488548 | 5,084 | 0.939047 | 0 | 0 | 0 | 0 | 0 | 0 | 1,555 | 0.287218 |
4fdc4f711926c912f23a1ff7ba283995e9318cf1 | 884 | py | Python | dbModel.py | eric033014/Line-bot | b4f104c9654ab7d618f22ca0616d10b41f844c79 | [
"MIT"
] | 104 | 2017-02-26T13:44:00.000Z | 2022-03-31T13:52:35.000Z | dbModel.py | eric033014/Line-bot | b4f104c9654ab7d618f22ca0616d10b41f844c79 | [
"MIT"
] | 9 | 2018-06-15T16:33:52.000Z | 2022-03-11T23:24:42.000Z | dbModel.py | eric033014/Line-bot | b4f104c9654ab7d618f22ca0616d10b41f844c79 | [
"MIT"
] | 69 | 2017-05-29T13:50:20.000Z | 2022-02-03T19:13:56.000Z | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
app = Flask(__name__)
app.config[
'SQLALCHEMY_DATABASE_URI'] = 'postgres://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
db = SQLAlchemy(app)
migrate = Migrate(app, db)
manage... | 23.891892 | 81 | 0.667421 | 455 | 0.514706 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.109729 |
4fdcd1bc159126e84ebdfa6322a0a25d9ab11fff | 3,064 | py | Python | modules/finance/social_security_audit/code/list_social_security_audit.py | xuhuiliang-maybe/ace_office | 07fae18676a193206802e8fb9aa32a805b1da24c | [
"Apache-2.0"
] | 1 | 2018-11-27T08:08:07.000Z | 2018-11-27T08:08:07.000Z | modules/finance/social_security_audit/code/list_social_security_audit.py | xuhuiliang-maybe/ace_office | 07fae18676a193206802e8fb9aa32a805b1da24c | [
"Apache-2.0"
] | null | null | null | modules/finance/social_security_audit/code/list_social_security_audit.py | xuhuiliang-maybe/ace_office | 07fae18676a193206802e8fb9aa32a805b1da24c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from django.contrib.auth.decorators import login_required
from django.contrib.auth.decorators import permission_required
from django.views.generic import ListView
from modules.finance.social_security_audit.models import *
from modules.share_module.formater import *
from modules.share_module.permissionMi... | 44.405797 | 116 | 0.792755 | 2,520 | 0.80821 | 0 | 0 | 2,675 | 0.857922 | 0 | 0 | 792 | 0.254009 |
4fde8899e019b17ecbe9311227f7c8f58e1e998b | 1,021 | py | Python | split_dataset/split_dataset.py | si-you/tools | 7b050310bdf64483531b5b16045a457ab7bc2e14 | [
"Apache-2.0"
] | null | null | null | split_dataset/split_dataset.py | si-you/tools | 7b050310bdf64483531b5b16045a457ab7bc2e14 | [
"Apache-2.0"
] | null | null | null | split_dataset/split_dataset.py | si-you/tools | 7b050310bdf64483531b5b16045a457ab7bc2e14 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
from absl import app
from absl import flags
import pandas as pd
FLAGS = flags.FLAGS
flags.DEFINE_string('dataset', None, 'A path to the dataset.')
flags.DEFINE_float('test_fraction', 0.2, 'A sp... | 24.902439 | 79 | 0.664055 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.213516 |
4fdf055b9b3959ba24471fbf965e154f00092d20 | 29,451 | py | Python | src/charter/axis.py | paw-lu/charter | ad36fbc1589b0e77af102b2b92873b7b412ef4eb | [
"MIT"
] | null | null | null | src/charter/axis.py | paw-lu/charter | ad36fbc1589b0e77af102b2b92873b7b412ef4eb | [
"MIT"
] | null | null | null | src/charter/axis.py | paw-lu/charter | ad36fbc1589b0e77af102b2b92873b7b412ef4eb | [
"MIT"
] | null | null | null | """A unicode number line."""
import bisect
import dataclasses
import math
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
from typing import Union
import rich.columns
import rich.measure
import rich.table
import rich.text
from rich.console import Console
from rich.c... | 36.047736 | 88 | 0.565516 | 21,552 | 0.731519 | 1,365 | 0.046331 | 2,554 | 0.086688 | 0 | 0 | 10,491 | 0.356086 |
4fdf1f2bc3691125407e6d9ef56d7aa3c6197b78 | 1,316 | py | Python | exercises/bssid-based/receive.py | ramonfontes/tutorials | 3335911512c14d90a1dddf425c3bc697c73e9581 | [
"Apache-2.0"
] | 3 | 2019-12-17T13:10:19.000Z | 2021-03-19T14:16:34.000Z | exercises/bssid-based/receive.py | ramonfontes/tutorials | 3335911512c14d90a1dddf425c3bc697c73e9581 | [
"Apache-2.0"
] | null | null | null | exercises/bssid-based/receive.py | ramonfontes/tutorials | 3335911512c14d90a1dddf425c3bc697c73e9581 | [
"Apache-2.0"
] | 4 | 2019-08-23T03:48:46.000Z | 2020-07-14T18:26:53.000Z | #!/usr/bin/env python
import sys
import os
from binascii import hexlify
from scapy.all import sniff
from scapy.all import TCP, Raw
allowed_bssids = ['020000000200']
reg_mac = []
def handle_pkt(pkt):
if TCP in pkt and pkt[TCP].dport == 1234 and Raw in pkt:
pkt = pkt.lastlayer()
pktHex = hexlify(st... | 28 | 73 | 0.56155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0.243921 |
4fdf21ff4984773ad50f5c25c0c1fd4ddfd99a2a | 37 | py | Python | mmo_module/__init__.py | alentoghostflame/StupidAlentoBot | c024bfb79a9ecb0d9fda5ddc4e361a0cb878baba | [
"MIT"
] | 1 | 2021-12-12T02:50:20.000Z | 2021-12-12T02:50:20.000Z | mmo_module/__init__.py | alentoghostflame/StupidAlentoBot | c024bfb79a9ecb0d9fda5ddc4e361a0cb878baba | [
"MIT"
] | 17 | 2020-02-07T23:40:36.000Z | 2020-12-22T16:38:44.000Z | mmo_module/__init__.py | alentoghostflame/StupidAlentoBot | c024bfb79a9ecb0d9fda5ddc4e361a0cb878baba | [
"MIT"
] | null | null | null | from mmo_module.mmo import MMOModule
| 18.5 | 36 | 0.864865 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4fdfd1c4ab06f23890420a493923d2a14bf8dc09 | 102 | py | Python | kattis/I've Been Everywhere, Man.py | jaredliw/python-question-bank | 9c8c246623d8d171f875700b57772df0afcbdcdf | [
"MIT"
] | 1 | 2021-04-08T07:49:15.000Z | 2021-04-08T07:49:15.000Z | kattis/I've Been Everywhere, Man.py | jaredliw/leetcode-solutions | 9c8c246623d8d171f875700b57772df0afcbdcdf | [
"MIT"
] | null | null | null | kattis/I've Been Everywhere, Man.py | jaredliw/leetcode-solutions | 9c8c246623d8d171f875700b57772df0afcbdcdf | [
"MIT"
] | 1 | 2022-01-23T02:12:24.000Z | 2022-01-23T02:12:24.000Z | # CPU: 0.09 s
for _ in range(int(input())):
print(len(set(input() for _ in range(int(input())))))
| 25.5 | 57 | 0.598039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.127451 |
4fe00bbc1d96a9e4ee679d65e35e6265c0f3db74 | 4,956 | py | Python | demo/multimodal/offline/QA/index_and_export/src/modeling.py | meta-soul/MetaSpore | e6fbc12c6a3139df76c87215b16f9dba65962ec7 | [
"Apache-2.0"
] | 32 | 2022-03-30T10:24:00.000Z | 2022-03-31T16:19:15.000Z | demo/multimodal/offline/QA/index_and_export/src/modeling.py | meta-soul/MetaSpore | e6fbc12c6a3139df76c87215b16f9dba65962ec7 | [
"Apache-2.0"
] | null | null | null | demo/multimodal/offline/QA/index_and_export/src/modeling.py | meta-soul/MetaSpore | e6fbc12c6a3139df76c87215b16f9dba65962ec7 | [
"Apache-2.0"
] | 3 | 2022-03-30T10:28:57.000Z | 2022-03-30T11:37:39.000Z | #
# Copyright 2022 DMetaSoul
#
# 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 writin... | 37.545455 | 149 | 0.669895 | 3,852 | 0.77724 | 0 | 0 | 794 | 0.16021 | 0 | 0 | 1,139 | 0.229822 |
4fe261b5c5bdf6d5965d4a6a97ddaf037a48c4ec | 518 | py | Python | 079_Valores_unicos_em_uma_lista.py | fabioeomedeiros/Python-Base | ef9c1c66b3221f71d1c8dcaf4c2f86503712e9f1 | [
"MIT"
] | null | null | null | 079_Valores_unicos_em_uma_lista.py | fabioeomedeiros/Python-Base | ef9c1c66b3221f71d1c8dcaf4c2f86503712e9f1 | [
"MIT"
] | null | null | null | 079_Valores_unicos_em_uma_lista.py | fabioeomedeiros/Python-Base | ef9c1c66b3221f71d1c8dcaf4c2f86503712e9f1 | [
"MIT"
] | null | null | null | #079_Valores_unicos_em_uma_lista.py
lista = []
print("")
while True:
n = int(input("Adicione valor: "))
if n not in lista:
lista.append(n)
print(f"Valor {n} adicionado com sucesso")
else:
print(f"Valor {n} duplicado NÃO adicionado")
esc = " "
while esc not in "SN":
... | 19.923077 | 71 | 0.554054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.32948 |
4fe32257723f36117284934c831c406997cca99a | 807 | py | Python | dcapi/dcapi.py | lethargilistic/dcapi-wrap | cc8366eee68bc4354a9256dc571c0a889e27d1de | [
"MIT"
] | null | null | null | dcapi/dcapi.py | lethargilistic/dcapi-wrap | cc8366eee68bc4354a9256dc571c0a889e27d1de | [
"MIT"
] | null | null | null | dcapi/dcapi.py | lethargilistic/dcapi-wrap | cc8366eee68bc4354a9256dc571c0a889e27d1de | [
"MIT"
] | null | null | null | import requests
from urllib.parse import urlparse
from os.path import join
#TODO: Break into separate standard settings module
ROOT_URL = 'http://progdisc.club/~lethargilistic/proxy'
HEADERS = {'User-Agent': 'dcapi-wrap (https://github.com/lethargilistic/dcapi-wrap)'}
def set_url(url):
if urlparse(url):
R... | 29.888889 | 85 | 0.680297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 253 | 0.313507 |
4fe3746ddc4fa14a658845cda471a268db232170 | 2,570 | py | Python | imagenet/utils.py | ayanc/tf-boilerplate | 7454f047b7c2abdc37fb3a328c0852fed23b169c | [
"MIT"
] | 2 | 2017-10-12T03:22:58.000Z | 2021-03-21T02:54:43.000Z | imagenet/utils.py | afcarl/tf-boilerplate | 7454f047b7c2abdc37fb3a328c0852fed23b169c | [
"MIT"
] | null | null | null | imagenet/utils.py | afcarl/tf-boilerplate | 7454f047b7c2abdc37fb3a328c0852fed23b169c | [
"MIT"
] | 4 | 2017-07-26T03:50:24.000Z | 2018-06-13T22:29:52.000Z | # Ayan Chakrabarti <ayanc@ttic.edu>
import re
import os
from glob import glob
import numpy as np
# Find all indices of labels with class cls
def find(labels,cls):
return np.array(range(len(labels)))[labels == cls]
# Raw load text file
def load(fname):
data = []
labels = []
for line in open(fname).rea... | 28.241758 | 66 | 0.549805 | 1,794 | 0.698054 | 0 | 0 | 0 | 0 | 0 | 0 | 439 | 0.170817 |
4fe3afe59e6fdce48edf3083bbe3da78eb1cdb6a | 785 | py | Python | TWLight/i18n/urls.py | nicole331/TWLight | fab9002e76868f8a2ef36f9279c777de34243b2c | [
"MIT"
] | 67 | 2017-12-14T22:27:48.000Z | 2022-03-13T18:21:31.000Z | TWLight/i18n/urls.py | nicole331/TWLight | fab9002e76868f8a2ef36f9279c777de34243b2c | [
"MIT"
] | 433 | 2017-03-24T22:51:23.000Z | 2022-03-31T19:36:22.000Z | TWLight/i18n/urls.py | Mahuton/TWLight | 90b299d07b0479f21dc90e17b8d05f5a221b0de1 | [
"MIT"
] | 105 | 2017-06-23T03:53:41.000Z | 2022-03-30T17:24:29.000Z | from django.conf import settings
from django.conf.urls import url
from django.urls import LocalePrefixPattern, URLResolver, get_resolver, path
from TWLight.i18n.views import set_language
# Direct rip from django.conf.urls.i18n, but imports our local set_language
# from GitHub
def i18n_patterns(*urls, prefix_default_... | 30.192308 | 81 | 0.721019 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.349045 |
4fe4839dae10bc01dde53637f1ffe6245260d1eb | 1,012,691 | py | Python | fkie_node_manager/src/fkie_node_manager/gui_resources.py | stertingen/multimaster_fkie | 95c2f5fae71c8337cc18b02db4e529b6900a91b2 | [
"BSD-3-Clause"
] | 1 | 2021-12-17T17:16:52.000Z | 2021-12-17T17:16:52.000Z | fkie_node_manager/src/fkie_node_manager/gui_resources.py | stertingen/multimaster_fkie | 95c2f5fae71c8337cc18b02db4e529b6900a91b2 | [
"BSD-3-Clause"
] | null | null | null | fkie_node_manager/src/fkie_node_manager/gui_resources.py | stertingen/multimaster_fkie | 95c2f5fae71c8337cc18b02db4e529b6900a91b2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: Mo. Mai 6 13:33:38 2019
# by: The Resource Compiler for PySide (Qt v4.8.7)
#
# WARNING! All changes made in this file will be lost!
from python_qt_binding import QtCore
qt_resource_data = "\x00\x00\x02&\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x0... | 46,031.409091 | 989,755 | 0.742664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,012,324 | 0.999638 |
4fe4889177cae87456a36f25f593aec933d75897 | 694 | py | Python | fq/agent/naive.py | valkiii/connect_four | e3cde9cfe2d3a75f5b9ba4b10075ecdcfb99dfc0 | [
"MIT"
] | null | null | null | fq/agent/naive.py | valkiii/connect_four | e3cde9cfe2d3a75f5b9ba4b10075ecdcfb99dfc0 | [
"MIT"
] | null | null | null | fq/agent/naive.py | valkiii/connect_four | e3cde9cfe2d3a75f5b9ba4b10075ecdcfb99dfc0 | [
"MIT"
] | null | null | null | import random
from fq.agent.base import Agent
from fq.four_board import Move
from fq.four_types import Point
class RandomBot(Agent):
def select_move(self, game_state):
'''
Choose a random valid move
'''
candidates = []
for c in range(1, game_state.board.num_cols +1):
... | 34.7 | 86 | 0.632565 | 575 | 0.82853 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.073487 |
4fe6f57209b77d918a0add8432a5a2b69bdec813 | 12,014 | py | Python | nsdistort.py | PyryM/northstar-distortion | 5e13b99c74ce867aac7112c8a5c1b1efd41fd787 | [
"MIT"
] | 1 | 2019-08-14T08:39:12.000Z | 2019-08-14T08:39:12.000Z | nsdistort.py | PyryM/northstar-distortion | 5e13b99c74ce867aac7112c8a5c1b1efd41fd787 | [
"MIT"
] | null | null | null | nsdistort.py | PyryM/northstar-distortion | 5e13b99c74ce867aac7112c8a5c1b1efd41fd787 | [
"MIT"
] | 1 | 2019-08-14T08:39:15.000Z | 2019-08-14T08:39:15.000Z | import math
import numpy as np
import cv2
import json
import argparse
def augment_homogeneous(V, augment):
""" Augment a 3xN array of vectors into a 4xN array of homogeneous coordinates
Args:
v (np.array 3xN): Array of vectors
augment (float): The value to fill in for the W coordinate
Retu... | 38.018987 | 104 | 0.584734 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,694 | 0.390321 |
4fe866c200278b721601124e14d85b55ade3f933 | 3,080 | py | Python | chainer_bcnn/links/connection/pixel_shuffle_upsampler.py | yuta-hi/bayesian_unet | cce1dbd75fad9cc29b77eb1c76b33c6a3eb0ffa6 | [
"MIT"
] | 36 | 2019-12-04T02:09:25.000Z | 2022-03-31T07:18:40.000Z | chainer_bcnn/links/connection/pixel_shuffle_upsampler.py | keisuke-uemura/bayesian_unet | cce1dbd75fad9cc29b77eb1c76b33c6a3eb0ffa6 | [
"MIT"
] | 2 | 2019-12-03T06:35:07.000Z | 2020-06-14T23:14:13.000Z | chainer_bcnn/links/connection/pixel_shuffle_upsampler.py | keisuke-uemura/bayesian_unet | cce1dbd75fad9cc29b77eb1c76b33c6a3eb0ffa6 | [
"MIT"
] | 8 | 2020-12-07T03:43:22.000Z | 2022-02-02T03:39:40.000Z | from __future__ import absolute_import
import chainer
import chainer.functions as F
from .convolution import ConvolutionND
def _pair(x, ndim=2):
if hasattr(x, '__getitem__'):
return x
return [x]*ndim
class PixelShuffleUpsamplerND(chainer.Chain):
"""Pixel Shuffler for the super resolution.
Th... | 35.402299 | 82 | 0.630519 | 2,855 | 0.926948 | 0 | 0 | 0 | 0 | 0 | 0 | 395 | 0.128247 |
4fe89fe9a8bdb2830db5052a284915883fc9077c | 199 | py | Python | bin/createLinkograph.py | mikiec84/linkshop | 72959ceca0003be226edeca6496f915502831596 | [
"Apache-2.0"
] | 6 | 2017-07-18T15:28:33.000Z | 2020-03-03T14:45:45.000Z | bin/createLinkograph.py | mikiec84/linkshop | 72959ceca0003be226edeca6496f915502831596 | [
"Apache-2.0"
] | null | null | null | bin/createLinkograph.py | mikiec84/linkshop | 72959ceca0003be226edeca6496f915502831596 | [
"Apache-2.0"
] | 3 | 2017-09-09T00:36:48.000Z | 2020-03-03T14:45:49.000Z | #!/usr/bin/env python3
"""Command-line wrapper for linkoCreate.cli_createLinko."""
import loadPath # Adds the project path.
import linkograph.linkoCreate
linkograph.linkoCreate.cli_createLinko()
| 22.111111 | 59 | 0.79397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.527638 |
4feaf213163ef5a00b436c5ad7ecdcf5303d9108 | 4,008 | py | Python | setup.py | gift-surg/endocal | e94969e90188cc661d4ddb937d0eed6c19892cdb | [
"BSD-3-Clause"
] | null | null | null | setup.py | gift-surg/endocal | e94969e90188cc661d4ddb937d0eed6c19892cdb | [
"BSD-3-Clause"
] | 35 | 2016-07-14T08:22:05.000Z | 2018-04-12T09:02:16.000Z | setup.py | gift-surg/endocal | e94969e90188cc661d4ddb937d0eed6c19892cdb | [
"BSD-3-Clause"
] | null | null | null | """A compact GUI application for optical distortion calibration of endoscopes.
See:
https://github.com/gift-surg/endocal
"""
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
doc_dir = path.abspath(path.join(path.dirname(__file__), 'doc'))
# Get the summary
summ... | 36.436364 | 85 | 0.661178 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,953 | 0.736776 |
4feaff87bfba44525ae00bcc254f129cd01cf258 | 2,832 | py | Python | pyglfw/test-opengl-2.1-vbo-shader.py | martijnberger/OpenGL-tests | cd259d923a70c22566fa3dc140764b409181cfc5 | [
"Unlicense"
] | null | null | null | pyglfw/test-opengl-2.1-vbo-shader.py | martijnberger/OpenGL-tests | cd259d923a70c22566fa3dc140764b409181cfc5 | [
"Unlicense"
] | null | null | null | pyglfw/test-opengl-2.1-vbo-shader.py | martijnberger/OpenGL-tests | cd259d923a70c22566fa3dc140764b409181cfc5 | [
"Unlicense"
] | null | null | null | __author__ = 'Martijn Berger'
import OpenGL.GL as gl
import numpy as np
import ctypes
import glfw
vertex_code = """
#version 120
void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_FrontColor = gl_Color;
}
"""
fragment_code = """
#version 120
void main()
{
gl_FragColor = gl_Co... | 24.842105 | 91 | 0.683969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 799 | 0.282133 |
4feb1a147d8e50c42d794ec01fa85f89b90107e5 | 3,378 | py | Python | tests/dataframesource/sources/test_dataikusource.py | telia-oss/birgitta | e4d27465f54a1d4789741e19e15aec726149a735 | [
"MIT"
] | 8 | 2019-11-25T16:39:33.000Z | 2022-03-31T12:48:54.000Z | tests/dataframesource/sources/test_dataikusource.py | telia-oss/birgitta | e4d27465f54a1d4789741e19e15aec726149a735 | [
"MIT"
] | 218 | 2019-09-09T11:11:59.000Z | 2022-03-08T05:16:40.000Z | tests/dataframesource/sources/test_dataikusource.py | telia-oss/birgitta | e4d27465f54a1d4789741e19e15aec726149a735 | [
"MIT"
] | 4 | 2020-07-21T15:33:40.000Z | 2021-12-22T11:32:45.000Z | import sys
from unittest.mock import MagicMock, patch # noqa F401
import mock
import pytest # noqa F401
# TODO: Simplify the mocking of private (unavailable) dataiku lib.
# Current mocking is ugly and complex.
if 'dataiku.Dataset' in sys.modules:
del sys.modules['dataiku.Dataset']
if 'dataiku' in sys.modules:
... | 35.93617 | 85 | 0.718176 | 0 | 0 | 0 | 0 | 1,676 | 0.496152 | 0 | 0 | 876 | 0.259325 |
4fecfd6ef667d7249408c54f04d8fa75b42ee77d | 6,661 | py | Python | Final Project/Final Project Code/UnityRosHusky/src/Mobile-Robot-Navigation-and-Mapping/mobile_robot_navigation_project/scripts/bug0.py | AdityaPradhan1/Nokia_Bell_Labs-MIT_Manipal-ROS_Mapping_Platform | 3775d8705eef2afc22dbeb9802449e010159a271 | [
"MIT"
] | 3 | 2021-12-07T11:21:23.000Z | 2022-03-03T11:58:33.000Z | Final Project/Final Project Code/UnityRosHusky/src/Mobile-Robot-Navigation-and-Mapping/mobile_robot_navigation_project/scripts/bug0.py | X-TRON404/Nokia_Bell_Labs-MIT_Manipal-ROS_Mapping_Platform | 3775d8705eef2afc22dbeb9802449e010159a271 | [
"MIT"
] | null | null | null | Final Project/Final Project Code/UnityRosHusky/src/Mobile-Robot-Navigation-and-Mapping/mobile_robot_navigation_project/scripts/bug0.py | X-TRON404/Nokia_Bell_Labs-MIT_Manipal-ROS_Mapping_Platform | 3775d8705eef2afc22dbeb9802449e010159a271 | [
"MIT"
] | 3 | 2022-02-27T12:45:12.000Z | 2022-03-03T11:58:38.000Z | #! /usr/bin/env python
"""
.. module:: bug0
:platform: Unix
:synopsis: Python module for implementing the bug0 path planning algorithm
.. moduleauthor:: Omotoye Adekoya adekoyaomotoye@gmail.com
This node implements the bug0 path planning algorithm for moving a robot from its current
position to some target ... | 28.96087 | 90 | 0.645248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,252 | 0.338087 |
4fed64955e3f58c7d25139eda70d26d1d7e7189f | 798 | py | Python | recorded_future/komand_recorded_future/actions/lookup_domain/action.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | recorded_future/komand_recorded_future/actions/lookup_domain/action.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | recorded_future/komand_recorded_future/actions/lookup_domain/action.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | import komand
from .. import demo_test
from .schema import LookupDomainInput, LookupDomainOutput
class LookupDomain(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='lookup_domain',
description='This action is used to return information about a... | 33.25 | 102 | 0.635338 | 698 | 0.874687 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.131579 |
4fee118b606298d594ac270f9706f38bb9dd33f7 | 866 | py | Python | Python3/838.push-dominoes.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/838.push-dominoes.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/838.push-dominoes.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=838 lang=python3
#
# [838] Push Dominoes
#
# @lc code=start
class Solution:
def pushDominoes(self, dominoes: str) -> str:
l = 0
ans = []
dominoes = 'L' + dominoes + 'R'
for r in range(1, len(dominoes)):
if dominoes[r] == '.':
conti... | 24.055556 | 81 | 0.435335 | 661 | 0.763279 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.169746 |
4fee178000fc83c8ccb38059e8f124cb6b142bf8 | 4,700 | py | Python | ode/deserializers.py | LiberTIC/ODE | 291fd23c94847e3f5e2f31bc95241ecc111abe7f | [
"BSD-3-Clause"
] | 2 | 2015-01-13T15:06:16.000Z | 2016-08-17T12:49:45.000Z | ode/deserializers.py | LiberTIC/ODE | 291fd23c94847e3f5e2f31bc95241ecc111abe7f | [
"BSD-3-Clause"
] | null | null | null | ode/deserializers.py | LiberTIC/ODE | 291fd23c94847e3f5e2f31bc95241ecc111abe7f | [
"BSD-3-Clause"
] | null | null | null | import csv
import json
import re
import six
from six import StringIO
from ics import Calendar
from ics.parse import ParseError
def default_extractor(attribute):
def extractor(event):
if hasattr(event, attribute):
return getattr(event, attribute)
return extractor
def date_exractor(attri... | 29.559748 | 76 | 0.575957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 592 | 0.125957 |
4fefddd3427c3502d85ef9985a5b9195f2336262 | 1,095 | py | Python | src/poker_now_log_converter/player.py | charlestudor/PokerNowLogConverter | f888a26d805546b2e470c1066552da4dfe9caf58 | [
"MIT"
] | 1 | 2022-01-18T18:14:41.000Z | 2022-01-18T18:14:41.000Z | src/poker_now_log_converter/player.py | charlestudor/PokerNowLogConverter | f888a26d805546b2e470c1066552da4dfe9caf58 | [
"MIT"
] | 4 | 2022-01-19T10:48:49.000Z | 2022-01-26T21:55:08.000Z | src/poker_now_log_converter/player.py | charlestudor/PokerNowLogConverter | f888a26d805546b2e470c1066552da4dfe9caf58 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Provides the Player class as part of the PokerNowLogConverter data model"""
from dataclasses import dataclass
@dataclass
class Player:
""" The Player class represents a player in a particular hand of poker.
Players start without an alias, which can be set using a method once the ... | 37.758621 | 112 | 0.694064 | 942 | 0.860274 | 0 | 0 | 953 | 0.87032 | 0 | 0 | 850 | 0.776256 |
4ff048f6366944e28bb0e1aee471e8cd65282915 | 1,122 | py | Python | 数据结构/NowCode/37_Print.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | null | null | null | 数据结构/NowCode/37_Print.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 3 | 2020-08-14T07:50:27.000Z | 2020-08-14T08:51:06.000Z | 数据结构/NowCode/37_Print.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 2 | 2021-03-14T05:58:45.000Z | 2021-08-29T17:25:52.000Z | class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
# 返回二维列表[[1,2],[4,5]]
def Print(self, pRoot):
if pRoot == None:
return []
queue1 = [pRoot]
queue2 = []
ret = []
while queue1 or q... | 29.526316 | 52 | 0.421569 | 1,130 | 0.996473 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.029101 |
4ff233f06959c9c3fd255703c4a7a5d03a690260 | 2,367 | py | Python | dirmon/dirmon/dirmon.py | ytreister/stoq-plugins-public | 1325ba0f61a313a1b9dbb71f2843ee698fb7ab9d | [
"Apache-2.0"
] | 72 | 2015-11-20T12:52:10.000Z | 2021-06-08T16:57:53.000Z | dirmon/dirmon/dirmon.py | ytreister/stoq-plugins-public | 1325ba0f61a313a1b9dbb71f2843ee698fb7ab9d | [
"Apache-2.0"
] | 87 | 2016-08-25T15:09:59.000Z | 2022-02-07T14:34:45.000Z | dirmon/dirmon/dirmon.py | ytreister/stoq-plugins-public | 1325ba0f61a313a1b9dbb71f2843ee698fb7ab9d | [
"Apache-2.0"
] | 37 | 2015-11-20T12:51:59.000Z | 2021-12-13T18:13:32.000Z | # Copyright 2014-present PUNCH Cyber Analytics Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 34.304348 | 85 | 0.632446 | 1,366 | 0.577102 | 0 | 0 | 0 | 0 | 887 | 0.374736 | 971 | 0.410224 |
4ff270ae3740ae1c772d22e13e0d8d42fb7216e5 | 1,284 | py | Python | bg.py | Blue-IT-Marketing/sa-loans | ff574766f1ae8bc051e5ba07acc47418118a3704 | [
"MIT"
] | null | null | null | bg.py | Blue-IT-Marketing/sa-loans | ff574766f1ae8bc051e5ba07acc47418118a3704 | [
"MIT"
] | null | null | null | bg.py | Blue-IT-Marketing/sa-loans | ff574766f1ae8bc051e5ba07acc47418118a3704 | [
"MIT"
] | null | null | null | import os
import webapp2
import jinja2
from google.appengine.ext import ndb
from google.appengine.api import users
from google.appengine.api import mail
import datetime,random,string
from google.appengine.api import memcache
import logging
#Jinja Loader
template_env = jinja2.Environment(
loader=jinja2.FileSystemLoader... | 28.533333 | 83 | 0.753115 | 765 | 0.595794 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.149533 |
4ff3692a34dcb497bd8bcdf14990309f69e66f40 | 4,522 | py | Python | pystella/fit/fit_lc.py | baklanovp/pystella | 47a8b9c3dcd343bf80fba80c8468b803f0f842ce | [
"MIT"
] | 1 | 2019-08-08T13:11:57.000Z | 2019-08-08T13:11:57.000Z | pystella/fit/fit_lc.py | cradesto/pystella | f6f44ed12d9648585a52a09e15d494daa4c70c59 | [
"MIT"
] | 9 | 2015-07-11T16:39:57.000Z | 2021-11-23T07:31:49.000Z | pystella/fit/fit_lc.py | cradesto/pystella | f6f44ed12d9648585a52a09e15d494daa4c70c59 | [
"MIT"
] | 1 | 2019-08-08T13:08:55.000Z | 2019-08-08T13:08:55.000Z | import numpy as np
class FitLc:
def __init__(self, name):
self._name = name
self._par = {'is_info': False, 'is_debug': False, 'is_quiet': True}
def print_parameters(self):
print(f'Parmeters of {self.Name}')
for k, v in self._par.items():
print(f'{k:20s}: {v}')
... | 24.181818 | 95 | 0.542459 | 4,497 | 0.994471 | 0 | 0 | 3,499 | 0.773773 | 0 | 0 | 340 | 0.075188 |
4ff3a16a5fa8aa693911fb8998166de3a4ec3a5e | 2,118 | py | Python | tests/KG2E/run_tucker.py | walker-liu/fennlp | 7432595342b2f2139a788187d3b46fd2097bb10a | [
"MIT"
] | 1 | 2020-05-23T03:42:44.000Z | 2020-05-23T03:42:44.000Z | tests/KG2E/run_tucker.py | walker-liu/fennlp | 7432595342b2f2139a788187d3b46fd2097bb10a | [
"MIT"
] | null | null | null | tests/KG2E/run_tucker.py | walker-liu/fennlp | 7432595342b2f2139a788187d3b46fd2097bb10a | [
"MIT"
] | null | null | null | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
@Author:Kaiyin Zhou
"""
import numpy as np
import tensorflow as tf
from fennlp.datas.graphloader import TuckERLoader
from fennlp.metrics import Metric
from fennlp.models import tucker
lr = 0.005
label_smoothing = 0.1
batch_size = 128
training = True
loader = TuckERLo... | 35.898305 | 114 | 0.635033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 300 | 0.140318 |
4ff5b0c354535c37f2701811b82b3f73ff4f9e97 | 989 | py | Python | blogjaguar/apps/blog/categorylister.py | darioblanco/blogjaguar | 11f5d8b1afa8b206992142e97382895a80a70b58 | [
"Apache-2.0"
] | null | null | null | blogjaguar/apps/blog/categorylister.py | darioblanco/blogjaguar | 11f5d8b1afa8b206992142e97382895a80a70b58 | [
"Apache-2.0"
] | 9 | 2020-06-30T05:41:00.000Z | 2020-06-30T05:42:16.000Z | blogjaguar/apps/blog/categorylister.py | darioblanco/blogjaguar | 11f5d8b1afa8b206992142e97382895a80a70b58 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Dario Blanco Iturriaga
#
# 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... | 34.103448 | 76 | 0.71183 | 346 | 0.349848 | 0 | 0 | 0 | 0 | 0 | 0 | 747 | 0.755308 |
4ff7127fb8af28f83e193127a74153015f7cab85 | 16,150 | py | Python | Implementations/transformer-tf2implementation/tf2_util_layer.py | YifanWu1994/ML-Papers | 10b896ebb62d27ccc2420ed126df746124c11341 | [
"MIT"
] | 2 | 2020-03-10T15:04:15.000Z | 2020-09-11T10:41:00.000Z | Implementations/transformer-tf2implementation/tf2_util_layer.py | YifanWu1994/ML-Papers | 10b896ebb62d27ccc2420ed126df746124c11341 | [
"MIT"
] | null | null | null | Implementations/transformer-tf2implementation/tf2_util_layer.py | YifanWu1994/ML-Papers | 10b896ebb62d27ccc2420ed126df746124c11341 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.layers import *
assert tf.__version__>="2.0.0", f"Expect TF>=2.0.0 but get {tf.__version__}"
class PositionalSinEmbedding(tf.keras.layers.Layer):
"""
Positional Sinusoidal Embedding layer as described in "Attention is All You Need".
|
| Parameters:
| | input_dim: pa... | 37.297921 | 197 | 0.737523 | 15,991 | 0.990155 | 0 | 0 | 3,214 | 0.199009 | 0 | 0 | 6,317 | 0.391146 |
4ff807a48e43dab450062bab8fe414c8fa64a3d1 | 1,856 | py | Python | src/users/models/microsoftgraphteam_messaging_settings.py | peombwa/Sample-Graph-Python-Client | 3396f531fbe6bb40a740767c4e31aee95a3b932e | [
"MIT"
] | null | null | null | src/users/models/microsoftgraphteam_messaging_settings.py | peombwa/Sample-Graph-Python-Client | 3396f531fbe6bb40a740767c4e31aee95a3b932e | [
"MIT"
] | null | null | null | src/users/models/microsoftgraphteam_messaging_settings.py | peombwa/Sample-Graph-Python-Client | 3396f531fbe6bb40a740767c4e31aee95a3b932e | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 45.268293 | 176 | 0.688039 | 1,499 | 0.807651 | 0 | 0 | 0 | 0 | 0 | 0 | 1,056 | 0.568966 |
4ff80844273cf854c1faf190a9b2ee85a3b36cae | 887 | py | Python | setup.py | shraman-rc/SecFS | a48f931a4f9270c607150ba5322230d2510d1236 | [
"MIT"
] | 2 | 2019-02-16T18:17:16.000Z | 2021-10-31T23:12:57.000Z | setup.py | nicola/security-project | 386f8baf808ca5d9db0c6e43647b9f1468e49f22 | [
"MIT"
] | null | null | null | setup.py | nicola/security-project | 386f8baf808ca5d9db0c6e43647b9f1468e49f22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='SecFS',
version='0.1.0',
description='6.858 final project --- an encrypted and authenticated file system',
long_description= open('README.md', 'r').read(),
author='Jon Gjengset',
author_email='jon@thesquareplanet.com',
ma... | 31.678571 | 85 | 0.62345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 512 | 0.577227 |
4ff80e59628e7631ea40f6f78ed0f7def3199284 | 4,130 | py | Python | IG_bots/classes/bot.py | domidanke/Make-Me-Famous | 87cf8bdda6f73acf449280abdc13a01e5da08d16 | [
"MIT"
] | 2 | 2020-10-12T15:39:03.000Z | 2020-10-12T16:35:46.000Z | IG_bots/classes/bot.py | domidanke/Make-Me-Famous | 87cf8bdda6f73acf449280abdc13a01e5da08d16 | [
"MIT"
] | 4 | 2020-10-11T16:53:59.000Z | 2020-10-22T14:33:02.000Z | IG_bots/classes/bot.py | domidanke/Make-Me-Famous | 87cf8bdda6f73acf449280abdc13a01e5da08d16 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(1, '../')
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
import random
from random import randint
from functions import config, wait
class Bot:
def __init__(self):
self.cred... | 36.22807 | 104 | 0.533414 | 3,870 | 0.937046 | 0 | 0 | 0 | 0 | 0 | 0 | 549 | 0.13293 |
4ff824ddfbc7836ffecae20ead3372f3cce1509e | 1,532 | py | Python | eventkit_cloud/jobs/migrations/0011_add_file_data_providers.py | venicegeo/eventkit-cloud | 3a9a4fbfea54d48387f3f3b2ab6e71946af9ffb2 | [
"BSD-3-Clause"
] | 1 | 2018-03-30T21:01:15.000Z | 2018-03-30T21:01:15.000Z | eventkit_cloud/jobs/migrations/0011_add_file_data_providers.py | venicegeo/eventkit-cloud | 3a9a4fbfea54d48387f3f3b2ab6e71946af9ffb2 | [
"BSD-3-Clause"
] | 46 | 2017-06-27T03:12:57.000Z | 2018-12-28T19:48:35.000Z | eventkit_cloud/jobs/migrations/0011_add_file_data_providers.py | venicegeo/eventkit-cloud | 3a9a4fbfea54d48387f3f3b2ab6e71946af9ffb2 | [
"BSD-3-Clause"
] | 7 | 2017-07-28T18:16:34.000Z | 2019-01-18T04:41:55.000Z | # Generated by Django 3.1.2 on 2021-01-27 18:43
from django.db import migrations
class Migration(migrations.Migration):
def add_file_data_providers(apps, schema_editor):
DataProviderType = apps.get_model("jobs", "DataProviderType")
ExportFormat = apps.get_model("jobs", "ExportFormat")
# ... | 40.315789 | 71 | 0.693864 | 1,447 | 0.944517 | 0 | 0 | 0 | 0 | 0 | 0 | 394 | 0.25718 |
4ff833159157523e89c19802c42dcae53025c73d | 655 | py | Python | Pythonista/Editor/make_zip.py | walogo/Pythonista-scripts | 760451a0cdbe5dd76008a4e616d74191385bbd8b | [
"MIT"
] | 2 | 2019-04-24T19:25:55.000Z | 2019-05-04T11:27:54.000Z | Pythonista/Editor/make_zip.py | walogo/Tools | 760451a0cdbe5dd76008a4e616d74191385bbd8b | [
"MIT"
] | 4 | 2019-04-08T02:02:56.000Z | 2019-05-04T10:30:26.000Z | Pythonista/Editor/make_zip.py | walogo/Tools | 760451a0cdbe5dd76008a4e616d74191385bbd8b | [
"MIT"
] | 1 | 2020-10-07T17:49:09.000Z | 2020-10-07T17:49:09.000Z | from sys import argv
from shutil import make_archive,copy2,copytree,move
from os import mkdir,rmdir,chdir,listdir,getcwd,remove
from os.path import isdir,join
def erase(file):
if isdir(file):
for f in listdir(file):
erase(join(file,f))
rmdir(file)
else:
remove(file)
def copy(file):
if isdir(file):
dst=jo... | 18.194444 | 54 | 0.69313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.09771 |
4ffa0615c5af4004c1177ea8230a27554d931fd6 | 2,000 | py | Python | setup.py | rps-v/crate-admin | e305700c6071c5ed3dfdc6b3ee0046267a5089e4 | [
"Apache-2.0"
] | 24 | 2015-01-14T21:32:37.000Z | 2021-04-13T21:29:56.000Z | setup.py | rps-v/crate-admin | e305700c6071c5ed3dfdc6b3ee0046267a5089e4 | [
"Apache-2.0"
] | 358 | 2015-01-13T08:34:46.000Z | 2022-03-17T10:57:16.000Z | setup.py | rps-v/crate-admin | e305700c6071c5ed3dfdc6b3ee0046267a5089e4 | [
"Apache-2.0"
] | 25 | 2015-04-01T16:58:36.000Z | 2021-11-17T10:00:26.000Z | # -*- coding: utf-8; -*-
#
# Licensed to CRATE Technology GmbH ("Crate") under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. Crate licenses
# this file to you under the Apache License, Version 2.0 (the "License"... | 32.258065 | 77 | 0.7095 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,258 | 0.629 |
4ffa4bb52cf7ead4916417cee5b8d6d6495c6760 | 658 | py | Python | Final_Project/top_ten_tags/mapper_top_ten_tags.py | saturator22/hadoop-mapreduce-udacity | 28bcf82985d96ce967137df9b2da7a3c1ff4d69e | [
"MIT"
] | null | null | null | Final_Project/top_ten_tags/mapper_top_ten_tags.py | saturator22/hadoop-mapreduce-udacity | 28bcf82985d96ce967137df9b2da7a3c1ff4d69e | [
"MIT"
] | null | null | null | Final_Project/top_ten_tags/mapper_top_ten_tags.py | saturator22/hadoop-mapreduce-udacity | 28bcf82985d96ce967137df9b2da7a3c1ff4d69e | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import csv
def mapper():
reader = csv.reader(sys.stdin, delimiter='\t')
writer = csv.writer(sys.stdout, delimiter='\t')
tagFrequency = {}
for line in reader:
nodeType = line[5]
if not nodeType == "question":
continue
tags... | 19.939394 | 51 | 0.525836 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.068389 |
4ffa72e790a3d4b20f49619940efed81b8845cf5 | 1,659 | py | Python | src/utils/url_parsers.py | googleinterns/connectivity-test | 789183797c831f683064e10d19132a183286dd05 | [
"Apache-2.0"
] | null | null | null | src/utils/url_parsers.py | googleinterns/connectivity-test | 789183797c831f683064e10d19132a183286dd05 | [
"Apache-2.0"
] | null | null | null | src/utils/url_parsers.py | googleinterns/connectivity-test | 789183797c831f683064e10d19132a183286dd05 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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 w... | 30.163636 | 97 | 0.667872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 894 | 0.538879 |
4ffae6ac0dd7d09c0ccad1471a8a046844a4cefd | 1,325 | py | Python | python/dlbs/exceptions.py | robertengelmann/dlcookbook-dlbs | c871372a8cb869f5f33b79d1211d8583707434e2 | [
"Apache-2.0"
] | 1 | 2021-03-19T06:51:11.000Z | 2021-03-19T06:51:11.000Z | python/dlbs/exceptions.py | robertengelmann/dlcookbook-dlbs | c871372a8cb869f5f33b79d1211d8583707434e2 | [
"Apache-2.0"
] | null | null | null | python/dlbs/exceptions.py | robertengelmann/dlcookbook-dlbs | c871372a8cb869f5f33b79d1211d8583707434e2 | [
"Apache-2.0"
] | null | null | null | # (c) Copyright [2017] Hewlett Packard Enterprise Development LP
#
# 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.868421 | 82 | 0.738113 | 634 | 0.478491 | 0 | 0 | 0 | 0 | 0 | 0 | 1,172 | 0.884528 |
4ffc988ca685a7eecc68f46466915c6813a39dba | 12,681 | py | Python | fbpic/picmi/simulation.py | wilds9/fbpic | 902c3bc8757545496b8cbb772401de6b0974a3dc | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-02-20T20:36:46.000Z | 2019-02-20T20:36:46.000Z | fbpic/picmi/simulation.py | RemiLehe/fbpic | f0d55048eb669081c26eff28fee39891b62aaeb2 | [
"BSD-3-Clause-LBNL"
] | 1 | 2018-11-07T23:42:53.000Z | 2018-11-07T23:42:53.000Z | fbpic/picmi/simulation.py | RemiLehe/fbpic | f0d55048eb669081c26eff28fee39891b62aaeb2 | [
"BSD-3-Clause-LBNL"
] | null | null | null | # Copyright 2019, FBPIC contributors
# Authors: Remi Lehe, Manuel Kirchen
# License: 3-Clause-BSD-LBNL
"""
This file is part of the Fourier-Bessel Particle-In-Cell code (FB-PIC)
It defines the picmi Simulation interface
"""
import numpy as np
from scipy.constants import c, e, m_e
from .particle_charge_and_mass import ... | 44.184669 | 100 | 0.609258 | 11,440 | 0.902137 | 0 | 0 | 0 | 0 | 0 | 0 | 2,343 | 0.184765 |
4fff62661ac758fcea1eeae3becc1b15f24aeb57 | 2,065 | py | Python | pyrobud/custom_modules/autoadmin.py | x0x8x/pyrobud | a03fb2c492d4ee5fe2e9f4e6d2b13614b09452e7 | [
"MIT"
] | null | null | null | pyrobud/custom_modules/autoadmin.py | x0x8x/pyrobud | a03fb2c492d4ee5fe2e9f4e6d2b13614b09452e7 | [
"MIT"
] | null | null | null | pyrobud/custom_modules/autoadmin.py | x0x8x/pyrobud | a03fb2c492d4ee5fe2e9f4e6d2b13614b09452e7 | [
"MIT"
] | null | null | null | import asyncio
import telethon as tg
from telethon.tl.types import PeerUser
from pyrobud import module
class AutoAdminModule(module.Module):
name = "Auto Admin"
no_events = [
"UpdateNewChannelMessage", "UpdateMessageID", "UpdateReadChannelInbox", "UpdateReadChannelOutbox",
"UpdateEditChanne... | 49.166667 | 117 | 0.569976 | 1,957 | 0.9477 | 0 | 0 | 0 | 0 | 1,703 | 0.824697 | 304 | 0.147215 |
8b00f1405c3ad03eb253f94da6f51045f8f6686b | 3,179 | py | Python | algorithms/genetic_algorithm.py | khiemdoan/tsp-ga-pso | 20eb41864b1b945d8c2b449b0dcd6831bb2afd6c | [
"MIT"
] | 1 | 2020-12-14T08:42:26.000Z | 2020-12-14T08:42:26.000Z | algorithms/genetic_algorithm.py | khiemdoan/tsp-ga-pso | 20eb41864b1b945d8c2b449b0dcd6831bb2afd6c | [
"MIT"
] | null | null | null | algorithms/genetic_algorithm.py | khiemdoan/tsp-ga-pso | 20eb41864b1b945d8c2b449b0dcd6831bb2afd6c | [
"MIT"
] | null | null | null | from .base import Algorithm
import random
from copy import deepcopy
from models import Tour
from typing import List, Tuple
n_population = 100
CXPB = 0.95
MUTPB = 0.1
class GeneticAlgorithm(Algorithm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.population: Lis... | 33.114583 | 91 | 0.591066 | 3,009 | 0.946524 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.046556 |
8b016f9d36a6a7346e12f1b2481290c3e06f7437 | 6,349 | py | Python | api/esprr_api/tests/test_utils.py | wholmgren/ESPRR | eb943d123bbebfdf1684be0cb7e246a54c593cc4 | [
"MIT"
] | 4 | 2021-05-04T19:52:33.000Z | 2022-03-03T03:33:00.000Z | api/esprr_api/tests/test_utils.py | wholmgren/ESPRR | eb943d123bbebfdf1684be0cb7e246a54c593cc4 | [
"MIT"
] | 17 | 2021-05-01T15:58:22.000Z | 2022-03-31T23:17:54.000Z | api/esprr_api/tests/test_utils.py | wholmgren/ESPRR | eb943d123bbebfdf1684be0cb7e246a54c593cc4 | [
"MIT"
] | 4 | 2021-05-01T15:54:44.000Z | 2022-02-14T21:54:06.000Z | import datetime as dt
from functools import partial
from io import BytesIO
from fastapi import HTTPException
import pandas as pd
import pyarrow as pa
import pytest
from esprr_api import utils
httpfail = partial(
pytest.param, marks=pytest.mark.xfail(strict=True, raises=HTTPException)
)
@pytest.mark.parametr... | 28.599099 | 84 | 0.351236 | 0 | 0 | 0 | 0 | 6,043 | 0.951803 | 0 | 0 | 582 | 0.091668 |
8b0407eabe8730ae8700e049e1b0a358e00b662f | 8,405 | py | Python | snakegame_v3.py | kz114109/project-ouroboros | 7fe68ad56b8e8b0b15f74634ce47ff74127efa08 | [
"MIT"
] | null | null | null | snakegame_v3.py | kz114109/project-ouroboros | 7fe68ad56b8e8b0b15f74634ce47ff74127efa08 | [
"MIT"
] | null | null | null | snakegame_v3.py | kz114109/project-ouroboros | 7fe68ad56b8e8b0b15f74634ce47ff74127efa08 | [
"MIT"
] | 2 | 2019-12-05T15:13:53.000Z | 2019-12-05T15:24:38.000Z | import random, pygame
import tkinter as tk
from tkinter import messagebox
pygame.init()
def text_format(message, textFont, textSize, textColor):
newFont=pygame.font.Font(textFont, textSize)
newText=newFont.render(message, 0, textColor)
return newText
font = "Retro.ttf"
class cube(object):
rows = 5... | 30.017857 | 92 | 0.500416 | 3,343 | 0.397739 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.04307 |
8b049063654a8131097a0b775408f70a6dbfaf94 | 6,767 | py | Python | vistrails/gui/shell.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | 1 | 2015-05-11T16:46:49.000Z | 2015-05-11T16:46:49.000Z | vistrails/gui/shell.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | vistrails/gui/shell.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | 35.994681 | 90 | 0.608394 | 3,386 | 0.500369 | 0 | 0 | 0 | 0 | 0 | 0 | 3,441 | 0.508497 |
8b05523632c605c54e5d43969458520e01212a63 | 3,858 | py | Python | stdlib2-src/dist-packages/quodlibet/qltk/dbus_.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | stdlib2-src/dist-packages/quodlibet/qltk/dbus_.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | stdlib2-src/dist-packages/quodlibet/qltk/dbus_.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | # Copyright 2006 Federico Pelloni <federico.pelloni@gmail.com>
# 2013 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
import dbus
import dbus.service
f... | 31.365854 | 76 | 0.62027 | 3,347 | 0.867548 | 0 | 0 | 1,855 | 0.480819 | 0 | 0 | 730 | 0.189217 |
8b0610b1c3104b500647289a378d78d363771d92 | 1,915 | py | Python | score/models.py | loric-/bcvscore | 2109ce2c4b747d98e1b4456d549d18ca2d7a2ff3 | [
"MIT"
] | 1 | 2018-01-09T21:47:43.000Z | 2018-01-09T21:47:43.000Z | score/models.py | loric-/bcvscore | 2109ce2c4b747d98e1b4456d549d18ca2d7a2ff3 | [
"MIT"
] | null | null | null | score/models.py | loric-/bcvscore | 2109ce2c4b747d98e1b4456d549d18ca2d7a2ff3 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from solo.models import SingletonModel
class Division(models.Model):
nom = models.CharField(max_length=30)
def __str__(self):
return self.nom
class Equipe(models.Model):
nom = models.CharField(max_length=100)
division ... | 24.240506 | 78 | 0.662663 | 1,788 | 0.933681 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.119582 |
8b061d4e29f3759b2440c5cc3d1ee9589ca5c2db | 656 | py | Python | migrations/versions/4a7d74b38564_.py | te11ur/twitter_watcher | 212008ed7386307c84e1b5078dee84b48b439020 | [
"MIT"
] | null | null | null | migrations/versions/4a7d74b38564_.py | te11ur/twitter_watcher | 212008ed7386307c84e1b5078dee84b48b439020 | [
"MIT"
] | null | null | null | migrations/versions/4a7d74b38564_.py | te11ur/twitter_watcher | 212008ed7386307c84e1b5078dee84b48b439020 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 4a7d74b38564
Revises: 8f8ee6ed0ee3
Create Date: 2017-02-16 16:09:46.859183
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4a7d74b38564'
down_revision = '8f8ee6ed0ee3'
branch_labels = None
depends_on = None
def upgrade():
# ... | 22.62069 | 83 | 0.690549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 388 | 0.591463 |
8b06973ff048f4917713726bfa5df01d91206315 | 6,178 | py | Python | GlueCustomConnectors/glueJobValidation/glue_job_validation_update.py | xy1m/aws-glue-samples | bf709caab5adc3a57415018899f3c573a8de13c8 | [
"MIT-0"
] | 925 | 2018-03-19T14:43:12.000Z | 2022-03-30T09:43:53.000Z | GlueCustomConnectors/glueJobValidation/glue_job_validation_update.py | xy1m/aws-glue-samples | bf709caab5adc3a57415018899f3c573a8de13c8 | [
"MIT-0"
] | 88 | 2018-03-22T18:00:10.000Z | 2022-03-23T22:43:18.000Z | GlueCustomConnectors/glueJobValidation/glue_job_validation_update.py | xy1m/aws-glue-samples | bf709caab5adc3a57415018899f3c573a8de13c8 | [
"MIT-0"
] | 555 | 2018-03-20T16:51:28.000Z | 2022-03-30T18:49:44.000Z | # Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import sys
from awsglue.utils import getResolvedOptions
from awsglue.transforms import *
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
from pys... | 36.556213 | 141 | 0.674166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,009 | 0.648916 |
8b09a71353a9d697223828b01a7664cd03f6861b | 494 | py | Python | SQLITE1/database.py | Alexelofu/sqlite | 3cf9b212d06607256790a8b6983dc8cf6d79bcef | [
"MIT"
] | null | null | null | SQLITE1/database.py | Alexelofu/sqlite | 3cf9b212d06607256790a8b6983dc8cf6d79bcef | [
"MIT"
] | null | null | null | SQLITE1/database.py | Alexelofu/sqlite | 3cf9b212d06607256790a8b6983dc8cf6d79bcef | [
"MIT"
] | null | null | null | #importing dependencies
import sqlite3
#creating a connection and also the database or connecting to the database if it exists already
conn = sqlite3.connect('student.db')
#Creating the cursor
c = conn.cursor()
#creating a table called students
c.execute("""CREATE TABLE students(
first_name text,
... | 22.454545 | 96 | 0.694332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.763158 |
8b09fd065dd599f9c34e182351ff1d15e47dc20c | 117 | py | Python | alumni/admin.py | ayushganguli1769/DevelopmentRobotix | 1692c104a6f220aa1238840b791aa857a6cc7765 | [
"Apache-2.0"
] | null | null | null | alumni/admin.py | ayushganguli1769/DevelopmentRobotix | 1692c104a6f220aa1238840b791aa857a6cc7765 | [
"Apache-2.0"
] | 7 | 2020-02-12T02:54:35.000Z | 2022-03-12T00:06:26.000Z | alumni/admin.py | ayushganguli1769/DevelopmentRobotix | 1692c104a6f220aa1238840b791aa857a6cc7765 | [
"Apache-2.0"
] | 6 | 2020-02-10T16:37:38.000Z | 2021-01-28T13:39:46.000Z | from django.contrib import admin
from .models import Alumni
# Register your models here.
admin.site.register(Alumni)
| 23.4 | 32 | 0.811966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.239316 |
8b0a50f43851de6203cf6ea5aec25fdd01ac8908 | 5,508 | py | Python | standalone/demo_texas.py | apalomES/plug | 5ab2244e0560814a313bc73b18796324f1599d35 | [
"MIT"
] | null | null | null | standalone/demo_texas.py | apalomES/plug | 5ab2244e0560814a313bc73b18796324f1599d35 | [
"MIT"
] | null | null | null | standalone/demo_texas.py | apalomES/plug | 5ab2244e0560814a313bc73b18796324f1599d35 | [
"MIT"
] | null | null | null | from uuid import uuid4
from powersimdata import Scenario
scenario = Scenario()
print(scenario.state.name)
scenario.set_grid(interconnect="Texas")
scenario.set_name("test", "comp_" + str(uuid4()))
scenario.set_time("2016-01-01 00:00:00", "2016-01-01 03:00:00", "1H")
scenario.set_base_profile("demand", "vJan2021")
s... | 25.382488 | 79 | 0.444808 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 698 | 0.126725 |
8b0a8ab12e38c91750c02ead20bd10c26827e83a | 1,497 | py | Python | examples/shape_example/shape_example/server.py | reevesj191/mesa | f1201abf00f9ec96eb829b1c2137e40ca42c5212 | [
"Apache-2.0"
] | 1 | 2021-01-07T10:31:16.000Z | 2021-01-07T10:31:16.000Z | examples/shape_example/shape_example/server.py | reevesj191/mesa | f1201abf00f9ec96eb829b1c2137e40ca42c5212 | [
"Apache-2.0"
] | null | null | null | examples/shape_example/shape_example/server.py | reevesj191/mesa | f1201abf00f9ec96eb829b1c2137e40ca42c5212 | [
"Apache-2.0"
] | null | null | null | import random
from mesa.visualization.modules import CanvasGrid
from mesa.visualization.ModularVisualization import ModularServer
from .model import Walker, ShapeExample
def agent_draw(agent):
portrayal = None
if agent is None:
# Actually this if part is unnecessary, but still keeping it for
... | 30.55102 | 79 | 0.545758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.203073 |
8b0b7d57ff6061a5647dccc3c860959fdca68eea | 602 | py | Python | AeroComBAT/__init__.py | bennames/AeroComBAT-Project | ddc7194d5ccc0b8bf09b73cc0c2c3d64adf4a472 | [
"MIT"
] | 13 | 2016-01-20T04:42:38.000Z | 2022-03-09T04:49:48.000Z | AeroComBAT/__init__.py | mldmnn/AeroComBAT-Project | ddc7194d5ccc0b8bf09b73cc0c2c3d64adf4a472 | [
"MIT"
] | 1 | 2016-04-18T14:19:26.000Z | 2016-04-18T21:55:25.000Z | AeroComBAT/__init__.py | mldmnn/AeroComBAT-Project | ddc7194d5ccc0b8bf09b73cc0c2c3d64adf4a472 | [
"MIT"
] | 3 | 2018-05-03T07:45:05.000Z | 2021-04-07T08:55:14.000Z | """A tool for modeling composite beams and aircraft wings.
``Aerodynamics``
This module provides the aerodynamics models used within AeroComBAT
``AircraftParts``
This module provides a full-fledged wing object that can be used to
determine if a design is both statically adequate as well as stable.
``... | 43 | 75 | 0.750831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 602 | 1 |
8b0c8ae225961cb83cd1db54cd4ce50a488afe5b | 1,341 | py | Python | redbot/message/headers/date.py | jakub-g/redbot | 48f17bd01da929eecdfd233fdc0730e2f4189800 | [
"MIT"
] | 1 | 2018-08-04T23:10:59.000Z | 2018-08-04T23:10:59.000Z | redbot/message/headers/date.py | jakub-g/redbot | 48f17bd01da929eecdfd233fdc0730e2f4189800 | [
"MIT"
] | null | null | null | redbot/message/headers/date.py | jakub-g/redbot | 48f17bd01da929eecdfd233fdc0730e2f4189800 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from redbot.message import headers
from redbot.syntax import rfc7231
from redbot.type import AddNoteMethodType
class date(headers.HttpHeader):
canonical_name = "Date"
description = """\
The `Date` header represents the time when the message was generated, regardless of caching that
happ... | 28.531915 | 96 | 0.694258 | 1,197 | 0.892617 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.269948 |
8b0cb3c11ef1c36b2cb66317b856fa9529a60f9b | 8,401 | py | Python | python/plugins/processing/algs/qgis/ImportIntoSpatialite.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/algs/qgis/ImportIntoSpatialite.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/algs/qgis/ImportIntoSpatialite.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | 1 | 2021-12-25T08:40:30.000Z | 2021-12-25T08:40:30.000Z | # -*- coding: utf-8 -*-
"""
***************************************************************************
ImportIntoSpatialite.py
---------------------
Date : October 2016
Copyright : (C) 2016 by Mathieu Pellerin
Email : nirvn dot asia at gmail dot com
******... | 44.68617 | 119 | 0.601476 | 6,566 | 0.781574 | 0 | 0 | 0 | 0 | 0 | 0 | 2,009 | 0.239138 |
8b0cbc1b20f2da92c734eeacd0b5fed2d3ab7ec8 | 6,490 | py | Python | padre/authorizers.py | krislindgren/padre | 56e3342a953fdc472adc11ce301acabf6c595760 | [
"MIT"
] | null | null | null | padre/authorizers.py | krislindgren/padre | 56e3342a953fdc472adc11ce301acabf6c595760 | [
"MIT"
] | null | null | null | padre/authorizers.py | krislindgren/padre | 56e3342a953fdc472adc11ce301acabf6c595760 | [
"MIT"
] | null | null | null | import abc
import itertools
from oslo_utils import reflection
import six
from padre import exceptions as excp
from padre import utils
@six.add_metaclass(abc.ABCMeta)
class auth_base(object):
"""Base of all authorizers."""
def __and__(self, other):
return all_must_pass(self, other)
def __or__(s... | 34.157895 | 78 | 0.575501 | 6,301 | 0.970878 | 0 | 0 | 381 | 0.058706 | 0 | 0 | 1,355 | 0.208783 |
8b0edd24603d45ad9ad87ea57e8572775a407117 | 5,931 | py | Python | migration/test/test_print_status.py | xypnox/Submitty | 6f858e0891e610f9b6ebcb716ee135c7a6b57407 | [
"BSD-3-Clause"
] | null | null | null | migration/test/test_print_status.py | xypnox/Submitty | 6f858e0891e610f9b6ebcb716ee135c7a6b57407 | [
"BSD-3-Clause"
] | null | null | null | migration/test/test_print_status.py | xypnox/Submitty | 6f858e0891e610f9b6ebcb716ee135c7a6b57407 | [
"BSD-3-Clause"
] | null | null | null | from argparse import Namespace
from io import StringIO
from pathlib import Path
import shutil
import sys
import tempfile
import unittest
from .helpers import create_migration
import migrator
class TestPrintStatus(unittest.TestCase):
def setUp(self):
self.stdout = sys.stdout
sys.stdout = StringI... | 45.976744 | 88 | 0.457933 | 5,677 | 0.957174 | 0 | 0 | 0 | 0 | 0 | 0 | 2,852 | 0.480863 |
8b0fd83a4c7961ced4d8ed61e941473be809399f | 17,554 | py | Python | skspec/IO/gwu_interfaces.py | hugadams/scikit-spectra | c451be6d54080fbcc2a3bc5daf8846b83b7343ee | [
"BSD-3-Clause"
] | 83 | 2015-01-15T18:57:22.000Z | 2022-01-18T11:43:55.000Z | skspec/IO/gwu_interfaces.py | hugadams/scikit-spectra | c451be6d54080fbcc2a3bc5daf8846b83b7343ee | [
"BSD-3-Clause"
] | 18 | 2015-02-02T22:46:51.000Z | 2019-04-29T17:23:32.000Z | skspec/IO/gwu_interfaces.py | hugadams/scikit-spectra | c451be6d54080fbcc2a3bc5daf8846b83b7343ee | [
"BSD-3-Clause"
] | 43 | 2015-01-02T20:47:11.000Z | 2021-12-18T16:14:40.000Z | ''' Utilities for converting various file formats to a skspec TimeSpectra.
To convert a list of raw files, use from_spec_files()
To convert old-style timefile/spectral data file, use from_timefile_datafile()
To convert spectral datafiles from Ocean Optics USB2000 and USB650, pas file list in
from_spec_files.
Re... | 41.400943 | 129 | 0.660647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,847 | 0.503988 |
8b0fd9cab2a1775b73f5531f114a51c038290a46 | 2,634 | py | Python | test/jubatus_test/classifier/test.py | gwtnb/jubatus-python-client | ccb14515656e33053ebc4c19f73de961dac78ad2 | [
"MIT"
] | null | null | null | test/jubatus_test/classifier/test.py | gwtnb/jubatus-python-client | ccb14515656e33053ebc4c19f73de961dac78ad2 | [
"MIT"
] | null | null | null | test/jubatus_test/classifier/test.py | gwtnb/jubatus-python-client | ccb14515656e33053ebc4c19f73de961dac78ad2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import unittest
import json
import msgpackrpc
from jubatus.classifier.client import Classifier
from jubatus.classifier.types import *
from jubatus_test.test_util import TestUtil
from jubatus.common import Datum
host = "127.0.0.1"
port = 21001
timeout = 10
class ClassifierTest(unittest.TestCase... | 32.121951 | 113 | 0.589218 | 2,199 | 0.834852 | 0 | 0 | 0 | 0 | 0 | 0 | 566 | 0.214882 |
8b1055fbe194e37cc44c380c3e69619fd957cbdf | 5,535 | py | Python | code/utils/losses_2.py | mantuoluozk/MFC | e296d7a8e345bc2ca404b5f0fb7f5048f9c5f0d3 | [
"MIT"
] | 161 | 2020-10-14T12:37:13.000Z | 2022-03-27T09:25:48.000Z | code/utils/losses_2.py | 1oskao21/DTC | 396895b3ad54e343dec5c8d51a221d307cc757b1 | [
"MIT"
] | 18 | 2020-10-29T13:23:58.000Z | 2022-03-29T03:01:50.000Z | code/utils/losses_2.py | 1oskao21/DTC | 396895b3ad54e343dec5c8d51a221d307cc757b1 | [
"MIT"
] | 34 | 2020-10-24T03:00:17.000Z | 2022-03-28T01:18:26.000Z | # import torch
# from torch.nn import functional as F
import numpy as np
from scipy.ndimage import distance_transform_edt as distance
from skimage import segmentation as skimage_seg
def compute_dtm(img_gt, out_shape, normalize=False, fg=False):
"""
compute the distance transform map of foreground in binary mas... | 36.414474 | 145 | 0.612827 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,058 | 0.371816 |
8b10e7a68c8af58225108e52b0f94e2ff22aadec | 996 | py | Python | setup.py | Feeeenng/flask-3auth | 806b43e5bfb50ba5ab1b9b002b160c199487c2a1 | [
"BSD-3-Clause"
] | 13 | 2017-08-09T07:49:27.000Z | 2021-11-08T08:42:45.000Z | setup.py | Feeeenng/flask-3auth | 806b43e5bfb50ba5ab1b9b002b160c199487c2a1 | [
"BSD-3-Clause"
] | null | null | null | setup.py | Feeeenng/flask-3auth | 806b43e5bfb50ba5ab1b9b002b160c199487c2a1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: UTF-8 -*-
'''
@author: 'FenG_Vnc'
@date: 2017-08-08 17:06
@file: setup.py
'''
from __future__ import unicode_literals
from setuptools import setup,find_packages
setup(
name='Flask-thridy',
version='0.0.3',
description='simple use thridy for login you web',
license='BSD',
author='Fee... | 26.210526 | 71 | 0.605422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 572 | 0.574297 |
8b10e9e3c83174d4caa9fe00959b69e07a5f243a | 5,787 | py | Python | gprm/utils/vector.py | siwill22/GPlatesClassStruggle | 713a87ff4f054d3a493ec09e5f310aa3036d3bc5 | [
"MIT"
] | 7 | 2020-05-04T03:05:09.000Z | 2022-01-28T13:52:53.000Z | gprm/utils/vector.py | siwill22/GPlatesClassStruggle | 713a87ff4f054d3a493ec09e5f310aa3036d3bc5 | [
"MIT"
] | null | null | null | gprm/utils/vector.py | siwill22/GPlatesClassStruggle | 713a87ff4f054d3a493ec09e5f310aa3036d3bc5 | [
"MIT"
] | 3 | 2021-05-23T01:53:52.000Z | 2021-09-14T12:21:53.000Z | import pygplates
from .create_gpml import create_gpml_healpix_mesh
def get_velocities(rotation_model,topology_features,time,velocity_domain_features=None,delta_time=1,velocity_type='MagAzim'):
if velocity_domain_features is None:
velocity_domain_features = create_gpml_healpix_mesh(32,feature_type='MeshNod... | 47.826446 | 221 | 0.654052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,129 | 0.195092 |
8b11462a64d61bf53c381ed6c701a1bc757341a7 | 763 | py | Python | config/users/views.py | sitepoint-editors/Django-photo-app | b80f545aba9c73a0810b49941e8e6769a80958df | [
"MIT",
"Unlicense"
] | null | null | null | config/users/views.py | sitepoint-editors/Django-photo-app | b80f545aba9c73a0810b49941e8e6769a80958df | [
"MIT",
"Unlicense"
] | null | null | null | config/users/views.py | sitepoint-editors/Django-photo-app | b80f545aba9c73a0810b49941e8e6769a80958df | [
"MIT",
"Unlicense"
] | null | null | null | from django.views.generic import CreateView
from django.contrib.auth import authenticate, login
from django.contrib.auth.views import LoginView
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
class SignUpView(CreateView):
template_name = 'users/signup.html'
... | 23.121212 | 54 | 0.70118 | 516 | 0.676278 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.091743 |
8b1156248ced2d6f7df0eac00637cace5611fe19 | 2,256 | py | Python | _cleaning_options/cleaner.py | coreybobco/gutenberg_cleaner | 1c50a7e26305c0fce5f022734ad44d1428e9675c | [
"MIT"
] | null | null | null | _cleaning_options/cleaner.py | coreybobco/gutenberg_cleaner | 1c50a7e26305c0fce5f022734ad44d1428e9675c | [
"MIT"
] | null | null | null | _cleaning_options/cleaner.py | coreybobco/gutenberg_cleaner | 1c50a7e26305c0fce5f022734ad44d1428e9675c | [
"MIT"
] | null | null | null | import re
from _cleaning_options.cleaning_options import _is_title_or_etc, _is_books_copy, \
_is_email_init, _is_footnote, _is_image, _is_table
from _cleaning_options.strip_headers import _strip_headers
def simple_cleaner(book: str) -> str:
"""
Just removes lines that are part of the Project Gutenberg hea... | 49.043478 | 120 | 0.697252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,262 | 0.559397 |
8b135e3727f963a44e7b5b358dc8ad675c7bd497 | 6,487 | py | Python | app/family/family.py | rafamartinc/upm-ingsoft-tfg | 533c31912e7a6c8a456d073ba5e8dc9571b4f00a | [
"MIT"
] | null | null | null | app/family/family.py | rafamartinc/upm-ingsoft-tfg | 533c31912e7a6c8a456d073ba5e8dc9571b4f00a | [
"MIT"
] | null | null | null | app/family/family.py | rafamartinc/upm-ingsoft-tfg | 533c31912e7a6c8a456d073ba5e8dc9571b4f00a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from app.family.member import Member
from app.model.gates import EnumGates
from app.model.quantumstate import QuantumState
from app.model.sequence import Sequence
from app.view.view import View
__author__ = 'Rafael Martin-Cuevas Redondo'
class Family:
def __init__(self, length... | 31.955665 | 96 | 0.545398 | 6,210 | 0.957299 | 0 | 0 | 146 | 0.022507 | 0 | 0 | 1,772 | 0.273162 |
8b13728cc887a77e3cb807d04e2d34cca3b441e6 | 3,889 | py | Python | crashreports/rest_api_logfiles.py | FairphoneMirrors/hiccup-server | 8b80109740ea663d23ca46bb272c8fd95f873f1e | [
"Apache-2.0"
] | null | null | null | crashreports/rest_api_logfiles.py | FairphoneMirrors/hiccup-server | 8b80109740ea663d23ca46bb272c8fd95f873f1e | [
"Apache-2.0"
] | 1 | 2019-10-21T18:00:57.000Z | 2019-10-21T18:00:57.000Z | crashreports/rest_api_logfiles.py | FairphoneMirrors/hiccup-server | 8b80109740ea663d23ca46bb272c8fd95f873f1e | [
"Apache-2.0"
] | null | null | null | """REST API for accessing log files."""
from django.core.exceptions import ObjectDoesNotExist
from django.utils.decorators import method_decorator
from drf_yasg import openapi
from drf_yasg.utils import swagger_auto_schema
from rest_framework import generics, status
from rest_framework.decorators import (
api_view... | 30.865079 | 80 | 0.730522 | 552 | 0.141939 | 0 | 0 | 2,922 | 0.75135 | 0 | 0 | 446 | 0.114682 |
8b15c2b94c77d85474f0c50d2f82ad4051a3fcc3 | 3,327 | py | Python | src/secondaires/systeme/commandes/systeme/__init__.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 14 | 2015-08-21T19:15:21.000Z | 2017-11-26T13:59:17.000Z | src/secondaires/systeme/commandes/systeme/__init__.py | vincent-lg/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 20 | 2015-09-29T20:50:45.000Z | 2018-06-21T12:58:30.000Z | src/secondaires/systeme/commandes/systeme/__init__.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 3 | 2015-05-02T19:42:03.000Z | 2018-09-06T10:55:00.000Z | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# 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
... | 45.575342 | 79 | 0.708747 | 1,605 | 0.479821 | 0 | 0 | 0 | 0 | 0 | 0 | 2,315 | 0.692078 |
8b15edfbdf5be0f89827a05677318cf968f5c2d2 | 12,828 | py | Python | ocdata/bulk_obj.py | cesmix-mit/Open-Catalyst-Dataset | ffd73a9bf5c5ec26efd15e3cf66c1c0b376886d5 | [
"CC-BY-4.0"
] | null | null | null | ocdata/bulk_obj.py | cesmix-mit/Open-Catalyst-Dataset | ffd73a9bf5c5ec26efd15e3cf66c1c0b376886d5 | [
"CC-BY-4.0"
] | null | null | null | ocdata/bulk_obj.py | cesmix-mit/Open-Catalyst-Dataset | ffd73a9bf5c5ec26efd15e3cf66c1c0b376886d5 | [
"CC-BY-4.0"
] | null | null | null |
import math
import numpy as np
import os
import pickle
from pymatgen.core.surface import SlabGenerator, get_symmetrically_distinct_miller_indices
from pymatgen.io.ase import AseAtomsAdaptor
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from .constants import MAX_MILLER, COVALENT_MATERIALS_MPIDS
class Bu... | 44.853147 | 135 | 0.613736 | 12,515 | 0.9756 | 0 | 0 | 0 | 0 | 0 | 0 | 7,350 | 0.572965 |
8b15f00815ad9487e0f1a1d2a4cc01895ab7ce2c | 5,068 | py | Python | core/management/commands/create_users.py | marcesher/collab | 0c418d8ea3c312966b8603a07f8edf6b75b3c24b | [
"CC0-1.0"
] | null | null | null | core/management/commands/create_users.py | marcesher/collab | 0c418d8ea3c312966b8603a07f8edf6b75b3c24b | [
"CC0-1.0"
] | null | null | null | core/management/commands/create_users.py | marcesher/collab | 0c418d8ea3c312966b8603a07f8edf6b75b3c24b | [
"CC0-1.0"
] | null | null | null | from django.core.management.base import BaseCommand
from django.contrib.auth import get_user_model
from core.models import Person, OfficeLocation, OrgGroup
import random
class Command(BaseCommand):
args = '<number_of_users>'
help = 'Creates random users for local testing'
def handle(self, *args, **option... | 81.741935 | 771 | 0.56472 | 4,895 | 0.965864 | 0 | 0 | 0 | 0 | 0 | 0 | 2,842 | 0.560773 |
8b163e9404c16514dbc99505826253646c24f1a2 | 1,343 | py | Python | tests/cloudformation/graph_builder/test_local_graph.py | nvuillam/checkov | 62a20db08da1c64bb85f9faec2f1f48a6b1189e3 | [
"Apache-2.0"
] | null | null | null | tests/cloudformation/graph_builder/test_local_graph.py | nvuillam/checkov | 62a20db08da1c64bb85f9faec2f1f48a6b1189e3 | [
"Apache-2.0"
] | null | null | null | tests/cloudformation/graph_builder/test_local_graph.py | nvuillam/checkov | 62a20db08da1c64bb85f9faec2f1f48a6b1189e3 | [
"Apache-2.0"
] | null | null | null | import os
from unittest import TestCase
from checkov.cloudformation.graph_builder.graph_components.block_types import BlockType
from checkov.cloudformation.graph_builder.local_graph import CloudformationLocalGraph
from checkov.cloudformation.parser import parse
TEST_DIRNAME = os.path.dirname(os.path.realpath(__file__... | 47.964286 | 127 | 0.774386 | 1,015 | 0.755771 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.138496 |
8b16baf511e23a5f36c1e39173fb45c7f48c3cb1 | 29,016 | py | Python | stc_StyledTextCtrl.py | Jalkhov/wxGlade | 5807ad784c02f4a03b7be353df5cb77928e5ad23 | [
"MIT"
] | null | null | null | stc_StyledTextCtrl.py | Jalkhov/wxGlade | 5807ad784c02f4a03b7be353df5cb77928e5ad23 | [
"MIT"
] | null | null | null | stc_StyledTextCtrl.py | Jalkhov/wxGlade | 5807ad784c02f4a03b7be353df5cb77928e5ad23 | [
"MIT"
] | null | null | null | """
TODO: What kind of syntax is handled in the Preview "language" type? Raw?
"""
import keyword
import wx
import wx.stc as stc
if wx.Platform == '__WXMSW__':
faces = { 'times': 'Times New Roman',
'mono' : 'Courier New',
'helv' : 'Arial',
'other': 'Comic Sans MS',
... | 63.911894 | 115 | 0.606941 | 28,157 | 0.970396 | 0 | 0 | 0 | 0 | 0 | 0 | 16,433 | 0.566343 |
8b175f7db934339e171858a403bdb58fb2024d98 | 16,188 | py | Python | compress.py | jpritt/boiler | c6f5d79dccddc9e662a648631bf3067ad907ed7a | [
"MIT"
] | 13 | 2016-02-22T23:18:03.000Z | 2020-05-28T11:38:09.000Z | compress.py | jpritt/boiler | c6f5d79dccddc9e662a648631bf3067ad907ed7a | [
"MIT"
] | null | null | null | compress.py | jpritt/boiler | c6f5d79dccddc9e662a648631bf3067ad907ed7a | [
"MIT"
] | 3 | 2016-06-02T13:08:05.000Z | 2018-08-15T18:38:16.000Z | import alignments
import re
import read
import binaryIO
import math
import os
import preprocess
import time
class Compressor:
aligned = None
# 0 - zlib
# 1 - lzma
# 2 - bz2
compressMethod = 0
covSize = 0
totalSize = 0
def __init__(self, frag_len_cutoff):
if self.compressMetho... | 36.624434 | 158 | 0.527798 | 16,078 | 0.993205 | 0 | 0 | 0 | 0 | 0 | 0 | 3,350 | 0.206943 |
8b19b972799065a94e862c4a6509deba577bacc9 | 51 | py | Python | pylint/examples/with_issues/example.py | strangeworks/cloud-builders-community | 5446da8d200898b1ea3026259ab593b4c57a4569 | [
"Apache-2.0"
] | null | null | null | pylint/examples/with_issues/example.py | strangeworks/cloud-builders-community | 5446da8d200898b1ea3026259ab593b4c57a4569 | [
"Apache-2.0"
] | null | null | null | pylint/examples/with_issues/example.py | strangeworks/cloud-builders-community | 5446da8d200898b1ea3026259ab593b4c57a4569 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
print("useless script")
| 12.75 | 24 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.764706 |
8b19f9e4f9931986d48263a55c0244cb519cd180 | 2,629 | py | Python | src/labelpair2csv.py | hanshiyi/GeneFusion | 4c5da89ef327de1ad1142ae2714b0e2b0bd59819 | [
"MIT"
] | null | null | null | src/labelpair2csv.py | hanshiyi/GeneFusion | 4c5da89ef327de1ad1142ae2714b0e2b0bd59819 | [
"MIT"
] | null | null | null | src/labelpair2csv.py | hanshiyi/GeneFusion | 4c5da89ef327de1ad1142ae2714b0e2b0bd59819 | [
"MIT"
] | 1 | 2019-11-12T04:14:51.000Z | 2019-11-12T04:14:51.000Z | import sys
import csv
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("lp_files", help="The label pair need to be converted")
parser.add_argument("dir2pubmed", help="The directory to the place for pubmed articles")
parser.add_argument('out_path', help="The path to store finaltraining ... | 44.559322 | 126 | 0.590719 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.152149 |
8b1bd7659a90a8ba28e7af3215b07594e4ce1ce4 | 620 | py | Python | dayu_widgets/radio_button.py | ZSD-tim/dayu_widgets | 31c2530bdc4161d9311574d9850c2e9471e53072 | [
"MIT"
] | 157 | 2019-03-10T05:55:21.000Z | 2022-03-31T09:07:00.000Z | dayu_widgets/radio_button.py | kanbang/dayu_widgets | 6ff101e6c6f8fcf10e5cb578023a12ccdcef9164 | [
"MIT"
] | 16 | 2019-07-15T11:30:53.000Z | 2021-12-16T14:17:59.000Z | dayu_widgets/radio_button.py | kanbang/dayu_widgets | 6ff101e6c6f8fcf10e5cb578023a12ccdcef9164 | [
"MIT"
] | 56 | 2019-06-19T03:35:27.000Z | 2022-03-22T08:07:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.2
# Email : muyanru345@163.com
###################################################################
"""
MRadioButton
"""
from dayu_widgets.mixin import cursor_mixin
from day... | 28.181818 | 85 | 0.55 | 250 | 0.403226 | 0 | 0 | 264 | 0.425806 | 0 | 0 | 359 | 0.579032 |
8b1c4977beae7cf445ff432bf546dbe77ab73927 | 2,440 | py | Python | NeoML/Python/neoml/Dnn/RepeatSequence.py | ndrewl/neoml | c87361fa8489c28a672cb8e1a447f47ba4c1dbc5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | NeoML/Python/neoml/Dnn/RepeatSequence.py | ndrewl/neoml | c87361fa8489c28a672cb8e1a447f47ba4c1dbc5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | NeoML/Python/neoml/Dnn/RepeatSequence.py | ndrewl/neoml | c87361fa8489c28a672cb8e1a447f47ba4c1dbc5 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ Copyright (c) 2017-2020 ABBYY Production LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | 33.424658 | 112 | 0.657377 | 1,635 | 0.670082 | 0 | 0 | 317 | 0.129918 | 0 | 0 | 1,664 | 0.681967 |
8b1e714bf6fc299907db34244b1a3058fefaf9af | 4,514 | py | Python | main_train.py | telenordigital/yawn | a5956d988051a27cd83fe4252b2b0d58abd94bbc | [
"Apache-2.0"
] | 1 | 2018-07-22T02:56:22.000Z | 2018-07-22T02:56:22.000Z | main_train.py | telenordigital/yawn | a5956d988051a27cd83fe4252b2b0d58abd94bbc | [
"Apache-2.0"
] | null | null | null | main_train.py | telenordigital/yawn | a5956d988051a27cd83fe4252b2b0d58abd94bbc | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# Copyright 2018 The Yawn 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 re... | 30.093333 | 96 | 0.671467 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,036 | 0.229508 |
8b1eb0ff83a775591f704a7aa70887b3b4fddd36 | 2,116 | py | Python | main.py | arjunds7/Python-Scripting-Morse-Code-Converter | 100a6698e562d00d6aa5477a26ebf801ff77d856 | [
"MIT"
] | null | null | null | main.py | arjunds7/Python-Scripting-Morse-Code-Converter | 100a6698e562d00d6aa5477a26ebf801ff77d856 | [
"MIT"
] | null | null | null | main.py | arjunds7/Python-Scripting-Morse-Code-Converter | 100a6698e562d00d6aa5477a26ebf801ff77d856 | [
"MIT"
] | null | null | null | # A Text to Morse Code Converter Project
# Notes:
# This Morse code make use of the basic morse code charts which contains 26 alphabets and 10 numerals
# No special characters are currently involved. But can be added in the '.txt ' file based on the requirement.
MORSE_CODE_CHART = "script_texts.txt"
def lo... | 33.587302 | 111 | 0.605388 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,099 | 0.519376 |
8b1f1d2d675dcf63432a5e7d1725dc277af57cf7 | 10,217 | py | Python | framework/CodeInterfaces/PHISICS/DecayParser.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | null | null | null | framework/CodeInterfaces/PHISICS/DecayParser.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | null | null | null | framework/CodeInterfaces/PHISICS/DecayParser.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | null | null | null | """
Created on June 19th, 2017
@author: rouxpn
"""
from __future__ import division, print_function, unicode_literals, absolute_import
import warnings
warnings.simplefilter('default', DeprecationWarning)
import os
import re
from decimal import Decimal
class DecayParser():
"""
Parses the PHISICS xml decay file an... | 47.082949 | 263 | 0.645884 | 9,963 | 0.975139 | 0 | 0 | 0 | 0 | 0 | 0 | 4,128 | 0.404032 |
8b21117def8d6382c6a9c3f5bcffb3504699d8c2 | 990 | py | Python | pkg/unival_tree.py | macchid/dcp-python | 05ea53d0526ef29bd8004ea4c67d8a80ef645593 | [
"Apache-2.0"
] | null | null | null | pkg/unival_tree.py | macchid/dcp-python | 05ea53d0526ef29bd8004ea4c67d8a80ef645593 | [
"Apache-2.0"
] | 1 | 2021-06-17T00:41:56.000Z | 2021-06-17T00:41:56.000Z | pkg/unival_tree.py | macchid/dcp-python | 05ea53d0526ef29bd8004ea4c67d8a80ef645593 | [
"Apache-2.0"
] | null | null | null |
class Node:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def count_univals(node):
if node.right is None and node.left is None:
return node.val, True, 1
l_val, l_is_unival, l_univals = count_univals(node.left)
r_val... | 23.571429 | 102 | 0.510101 | 138 | 0.139394 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.032323 |
8b22096ffd13f82c182a40a63de2595a4a5e3bb5 | 3,626 | py | Python | Parsers/GFF.py | mahajrod/MAVR | 4db74dff7376a2ffe4426db720b241de9198f329 | [
"MIT"
] | 10 | 2015-04-28T14:15:04.000Z | 2021-03-15T00:07:38.000Z | Parsers/GFF.py | mahajrod/MAVR | 4db74dff7376a2ffe4426db720b241de9198f329 | [
"MIT"
] | null | null | null | Parsers/GFF.py | mahajrod/MAVR | 4db74dff7376a2ffe4426db720b241de9198f329 | [
"MIT"
] | 6 | 2017-03-16T22:38:41.000Z | 2021-08-11T00:22:52.000Z | #!/usr/bin/env python
from RouToolPa.Parsers.Abstract import Record, Metadata, Collection
class MetadataGFF(Metadata):
# TODO: rewrite for general case
pass
class RecordGFF(Record):
def __init__(self, chrom, source, type, start, end, score, strand, quality, attributes):
self.chrom = chrom ... | 37 | 112 | 0.427744 | 3,526 | 0.972421 | 1,254 | 0.345836 | 1,290 | 0.355764 | 0 | 0 | 325 | 0.08963 |
8b22f60e8817b510f8bc63f41e536f26cc1e0f64 | 689 | py | Python | test/integration/ggrc/models/test_control_assessment.py | mikecb/ggrc-core | 1cda560cb0920021416e07740c6cca1acba56268 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc/models/test_control_assessment.py | mikecb/ggrc-core | 1cda560cb0920021416e07740c6cca1acba56268 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-03-26T00:24:35.000Z | 2021-03-26T00:24:35.000Z | test/integration/ggrc/models/test_control_assessment.py | mikecb/ggrc-core | 1cda560cb0920021416e07740c6cca1acba56268 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: miha@reciprocitylabs.com
# Maintained By: miha@reciprocitylabs.com
from ggrc import db
from ggrc.models import ControlAssessment
from integration.g... | 34.45 | 78 | 0.780842 | 275 | 0.399129 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.373004 |
8b2504e3896cc52ab78f57f08f7558c014763331 | 1,465 | py | Python | prettyqt/core/variantanimation.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 7 | 2019-05-01T01:34:36.000Z | 2022-03-08T02:24:14.000Z | prettyqt/core/variantanimation.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 141 | 2019-04-16T11:22:01.000Z | 2021-04-14T15:12:36.000Z | prettyqt/core/variantanimation.py | phil65/PrettyQt | 26327670c46caa039c9bd15cb17a35ef5ad72e6c | [
"MIT"
] | 5 | 2019-04-17T11:48:19.000Z | 2021-11-21T10:30:19.000Z | from __future__ import annotations
from typing import Callable, Iterator
from prettyqt import core
from prettyqt.qt import QtCore
from prettyqt.utils import types
QtCore.QVariantAnimation.__bases__ = (core.AbstractAnimation,)
class VariantAnimation(QtCore.QVariantAnimation):
def __getitem__(self, value: float... | 28.72549 | 80 | 0.653242 | 1,232 | 0.840956 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.005461 |
8b250e31868ca68eaa2cde94aa07956f5fa8b56a | 6,951 | py | Python | tests/Endpoint_unit_test.py | dr3dd589/django-DefectDojo | 7744cc4b54f294a300405db4f8e16c5408892a41 | [
"BSD-3-Clause"
] | 2 | 2019-06-26T14:11:17.000Z | 2020-10-12T23:14:52.000Z | tests/Endpoint_unit_test.py | dr3dd589/django-DefectDojo | 7744cc4b54f294a300405db4f8e16c5408892a41 | [
"BSD-3-Clause"
] | 73 | 2020-10-03T12:54:14.000Z | 2022-03-31T19:13:01.000Z | tests/Endpoint_unit_test.py | dr3dd589/django-DefectDojo | 7744cc4b54f294a300405db4f8e16c5408892a41 | [
"BSD-3-Clause"
] | 1 | 2020-09-26T05:06:54.000Z | 2020-09-26T05:06:54.000Z | from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import Select
import unittest
import re
import sys
import os
# first thing first. We have to create product, just to make sure there is atleast 1 product available
# to assign endpoints to when crea... | 46.966216 | 125 | 0.700762 | 5,247 | 0.754855 | 0 | 0 | 0 | 0 | 0 | 0 | 3,115 | 0.448137 |
8b25cfdd6a9f5af0527bf3b2cd5c3142fa2734ed | 69 | py | Python | src/optopus/__init__.py | hindman/optopus | daaba31c6b1bd4f56e442326e36f7b3ea0b74b15 | [
"MIT"
] | 2 | 2021-05-04T23:44:42.000Z | 2021-07-25T20:45:33.000Z | src/optopus/__init__.py | hindman/optopus | daaba31c6b1bd4f56e442326e36f7b3ea0b74b15 | [
"MIT"
] | null | null | null | src/optopus/__init__.py | hindman/optopus | daaba31c6b1bd4f56e442326e36f7b3ea0b74b15 | [
"MIT"
] | null | null | null | from .parser import Parser, Result
from .version import __version__
| 17.25 | 34 | 0.811594 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b28e5a786116ac3903ed7bbc374933945c65b63 | 4,462 | py | Python | psana/psana/graphqt/CMWDBMain.py | slac-lcls/pdsdata2 | 6e2ad4f830cadfe29764dbd280fa57f8f9edc451 | [
"BSD-3-Clause-LBNL"
] | null | null | null | psana/psana/graphqt/CMWDBMain.py | slac-lcls/pdsdata2 | 6e2ad4f830cadfe29764dbd280fa57f8f9edc451 | [
"BSD-3-Clause-LBNL"
] | null | null | null | psana/psana/graphqt/CMWDBMain.py | slac-lcls/pdsdata2 | 6e2ad4f830cadfe29764dbd280fa57f8f9edc451 | [
"BSD-3-Clause-LBNL"
] | null | null | null |
"""
Class :py:class:`CMWDBMain` is a QWidget for calibman
===========================================================
Usage ::
See test_CMWDBMain() at the end
See:
- :class:`CMWDBMain`
- :class:`CMWMainTabs`
- :class:`CMConfigParameters`
- `graphqt documentation <https://lcls-psana.github.io/grap... | 25.791908 | 102 | 0.628418 | 3,236 | 0.725235 | 0 | 0 | 0 | 0 | 0 | 0 | 1,012 | 0.226804 |
8b297aafeb705947d6909eb456ef45a53e41f53a | 1,778 | py | Python | localstack/plugin/entrypoint.py | Madajevas/localstack | 85c712e50d45183b9703c682de02d5114c50c47c | [
"Apache-2.0"
] | 13 | 2022-01-16T20:00:20.000Z | 2022-03-30T20:48:08.000Z | localstack/plugin/entrypoint.py | Madajevas/localstack | 85c712e50d45183b9703c682de02d5114c50c47c | [
"Apache-2.0"
] | 1 | 2022-03-02T22:15:21.000Z | 2022-03-03T09:58:45.000Z | localstack/plugin/entrypoint.py | Madajevas/localstack | 85c712e50d45183b9703c682de02d5114c50c47c | [
"Apache-2.0"
] | null | null | null | import inspect
from collections import defaultdict
from typing import Dict, List, NamedTuple
from .core import PluginFinder, PluginSpec
from .discovery import PackagePathPluginFinder
class EntryPoint(NamedTuple):
name: str
value: str
group: str
EntryPointDict = Dict[str, List[str]]
def discover_entry... | 28.222222 | 118 | 0.7036 | 73 | 0.041057 | 0 | 0 | 0 | 0 | 0 | 0 | 529 | 0.297525 |
8b2ab22916cd5a524b37c6eedd728bf0158db92f | 4,966 | py | Python | rgw/v2/lib/s3/lifecycle.py | viduship/ceph-qe-scripts | 886619fa6600c24cbf989d65868951b9c3decd72 | [
"MIT"
] | 6 | 2019-04-12T17:45:44.000Z | 2021-09-14T19:59:05.000Z | rgw/v2/lib/s3/lifecycle.py | viduship/ceph-qe-scripts | 886619fa6600c24cbf989d65868951b9c3decd72 | [
"MIT"
] | 111 | 2019-12-10T10:41:08.000Z | 2022-03-31T11:42:30.000Z | rgw/v2/lib/s3/lifecycle.py | viduship/ceph-qe-scripts | 886619fa6600c24cbf989d65868951b9c3decd72 | [
"MIT"
] | 23 | 2019-05-30T19:48:25.000Z | 2022-03-24T17:07:19.000Z | # lifecycle config parameters explanation:
# https://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.put_bucket_lifecycle_configuration
import os
import sys
sys.path.append(os.path.abspath(os.path.join(__file__, "../../../")))
import logging
log = logging.getLogger()
sample_lifecycle_syntax = {
... | 29.736527 | 112 | 0.589408 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,445 | 0.492348 |
8b2c96872756ada7578bae428920e05b419182c7 | 10,039 | py | Python | ddu_dirty_mnist/dirty_mnist.py | BlackHC/ddu_dirty_mnist | fdd4e0a4d5496bc3e3ba80359dd7cd67f564d955 | [
"Apache-2.0"
] | 3 | 2021-06-30T13:57:59.000Z | 2021-12-05T18:55:35.000Z | ddu_dirty_mnist/dirty_mnist.py | BlackHC/ddu_dirty_mnist | fdd4e0a4d5496bc3e3ba80359dd7cd67f564d955 | [
"Apache-2.0"
] | null | null | null | ddu_dirty_mnist/dirty_mnist.py | BlackHC/ddu_dirty_mnist | fdd4e0a4d5496bc3e3ba80359dd7cd67f564d955 | [
"Apache-2.0"
] | 1 | 2021-07-09T16:36:11.000Z | 2021-07-09T16:36:11.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: 01_dataloader.ipynb (unless otherwise specified).
__all__ = ['MNIST_NORMALIZATION', 'AmbiguousMNIST', 'FastMNIST', 'DirtyMNIST']
# Cell
import os
from typing import IO, Any, Callable, Dict, List, Optional, Tuple, Union
from urllib.error import URLError
import torch
from t... | 35.725979 | 152 | 0.634227 | 7,053 | 0.70256 | 0 | 0 | 107 | 0.010658 | 0 | 0 | 5,069 | 0.504931 |
8b2d1c41fd7a85a14145e077860057b9c61a9bae | 571 | py | Python | python/qipkg/actions/build.py | vbarbaresi/qibuild | eab6b815fe0af49ea5c41ccddcd0dff2363410e1 | [
"BSD-3-Clause"
] | null | null | null | python/qipkg/actions/build.py | vbarbaresi/qibuild | eab6b815fe0af49ea5c41ccddcd0dff2363410e1 | [
"BSD-3-Clause"
] | null | null | null | python/qipkg/actions/build.py | vbarbaresi/qibuild | eab6b815fe0af49ea5c41ccddcd0dff2363410e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012-2018 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the COPYING file.
""" Build all the projects of the given pml file
"""
import qibuild.parsers
import qipkg.parsers
def configure_parser(parser):
"""Configure parse... | 27.190476 | 72 | 0.742557 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.485114 |
8b2d570d87afcc061d5bf188bfb65c73ba42036b | 2,912 | py | Python | qrandom/driver/raw_driver.py | lastmeta/qrandom | 4107822d854ecc44d6c98ced6ed142cf866509b3 | [
"MIT"
] | null | null | null | qrandom/driver/raw_driver.py | lastmeta/qrandom | 4107822d854ecc44d6c98ced6ed142cf866509b3 | [
"MIT"
] | null | null | null | qrandom/driver/raw_driver.py | lastmeta/qrandom | 4107822d854ecc44d6c98ced6ed142cf866509b3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# TrueRNG Read - Simple Example
# Chris K Cockrum
# 8/21/2016
#
# Requires Python 2.7, pyserial
# On Linux - may need to be root or set /dev/tty port permissions to 666
#
# Python 2.7.xx is available here: https://www.python.org/
# Install Pyserial package with: python -m pip install pyserial
impo... | 26.234234 | 105 | 0.646635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,734 | 0.595467 |
8b2dde35e62db95e506b03f874b47c0094c23c3a | 40 | py | Python | cygraphblas/lib/monoid/ss.py | eriknw/cygraphblas | 81ae37591ec38aa698d5f37716464a6c366076f9 | [
"Apache-2.0"
] | 3 | 2020-09-03T21:47:25.000Z | 2021-08-06T20:24:19.000Z | cygraphblas/lib/monoid/ss.py | eriknw/cygraphblas | 81ae37591ec38aa698d5f37716464a6c366076f9 | [
"Apache-2.0"
] | null | null | null | cygraphblas/lib/monoid/ss.py | eriknw/cygraphblas | 81ae37591ec38aa698d5f37716464a6c366076f9 | [
"Apache-2.0"
] | 2 | 2020-09-03T21:47:52.000Z | 2021-08-06T20:24:20.000Z | from cygraphblas_ss.lib.monoid import *
| 20 | 39 | 0.825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b2de91bfb8d50062a3db4c0b2f2027c54e1a627 | 49 | py | Python | specviz/plugins/unit_change/__init__.py | ibusko/specviz | b8bcd495e5b43dc2b90f7bf2d5bad2d27c6990aa | [
"BSD-3-Clause"
] | null | null | null | specviz/plugins/unit_change/__init__.py | ibusko/specviz | b8bcd495e5b43dc2b90f7bf2d5bad2d27c6990aa | [
"BSD-3-Clause"
] | null | null | null | specviz/plugins/unit_change/__init__.py | ibusko/specviz | b8bcd495e5b43dc2b90f7bf2d5bad2d27c6990aa | [
"BSD-3-Clause"
] | null | null | null | from .unit_change_dialog import UnitChangeDialog
| 24.5 | 48 | 0.897959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8b2e2bb143f6ccfb6c8ca078529f4cf132d681ec | 1,449 | py | Python | charts.py | lancelote/flask-tutorial-demo | a36f0ee2555e4d883a428483d06b4379c5c0dc32 | [
"Apache-2.0"
] | 8 | 2018-09-26T14:32:21.000Z | 2021-07-09T21:28:35.000Z | charts.py | lancelote/flask-tutorial-demo | a36f0ee2555e4d883a428483d06b4379c5c0dc32 | [
"Apache-2.0"
] | 6 | 2019-01-12T14:04:21.000Z | 2021-06-23T08:24:41.000Z | charts.py | lancelote/flask-tutorial-demo | a36f0ee2555e4d883a428483d06b4379c5c0dc32 | [
"Apache-2.0"
] | 17 | 2019-01-12T13:31:13.000Z | 2021-11-02T20:00:54.000Z | from io import BytesIO
import matplotlib.pyplot as plt
from user_database import data, MONTHS, get_city_temperature, get_city_humidity, CITIES
def get_main_image():
"""Rendering the scatter chart"""
yearly_temp = []
yearly_hum = []
for city in data:
yearly_temp.append(sum(get_city_temperature... | 28.98 | 87 | 0.678399 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.188406 |
8b2f679c9102e6e6919fcdde3054bac9c1960bbd | 5,096 | py | Python | calculator.py | Nynir/CalcPy | ed6aae4b9b45e660c487f87b5f37503991874e00 | [
"MIT"
] | 1 | 2021-12-07T14:02:08.000Z | 2021-12-07T14:02:08.000Z | calculator.py | Nynir/CalcPy | ed6aae4b9b45e660c487f87b5f37503991874e00 | [
"MIT"
] | null | null | null | calculator.py | Nynir/CalcPy | ed6aae4b9b45e660c487f87b5f37503991874e00 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import ttk
from functools import partial
DEBUG = True
global darkTheme
darkTheme = True
class calculator(ttk.Frame):
def __init__(self, parent):
ttk.Frame.__init__(self)
global allowed
allowed = { "=", "+", "-", "/", "%", "*" } #Doesnt support ^
global justEntered
self.... | 29.287356 | 200 | 0.681515 | 2,233 | 0.438187 | 0 | 0 | 0 | 0 | 0 | 0 | 1,446 | 0.283752 |
8b31460e87326af480123834b4e021112e65e413 | 518 | py | Python | src/cuda_ai/mean.py | TRex22/dave-A-2048-AI | 6c2b97b960ef111b207d63e09f6644c1332e2c9b | [
"MIT"
] | null | null | null | src/cuda_ai/mean.py | TRex22/dave-A-2048-AI | 6c2b97b960ef111b207d63e09f6644c1332e2c9b | [
"MIT"
] | null | null | null | src/cuda_ai/mean.py | TRex22/dave-A-2048-AI | 6c2b97b960ef111b207d63e09f6644c1332e2c9b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun May 21 15:35:38 2017
@author: Liron
"""
import numpy as np
np.set_printoptions(threshold=np.nan)
data = np.genfromtxt("cuda_times.csv", delimiter=",", usecols=(0,1), max_rows=97, skip_header=96+96+96)
print data[0]
print data[data.shape[0]-1]
mean = np.zeros((16,2))
for i... | 21.583333 | 103 | 0.631274 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.303089 |