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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e168edf2fd4a9f7e34f7a83253f12b25417c2d21 | 3,113 | py | Python | examples/utils/interaction.py | epuzanov/pivy | 2f049c19200ab4a3a1e4740268450496c12359f9 | [
"ISC"
] | 29 | 2019-12-28T10:37:16.000Z | 2022-02-09T10:48:04.000Z | examples/utils/interaction.py | epuzanov/pivy | 2f049c19200ab4a3a1e4740268450496c12359f9 | [
"ISC"
] | 29 | 2019-12-26T13:46:11.000Z | 2022-03-29T18:14:33.000Z | examples/utils/interaction.py | epuzanov/pivy | 2f049c19200ab4a3a1e4740268450496c12359f9 | [
"ISC"
] | 17 | 2019-12-29T11:49:32.000Z | 2022-02-23T00:28:18.000Z | import sys
from PySide2.QtWidgets import QApplication
from PySide2.QtGui import QColor
from pivy import quarter, coin, graphics, utils
class ConnectionMarker(graphics.Marker):
def __init__(self, points):
super(ConnectionMarker, self).__init__(points, True)
class ConnectionPolygon(graphics.Polygon):
s... | 28.824074 | 72 | 0.615805 | 1,277 | 0.410215 | 0 | 0 | 130 | 0.04176 | 0 | 0 | 51 | 0.016383 |
e169422102864465f508bcbb4404b6271b866de1 | 4,673 | py | Python | utils/data_process.py | cltl/a-proof-zonmw | f6d1a83fc77223bf8b58c9d465aae301269bb679 | [
"Apache-2.0"
] | 2 | 2021-02-08T08:24:06.000Z | 2021-11-12T10:23:23.000Z | utils/data_process.py | cltl/a-proof-zonmw | f6d1a83fc77223bf8b58c9d465aae301269bb679 | [
"Apache-2.0"
] | null | null | null | utils/data_process.py | cltl/a-proof-zonmw | f6d1a83fc77223bf8b58c9d465aae301269bb679 | [
"Apache-2.0"
] | 2 | 2021-12-07T22:14:56.000Z | 2021-12-14T09:06:16.000Z | """
Functions used in pre-processing of data for the machine learning pipelines.
"""
import pandas as pd
from pandas.api.types import is_scalar
from pathlib import Path
from sklearn.model_selection import GroupShuffleSplit
def concat_annotated(datadir):
"""
Concatenate all "annotated_df_*_parsed*.pkl" files... | 29.024845 | 130 | 0.650332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,731 | 0.584421 |
e16c926aa6450fc30f72e50b4463f6a0fcd7d9ad | 276 | py | Python | venv/Lib/site-packages/numpy/typing/tests/data/fail/lib_utils.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 11 | 2020-06-28T04:30:26.000Z | 2022-03-26T08:40:47.000Z | venv/Lib/site-packages/numpy/typing/tests/data/fail/lib_utils.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 150 | 2019-09-30T11:22:36.000Z | 2021-08-02T06:19:29.000Z | venv/Lib/site-packages/numpy/typing/tests/data/fail/lib_utils.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 20 | 2021-11-07T13:55:56.000Z | 2021-12-02T10:54:01.000Z | import numpy as np
np.deprecate(1) # E: No overload variant
np.deprecate_with_doc(1) # E: incompatible type
np.byte_bounds(1) # E: incompatible type
np.who(1) # E: incompatible type
np.lookfor(None) # E: incompatible type
np.safe_eval(None) # E: incompatible type
| 19.714286 | 48 | 0.721014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.485507 |
e16db721abb59e634b09680c4bdf3796a1a5328b | 6,115 | py | Python | VoiceAssistant/Project_Basic_struct/speakListen.py | TheRealMilesLee/Python | d145c848a7ba76e8e523e4fe06e2a0add7e2fae1 | [
"MIT"
] | 1 | 2018-12-05T11:04:47.000Z | 2018-12-05T11:04:47.000Z | VoiceAssistant/Project_Basic_struct/speakListen.py | MarkHooland/Python | d145c848a7ba76e8e523e4fe06e2a0add7e2fae1 | [
"MIT"
] | null | null | null | VoiceAssistant/Project_Basic_struct/speakListen.py | MarkHooland/Python | d145c848a7ba76e8e523e4fe06e2a0add7e2fae1 | [
"MIT"
] | null | null | null | import time
from colorama import Fore, Back, Style
import speech_recognition as sr
import os
import pyttsx3
import datetime
from rich.progress import Progress
python = pyttsx3.init("sapi5") # name of the engine is set as Python
voices = python.getProperty("voices")
#print(voices)
python.setProperty("voice... | 35.970588 | 118 | 0.594113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,325 | 0.543745 |
e16e5534d48d16f412f05cd80a5b2d4be81a0792 | 702 | py | Python | api/krenak_api/apps/activities/migrations/0008_auto_20210506_2357.py | bacuarabrasil/krenak | ad6a3af5ff162783ec9bd40d07a82f09bf35071b | [
"MIT"
] | null | null | null | api/krenak_api/apps/activities/migrations/0008_auto_20210506_2357.py | bacuarabrasil/krenak | ad6a3af5ff162783ec9bd40d07a82f09bf35071b | [
"MIT"
] | 26 | 2021-03-10T22:07:57.000Z | 2021-03-11T12:13:35.000Z | api/krenak_api/apps/activities/migrations/0008_auto_20210506_2357.py | bacuarabrasil/krenak | ad6a3af5ff162783ec9bd40d07a82f09bf35071b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-05-06 23:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mentorships', '0001_initial'),
('activities', '0007_activity_enrollment'),
]
operations = [
migrati... | 28.08 | 175 | 0.633903 | 576 | 0.820513 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.290598 |
e16f4dbb7cb5166fe73ac09acb1a07de0138e0d3 | 2,330 | py | Python | Data_pre/encoding_feature.py | KaifangXu/API | 47cb17e35a381e50b25bbda9aa7e5216482af022 | [
"MIT"
] | null | null | null | Data_pre/encoding_feature.py | KaifangXu/API | 47cb17e35a381e50b25bbda9aa7e5216482af022 | [
"MIT"
] | null | null | null | Data_pre/encoding_feature.py | KaifangXu/API | 47cb17e35a381e50b25bbda9aa7e5216482af022 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from scipy import signal,stats
from flask import Flask,request,jsonify
import json
import re
import os
import data_utils as utils
import sklearn.preprocessing as pre
configpath=os.path.join(os.path.dirname(__file__),'config.txt')
try:
config = utils.py_configs... | 31.066667 | 125 | 0.564807 | 0 | 0 | 0 | 0 | 1,834 | 0.758478 | 0 | 0 | 427 | 0.176592 |
e16fa8e2b0d20fbbd86dbb386c3a783cd3b7617b | 13,708 | py | Python | src/utils.py | mmin0/SigDFP | e2a93faa658741d693b8070bcc7038d2fb7c3e74 | [
"MIT"
] | null | null | null | src/utils.py | mmin0/SigDFP | e2a93faa658741d693b8070bcc7038d2fb7c3e74 | [
"MIT"
] | null | null | null | src/utils.py | mmin0/SigDFP | e2a93faa658741d693b8070bcc7038d2fb7c3e74 | [
"MIT"
] | 1 | 2022-02-28T23:26:23.000Z | 2022-02-28T23:26:23.000Z |
import torch
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from matplotlib.legend_handler import HandlerTuple
from matplotlib.ticker import FormatStrFormatter
#from tqdm import tqdm
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
plt.rc('xtick', labelsize=... | 33.031325 | 153 | 0.587978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,783 | 0.13007 |
e170d7139c31119e1eb476ae084b331e0ed0a722 | 100 | py | Python | lambdata_doinalangille/__init__.py | doinalangille/lambdata_doinalangille | f57e1f9f87615bc9d1d1cfada530a542ea4551a1 | [
"MIT"
] | null | null | null | lambdata_doinalangille/__init__.py | doinalangille/lambdata_doinalangille | f57e1f9f87615bc9d1d1cfada530a542ea4551a1 | [
"MIT"
] | 3 | 2020-03-24T18:29:36.000Z | 2021-02-02T22:42:20.000Z | lambdata_doinalangille/__init__.py | doinalangille/lambdata_doinalangille | f57e1f9f87615bc9d1d1cfada530a542ea4551a1 | [
"MIT"
] | 1 | 2020-02-11T23:05:07.000Z | 2020-02-11T23:05:07.000Z | """
lambdata - a collection of Data Science helper functions
"""
import pandas as pd
import sklearn | 16.666667 | 56 | 0.76 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.64 |
e171d508606a36edd465712b9674cad13c99de99 | 1,554 | py | Python | jsConsole/__init__.py | Animenosekai/jsConsole | e2604988f20a0d0d93578f786ee7beaf72b9afbc | [
"MIT"
] | null | null | null | jsConsole/__init__.py | Animenosekai/jsConsole | e2604988f20a0d0d93578f786ee7beaf72b9afbc | [
"MIT"
] | null | null | null | jsConsole/__init__.py | Animenosekai/jsConsole | e2604988f20a0d0d93578f786ee7beaf72b9afbc | [
"MIT"
] | null | null | null | """
pyJsConsole wrapper.
© Anime no Sekai - 2020
"""
from .internal.javascript import classes as JSClass
console = JSClass._Console()
document = JSClass._Document()
history = JSClass._History()
Math = JSClass._Math()
navigator = JSClass._Navigator()
screen = JSClass._Screen()
window = JSClass._Window()
browser = JSC... | 23.19403 | 71 | 0.70592 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 582 | 0.374277 |
e1741137c9f22621cbb2d5cd7d5c872d48ea9402 | 45,528 | py | Python | grr/client/client_actions/file_finder_test.py | panhania/grr | fe16a7311a528e31fe0e315a880e98273b8df960 | [
"Apache-2.0"
] | null | null | null | grr/client/client_actions/file_finder_test.py | panhania/grr | fe16a7311a528e31fe0e315a880e98273b8df960 | [
"Apache-2.0"
] | null | null | null | grr/client/client_actions/file_finder_test.py | panhania/grr | fe16a7311a528e31fe0e315a880e98273b8df960 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tests the client file finder action."""
import collections
import glob
import hashlib
import os
import platform
import shutil
import subprocess
import unittest
import mock
import psutil
import unittest
from grr.client import comms
from grr.client.client_actions import file_finder as client_f... | 35.708235 | 80 | 0.698405 | 44,255 | 0.972039 | 0 | 0 | 3,754 | 0.082455 | 0 | 0 | 5,712 | 0.125461 |
e174818f6b393a98ed554aec714f2c139a01e0c8 | 1,624 | py | Python | lesson13/sunzhaohui/reboot/deploy/models.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson13/sunzhaohui/reboot/deploy/models.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson13/sunzhaohui/reboot/deploy/models.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | from django.db import models
# Create your models here.
from django.db import models
from users.models import UserProfile
class Deploy(models.Model):
STATUS = (
(0, '申请'),
(1, '审核'),
(2, '上线'),
(3, '已取消'),
(4, '已上线'),
(5,'失败')
)
name = models.CharField(m... | 40.6 | 113 | 0.67734 | 1,631 | 0.925653 | 0 | 0 | 0 | 0 | 0 | 0 | 303 | 0.171964 |
e177afe5c4e52b6ea7d71deed0bddae35b953491 | 83 | py | Python | config.py | zombodotcom/twitchUserData | 50c702b832515a946d55c2f5ca79b51436352ef2 | [
"MIT",
"Unlicense"
] | 1 | 2019-10-22T06:23:56.000Z | 2019-10-22T06:23:56.000Z | config.py | zombodotcom/twitchUserData | 50c702b832515a946d55c2f5ca79b51436352ef2 | [
"MIT",
"Unlicense"
] | null | null | null | config.py | zombodotcom/twitchUserData | 50c702b832515a946d55c2f5ca79b51436352ef2 | [
"MIT",
"Unlicense"
] | null | null | null | Client_ID = "<Your Client ID>"
Authorization = "Bearer <Insert Bearer token Here>" | 41.5 | 51 | 0.73494 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.638554 |
e17842bac608c397e2ccd355daad8b350e2c2102 | 1,900 | py | Python | echo_client.py | gauravssnl/Python3-Network-Programming | 32bb5a4872bce60219c6387b6f3c2e7f31b0654a | [
"MIT"
] | 4 | 2017-12-04T15:05:35.000Z | 2021-03-24T11:53:39.000Z | echo_client.py | gauravssnl/Python3-Network-Programming | 32bb5a4872bce60219c6387b6f3c2e7f31b0654a | [
"MIT"
] | null | null | null | echo_client.py | gauravssnl/Python3-Network-Programming | 32bb5a4872bce60219c6387b6f3c2e7f31b0654a | [
"MIT"
] | null | null | null | import socket
host = 'localhost'
# we need to define encode function for converting string to bytes string
# this will be use for sending/receiving data via socket
encode = lambda text: text.encode()
# we need to define deocde function for converting bytes string to string
# this will convert bytes string sent/reci... | 31.666667 | 79 | 0.644211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 685 | 0.360526 |
e179f0630567fb54dca2d83ae47722317d2637db | 2,247 | py | Python | my_collection/paxos/proposer.py | khanh-nguyen-code/my-collection | 31581ef0b1dae67aafb1f4e64b9973a38cc01edf | [
"MIT"
] | null | null | null | my_collection/paxos/proposer.py | khanh-nguyen-code/my-collection | 31581ef0b1dae67aafb1f4e64b9973a38cc01edf | [
"MIT"
] | null | null | null | my_collection/paxos/proposer.py | khanh-nguyen-code/my-collection | 31581ef0b1dae67aafb1f4e64b9973a38cc01edf | [
"MIT"
] | null | null | null | from typing import Optional
from my_collection.paxos.common import NodeId, Router, ProposalId, Value, PrepareRequest, is_majority, PrepareResponse, \
Proposal, ProposeRequest, ProposeResponse, CODE_OK
class Proposer:
node_id: NodeId
acceptor_id_list: list[NodeId]
router: Router
current_proposal_i... | 38.084746 | 121 | 0.659546 | 2,038 | 0.906987 | 0 | 0 | 0 | 0 | 1,618 | 0.720071 | 19 | 0.008456 |
e17a77153a0967bee562363294a90df123d695b6 | 6,551 | py | Python | .leetcode/749.contain-virus.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/749.contain-virus.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/749.contain-virus.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=749 lang=python3
#
# [749] Contain Virus
#
# https://leetcode.com/problems/contain-virus/description/
#
# algorithms
# Hard (49.14%)
# Likes: 190
# Dislikes: 349
# Total Accepted: 7.5K
# Total Submissions: 15.2K
# Testcase Example: '[[0,1,0,0,0,0,0,1],[0,1,0,0,0,0,0,1],[0,0,0,0,0,0,0,1],[0,... | 29.376682 | 96 | 0.523432 | 2,657 | 0.403125 | 0 | 0 | 0 | 0 | 0 | 0 | 2,925 | 0.443787 |
e17b963468c4245e4f159926617ef232d646797a | 4,309 | py | Python | src/robotcontrol.py | social-robotics-lab/dog_sample | e70706bdbdbb7be222ee71cd9529dc433bf705ce | [
"MIT"
] | null | null | null | src/robotcontrol.py | social-robotics-lab/dog_sample | e70706bdbdbb7be222ee71cd9529dc433bf705ce | [
"MIT"
] | null | null | null | src/robotcontrol.py | social-robotics-lab/dog_sample | e70706bdbdbb7be222ee71cd9529dc433bf705ce | [
"MIT"
] | null | null | null | import json
import os.path
import socket
import subprocess
from pydub import AudioSegment
from typing import Dict, List
class RCClient(object):
"""
RobotControllerを操作するためのクラス
"""
def __init__(self, host:str, speech_port=22222, pose_port=22223, read_port=22224):
self.host = host
self.sp... | 31.683824 | 116 | 0.620562 | 2,103 | 0.47269 | 0 | 0 | 0 | 0 | 0 | 0 | 1,109 | 0.249269 |
e17ccdc4212c86466c9d7221473dc6138120cb0b | 1,375 | py | Python | exercises/shortest-path/ShortestPath.py | maxwellmattryan/cs-313e | 462a871475ba956e364a0faf98284633462984b8 | [
"MIT"
] | 1 | 2020-02-05T23:56:16.000Z | 2020-02-05T23:56:16.000Z | exercises/shortest-path/ShortestPath.py | maxwellmattryan/cs-313e | 462a871475ba956e364a0faf98284633462984b8 | [
"MIT"
] | null | null | null | exercises/shortest-path/ShortestPath.py | maxwellmattryan/cs-313e | 462a871475ba956e364a0faf98284633462984b8 | [
"MIT"
] | 2 | 2020-03-09T16:26:00.000Z | 2021-07-23T03:17:11.000Z | import math
class Point (object):
# constructor
def __init__ (self, x = 0, y = 0):
self.x = x
self.y = y
# get the distance to another Point object
def dist (self, other):
return math.hypot (self.x - other.x, self.y - other.y)
# string representation of a Point
def __str__ (self):
return ... | 25.462963 | 76 | 0.589091 | 518 | 0.376727 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.155636 |
e17d136893ad674b6eda0ec3efee1f8fda058d2d | 341 | py | Python | Data Analysis/csv remove other label.py | byew/python-do-differernt-csv | 094b154834ee48210c2ee4a6a529d8fe76055fb7 | [
"MIT"
] | null | null | null | Data Analysis/csv remove other label.py | byew/python-do-differernt-csv | 094b154834ee48210c2ee4a6a529d8fe76055fb7 | [
"MIT"
] | null | null | null | Data Analysis/csv remove other label.py | byew/python-do-differernt-csv | 094b154834ee48210c2ee4a6a529d8fe76055fb7 | [
"MIT"
] | null | null | null | import pandas as pd
exa = pd.read_csv('en_dup.csv')
exa.loc[exa['label'] =='F', 'label']= 0
exa.loc[exa['label'] =='T', 'label']= 1
exa.loc[exa['label'] =='U', 'label']= 2
#不读取label2, 只读取0,1标签
exa0 = exa.loc[exa["label"] == 0]
exa1 = exa.loc[exa["label"] == 1]
exa = [exa0, exa1]
exa = pd.concat(exa)
exa.to_csv('... | 17.947368 | 39 | 0.595308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.350975 |
e17d6ab7a795e35c2eccfd187299cdaa6e5f367c | 60,009 | py | Python | pySPACE/resources/dataset_defs/stream.py | pyspace/pyspace | 763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62 | [
"BSD-3-Clause"
] | 32 | 2015-02-20T09:03:09.000Z | 2022-02-25T22:32:52.000Z | pySPACE/resources/dataset_defs/stream.py | pyspace/pyspace | 763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62 | [
"BSD-3-Clause"
] | 5 | 2015-05-18T15:08:40.000Z | 2020-03-05T19:18:01.000Z | pySPACE/resources/dataset_defs/stream.py | pyspace/pyspace | 763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62 | [
"BSD-3-Clause"
] | 18 | 2015-09-28T07:16:38.000Z | 2021-01-20T13:52:19.000Z | """ Reader objects and main class for continuous data (time series)
Depending on the storage format, the fitting reader is loaded and takes care
of reading the files.
.. todo:: unify with analyzer collection!
eeg source and analyzer sink node should work together
this connection should be documented w... | 42.111579 | 137 | 0.580613 | 58,352 | 0.972387 | 0 | 0 | 3,077 | 0.051276 | 0 | 0 | 16,529 | 0.275442 |
e17db1fd4e96affffe66942426ac284e73e8b345 | 10,463 | py | Python | tests/base/test_endpoints_authentication.py | rapydo/http-api | ef0a299173195145303069534d45d446ea4da93a | [
"MIT"
] | 8 | 2018-07-04T09:54:46.000Z | 2022-03-17T08:21:06.000Z | tests/base/test_endpoints_authentication.py | rapydo/http-api | ef0a299173195145303069534d45d446ea4da93a | [
"MIT"
] | 19 | 2018-04-18T07:24:55.000Z | 2022-03-04T01:03:15.000Z | tests/base/test_endpoints_authentication.py | rapydo/http-api | ef0a299173195145303069534d45d446ea4da93a | [
"MIT"
] | 7 | 2018-07-03T12:17:50.000Z | 2021-05-05T04:33:32.000Z | from restapi.connectors import Connector
from restapi.env import Env
from restapi.services.authentication import BaseAuthentication, Role
from restapi.tests import API_URI, BaseTests, FlaskClient
from restapi.utilities.logs import log
class TestApp(BaseTests):
def test_no_auth(self, client: FlaskClient) -> None:
... | 35.228956 | 88 | 0.60346 | 10,225 | 0.977253 | 0 | 0 | 0 | 0 | 0 | 0 | 2,793 | 0.266941 |
e17f627e7014eaf9f501344de8ac94066bc5da4f | 70,860 | py | Python | katsdpscripts/rts_session.py | ska-sa/katsdpscripts | f9eaa867aad8b94c715f7286953124df00b5781c | [
"BSD-3-Clause"
] | null | null | null | katsdpscripts/rts_session.py | ska-sa/katsdpscripts | f9eaa867aad8b94c715f7286953124df00b5781c | [
"BSD-3-Clause"
] | 21 | 2019-09-16T15:26:53.000Z | 2022-01-11T09:14:39.000Z | katsdpscripts/rts_session.py | ska-sa/katsdpscripts | f9eaa867aad8b94c715f7286953124df00b5781c | [
"BSD-3-Clause"
] | 1 | 2019-11-11T11:47:54.000Z | 2019-11-11T11:47:54.000Z | ###############################################################################
# SKA South Africa (http://ska.ac.za/) #
# Author: cam@ska.ac.za #
# Copyright @ 2013 SKA SA. All rights reserved. #
... | 50.14862 | 185 | 0.62869 | 67,226 | 0.948716 | 0 | 0 | 9,948 | 0.14039 | 0 | 0 | 40,117 | 0.566145 |
e17fa16cc2830c70bdb6cc63e17b12437230ec42 | 499 | py | Python | projects/webptspy/apps/account/admin.py | codelieche/testing | 1f4a3393f761654d98588c9ba90596a307fa59db | [
"MIT"
] | 2 | 2017-08-10T03:40:22.000Z | 2017-08-17T13:20:16.000Z | projects/webptspy/apps/account/admin.py | codelieche/webpts | 1f4a3393f761654d98588c9ba90596a307fa59db | [
"MIT"
] | null | null | null | projects/webptspy/apps/account/admin.py | codelieche/webpts | 1f4a3393f761654d98588c9ba90596a307fa59db | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
from django.contrib import admin
from .models import UserProfile
# Register your models here.
class UserProfileModelAdmin(admin.ModelAdmin):
"""
用户管理Model
"""
list_display = ('id', 'username', 'nike_name', 'mobile',
'email', 'is_active')
list_filter = ('... | 26.263158 | 64 | 0.653307 | 329 | 0.648915 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.384615 |
e18273cb48126cd36d2e98bfcd448716a51f67d4 | 396 | py | Python | axicli.py | notpeter/AxiDraw_API | d9c35eb93fd85f96cf197908415822af9a725b41 | [
"MIT"
] | null | null | null | axicli.py | notpeter/AxiDraw_API | d9c35eb93fd85f96cf197908415822af9a725b41 | [
"MIT"
] | 3 | 2021-01-17T04:31:57.000Z | 2021-01-17T04:36:41.000Z | axicli.py | notpeter/AxiDraw_API | d9c35eb93fd85f96cf197908415822af9a725b41 | [
"MIT"
] | null | null | null | '''
axicli.py - Command line interface (CLI) for AxiDraw.
For quick help:
python axicli.py --help
Full user guide:
https://axidraw.com/doc/cli_api/
This script is a stand-alone version of AxiDraw Control, accepting
various options and providing a facility for setting default values.
'''
from axicli.a... | 19.8 | 68 | 0.729798 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 315 | 0.795455 |
e183076e1912547a48c02bb69c7456b82ec312ba | 852 | py | Python | qualification_round_2017/C.py | asukakenji/codejam2018 | a519f522337d7faf3d07a84f6e24f0161f95c880 | [
"MIT"
] | null | null | null | qualification_round_2017/C.py | asukakenji/codejam2018 | a519f522337d7faf3d07a84f6e24f0161f95c880 | [
"MIT"
] | null | null | null | qualification_round_2017/C.py | asukakenji/codejam2018 | a519f522337d7faf3d07a84f6e24f0161f95c880 | [
"MIT"
] | null | null | null | # code jam: Qualification Round 2017: Problem C. Bathroom Stalls
def read_int():
return int(raw_input())
def read_int_n():
return map(int, raw_input().split())
def get_y_z(n, k):
if k == 1:
if n & 1 == 0:
# Even Number
return n >> 1, (n >> 1) - 1
else:
... | 23.027027 | 64 | 0.419014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.183099 |
e1842583bfd3115c7825344cdde05a9fbfaf3644 | 1,143 | py | Python | tests/integration/modules/test_vmc_vm_stats.py | kdsalvy/salt-ext-modules-vmware-1 | 9fdc941692e4c526f575f33b2ce23c1470582934 | [
"Apache-2.0"
] | 10 | 2021-11-02T20:24:44.000Z | 2022-03-11T05:54:27.000Z | tests/integration/modules/test_vmc_vm_stats.py | waynew/salt-ext-modules-vmware | 9f693382772061676c846c850df6ff508b7f3a91 | [
"Apache-2.0"
] | 83 | 2021-10-01T15:13:02.000Z | 2022-03-31T16:22:40.000Z | tests/integration/modules/test_vmc_vm_stats.py | waynew/salt-ext-modules-vmware | 9f693382772061676c846c850df6ff508b7f3a91 | [
"Apache-2.0"
] | 15 | 2021-09-30T23:17:27.000Z | 2022-03-23T06:54:22.000Z | """
Integration Tests for vmc_vm_stats execution module
"""
import pytest
@pytest.fixture
def vm_id(salt_call_cli, vmc_vcenter_connect):
ret = salt_call_cli.run("vmc_sddc.get_vms", **vmc_vcenter_connect)
vm_obj = ret.json[0]
return vm_obj["vm"]
def test_get_cpu_stats_for_vm_smoke_test(salt_call_cli,... | 30.078947 | 87 | 0.724409 | 0 | 0 | 0 | 0 | 182 | 0.15923 | 0 | 0 | 219 | 0.191601 |
e18531179510c781afbb8fd1aa7db0ab08f90a40 | 2,134 | py | Python | uncompy3/decomp_dec.py | Alpha-Demon404/RE-14 | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 39 | 2020-02-26T09:44:36.000Z | 2022-03-23T00:18:25.000Z | uncompy3/decomp_dec.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 15 | 2020-05-14T10:07:26.000Z | 2022-01-06T02:55:32.000Z | uncompy3/decomp_dec.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 41 | 2020-03-16T22:36:38.000Z | 2022-03-17T14:47:19.000Z | # MENTOL
# At:Sun Nov 24 15:04:31 2019
if len(bytecode) == 0:
print('\x1b[1;93mbyte code kosong\nharap masukkan bytecodenya\x1b[0m')
exit()
import marshal, sys, os, random, string, time
try:
from uncompyle6.main import decompile
except:
os.system('pip install uncompyle6')
from uncompyle6.main imp... | 32.830769 | 643 | 0.49672 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 971 | 0.455014 |
e189d16da8174a3b154f79a433e1c07828f194cc | 650 | py | Python | tests/unit/proxy/roundtrip/test_janus_graph_proxy.py | joshthoward/amundsenmetadatalibrary | 87e2b44f0e44ca643f087bff6bd6b39d4ae9e9ad | [
"Apache-2.0"
] | 3 | 2021-02-09T13:52:03.000Z | 2022-02-26T02:36:02.000Z | tests/unit/proxy/roundtrip/test_janus_graph_proxy.py | joshthoward/amundsenmetadatalibrary | 87e2b44f0e44ca643f087bff6bd6b39d4ae9e9ad | [
"Apache-2.0"
] | 1 | 2021-02-08T23:21:04.000Z | 2021-02-08T23:21:04.000Z | tests/unit/proxy/roundtrip/test_janus_graph_proxy.py | joshthoward/amundsenmetadatalibrary | 87e2b44f0e44ca643f087bff6bd6b39d4ae9e9ad | [
"Apache-2.0"
] | 2 | 2021-02-23T18:23:35.000Z | 2022-03-18T15:12:25.000Z | # Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
from typing import Any, Mapping
import unittest
from .abstract_gremlin_proxy_tests import abstract_gremlin_proxy_test_class
from .roundtrip_janusgraph_proxy import RoundtripJanusGraphProxy
class JanusGraphGremlinProxyTest(
... | 40.625 | 91 | 0.803077 | 368 | 0.566154 | 0 | 0 | 0 | 0 | 0 | 0 | 198 | 0.304615 |
e18aabf2262561727c96e58389bdf2da5dd573c7 | 3,829 | py | Python | scripts/performance/config.py | atsgen/tf-test | 2748fcd81491450c75dadc71849d2a1c11061029 | [
"Apache-2.0"
] | 5 | 2020-09-29T00:36:57.000Z | 2022-02-16T06:51:32.000Z | scripts/performance/config.py | atsgen/tf-test | 2748fcd81491450c75dadc71849d2a1c11061029 | [
"Apache-2.0"
] | 27 | 2019-11-02T02:18:34.000Z | 2022-02-24T18:49:08.000Z | scripts/performance/config.py | atsgen/tf-test | 2748fcd81491450c75dadc71849d2a1c11061029 | [
"Apache-2.0"
] | 20 | 2019-11-28T16:02:25.000Z | 2022-01-06T05:56:58.000Z | from builtins import str
from builtins import range
from builtins import object
import os
import fixtures
import testtools
from vn_test import VNFixture
from vm_test import VMFixture
from common.connections import ContrailConnections
from policy_test import PolicyFixture
from policy.config import AttachPolicyFixture
f... | 47.271605 | 121 | 0.659441 | 3,422 | 0.893706 | 0 | 0 | 0 | 0 | 0 | 0 | 917 | 0.239488 |
e18bc1c9af4bc77f3e745030b60675eb8770630a | 4,048 | py | Python | deepspeech_pytorch/testing.py | Chudbrochil/deepspeech.pytorch-2.1 | d5d01e33ef383edb79c6a5b1584c134587108deb | [
"MIT"
] | 13 | 2022-01-25T01:26:56.000Z | 2022-03-18T00:46:38.000Z | deepspeech_pytorch/testing.py | Chudbrochil/deepspeech.pytorch-2.1 | d5d01e33ef383edb79c6a5b1584c134587108deb | [
"MIT"
] | null | null | null | deepspeech_pytorch/testing.py | Chudbrochil/deepspeech.pytorch-2.1 | d5d01e33ef383edb79c6a5b1584c134587108deb | [
"MIT"
] | 1 | 2021-03-03T06:14:21.000Z | 2021-03-03T06:14:21.000Z | import hydra
import torch
from tqdm import tqdm
from deepspeech_pytorch.configs.inference_config import EvalConfig
from deepspeech_pytorch.decoder import GreedyDecoder
from deepspeech_pytorch.loader.data_loader import SpectrogramDataset, AudioDataLoader
from deepspeech_pytorch.utils import load_model, load_decoder
@... | 42.610526 | 104 | 0.561759 | 0 | 0 | 0 | 0 | 3,725 | 0.920208 | 0 | 0 | 178 | 0.043972 |
e18d4a143a071cc6ef045ea47a03a5bc0de604f9 | 483 | py | Python | api/aps3/tasklist/tasklist/main.py | Gustavobb/megadados | 6a653314e0c93c866ec86be2119d64bf297d2f5a | [
"MIT"
] | null | null | null | api/aps3/tasklist/tasklist/main.py | Gustavobb/megadados | 6a653314e0c93c866ec86be2119d64bf297d2f5a | [
"MIT"
] | null | null | null | api/aps3/tasklist/tasklist/main.py | Gustavobb/megadados | 6a653314e0c93c866ec86be2119d64bf297d2f5a | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from fastapi import FastAPI
from .routers import task, user
tags_metadata = [
{
'name': 'task',
'description': 'Operations related to tasks.',
},
]
app = FastAPI(
title='Task list',
description='Task-list project for the **Megadados** course'... | 23 | 65 | 0.672878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.376812 |
e18d760e51cdf1f8ab9695881861681dcd4595c4 | 214 | py | Python | silver_bullet/contain_value.py | Hojung-Jeong/Silver-Bullet-Encryption-Tool | 5ea29b3cd78cf7488e0cbdcf4ea60d7c9151c2a7 | [
"Apache-2.0"
] | null | null | null | silver_bullet/contain_value.py | Hojung-Jeong/Silver-Bullet-Encryption-Tool | 5ea29b3cd78cf7488e0cbdcf4ea60d7c9151c2a7 | [
"Apache-2.0"
] | null | null | null | silver_bullet/contain_value.py | Hojung-Jeong/Silver-Bullet-Encryption-Tool | 5ea29b3cd78cf7488e0cbdcf4ea60d7c9151c2a7 | [
"Apache-2.0"
] | null | null | null | '''
>List of functions
1. contain(value,limit) - contains a value between 0 to limit
'''
def contain(value,limit):
if value<0:
return value+limit
elif value>=limit:
return value-limit
else:
return value | 16.461538 | 62 | 0.705607 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.415888 |
e18de74748857a558fcaeea0ccf6405de06e2047 | 6,388 | py | Python | code/train.py | TONGJINGLV/dagan | 4b6701f0a31026d9a45ab988a645f0a2249cc45c | [
"MIT"
] | null | null | null | code/train.py | TONGJINGLV/dagan | 4b6701f0a31026d9a45ab988a645f0a2249cc45c | [
"MIT"
] | null | null | null | code/train.py | TONGJINGLV/dagan | 4b6701f0a31026d9a45ab988a645f0a2249cc45c | [
"MIT"
] | null | null | null | from data import NumericalField, CategoricalField, Iterator
from data import Dataset
from synthesizer import MaskGenerator_MLP, ObservedGenerator_MLP, Discriminator, Handler, ObservedGenerator_LSTM
from random import choice
import multiprocessing
import pandas as pd
import numpy as np
import torch
import argparse
impor... | 32.426396 | 153 | 0.706951 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,468 | 0.229806 |
e18f60246990c305ae61d8fc90992d5ea5e04b27 | 4,054 | py | Python | front-end/testsuite-python-lib/Python-3.1/Lib/test/test_pep277.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2020-11-26T18:53:46.000Z | 2020-11-26T18:53:46.000Z | front-end/testsuite-python-lib/Python-3.1/Lib/test/test_pep277.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | null | null | null | front-end/testsuite-python-lib/Python-3.1/Lib/test/test_pep277.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2019-04-11T11:27:01.000Z | 2019-04-11T11:27:01.000Z | # Test the Unicode versions of normal file functions
# open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir
import sys, os, unittest
from test import support
if not os.path.supports_unicode_filenames:
raise unittest.SkipTest("test works only on NT+")
filenames = [
'abc',
'... | 35.252174 | 88 | 0.583128 | 2,829 | 0.697829 | 0 | 0 | 0 | 0 | 0 | 0 | 1,018 | 0.25111 |
e18feeef1d44b1fb5822da8d7afcebfd40c0bfe3 | 1,336 | py | Python | test/unit/test_utils.py | managedbyq/q-dbt | 01f1918fe5cbf3036b7197b8e3211960403718f3 | [
"Apache-2.0"
] | 1 | 2018-06-20T17:51:20.000Z | 2018-06-20T17:51:20.000Z | test/unit/test_utils.py | managedbyq/q-dbt | 01f1918fe5cbf3036b7197b8e3211960403718f3 | [
"Apache-2.0"
] | null | null | null | test/unit/test_utils.py | managedbyq/q-dbt | 01f1918fe5cbf3036b7197b8e3211960403718f3 | [
"Apache-2.0"
] | 1 | 2018-10-18T18:45:38.000Z | 2018-10-18T18:45:38.000Z | import unittest
import dbt.utils
class TestDeepMerge(unittest.TestCase):
def test__simple_cases(self):
cases = [
{'args': [{}, {'a': 1}],
'expected': {'a': 1},
'description': 'one key into empty'},
{'args': [{}, {'b': 1}, {'a': 1}],
'expecte... | 30.363636 | 67 | 0.450599 | 1,296 | 0.97006 | 0 | 0 | 0 | 0 | 0 | 0 | 376 | 0.281437 |
e191203fe2262ef390df012127682a8cc60f4320 | 1,006 | py | Python | results.py | ejnnr/steerable_pdo_experiments | 17902e56641cefe305b935c8733b45aa066bf068 | [
"BSD-3-Clause"
] | null | null | null | results.py | ejnnr/steerable_pdo_experiments | 17902e56641cefe305b935c8733b45aa066bf068 | [
"BSD-3-Clause"
] | null | null | null | results.py | ejnnr/steerable_pdo_experiments | 17902e56641cefe305b935c8733b45aa066bf068 | [
"BSD-3-Clause"
] | null | null | null | import argparse
from pathlib import Path
import numpy as np
import yaml
# this script takes in a folder path and then recursively collects all
# results.yaml files in that directory. It averages them and prints
# summary statistics
parser = argparse.ArgumentParser(description="Analyze the results")
parser.add_argume... | 25.794872 | 87 | 0.672962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.327038 |
e19165bb436973e6fab40bd344665853870c9891 | 4,541 | py | Python | Pgnet.py | rs-lsl/Pgnet | b31de7c93619a40bfb194bda0ad2889e732c1db6 | [
"MIT"
] | 2 | 2021-12-27T06:27:56.000Z | 2022-03-12T05:19:59.000Z | Pgnet.py | rs-lsl/Pgnet | b31de7c93619a40bfb194bda0ad2889e732c1db6 | [
"MIT"
] | null | null | null | Pgnet.py | rs-lsl/Pgnet | b31de7c93619a40bfb194bda0ad2889e732c1db6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: lsl
E-mail: cug_lsl@cug.edu.cn
"""
import sys
import argparse
sys.path.append("/home/aistudio/code")
import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data as data
import time
from Pgnet_structure import Pg_net
from Pgnet_dataset imp... | 36.620968 | 120 | 0.657564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 885 | 0.194891 |
e1927fcb892725b69d50542f139eaa6330088fdc | 14,716 | py | Python | tracing/plugins/ath10k_pktlog.py | lumag/qca-swiss-army-knife | 5ede3cc07e9a52f115101c28f833242b772eeaab | [
"ISC"
] | 47 | 2016-05-20T02:33:26.000Z | 2022-03-02T01:48:57.000Z | tracing/plugins/ath10k_pktlog.py | lumag/qca-swiss-army-knife | 5ede3cc07e9a52f115101c28f833242b772eeaab | [
"ISC"
] | 7 | 2020-04-09T13:40:56.000Z | 2022-01-24T19:18:50.000Z | tracing/plugins/ath10k_pktlog.py | lumag/qca-swiss-army-knife | 5ede3cc07e9a52f115101c28f833242b772eeaab | [
"ISC"
] | 41 | 2016-04-19T06:31:14.000Z | 2022-03-30T06:25:09.000Z | #
# Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR... | 31.177966 | 106 | 0.632509 | 2,603 | 0.176882 | 0 | 0 | 0 | 0 | 0 | 0 | 2,983 | 0.202705 |
e1936080a3e49021025bc658618c985bef1143b7 | 731 | py | Python | tgtypes/models/venue.py | autogram/tgtypes | 90f8d0d35d3c372767508e56c20777635e128e38 | [
"MIT"
] | null | null | null | tgtypes/models/venue.py | autogram/tgtypes | 90f8d0d35d3c372767508e56c20777635e128e38 | [
"MIT"
] | null | null | null | tgtypes/models/venue.py | autogram/tgtypes | 90f8d0d35d3c372767508e56c20777635e128e38 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from ._base import TelegramObject
if TYPE_CHECKING: # pragma: no cover
from .location import Location
class Venue(TelegramObject):
"""
This object represents a venue.
Source: https://core.telegram.org/bots/api#venue
... | 25.206897 | 80 | 0.689466 | 540 | 0.738714 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.495212 |
e19376010ad54eee24bb9ce56fbcb72f63a795cb | 2,457 | py | Python | nsa.py | hypervis0r/nsaproductgenerator | e384717e0eb2746bd58d041963b49e4772192f0a | [
"MIT"
] | null | null | null | nsa.py | hypervis0r/nsaproductgenerator | e384717e0eb2746bd58d041963b49e4772192f0a | [
"MIT"
] | null | null | null | nsa.py | hypervis0r/nsaproductgenerator | e384717e0eb2746bd58d041963b49e4772192f0a | [
"MIT"
] | 1 | 2022-02-25T13:06:14.000Z | 2022-02-25T13:06:14.000Z | import random
import argparse
# TODO: Parse word lists from files
words = {
"codenames_adjective": [
"quantum",
"loud",
"red",
"blue",
"green",
"yellow",
"irate",
"angry",
"peeved",
"happy",
"slimy",
"sleepy",
"junior",
"slicker",
"united",
... | 16.944828 | 119 | 0.483923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,011 | 0.411477 |
e195525885c756f6c1eaa22f28ac15deda8bb369 | 2,886 | py | Python | bob/blitz/extension.py | bioidiap/bob.blitz | 348d7cf3866b549cac576efc3c6f3df24245d9fd | [
"BSD-3-Clause"
] | null | null | null | bob/blitz/extension.py | bioidiap/bob.blitz | 348d7cf3866b549cac576efc3c6f3df24245d9fd | [
"BSD-3-Clause"
] | 6 | 2015-01-01T09:15:28.000Z | 2016-10-20T08:09:26.000Z | bob/blitz/extension.py | bioidiap/bob.blitz | 348d7cf3866b549cac576efc3c6f3df24245d9fd | [
"BSD-3-Clause"
] | 3 | 2015-08-05T12:16:45.000Z | 2018-02-01T19:55:40.000Z | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Mon 18 Nov 21:38:19 2013
"""Extension building for using this package
"""
import numpy
from pkg_resources import resource_filename
from bob.extension import Extension as BobExtension
# forward the build_ext command from bob.e... | 31.032258 | 79 | 0.698545 | 2,450 | 0.848926 | 0 | 0 | 0 | 0 | 0 | 0 | 1,562 | 0.541234 |
e195971c01d6f8dcda846bd7ff1f32bb1f7099e8 | 4,248 | py | Python | src/RosGazeboLibrary/Gazebo.py | hielsnoppe/robotframework-rosgazebolibrary | a91d48413d4af95856964644b149898b538c6724 | [
"Apache-2.0"
] | null | null | null | src/RosGazeboLibrary/Gazebo.py | hielsnoppe/robotframework-rosgazebolibrary | a91d48413d4af95856964644b149898b538c6724 | [
"Apache-2.0"
] | null | null | null | src/RosGazeboLibrary/Gazebo.py | hielsnoppe/robotframework-rosgazebolibrary | a91d48413d4af95856964644b149898b538c6724 | [
"Apache-2.0"
] | null | null | null | from robot.api.deco import keyword
from robot.libraries.BuiltIn import BuiltIn
class Gazebo(object):
"""Robot Framework test library for the Gazebo simulator
See also http://gazebosim.org/tutorials/?tut=ros_comm
== Table of contents ==
%TOC%
"""
ROBOT_LIBRARY_SCOPE = 'SUITE'
def __init... | 29.296552 | 94 | 0.638889 | 4,168 | 0.981168 | 0 | 0 | 2,139 | 0.503531 | 0 | 0 | 2,368 | 0.557439 |
e1960d36e95888a08f212b033eea9c1cb048cffe | 1,143 | py | Python | tests/unit/test_hass.py | boonhapus/hautomate | f111a8ad86d5f07183903ec99c1981569e0ee046 | [
"MIT"
] | null | null | null | tests/unit/test_hass.py | boonhapus/hautomate | f111a8ad86d5f07183903ec99c1981569e0ee046 | [
"MIT"
] | null | null | null | tests/unit/test_hass.py | boonhapus/hautomate | f111a8ad86d5f07183903ec99c1981569e0ee046 | [
"MIT"
] | null | null | null | from ward import test, each, raises
from homeassistant.core import HomeAssistant
from hautomate.settings import HautoConfig
from hautomate import Hautomate
import pydantic
from tests.fixtures import cfg_data_hauto
@test('HomeAssistantConfig validates for {feed}', tags=['unit'])
async def _(
cfg_data=cfg_data_ha... | 26.581395 | 67 | 0.632546 | 0 | 0 | 0 | 0 | 924 | 0.808399 | 859 | 0.751531 | 270 | 0.23622 |
e19634e1c0e6ad67f639ff7b727b4525f8c022d4 | 1,186 | py | Python | test/arguments/with_range_check_code/python/Bit4RangeCheckTest.py | dkBrazz/zserio | 29dd8145b7d851fac682d3afe991185ea2eac318 | [
"BSD-3-Clause"
] | 86 | 2018-09-06T09:30:53.000Z | 2022-03-27T01:12:36.000Z | test/arguments/with_range_check_code/python/Bit4RangeCheckTest.py | dkBrazz/zserio | 29dd8145b7d851fac682d3afe991185ea2eac318 | [
"BSD-3-Clause"
] | 362 | 2018-09-04T20:21:24.000Z | 2022-03-30T15:14:38.000Z | test/arguments/with_range_check_code/python/Bit4RangeCheckTest.py | dkBrazz/zserio | 29dd8145b7d851fac682d3afe991185ea2eac318 | [
"BSD-3-Clause"
] | 20 | 2018-09-10T15:59:02.000Z | 2021-12-01T15:38:22.000Z | import unittest
import zserio
from testutils import getZserioApi
class Bit4RangeCheckTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "with_range_check_code.zs",
extraArgs=["-withRangeCheckCode"]).bit4_range_check
def testB... | 34.882353 | 99 | 0.73946 | 1,074 | 0.905565 | 0 | 0 | 189 | 0.159359 | 0 | 0 | 47 | 0.039629 |
e196eb274e00b4e5d8027a1161feb36eab5a1ff6 | 1,931 | py | Python | src/MainAPP/migrations/0030_auto_20181211_1246.py | mizamae/HomeAutomation | 8c462ee4c31c1fea6792cb19af66a4d2cf7bb2ca | [
"MIT"
] | null | null | null | src/MainAPP/migrations/0030_auto_20181211_1246.py | mizamae/HomeAutomation | 8c462ee4c31c1fea6792cb19af66a4d2cf7bb2ca | [
"MIT"
] | 9 | 2017-11-21T15:45:18.000Z | 2022-02-11T03:37:54.000Z | src/MainAPP/migrations/0030_auto_20181211_1246.py | mizamae/HomeAutomation | 8c462ee4c31c1fea6792cb19af66a4d2cf7bb2ca | [
"MIT"
] | 1 | 2020-07-22T02:24:17.000Z | 2020-07-22T02:24:17.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-12-11 11:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('MainAPP', '0029_auto_20181211_1237'),
]
operations = [
migrat... | 47.097561 | 252 | 0.651476 | 1,765 | 0.914034 | 0 | 0 | 0 | 0 | 0 | 0 | 770 | 0.398757 |
e1970edc7bf4ebc76f1931f011d41021ea8563bf | 18,954 | py | Python | qdms/PulsedProgramming.py | 3it-nano/QDMS | 9ec2d4e198c00f394d8882517c4b3b336c7fe8c2 | [
"MIT"
] | 1 | 2021-11-21T15:18:27.000Z | 2021-11-21T15:18:27.000Z | qdms/PulsedProgramming.py | 3it-nano/QDMS | 9ec2d4e198c00f394d8882517c4b3b336c7fe8c2 | [
"MIT"
] | null | null | null | qdms/PulsedProgramming.py | 3it-nano/QDMS | 9ec2d4e198c00f394d8882517c4b3b336c7fe8c2 | [
"MIT"
] | null | null | null | import numpy as np
import math
import time
class PulsedProgramming:
"""
This class contains all the parameters for the Pulsed programming on a memristor model.
After initializing the parameters values, start the simulation with self.simulate()
Parameters
----------
max_voltage : float
... | 43.672811 | 219 | 0.614013 | 18,908 | 0.997573 | 0 | 0 | 0 | 0 | 0 | 0 | 5,883 | 0.310383 |
e197f5d2fbd28b451da6017706229aff6b5fef77 | 462 | py | Python | tests/test_push.py | associatedpress/datakit-dworld | 21ccd0e468c7064d62022a2f136c0f8f47bbabb9 | [
"ISC"
] | 2 | 2019-09-07T02:03:46.000Z | 2021-03-06T14:43:01.000Z | tests/test_push.py | associatedpress/datakit-dworld | 21ccd0e468c7064d62022a2f136c0f8f47bbabb9 | [
"ISC"
] | 5 | 2019-09-06T22:24:26.000Z | 2021-04-27T21:42:18.000Z | tests/test_push.py | associatedpress/datakit-dworld | 21ccd0e468c7064d62022a2f136c0f8f47bbabb9 | [
"ISC"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# from unittest import mock
# from datakit_dworld.push import Push
def test_push(capsys):
"""Sample pytest test function with a built-in pytest fixture as an argument.
"""
# cmd = Greeting(None, None, cmd_name='dworld push')
# parsed_args = mock.Mock()
... | 25.666667 | 81 | 0.655844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 396 | 0.857143 |
e19851b68758ad2c430ee4ac03534a5235c71909 | 1,742 | py | Python | cool_filter.py | Andrea055/Imager | 8463fb18253a97f0c93b11f36104881b7e003f41 | [
"MIT"
] | 7 | 2019-03-31T00:02:42.000Z | 2022-01-30T00:30:46.000Z | cool_filter.py | Andrea055/Imager | 8463fb18253a97f0c93b11f36104881b7e003f41 | [
"MIT"
] | 21 | 2018-11-29T14:35:08.000Z | 2019-01-11T08:00:26.000Z | cool_filter.py | Andrea055/Imager | 8463fb18253a97f0c93b11f36104881b7e003f41 | [
"MIT"
] | 17 | 2018-11-27T01:15:29.000Z | 2019-12-29T19:41:30.000Z | import cv2
import numpy as np
from scipy.interpolate import UnivariateSpline
class Cool(object):
"""cool_filter ---
This class will apply cool filter to an image
by giving a sky blue effect to the input image.
"""
def __init__(self):
# create look-up tables for increasing and decreasing red and blue resp.
... | 32.259259 | 74 | 0.703215 | 1,663 | 0.95465 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.245121 |
e198e752d01863b4604a77f7225e25fec572d794 | 623 | py | Python | src/evaluators/sample_evaluators/swd_sample_evaluator.py | gmum/cwae-pytorch | 7fb31a5d12a0a637be7dde76f0e11e80ec4a345d | [
"MIT"
] | 4 | 2020-08-20T20:51:24.000Z | 2022-01-26T23:56:35.000Z | src/evaluators/sample_evaluators/swd_sample_evaluator.py | gmum/cwae-pytorch | 7fb31a5d12a0a637be7dde76f0e11e80ec4a345d | [
"MIT"
] | null | null | null | src/evaluators/sample_evaluators/swd_sample_evaluator.py | gmum/cwae-pytorch | 7fb31a5d12a0a637be7dde76f0e11e80ec4a345d | [
"MIT"
] | 1 | 2021-12-24T14:13:40.000Z | 2021-12-24T14:13:40.000Z | import torch
from metrics.swd import sliced_wasserstein_distance
from evaluators.sample_evaluators.base_sample_evaluator import BaseSampleEvaluator
from noise_creator import NoiseCreator
class SWDSampleEvaluator(BaseSampleEvaluator):
def __init__(self, noise_creator: NoiseCreator):
self.__noise_... | 38.9375 | 89 | 0.781701 | 426 | 0.683788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e199a6e60b58553046744ab0013002524ed3e824 | 473 | py | Python | topic-db/topicdb/core/models/language.py | anthcp-infocom/Contextualise | 0136660fcb965fd70fb4c7a33de7973a69ee9fec | [
"MIT"
] | 184 | 2019-01-10T03:50:50.000Z | 2022-03-31T19:45:16.000Z | topic-db/topicdb/core/models/language.py | anthcp-infocom/Contextualise | 0136660fcb965fd70fb4c7a33de7973a69ee9fec | [
"MIT"
] | 11 | 2019-04-07T07:39:11.000Z | 2022-02-17T13:29:32.000Z | topic-db/topicdb/core/models/language.py | anthcp-infocom/Contextualise | 0136660fcb965fd70fb4c7a33de7973a69ee9fec | [
"MIT"
] | 9 | 2019-10-26T02:43:59.000Z | 2021-11-03T00:49:10.000Z | """
Language enumeration. Part of the StoryTechnologies project.
June 12, 2016
Brett Alistair Kromkamp (brett.kromkamp@gmail.com)
"""
from enum import Enum
class Language(Enum):
# https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
# https://en.wikipedia.org/wiki/ISO_639-2
ENG = 1 # English
SPA... | 18.92 | 60 | 0.64482 | 312 | 0.659619 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.591966 |
e199bdb1802d5fdf8365414f161e96d1a070a7b9 | 899 | py | Python | utils/migrations/0002_alter_electricitybilling_unit_price_and_more.py | shumwe/rental-house-management-system | f97f22afa8bc2740ed08baa387c74b93e02fac0c | [
"MIT"
] | 1 | 2022-03-16T13:29:30.000Z | 2022-03-16T13:29:30.000Z | utils/migrations/0002_alter_electricitybilling_unit_price_and_more.py | shumwe/rental-house-management-system | f97f22afa8bc2740ed08baa387c74b93e02fac0c | [
"MIT"
] | null | null | null | utils/migrations/0002_alter_electricitybilling_unit_price_and_more.py | shumwe/rental-house-management-system | f97f22afa8bc2740ed08baa387c74b93e02fac0c | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-04-02 17:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('utils', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='electricitybilling',
name='unit_price',... | 31 | 130 | 0.604004 | 806 | 0.896552 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.244716 |
e19e2e064598322d4426a31b5e25a817d667c8db | 13,017 | py | Python | lemur/roles/views.py | pandragoq/lemur | 4f289c790b6638be49dc6614045bcad01bebf7ba | [
"Apache-2.0"
] | null | null | null | lemur/roles/views.py | pandragoq/lemur | 4f289c790b6638be49dc6614045bcad01bebf7ba | [
"Apache-2.0"
] | null | null | null | lemur/roles/views.py | pandragoq/lemur | 4f289c790b6638be49dc6614045bcad01bebf7ba | [
"Apache-2.0"
] | null | null | null | """
.. module: lemur.roles.views
:platform: Unix
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
"""
from flask import Blueprint
from flask import make_response, jsonify, abort, g
from flask.e... | 29.186099 | 112 | 0.520089 | 11,841 | 0.909657 | 0 | 0 | 9,744 | 0.74856 | 0 | 0 | 8,928 | 0.685872 |
e19e4bc332d90affe3ea70c17d43f480bce982e0 | 16,454 | py | Python | backend/core/workspaces/dataView.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | null | null | null | backend/core/workspaces/dataView.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | 50 | 2021-03-28T03:06:19.000Z | 2021-10-18T12:36:16.000Z | backend/core/workspaces/dataView.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | 1 | 2021-07-30T07:12:46.000Z | 2021-07-30T07:12:46.000Z | """
The roseguarden project
Copyright (C) 2018-2020 Marcus Drobisch,
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This pr... | 38.533958 | 109 | 0.521454 | 15,599 | 0.948037 | 0 | 0 | 0 | 0 | 0 | 0 | 3,115 | 0.189316 |
e19eb98e8bf34e916a97b5b0db5e158713913cb4 | 3,892 | py | Python | demo/video_gpuaccel_demo.py | chenxinfeng4/mmdetection | a99a1aaa5e4a7614f2f89f2350e1b917b2a8ca7e | [
"Apache-2.0"
] | 1 | 2021-12-10T15:08:22.000Z | 2021-12-10T15:08:22.000Z | demo/video_gpuaccel_demo.py | q3394101/mmdetection | ca11860f4f3c3ca2ce8340e2686eeaec05b29111 | [
"Apache-2.0"
] | null | null | null | demo/video_gpuaccel_demo.py | q3394101/mmdetection | ca11860f4f3c3ca2ce8340e2686eeaec05b29111 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import argparse
import cv2
import mmcv
import numpy as np
import torch
from torchvision.transforms import functional as F
from mmdet.apis import init_detector
from mmdet.datasets.pipelines import Compose
try:
import ffmpegcv
except ImportError:
raise ImportErro... | 34.140351 | 77 | 0.659044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 727 | 0.186793 |
e1a102da5af50dd136ac3eab04d096bc659e8951 | 1,234 | py | Python | scripts/benchmark_1_rdomset.py | bluegenes/spacegraphcats | 35f8057068e4fe79ab83ac4efe91d1b0f389e1ea | [
"BSD-3-Clause"
] | null | null | null | scripts/benchmark_1_rdomset.py | bluegenes/spacegraphcats | 35f8057068e4fe79ab83ac4efe91d1b0f389e1ea | [
"BSD-3-Clause"
] | null | null | null | scripts/benchmark_1_rdomset.py | bluegenes/spacegraphcats | 35f8057068e4fe79ab83ac4efe91d1b0f389e1ea | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
"""
Benchmark the rdomset (catlas level 1) algorithm, without I/O considerations.
"""
import sys, os
# add spacegraphcats package to import path:
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
import spacegraphcats
from spacegraphcats.catlas import catlas
import argparse
impor... | 28.697674 | 77 | 0.658833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.267423 |
e1a1374935fa7cc8ec68a7212a8ba5b8c016fac8 | 2,107 | py | Python | pyob/mixins/pyob_set_label.py | khunspoonzi/pyob | b1b134b708585add15d04fa75001f3364f31dd74 | [
"MIT"
] | null | null | null | pyob/mixins/pyob_set_label.py | khunspoonzi/pyob | b1b134b708585add15d04fa75001f3364f31dd74 | [
"MIT"
] | null | null | null | pyob/mixins/pyob_set_label.py | khunspoonzi/pyob | b1b134b708585add15d04fa75001f3364f31dd74 | [
"MIT"
] | null | null | null | # ┌─────────────────────────────────────────────────────────────────────────────────────
# │ PYOB SET LABEL MIXIN
# └─────────────────────────────────────────────────────────────────────────────────────
class PyObSetLabelMixin:
"""A mixin class for PyOb set label methods"""
# ┌───────────────────────────────... | 36.327586 | 88 | 0.366398 | 3,221 | 0.853697 | 0 | 0 | 992 | 0.262921 | 0 | 0 | 3,030 | 0.803074 |
e1a2f60719c963dbaf1979085fd5c1225ad3b6d9 | 1,547 | py | Python | proto/twowfuck.py | hanss314/twowfuck | 43d4f7b8c9f6b1e547f57d0c56b1db2972393c1e | [
"Unlicense"
] | null | null | null | proto/twowfuck.py | hanss314/twowfuck | 43d4f7b8c9f6b1e547f57d0c56b1db2972393c1e | [
"Unlicense"
] | null | null | null | proto/twowfuck.py | hanss314/twowfuck | 43d4f7b8c9f6b1e547f57d0c56b1db2972393c1e | [
"Unlicense"
] | null | null | null | import time
from hashlib import sha1
class InfArray():
def __init__(self):
self.left = [0]*16
self.right = [0]*16
def getarr(self, ind):
arr = self.right
if ind < 0: arr, ind = self.left, -ind-1
if ind >= len(arr): arr.extend([0]* (key - len(arr) + 10))
return a... | 28.127273 | 93 | 0.513251 | 599 | 0.387201 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.026503 |
e1a32855943669310a5b6aeb210eb2e39273f98a | 5,915 | py | Python | simba/process_data_log.py | justinshenk/simba | a58ccd0ceeda201c1452d186033ce6b25fbab564 | [
"MIT"
] | 1 | 2021-12-15T07:30:33.000Z | 2021-12-15T07:30:33.000Z | simba/process_data_log.py | justinshenk/simba | a58ccd0ceeda201c1452d186033ce6b25fbab564 | [
"MIT"
] | null | null | null | simba/process_data_log.py | justinshenk/simba | a58ccd0ceeda201c1452d186033ce6b25fbab564 | [
"MIT"
] | 1 | 2021-11-14T09:15:30.000Z | 2021-11-14T09:15:30.000Z | import pandas as pd
import os
from configparser import ConfigParser, NoSectionError, NoOptionError
from datetime import datetime
import numpy as np
import glob
from simba.rw_dfs import *
def analyze_process_data_log(configini,chosenlist):
dateTime = datetime.now().strftime('%Y%m%d%H%M%S')
config = ... | 49.291667 | 200 | 0.598478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,068 | 0.180558 |
e1a33e79602cf7d5b3c579918699d4ae4a866f09 | 3,812 | py | Python | SphinxReportPlugins/MatplotlibPlugin/__init__.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | 1 | 2020-04-10T12:48:40.000Z | 2020-04-10T12:48:40.000Z | SphinxReportPlugins/MatplotlibPlugin/__init__.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | null | null | null | SphinxReportPlugins/MatplotlibPlugin/__init__.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | null | null | null | import os
import re
import warnings
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.image as image
from matplotlib import _pylab_helpers
from matplotlib.cbook import exception_to_str
import seaborn
from SphinxReport.Component import *
from SphinxReport import Config, Utils
class MatplotlibPlugin(... | 35.626168 | 97 | 0.471144 | 3,513 | 0.921563 | 0 | 0 | 0 | 0 | 0 | 0 | 1,167 | 0.306139 |
e1a3af379a95b5a4e4e2ab062711e4da48ff07ad | 4,358 | py | Python | nips2018/utils/plotting.py | kovacspe/Sinz2018_NIPS | c0aad625e516bed57f3ee52b39195c8817527d66 | [
"MIT"
] | 5 | 2018-10-30T05:39:11.000Z | 2021-03-20T12:00:25.000Z | nips2018/utils/plotting.py | kovacspe/Sinz2018_NIPS | c0aad625e516bed57f3ee52b39195c8817527d66 | [
"MIT"
] | null | null | null | nips2018/utils/plotting.py | kovacspe/Sinz2018_NIPS | c0aad625e516bed57f3ee52b39195c8817527d66 | [
"MIT"
] | 5 | 2019-03-08T13:48:39.000Z | 2020-10-04T13:27:56.000Z | import cv2
import imageio
import numpy as np
import matplotlib.pyplot as plt
from itertools import product, zip_longest
import seaborn as sns
def grouper(n, iterable, fillvalue=None):
args = [iter(iterable)] * n
return zip_longest(fillvalue=fillvalue, *args)
def rename(rel, prefix='new_', exclude=[]):
at... | 36.932203 | 106 | 0.630564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 210 | 0.048187 |
e1a3e676ffda7283905e72fd2a219c469d9b17cf | 2,115 | py | Python | src/tests/samples.py | BeholdersEye/PyBitmessage | 362a975fbf1ec831d3107c7442527225bc140162 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 5 | 2018-03-24T17:33:03.000Z | 2019-07-01T07:16:19.000Z | src/tests/samples.py | BeholdersEye/PyBitmessage | 362a975fbf1ec831d3107c7442527225bc140162 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 15 | 2018-03-19T00:04:57.000Z | 2021-12-10T17:21:54.000Z | src/tests/samples.py | BeholdersEye/PyBitmessage | 362a975fbf1ec831d3107c7442527225bc140162 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 5 | 2019-05-15T08:42:57.000Z | 2019-09-17T12:21:37.000Z | """Various sample data"""
from binascii import unhexlify
magic = 0xE9BEB4D9
# These keys are from addresses test script
sample_pubsigningkey = unhexlify(
'044a367f049ec16cb6b6118eb734a9962d10b8db59c890cd08f210c43ff08bdf09d'
'16f502ca26cd0713f38988a1237f1fc8fa07b15653c996dc4013af6d15505ce')
sample_pubencrypt... | 47 | 115 | 0.858629 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,170 | 0.553191 |
e1a48794127b8e659f4702ccf90e46361a4d8c86 | 9,123 | py | Python | court_scraper/platforms/wicourts/pages/search.py | mscarey/court-scraper | 0e13976d901352a09cfd7e48450bbe427494f48e | [
"0BSD"
] | 1 | 2021-08-20T08:24:55.000Z | 2021-08-20T08:24:55.000Z | court_scraper/platforms/wicourts/pages/search.py | palewire/court-scraper | da4b614fb16806d8b5117373d273f802ca93a8cb | [
"0BSD"
] | null | null | null | court_scraper/platforms/wicourts/pages/search.py | palewire/court-scraper | da4b614fb16806d8b5117373d273f802ca93a8cb | [
"0BSD"
] | null | null | null | from urllib.parse import parse_qs
from anticaptchaofficial.hcaptchaproxyless import hCaptchaProxyless
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from court_scraper.base.selenium_helpers import Sel... | 45.38806 | 110 | 0.645183 | 8,655 | 0.948701 | 0 | 0 | 0 | 0 | 0 | 0 | 2,180 | 0.238956 |
e1a571d93e123889de55adde281c383678e87c9f | 392 | py | Python | bitmovin_api_sdk/encoding/encodings/muxings/mp3/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/encoding/encodings/muxings/mp3/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/encoding/encodings/muxings/mp3/__init__.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | from bitmovin_api_sdk.encoding.encodings.muxings.mp3.mp3_api import Mp3Api
from bitmovin_api_sdk.encoding.encodings.muxings.mp3.customdata.customdata_api import CustomdataApi
from bitmovin_api_sdk.encoding.encodings.muxings.mp3.information.information_api import InformationApi
from bitmovin_api_sdk.encoding.encodings.m... | 78.4 | 113 | 0.903061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1a57aedd9dcfceea7d88aacf27bf3e654f2a6f2 | 6,107 | py | Python | platform/bl_interface.py | sumasree98/2022-ectf-insecure-example | ed0a1e3618bca226b0cacd0157ff32a7f4fec2d9 | [
"Apache-2.0"
] | null | null | null | platform/bl_interface.py | sumasree98/2022-ectf-insecure-example | ed0a1e3618bca226b0cacd0157ff32a7f4fec2d9 | [
"Apache-2.0"
] | null | null | null | platform/bl_interface.py | sumasree98/2022-ectf-insecure-example | ed0a1e3618bca226b0cacd0157ff32a7f4fec2d9 | [
"Apache-2.0"
] | 1 | 2022-01-28T02:30:35.000Z | 2022-01-28T02:30:35.000Z | # 2022 eCTF
# Bootloader Interface Emulator
# Ben Janis
#
# (c) 2022 The MITRE Corporation
#
# This source file is part of an example system for MITRE's 2022 Embedded System
# CTF (eCTF). This code is being provided only for educational purposes for the
# 2022 MITRE eCTF competition, and may not meet MITRE standards fo... | 27.885845 | 80 | 0.595055 | 3,423 | 0.560504 | 0 | 0 | 220 | 0.036024 | 0 | 0 | 1,268 | 0.207631 |
e1a5eed695e57412a97412dd5eb33192adae977e | 968 | py | Python | Excel_python_demo.py | SJG88/excel_vba_python | ba7413be23796c67f921fe5428cd52592fdb54a9 | [
"MIT"
] | null | null | null | Excel_python_demo.py | SJG88/excel_vba_python | ba7413be23796c67f921fe5428cd52592fdb54a9 | [
"MIT"
] | null | null | null | Excel_python_demo.py | SJG88/excel_vba_python | ba7413be23796c67f921fe5428cd52592fdb54a9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This is a script to demo how to open up a macro enabled excel file, write a pandas dataframe to it
and save it as a new file name.
Created on Mon Mar 1 17:47:41 2021
@author: Shane Gore
"""
import os
import xlwings as xw
import pandas as pd
os.chdir(r"C:\Users\Shane Gore\De... | 23.047619 | 99 | 0.669421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 557 | 0.575413 |
e1a7e0683b31fbc7612eb7456c53935a17b8dbcf | 31,709 | py | Python | code/Elipsoide_Clark_FAT.py | birocoles/paper-magnetic-elipsoid | 81d9b2e39cbb942f619f590ad389eb30d58b46d4 | [
"BSD-3-Clause"
] | 1 | 2017-02-26T15:19:25.000Z | 2017-02-26T15:19:25.000Z | code/Elipsoide_Clark_FAT.py | birocoles/paper-magnetic-elipsoid | 81d9b2e39cbb942f619f590ad389eb30d58b46d4 | [
"BSD-3-Clause"
] | null | null | null | code/Elipsoide_Clark_FAT.py | birocoles/paper-magnetic-elipsoid | 81d9b2e39cbb942f619f590ad389eb30d58b46d4 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division
import numpy as np
from scipy import linalg
from matplotlib import pyplot as plt
from fatiando.gravmag import sphere
from fatiando import mesher, gridder, utils
from fatiando.vis import mpl
import scipy.special
import scipy.interpolate
class GeometricElement(object):
"""
Base... | 30.372605 | 216 | 0.583431 | 3,454 | 0.108928 | 0 | 0 | 0 | 0 | 0 | 0 | 15,257 | 0.481157 |
e1a8d307cf28e74c7cd2efb91e428fd65a4beecc | 852 | py | Python | app.py | aserhatdemir/digitalocean | 4ae2bfc2831b4fae15d9076b3b228c9a4bda44e7 | [
"MIT"
] | null | null | null | app.py | aserhatdemir/digitalocean | 4ae2bfc2831b4fae15d9076b3b228c9a4bda44e7 | [
"MIT"
] | null | null | null | app.py | aserhatdemir/digitalocean | 4ae2bfc2831b4fae15d9076b3b228c9a4bda44e7 | [
"MIT"
] | null | null | null | from do import DigitalOcean
import argparse
import json
def do_play(token):
do = DigitalOcean(token)
# ----
# for i in range(3):
# do.create_droplet(f'node-{i}', 'fra1', 'do-python')
# do.wait_droplet_creation_process('do-python')
# ----
# do.destroy_droplets('do-python')
# ----
... | 23.027027 | 61 | 0.627934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 250 | 0.293427 |
e1a8f6b9d508e5ab80894a039b117dd4b1afc6ed | 343 | py | Python | convert_twitter_data.py | charlieyou/data-science-final-project | 7968261c3e44fe3544360a08fea271b611d105c1 | [
"Apache-2.0"
] | null | null | null | convert_twitter_data.py | charlieyou/data-science-final-project | 7968261c3e44fe3544360a08fea271b611d105c1 | [
"Apache-2.0"
] | null | null | null | convert_twitter_data.py | charlieyou/data-science-final-project | 7968261c3e44fe3544360a08fea271b611d105c1 | [
"Apache-2.0"
] | null | null | null | import cPickle as pickle
import pandas as pd
if __name__ == '__main__':
fnames = set(['clinton_tweets.json', 'trump_tweets.json'])
for fname in fnames:
df = pd.read_json('data/' + fname)
df = df.transpose()
df = df['text']
pickle.dump([(i, v) for i, v in zip(df.index, df.values... | 28.583333 | 85 | 0.597668 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.195335 |
e1aafb58eef941757b45eb7221687eebd5c2e5ea | 799 | py | Python | app.py | mwinel/python-cicd-assignement | c4c08772094f983f8105090f0d91dfef5be042aa | [
"MIT"
] | null | null | null | app.py | mwinel/python-cicd-assignement | c4c08772094f983f8105090f0d91dfef5be042aa | [
"MIT"
] | null | null | null | app.py | mwinel/python-cicd-assignement | c4c08772094f983f8105090f0d91dfef5be042aa | [
"MIT"
] | null | null | null | import os
import logging
from flask import Flask
app = Flask(__name__)
@app.route('/status')
def health_check():
app.logger.info('Status request successfull')
app.logger.debug('DEBUG message')
return 'OK - healthy'
@app.route('/metrics')
def metrics():
app.logger.info('Metrics request successfull')... | 22.828571 | 79 | 0.673342 | 0 | 0 | 0 | 0 | 517 | 0.647059 | 0 | 0 | 264 | 0.330413 |
e1ad6793329afb999758e7af4b085f4de8b95b33 | 93 | py | Python | Configuration/StandardSequences/python/L1Reco_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/StandardSequences/python/L1Reco_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/StandardSequences/python/L1Reco_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from L1Trigger.Configuration.L1TReco_cff import *
| 18.6 | 49 | 0.83871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1af67620fb53577d386b7ebbfdc3bab9dc25e7c | 2,347 | py | Python | pysrc/common/dataset_mod.py | Hibiki1020/classification_attitude_estimator | 7f7435c2ed5b5b5c8d0219df2da0426b108ff3aa | [
"MIT"
] | null | null | null | pysrc/common/dataset_mod.py | Hibiki1020/classification_attitude_estimator | 7f7435c2ed5b5b5c8d0219df2da0426b108ff3aa | [
"MIT"
] | null | null | null | pysrc/common/dataset_mod.py | Hibiki1020/classification_attitude_estimator | 7f7435c2ed5b5b5c8d0219df2da0426b108ff3aa | [
"MIT"
] | null | null | null |
import torch.utils.data as data
from PIL import Image
import numpy as np
import math
import csv
class ClassOriginaldataset(data.Dataset):
def __init__(self, data_list, transform, phase, index_dict_path, dim_fc_out):
self.data_list = data_list
self.transform = transform
self.phase = phase
... | 28.621951 | 111 | 0.611845 | 2,248 | 0.957818 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.013208 |
e1b1063d345266bc6d42ef8301d5659cc8f0a43d | 1,846 | py | Python | scripts/darias_energy_control/moveit_traj_baseline/repulsive_potential_field.py | hjw-1014/Multi-Objective-Reactive-Motion-Planning-in-Mobile-Manipulators | 9a8801e9c663174b753c4852b2313c5a3f302434 | [
"MIT"
] | null | null | null | scripts/darias_energy_control/moveit_traj_baseline/repulsive_potential_field.py | hjw-1014/Multi-Objective-Reactive-Motion-Planning-in-Mobile-Manipulators | 9a8801e9c663174b753c4852b2313c5a3f302434 | [
"MIT"
] | null | null | null | scripts/darias_energy_control/moveit_traj_baseline/repulsive_potential_field.py | hjw-1014/Multi-Objective-Reactive-Motion-Planning-in-Mobile-Manipulators | 9a8801e9c663174b753c4852b2313c5a3f302434 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import matplotlib.pyplot as plt
from icecream import ic
def visualize_vector_field(policy, device, min_max = [[-1,-1],[1,1]], fig_number=1):
min_x = min_max[0][0]
max_x = min_max[1][0]
min_y = min_max[0][1]
max_y = min_max[1][1]
n_sample = 100
x = np.linspace(m... | 20.977273 | 84 | 0.594258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 453 | 0.245395 |
e1b18b46651e9f66ff6958a9025b0bc1b9f9aca5 | 3,793 | py | Python | capa/features/extractors/ida/extractor.py | pombredanne/capa | b41d23930189c269608d4b705533fa45cf3c064c | [
"Apache-2.0"
] | null | null | null | capa/features/extractors/ida/extractor.py | pombredanne/capa | b41d23930189c269608d4b705533fa45cf3c064c | [
"Apache-2.0"
] | null | null | null | capa/features/extractors/ida/extractor.py | pombredanne/capa | b41d23930189c269608d4b705533fa45cf3c064c | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at: [package root]/LICENSE.txt
# Unless required by applicable law or agreed to in writing,... | 33.566372 | 111 | 0.714474 | 2,846 | 0.75033 | 1,441 | 0.37991 | 134 | 0.035328 | 0 | 0 | 934 | 0.246243 |
e1b1b1bf75362e9f77713c3b8bcaddbf1477de81 | 55 | py | Python | Tests/playground.py | mbtaPredict/Main | e1c3320ff08b61355ac96f51be9e20c57372f13b | [
"MIT"
] | null | null | null | Tests/playground.py | mbtaPredict/Main | e1c3320ff08b61355ac96f51be9e20c57372f13b | [
"MIT"
] | null | null | null | Tests/playground.py | mbtaPredict/Main | e1c3320ff08b61355ac96f51be9e20c57372f13b | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
plt.plot()
plt.show() | 11 | 31 | 0.745455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1b370db317e8d54c9c290cf01cbebc1cac20378 | 1,373 | py | Python | flex/extensions/jsondata.py | AWehrhahn/flex-format | 7fcc985559cd90e54d3ebde7946455aedc7293d7 | [
"MIT"
] | null | null | null | flex/extensions/jsondata.py | AWehrhahn/flex-format | 7fcc985559cd90e54d3ebde7946455aedc7293d7 | [
"MIT"
] | null | null | null | flex/extensions/jsondata.py | AWehrhahn/flex-format | 7fcc985559cd90e54d3ebde7946455aedc7293d7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import annotations
from tarfile import TarInfo
from typing import BinaryIO, Tuple
from ..base import FlexExtension
class JsonDataExtension(FlexExtension):
"""An extension to store simple json data"""
def __init__(self, header=None, data=None, cls=None):
super... | 31.930233 | 78 | 0.640932 | 1,213 | 0.883467 | 0 | 0 | 423 | 0.308084 | 0 | 0 | 213 | 0.155135 |
e1b37b3b7be2be9f06bdec60a631822373a8b7f7 | 185 | py | Python | awards/forms.py | danalvin/Django-IP3 | 6df0adaddf998fd4195b23ee97f81938e741215a | [
"MIT"
] | null | null | null | awards/forms.py | danalvin/Django-IP3 | 6df0adaddf998fd4195b23ee97f81938e741215a | [
"MIT"
] | 4 | 2020-06-05T19:20:59.000Z | 2021-09-08T00:32:49.000Z | awards/forms.py | danalvin/Django-IP3 | 6df0adaddf998fd4195b23ee97f81938e741215a | [
"MIT"
] | null | null | null | from django import forms
from .models import Project
class ProjectForm(forms.ModelForm):
class Meta:
model = Project
exclude = ['profile', 'posted_time', 'user']
| 18.5 | 52 | 0.67027 | 128 | 0.691892 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.151351 |
e1b43999f4dbbac898da1e996502f381b7896fa5 | 72,341 | py | Python | src/tale/syntax/grammar/TaleParser.py | tale-lang/tale | 1779f94aa13545e58a1d5a8819b85ad02ada4144 | [
"MIT"
] | 17 | 2020-02-11T10:38:19.000Z | 2020-09-22T16:36:25.000Z | src/tale/syntax/grammar/TaleParser.py | tale-lang/tale | 1779f94aa13545e58a1d5a8819b85ad02ada4144 | [
"MIT"
] | 18 | 2020-02-14T20:36:25.000Z | 2020-05-26T21:52:46.000Z | src/tale/syntax/grammar/TaleParser.py | tale-lang/tale | 1779f94aa13545e58a1d5a8819b85ad02ada4144 | [
"MIT"
] | 1 | 2020-02-16T12:04:07.000Z | 2020-02-16T12:04:07.000Z | # Generated from tale/syntax/grammar/Tale.g4 by ANTLR 4.8
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\... | 34.317362 | 239 | 0.590868 | 64,548 | 0.892274 | 0 | 0 | 0 | 0 | 0 | 0 | 7,549 | 0.104353 |
e1b490b033e953f1585ccd81fdcb489a598e5706 | 353 | py | Python | 004.py | gabrieleliasdev/python-cev | 45390963b5112a982e673f6a6866da422bf9ae6d | [
"MIT"
] | null | null | null | 004.py | gabrieleliasdev/python-cev | 45390963b5112a982e673f6a6866da422bf9ae6d | [
"MIT"
] | null | null | null | 004.py | gabrieleliasdev/python-cev | 45390963b5112a982e673f6a6866da422bf9ae6d | [
"MIT"
] | null | null | null | print('Olá, Mundo!')
print(7+4)
print('7'+'4')
print('Olá', 5)
# Toda variável é um objeto
# Um objeto é mais do que uma variável
nome = 'Gabriel'
idade = 30
peso = 79
print(nome,idade,peso)
nome = input('>>> Nome ')
idade = input('>>> Idade ')
peso = input('>>> Peso ')
print(nome,idade,peso)
print(f'Nome:{nom... | 14.12 | 49 | 0.620397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0.501393 |
e1b5d39efe358fd9f5a0abeb927321f0eef6f285 | 680 | py | Python | examples/create_mac_table_entry.py | open-switch/opx-docs | f448f3f3dc0de38822bbf16c1e173eb108925a40 | [
"CC-BY-4.0"
] | 122 | 2017-02-10T01:47:04.000Z | 2022-03-23T20:11:11.000Z | examples/create_mac_table_entry.py | open-switch/opx-docs | f448f3f3dc0de38822bbf16c1e173eb108925a40 | [
"CC-BY-4.0"
] | 37 | 2017-03-01T07:07:22.000Z | 2021-11-11T16:47:42.000Z | examples/create_mac_table_entry.py | open-switch/opx-docs | f448f3f3dc0de38822bbf16c1e173eb108925a40 | [
"CC-BY-4.0"
] | 39 | 2017-01-18T16:22:58.000Z | 2020-11-18T13:23:43.000Z | #Python code block to configure MAC address table entry
import cps_utils
#Register the attribute type
cps_utils.add_attr_type('base-mac/table/mac-address', 'mac')
#Define the MAC address, interface index and VLAN attributes
d = {'mac-address': '00:0a:0b:cc:0d:0e', 'ifindex': 18, 'vlan': '100'}
#Create a CPS object
... | 27.2 | 70 | 0.738235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 422 | 0.620588 |
e1b62639aea1ec0a6c6d66e1d90f5f610c374034 | 4,397 | py | Python | win/GUI/Configuration.py | WeAreAVP/mdqc | 3130a713c70017bc54d8e5da6bb5766ba9d97423 | [
"Apache-2.0"
] | 8 | 2019-01-18T08:58:02.000Z | 2021-05-20T16:51:14.000Z | osx/GUI/Configuration.py | WeAreAVP/mdqc | 3130a713c70017bc54d8e5da6bb5766ba9d97423 | [
"Apache-2.0"
] | 7 | 2016-02-25T21:50:03.000Z | 2017-12-13T14:27:29.000Z | osx/GUI/Configuration.py | WeAreAVP/mdqc | 3130a713c70017bc54d8e5da6bb5766ba9d97423 | [
"Apache-2.0"
] | 2 | 2020-02-13T16:00:07.000Z | 2020-08-12T16:31:49.000Z | # -*- coding: UTF-8 -*-
'''
Created on May 14, 2014
@author: Furqan Wasi <furqan@avpreserve.com>
'''
import os, datetime, sys, platform, base64
class Configuration(object):
def __init__(self):
# Constructor
if os.name == 'posix':
self.OsType = 'linux'
elif os.name == 'nt':
... | 31.407143 | 139 | 0.596771 | 4,249 | 0.966341 | 0 | 0 | 0 | 0 | 0 | 0 | 669 | 0.152149 |
e1b62abc8e468748316b85f828dfc8de03775be8 | 17,306 | py | Python | MainController.py | samuelvp360/Microbiological-Assay-Calculator | 36317e266bf499f24f7e7d3f59328864a8723aa4 | [
"FSFAP"
] | null | null | null | MainController.py | samuelvp360/Microbiological-Assay-Calculator | 36317e266bf499f24f7e7d3f59328864a8723aa4 | [
"FSFAP"
] | null | null | null | MainController.py | samuelvp360/Microbiological-Assay-Calculator | 36317e266bf499f24f7e7d3f59328864a8723aa4 | [
"FSFAP"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from pathlib import Path
from datetime import datetime
from PyQt5 import QtCore as qtc
from PyQt5 import QtWidgets as qtw
from PyQt5 import uic
import numpy as np
from Models import AssaysModel, SamplesModel
from DB.AssaysDB import MyZODB
import matpl... | 42.836634 | 108 | 0.596729 | 16,343 | 0.944191 | 0 | 0 | 1,473 | 0.0851 | 0 | 0 | 1,490 | 0.086082 |
e1b6ebd37b97bc9b109f511037c684ea5fa2de9b | 225 | py | Python | events/defaults.py | bozbalci/cython-experiments | a675571e09297e3cda9154e8b611562bb8b14f7e | [
"Unlicense"
] | 1 | 2018-06-23T17:52:20.000Z | 2018-06-23T17:52:20.000Z | events/defaults.py | bozbalci/cython-experiments | a675571e09297e3cda9154e8b611562bb8b14f7e | [
"Unlicense"
] | null | null | null | events/defaults.py | bozbalci/cython-experiments | a675571e09297e3cda9154e8b611562bb8b14f7e | [
"Unlicense"
] | null | null | null | # defaults.py: contains the built-in variables, events and methods
# used for scripting the C program
import event
events = {}
_event_names = ["on_start", "on_exit"]
for evt in _event_names:
events[evt] = event.Event()
| 22.5 | 66 | 0.724444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.528889 |
e1b7011c0667fc12e337dc4c85e26236aa831c39 | 15,526 | py | Python | src/parse_text.py | rflieshman/BOLSTM | be7551957001a9bdaab6051145f96ad9d7415209 | [
"Apache-2.0"
] | 13 | 2019-04-11T02:20:49.000Z | 2021-03-26T11:00:10.000Z | src/parse_text.py | rflieshman/BOLSTM | be7551957001a9bdaab6051145f96ad9d7415209 | [
"Apache-2.0"
] | 5 | 2018-12-05T14:38:40.000Z | 2021-12-13T19:46:53.000Z | src/parse_text.py | lasigeBioTM/BOLSTM | c33a8b2a7722acb5e3ff55c3735591aea4f76f49 | [
"Apache-2.0"
] | 2 | 2019-10-13T13:47:19.000Z | 2021-01-16T10:43:33.000Z | from itertools import combinations
import numpy as np
import spacy
import sys
from spacy.tokenizer import Tokenizer
import re
from subprocess import PIPE, Popen
import os
import logging
import networkx as nx
import en_core_web_sm
import string
from neg_gv import neg_gv_list
SSTDIR = "sst-light-0.4/"
TEMP_DIR = "temp/... | 37.502415 | 119 | 0.550818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,642 | 0.298982 |
e1b73e252109287a68039d70bc02eba7d5e821da | 1,049 | py | Python | metadata-ingestion/examples/library/dataset_set_tag.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 1,603 | 2016-03-03T17:21:03.000Z | 2020-01-22T22:12:02.000Z | metadata-ingestion/examples/library/dataset_set_tag.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 1,157 | 2016-03-03T19:29:22.000Z | 2020-01-20T14:41:59.000Z | metadata-ingestion/examples/library/dataset_set_tag.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 570 | 2016-03-03T17:21:05.000Z | 2020-01-21T06:54:10.000Z | # Imports for urn construction utility methods
import logging
from datahub.emitter.mce_builder import make_dataset_urn, make_tag_urn
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from datahub.emitter.rest_emitter import DatahubRestEmitter
# Imports for metadata model classes
from datahub.metadata.sche... | 32.78125 | 87 | 0.804576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.228789 |
e1b7f693b03922194b579f49635c8089ae32b745 | 517 | py | Python | examples/Old Format/matrix_latex.py | waldyrious/galgebra | b5eb070340434d030dd737a5656fbf709538b0b1 | [
"BSD-3-Clause"
] | 151 | 2018-09-18T12:30:14.000Z | 2022-03-16T08:02:48.000Z | examples/Old Format/matrix_latex.py | abrombo/galgebra | 5ae058c9ba2c17b1baf46c58f77124e82eaf428a | [
"BSD-3-Clause"
] | 454 | 2018-09-19T01:42:30.000Z | 2022-01-18T14:02:00.000Z | examples/Old Format/matrix_latex.py | abrombo/galgebra | 5ae058c9ba2c17b1baf46c58f77124e82eaf428a | [
"BSD-3-Clause"
] | 30 | 2019-02-22T08:25:50.000Z | 2022-01-15T05:20:22.000Z | from __future__ import print_function
from sympy import symbols, Matrix
from galgebra.printer import xpdf, Format
def main():
Format()
a = Matrix ( 2, 2, ( 1, 2, 3, 4 ) )
b = Matrix ( 2, 1, ( 5, 6 ) )
c = a * b
print(a,b,'=',c)
x, y = symbols ( 'x, y' )
d = Matrix ( 1, 2, ( x ** 3, y ** 3... | 19.884615 | 65 | 0.475822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.06383 |
e1b88db11881c00abc4ca3f31868a0861378a947 | 780 | py | Python | hopsapp/__init__.py | mrahman013/Hope4Hops-web-applcation | d5bde1463c6fbc1ea5424cb656504119393c6ce2 | [
"MIT"
] | null | null | null | hopsapp/__init__.py | mrahman013/Hope4Hops-web-applcation | d5bde1463c6fbc1ea5424cb656504119393c6ce2 | [
"MIT"
] | null | null | null | hopsapp/__init__.py | mrahman013/Hope4Hops-web-applcation | d5bde1463c6fbc1ea5424cb656504119393c6ce2 | [
"MIT"
] | null | null | null | """Implements a basic flask app that provides hashes of text."""
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import flask_login
#pylint: disable=invalid-name
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgres://yjjuylsytqewni:d0d63322c6abd33e2dadeafd... | 35.454545 | 224 | 0.815385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 456 | 0.584615 |
e1b8fdfc631946eef5fedb38c2e25e5e6c2e1add | 800 | py | Python | npytoImage.py | x35yao/camera | 0ee77f5de72d785ba68bef44a557470ec425d702 | [
"MIT"
] | null | null | null | npytoImage.py | x35yao/camera | 0ee77f5de72d785ba68bef44a557470ec425d702 | [
"MIT"
] | null | null | null | npytoImage.py | x35yao/camera | 0ee77f5de72d785ba68bef44a557470ec425d702 | [
"MIT"
] | null | null | null | import numpy as np;
import cv2;
n = 428671
img_RS_color = np.load('/home/p4bhattachan/gripper/3DCameraServer/testImages/npyFiles/{}_RS_color.npy'.format(n))
cv2.imshow('RS Color Image {}'.format(n), img_RS_color)
#
# # img_RS_depth = np.load('/home/p4bhattachan/gripper/3DCameraServer/testImages/npyFiles/{}_RS_depth.np... | 38.095238 | 119 | 0.7475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 633 | 0.79125 |
e1b94f246fa698d25573d863b176f320113a2877 | 11,217 | py | Python | magenta/music/sequences_lib.py | jellysquider/magenta | 0fc8188870f5d1c988b76dae434b21e58362516c | [
"Apache-2.0"
] | null | null | null | magenta/music/sequences_lib.py | jellysquider/magenta | 0fc8188870f5d1c988b76dae434b21e58362516c | [
"Apache-2.0"
] | null | null | null | magenta/music/sequences_lib.py | jellysquider/magenta | 0fc8188870f5d1c988b76dae434b21e58362516c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 38.67931 | 80 | 0.692788 | 8,771 | 0.781938 | 0 | 0 | 0 | 0 | 0 | 0 | 5,436 | 0.484622 |
e1ba5c72da56a9dbf7ee8bd79a41429f11457824 | 8,404 | py | Python | tests/index_jsonurl_test.py | Stidsty/dismantle | 26fb8fe7ba97349a67498715bb47a19329b1a4c7 | [
"Apache-2.0"
] | null | null | null | tests/index_jsonurl_test.py | Stidsty/dismantle | 26fb8fe7ba97349a67498715bb47a19329b1a4c7 | [
"Apache-2.0"
] | null | null | null | tests/index_jsonurl_test.py | Stidsty/dismantle | 26fb8fe7ba97349a67498715bb47a19329b1a4c7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Gary Stidston-Broadbent
#
# 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 ... | 42.02 | 79 | 0.707996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,997 | 0.237625 |
e1ba723285119341020fa35acb08aec8be4bb131 | 200 | py | Python | src/resdk/__init__.py | AGregorc/resolwe-bio-py | 62304e5d4c54c917575421701c6977dc63fc3a8f | [
"Apache-2.0"
] | 4 | 2016-09-28T16:00:05.000Z | 2018-08-16T16:14:10.000Z | src/resdk/__init__.py | AGregorc/resolwe-bio-py | 62304e5d4c54c917575421701c6977dc63fc3a8f | [
"Apache-2.0"
] | 229 | 2016-03-28T19:41:00.000Z | 2022-03-16T15:02:15.000Z | src/resdk/__init__.py | AGregorc/resolwe-bio-py | 62304e5d4c54c917575421701c6977dc63fc3a8f | [
"Apache-2.0"
] | 18 | 2016-03-10T16:11:57.000Z | 2021-06-01T10:01:49.000Z | """Resolwe SDK for Python."""
from .collection_tables import CollectionTables # noqa
from .resdk_logger import log_to_stdout, start_logging # noqa
from .resolwe import Resolwe, ResolweQuery # noqa
| 40 | 62 | 0.79 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.235 |
e1bade04e7403e544b5faa2f08e7005733a09b95 | 4,842 | py | Python | helper/validation_scripts/launch-lm-profile.py | NanoMembers/DeepFlow | 0235fe460d15a95f90202a1fdb3d3405d774511a | [
"Apache-2.0"
] | 3 | 2020-10-29T19:00:29.000Z | 2020-12-21T12:24:28.000Z | helper/validation_scripts/launch-lm-profile.py | NanoMembers/DeepFlow | 0235fe460d15a95f90202a1fdb3d3405d774511a | [
"Apache-2.0"
] | null | null | null | helper/validation_scripts/launch-lm-profile.py | NanoMembers/DeepFlow | 0235fe460d15a95f90202a1fdb3d3405d774511a | [
"Apache-2.0"
] | null | null | null | #!/tools/python/python3.8.3/bin/python
import os
import shutil
import subprocess
import numpy as np
batch_list=[i*1024 for i in range(2,7)]
seq_list=[10]
hidden_list=[i*1024 for i in range(2,7)]
vocab_list=[2048] #[int(i) for i in (2**np.linspace(10,13,20)//2*2)]
layer_list=[1]
bpe_list=[10]
epoch_list=[3]
def run_... | 63.710526 | 363 | 0.621437 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,470 | 0.51012 |
e1bb9b6b3739ef931135cf1fd4f2fa3e0d1cab30 | 8,171 | py | Python | src/planet_box_extractor/extractor.py | V-AI-S/planet-box-extractor | 5404bc97e7a2e1f6d90c7503d9106973038e4387 | [
"MIT"
] | 6 | 2021-05-31T14:51:55.000Z | 2022-01-27T14:44:04.000Z | src/planet_box_extractor/extractor.py | V-AI-S/planet-box-extractor | 5404bc97e7a2e1f6d90c7503d9106973038e4387 | [
"MIT"
] | null | null | null | src/planet_box_extractor/extractor.py | V-AI-S/planet-box-extractor | 5404bc97e7a2e1f6d90c7503d9106973038e4387 | [
"MIT"
] | null | null | null | from .geo_utils import boundingBox
import time
import PIL.Image
import urllib.request
import mercantile
import numpy as np
class PlanetBoxExtractor:
"""
Extract bounding boxes from satellite images using Planet Tiles API
@radius: distance from the center of the image to the edge in kilometers
@... | 41.060302 | 153 | 0.598947 | 7,789 | 0.953249 | 0 | 0 | 0 | 0 | 0 | 0 | 4,176 | 0.511076 |
e1bbdc48371fed473f16ae3afb93373be31ead4e | 21,365 | py | Python | Kai/python/modules/mctruth.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2022-01-17T17:29:38.000Z | 2022-01-17T17:29:38.000Z | Kai/python/modules/mctruth.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | null | null | null | Kai/python/modules/mctruth.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2021-12-15T10:56:50.000Z | 2021-12-15T10:56:50.000Z | from __future__ import (division, print_function)
import os
import ROOT
#import numpy as np
#import itertools
#from collections import OrderedDict
ROOT.PyConfig.IgnoreCommandLineOptions = True
from PhysicsTools.NanoAODTools.postprocessing.framework.datamodel import Collection, Object
from PhysicsTools.NanoAODTools.pos... | 54.088608 | 192 | 0.539246 | 20,743 | 0.970887 | 0 | 0 | 0 | 0 | 0 | 0 | 14,430 | 0.675404 |
e1bced98ae2a678cded5046d18c92e44944d6925 | 1,214 | py | Python | skimpy/utils/namespace.py | AQ18/skimpy | 435fc50244f2ca815bbb39d525a82a4692f5c0ac | [
"Apache-2.0"
] | 13 | 2020-11-05T10:59:13.000Z | 2022-03-21T01:38:31.000Z | skimpy/utils/namespace.py | AQ18/skimpy | 435fc50244f2ca815bbb39d525a82a4692f5c0ac | [
"Apache-2.0"
] | 4 | 2022-01-27T10:23:40.000Z | 2022-03-10T18:16:06.000Z | skimpy/utils/namespace.py | AQ18/skimpy | 435fc50244f2ca815bbb39d525a82a4692f5c0ac | [
"Apache-2.0"
] | 6 | 2020-08-04T17:01:33.000Z | 2022-03-21T01:38:32.000Z | # -*- coding: utf-8 -*-
"""
.. module:: pytfa
:platform: Unix, Windows
:synopsis: Simple Kinetic Models in Python
.. moduleauthor:: SKiMPy team
[---------]
Copyright 2017 Laboratory of Computational Systems Biotechnology (LCSB),
Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland
Licensed under the ... | 21.298246 | 72 | 0.702636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,041 | 0.857496 |
e1bdf0a5854ba7b15ac7f77144b26d66246bcec0 | 517 | py | Python | app/urlshortener.py | felixbade/minimal-url-shortener | 4f2b4e318fff4eab2b37f863230198a5116e7a7e | [
"MIT"
] | null | null | null | app/urlshortener.py | felixbade/minimal-url-shortener | 4f2b4e318fff4eab2b37f863230198a5116e7a7e | [
"MIT"
] | null | null | null | app/urlshortener.py | felixbade/minimal-url-shortener | 4f2b4e318fff4eab2b37f863230198a5116e7a7e | [
"MIT"
] | null | null | null | class URLShortener:
def __init__(self):
self.id_counter = 0
self.links = {}
def getURL(self, short_id):
return self.links.get(short_id)
def shorten(self, url):
short_id = self.getNextId()
self.links.update({short_id: url})
return short_id
def getNextId... | 25.85 | 75 | 0.611219 | 516 | 0.998066 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.205029 |
e1be426bfe54febaaf2747236ba29b8bea95325e | 2,897 | py | Python | designate/storage/impl_sqlalchemy/migrate_repo/versions/051_scoped_tsig.py | cneill/designate-testing | 7bf320062d85a12bff2aee8d26c133941a289fc4 | [
"Apache-2.0"
] | null | null | null | designate/storage/impl_sqlalchemy/migrate_repo/versions/051_scoped_tsig.py | cneill/designate-testing | 7bf320062d85a12bff2aee8d26c133941a289fc4 | [
"Apache-2.0"
] | null | null | null | designate/storage/impl_sqlalchemy/migrate_repo/versions/051_scoped_tsig.py | cneill/designate-testing | 7bf320062d85a12bff2aee8d26c133941a289fc4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hp.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/L... | 36.2125 | 78 | 0.713497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,296 | 0.447359 |
e1bf68076ea2cc2d9234c0759575b80d167f8b2e | 680 | py | Python | geomat/stein/migrations/0060_remove_mineraltype_mohs_scale.py | mimischi/django-geomat | 8c5bc4c9ba9759b58b52ddf339ccaec40ec5f6ea | [
"BSD-3-Clause"
] | 3 | 2017-01-13T15:53:39.000Z | 2017-05-05T11:57:55.000Z | geomat/stein/migrations/0060_remove_mineraltype_mohs_scale.py | mimischi/django-geomat | 8c5bc4c9ba9759b58b52ddf339ccaec40ec5f6ea | [
"BSD-3-Clause"
] | 233 | 2016-11-05T15:19:48.000Z | 2021-09-07T23:33:47.000Z | geomat/stein/migrations/0060_remove_mineraltype_mohs_scale.py | GeoMatDigital/django-geomat | 8c5bc4c9ba9759b58b52ddf339ccaec40ec5f6ea | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.0.2 on 2018-05-04 07:33
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
('stein', '0059_mineraltype_new_mohs_scale'),
]
operations = [
migrations.AlterField(
model_name='mineraltype... | 26.153846 | 106 | 0.632353 | 566 | 0.832353 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.282353 |
e1c057aa5119875fed8dba5a07e37ff673709a2b | 14,420 | py | Python | bamboo/core/calculator.py | pld/bamboo | a0fc77aebd6ff6b1087ba46896b0ce705fbb25a3 | [
"BSD-3-Clause"
] | 27 | 2015-01-14T15:57:54.000Z | 2020-12-27T19:34:41.000Z | bamboo/core/calculator.py | biswapanda/bamboo | 72fc260822a27ce52cbe65de178f8fa1b60311f3 | [
"BSD-3-Clause"
] | 2 | 2015-08-06T15:23:28.000Z | 2016-01-28T00:05:25.000Z | bamboo/core/calculator.py | biswapanda/bamboo | 72fc260822a27ce52cbe65de178f8fa1b60311f3 | [
"BSD-3-Clause"
] | 10 | 2015-08-07T01:50:39.000Z | 2019-05-15T21:41:18.000Z | from collections import defaultdict
from celery.task import task
from pandas import concat, DataFrame
from bamboo.core.aggregator import Aggregator
from bamboo.core.frame import add_parent_column, join_dataset
from bamboo.core.parser import Parser
from bamboo.lib.datetools import recognize_dates
from bamboo.lib.jsont... | 35.343137 | 78 | 0.676283 | 0 | 0 | 0 | 0 | 1,686 | 0.116921 | 0 | 0 | 3,879 | 0.269001 |
e1c0ee31e7c392fd9a301672456d03f86541b8f3 | 265 | py | Python | modules/python3/tests/unittests/scripts/glm.py | ImagiaViz/inviwo | a00bb6b0551bc1cf26dc0366c827c1a557a9603d | [
"BSD-2-Clause"
] | 349 | 2015-01-30T09:21:52.000Z | 2022-03-25T03:10:02.000Z | modules/python3/tests/unittests/scripts/glm.py | ImagiaViz/inviwo | a00bb6b0551bc1cf26dc0366c827c1a557a9603d | [
"BSD-2-Clause"
] | 641 | 2015-09-23T08:54:06.000Z | 2022-03-23T09:50:55.000Z | modules/python3/tests/unittests/scripts/glm.py | ImagiaViz/inviwo | a00bb6b0551bc1cf26dc0366c827c1a557a9603d | [
"BSD-2-Clause"
] | 124 | 2015-02-27T23:45:02.000Z | 2022-02-21T09:37:14.000Z | import inviwopy
from inviwopy.glm import *
v1 = vec3(1,2,3)
v2 = size2_t(4,5)
m1 = mat4(1)
m2 = mat3(0,1,0,-1,0,0,0,0,2)
v3 = m2 * v1
v4 = vec4(1,2,3,4)
w = v4.w
a = v4.a
q = v4.q
z = v4.z
b = v4.b
p = v4.p
y = v4.y
g = v4.g
t = v4.t
x = v4.x
r = v4.r
s = v4.s
| 10.6 | 29 | 0.532075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1c1c2a4c0c8d49965261747c7efaf839f60298c | 7,538 | py | Python | djangoexample/thumbs/views.py | arneb/sorethumb | 5b224fbf30eaeb83640510d11a0dea40592e76ad | [
"BSD-3-Clause"
] | null | null | null | djangoexample/thumbs/views.py | arneb/sorethumb | 5b224fbf30eaeb83640510d11a0dea40592e76ad | [
"BSD-3-Clause"
] | null | null | null | djangoexample/thumbs/views.py | arneb/sorethumb | 5b224fbf30eaeb83640510d11a0dea40592e76ad | [
"BSD-3-Clause"
] | null | null | null | from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.conf import settings
from models import ThumbTest
from sorethumb.filters.defaultfilters import *
from sorethumb.filters.drawfilters import *
from sorethumb.djangothumbnail import... | 31.805907 | 223 | 0.602282 | 2,052 | 0.272221 | 0 | 0 | 0 | 0 | 0 | 0 | 3,995 | 0.529981 |
e1c3efdf6d1bcb608ddb86a4384fd1aed1e4458f | 117 | py | Python | hello_world.py | michaeljamieson/Python01 | 96777e5252aaf58e5b424dd5b39186b395d9d859 | [
"Apache-2.0"
] | null | null | null | hello_world.py | michaeljamieson/Python01 | 96777e5252aaf58e5b424dd5b39186b395d9d859 | [
"Apache-2.0"
] | null | null | null | hello_world.py | michaeljamieson/Python01 | 96777e5252aaf58e5b424dd5b39186b395d9d859 | [
"Apache-2.0"
] | null | null | null | print ('hello world')
print ('hey i did something')
print ('what happens if i do a ;');
print ('apparently nothing')
| 23.4 | 35 | 0.683761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.683761 |