hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bc3c1b4b67c6a161b94ae23b58760e641ad020db | 914 | py | Python | colorspace/__init__.py | atomicoo/EnhanceIMG | 8c009fbb6c5461ff6d7f30bdacec72232639c7f2 | [
"MIT"
] | 35 | 2021-04-20T21:14:25.000Z | 2022-03-31T08:27:35.000Z | colorspace/__init__.py | Real798/EnhanceIMG | 8c009fbb6c5461ff6d7f30bdacec72232639c7f2 | [
"MIT"
] | 2 | 2021-05-13T05:34:59.000Z | 2021-09-23T09:07:32.000Z | colorspace/__init__.py | Real798/EnhanceIMG | 8c009fbb6c5461ff6d7f30bdacec72232639c7f2 | [
"MIT"
] | 7 | 2021-05-10T12:08:42.000Z | 2022-02-24T10:06:05.000Z | import cv2
def bgr2rgb(img_bgr):
return cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB)
def rgb2bgr(img_rgb):
return cv2.cvtColor(img_rgb, cv2.COLOR_RGB2BGR)
def bgr2gray(img_bgr):
return cv2.cvtColor(img_bgr, cv2.COLOR_BGR2GRAY)
def bgr2hsv(img_bgr):
return cv2.cvtColor(img_bgr, cv2.COLOR_BGR2HSV)
def hs... | 23.435897 | 52 | 0.760394 |
20dcadf14d7e729f3bf49414a96c1bfd37338759 | 5,160 | py | Python | mangasheet.py | MizunagiKB/mangasheet | acc747eb6e84d32d775caede3bd4d1e4dda7ef80 | [
"MIT"
] | null | null | null | mangasheet.py | MizunagiKB/mangasheet | acc747eb6e84d32d775caede3bd4d1e4dda7ef80 | [
"MIT"
] | null | null | null | mangasheet.py | MizunagiKB/mangasheet | acc747eb6e84d32d775caede3bd4d1e4dda7ef80 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# ------------------------------------------------------------------ import(s)
import sys
import math
import argparse
import PIL.Image
import PIL.ImageDraw
import PIL.ImageFont
# -----------------------------------... | 28.196721 | 99 | 0.486434 |
3a7623d7e0055f0adc198c936fa5d8640bd35ec3 | 2,432 | py | Python | manage.py | kevinmcalear/lego | b1f92159f8d0b8ec7ee54cf2f749066efc4d0615 | [
"BSD-3-Clause"
] | null | null | null | manage.py | kevinmcalear/lego | b1f92159f8d0b8ec7ee54cf2f749066efc4d0615 | [
"BSD-3-Clause"
] | null | null | null | manage.py | kevinmcalear/lego | b1f92159f8d0b8ec7ee54cf2f749066efc4d0615 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Management script."""
import os
from glob import glob
from subprocess import call
from flask_migrate import MigrateCommand
from flask_script import Command, Manager, Option, Server, Shell
from flask_script.commands import Clean, ShowUrls
from lego_me.app import create_... | 31.584416 | 107 | 0.660362 |
8c57107f4d14ef5f170bfeb1e539420d882a5c56 | 202 | py | Python | spitz/spiders/snap_fit.py | zezaeoh/spitz | 4420af2bc26a705ef92cc05e14f6db759e217a13 | [
"MIT"
] | 1 | 2019-12-16T16:31:45.000Z | 2019-12-16T16:31:45.000Z | spitz/spiders/snap_fit.py | zezaeoh/spitz | 4420af2bc26a705ef92cc05e14f6db759e217a13 | [
"MIT"
] | 2 | 2021-03-31T19:29:57.000Z | 2021-12-13T20:27:03.000Z | spitz/spiders/snap_fit.py | zezaeoh/spitz | 4420af2bc26a705ef92cc05e14f6db759e217a13 | [
"MIT"
] | null | null | null | import scrapy
class SnapFitSpider(scrapy.Spider):
name = 'snap_fit'
allowed_domains = ['66girls.co.kr']
start_urls = ['http://66girls.co.kr/']
def parse(self, response):
pass
| 18.363636 | 42 | 0.638614 |
f4dd51193d41ee00b9cdd00a1f106e6eb46346cf | 8,729 | py | Python | blender/2.79/scripts/addons/add_mesh_extra_objects/geodesic_domes/forms_271.py | uzairakbar/bpy2.79 | 3a3e0004ac6783c4e4b89d939e4432de99026a85 | [
"MIT"
] | 3 | 2019-09-16T10:29:19.000Z | 2022-02-11T14:43:18.000Z | engine/2.80/scripts/addons/add_mesh_geodesic_domes/forms_271.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons/add_mesh_geodesic_domes/forms_271.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | 4 | 2020-02-19T20:02:26.000Z | 2022-02-11T18:47:56.000Z | from math import sin, cos, sqrt
from .vefm_271 import *
class form(mesh):
def __init__(self, uresolution, vresolution, uscale, vscale, upart,
vpart, uphase, vphase, utwist, vtwist, xscale, yscale, sform):
mesh.__init__(self)
self.PKHG_parameters = [uresolution, vresolution, uscal... | 36.523013 | 93 | 0.513805 |
627cb3b39d546badb4943297cdc34a8129f96823 | 35 | py | Python | Calculator/squared.py | zc256/PythonCalculator | 3267a0809dbc28e437337c68f93a9205c0532563 | [
"MIT"
] | null | null | null | Calculator/squared.py | zc256/PythonCalculator | 3267a0809dbc28e437337c68f93a9205c0532563 | [
"MIT"
] | null | null | null | Calculator/squared.py | zc256/PythonCalculator | 3267a0809dbc28e437337c68f93a9205c0532563 | [
"MIT"
] | null | null | null | def squared(a):
return float(a)**2 | 17.5 | 19 | 0.685714 |
93e928336e1ad6c687d3ad3a2bc5c378d547edf5 | 5,433 | py | Python | streamlit/src/pages/user_statistics.py | likweitan/final_year_project | a86059cad92efe4edd85364d21b4ee6a56234b30 | [
"MIT"
] | null | null | null | streamlit/src/pages/user_statistics.py | likweitan/final_year_project | a86059cad92efe4edd85364d21b4ee6a56234b30 | [
"MIT"
] | null | null | null | streamlit/src/pages/user_statistics.py | likweitan/final_year_project | a86059cad92efe4edd85364d21b4ee6a56234b30 | [
"MIT"
] | 1 | 2021-07-10T15:54:54.000Z | 2021-07-10T15:54:54.000Z | import streamlit as st
import altair as alt
import pandas as pd
import numpy as np
import random
def load(data):
st.title('🎲 Student Statistics')
merge_df = merge_all(data[0], data[1], data[2])
users = find_user(merge_df)
st.sidebar.header('User')
user = st.sidebar.selectbox('Please select ... | 35.509804 | 153 | 0.684336 |
528fae4391563c0a920f260d5099c37962493faf | 14,785 | py | Python | batch/batch/driver/canceller.py | mattsolo1/hail | ccec08b3dfcf5da83fa09a4576dd1f5ee4e17b6f | [
"MIT"
] | null | null | null | batch/batch/driver/canceller.py | mattsolo1/hail | ccec08b3dfcf5da83fa09a4576dd1f5ee4e17b6f | [
"MIT"
] | null | null | null | batch/batch/driver/canceller.py | mattsolo1/hail | ccec08b3dfcf5da83fa09a4576dd1f5ee4e17b6f | [
"MIT"
] | null | null | null | import logging
import asyncio
from hailtop.utils import (
WaitableSharedPool,
retry_long_running,
run_if_changed,
AsyncWorkerPool,
time_msecs,
periodically_call,
)
from hailtop import aiotools
from gear import Database
from .job import unschedule_job, mark_job_complete
from .instance_collectio... | 38.204134 | 133 | 0.596483 |
0cd22bf2a4222316017609c754ef754694cb9df1 | 525 | py | Python | Study_Ahead/Templates_Basics/starter_temp.py | AnikaZN/AnikaDS | 02c69894b242abdc88b6e1ac86407a02a3d43f92 | [
"MIT"
] | null | null | null | Study_Ahead/Templates_Basics/starter_temp.py | AnikaZN/AnikaDS | 02c69894b242abdc88b6e1ac86407a02a3d43f92 | [
"MIT"
] | null | null | null | Study_Ahead/Templates_Basics/starter_temp.py | AnikaZN/AnikaDS | 02c69894b242abdc88b6e1ac86407a02a3d43f92 | [
"MIT"
] | null | null | null | import os
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def index():
return render_template('home.html')
@app.route('/puppy/<name>')
def puppy(name):
return render_template('puppy_name.html', name=name)
@app.route('/another/<name>')
def another(name):
letters = list(nam... | 21 | 72 | 0.657143 |
2e93c7ab3c8ec8793db42c1a7a5aff91d2690618 | 2,563 | py | Python | book_figures/chapter5/fig_outlier_distribution.py | StKyr/astroML_figures | 45e9748335e0cd854d09319dff0e43ecd70e7b61 | [
"BSD-2-Clause"
] | 6 | 2019-08-31T16:43:43.000Z | 2021-07-10T06:06:20.000Z | book_figures/chapter5/fig_outlier_distribution.py | StKyr/astroML_figures | 45e9748335e0cd854d09319dff0e43ecd70e7b61 | [
"BSD-2-Clause"
] | 34 | 2018-09-10T22:35:07.000Z | 2022-02-08T21:17:39.000Z | book_figures/chapter5/fig_outlier_distribution.py | StKyr/astroML_figures | 45e9748335e0cd854d09319dff0e43ecd70e7b61 | [
"BSD-2-Clause"
] | 10 | 2017-06-22T09:21:19.000Z | 2020-01-26T03:54:26.000Z | """
Gaussian Distribution with Outliers
-----------------------------------
This figure shows the distribution of points drawn from a narrow
Gaussian distribution, with 20% "outliers" drawn from a wider
Gaussian distribution. Over-plotted are the robust and non-robust
estimators of the mean and standard deviation.
"""... | 32.858974 | 79 | 0.62817 |
f0d7669235d99d5b4974773e30f421bcce3f43ec | 85 | py | Python | run.py | ouriquegustavo/twitch_tower_defense | 20e1b41e3f1c363856515eda1c2a9288ce42e442 | [
"MIT"
] | null | null | null | run.py | ouriquegustavo/twitch_tower_defense | 20e1b41e3f1c363856515eda1c2a9288ce42e442 | [
"MIT"
] | null | null | null | run.py | ouriquegustavo/twitch_tower_defense | 20e1b41e3f1c363856515eda1c2a9288ce42e442 | [
"MIT"
] | null | null | null | from main.game import Game
if __name__ == "__main__":
main_server = Game()
| 14.166667 | 26 | 0.647059 |
688cf0d89ccced4ccb7d1e234b017329f99a8921 | 2,953 | py | Python | test/problems/sampling/protein_folding/peptide/beads/test_bead_main.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | 132 | 2021-01-28T14:51:11.000Z | 2022-03-25T21:10:47.000Z | test/problems/sampling/protein_folding/peptide/beads/test_bead_main.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | 449 | 2021-01-28T19:57:43.000Z | 2022-03-31T17:01:50.000Z | test/problems/sampling/protein_folding/peptide/beads/test_bead_main.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | 109 | 2021-01-28T13:17:46.000Z | 2022-03-30T23:53:39.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 40.452055 | 95 | 0.716559 |
c3062d30168475f93a4fbbdb94e37cadf5670df7 | 7,471 | py | Python | lib/matplotlib/tri/triangulation.py | cboos/matplotlib | 2bb91ce669c92e118f7a87ea9437a3efaa4ead39 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2015-02-13T19:39:31.000Z | 2015-02-13T19:39:31.000Z | lib/matplotlib/tri/triangulation.py | cboos/matplotlib | 2bb91ce669c92e118f7a87ea9437a3efaa4ead39 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/tri/triangulation.py | cboos/matplotlib | 2bb91ce669c92e118f7a87ea9437a3efaa4ead39 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | import matplotlib.delaunay as delaunay
import matplotlib._tri as _tri
import numpy as np
class Triangulation(object):
"""
An unstructured triangular grid consisting of npoints points and
ntri triangles. The triangles can either be specified by the user
or automatically generated using a Delaunay trian... | 37.732323 | 77 | 0.590684 |
1ce1eac9137b3f22a6077830c830b6da4ce18911 | 8,492 | py | Python | gmn/src/d1_gmn/app/views/slice.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 15 | 2016-10-28T13:56:52.000Z | 2022-01-31T19:07:49.000Z | gmn/src/d1_gmn/app/views/slice.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 56 | 2017-03-16T03:52:32.000Z | 2022-03-12T01:05:28.000Z | gmn/src/d1_gmn/app/views/slice.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 11 | 2016-05-31T16:22:02.000Z | 2020-10-05T14:37:10.000Z | # This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | 36.603448 | 88 | 0.705488 |
57fd3a540d3abeab44712652f804e1ee0bc3dfde | 74 | py | Python | test.py | dmcblue/balanced_teams | d1bbec56fa7b64853632343461c1c272c147ae4d | [
"Apache-2.0"
] | null | null | null | test.py | dmcblue/balanced_teams | d1bbec56fa7b64853632343461c1c272c147ae4d | [
"Apache-2.0"
] | null | null | null | test.py | dmcblue/balanced_teams | d1bbec56fa7b64853632343461c1c272c147ae4d | [
"Apache-2.0"
] | 1 | 2021-03-28T23:11:47.000Z | 2021-03-28T23:11:47.000Z | import os
os.system("python -m unittest discover -s test -p '*_test.py'")
| 24.666667 | 63 | 0.702703 |
1f9172926d4626341236eec0431dec7ef34ba0ad | 5,593 | py | Python | kubernetes/client/models/v1_resource_quota_spec.py | TomasTomecek/kubernetes-python | c37c074303a13c72662b9201ccc023fb0ca45755 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_resource_quota_spec.py | TomasTomecek/kubernetes-python | c37c074303a13c72662b9201ccc023fb0ca45755 | [
"Apache-2.0"
] | 1 | 2021-04-30T20:41:19.000Z | 2021-04-30T20:41:19.000Z | venv/lib/python2.7/site-packages/kubernetes/client/models/v1_resource_quota_spec.py | 784134748/kubernetes-install | 5df59632c2619632e422948b667fb68eab9ff5be | [
"MIT"
] | 1 | 2020-05-09T07:16:55.000Z | 2020-05-09T07:16:55.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 30.562842 | 287 | 0.603254 |
ecb0184d295937350be675ffab084d3706eec6a5 | 75,978 | py | Python | fugue/workflow/workflow.py | gityow/fugue | e975625b33766d8b9dc64c6954871569b59367ec | [
"Apache-2.0"
] | null | null | null | fugue/workflow/workflow.py | gityow/fugue | e975625b33766d8b9dc64c6954871569b59367ec | [
"Apache-2.0"
] | null | null | null | fugue/workflow/workflow.py | gityow/fugue | e975625b33766d8b9dc64c6954871569b59367ec | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from threading import RLock
from typing import Any, Callable, Dict, Iterable, List, Optional, Set, TypeVar, Union
from uuid import uuid4
from adagio.specs import WorkflowSpec
from fugue.collections.partition import PartitionSpec
from fugue.collections.yielded import Yielded
from fug... | 39.305742 | 88 | 0.621654 |
e3b5c4969b2ba593cabcf703ab94180e9b8911f7 | 131 | py | Python | src/window.py | ytyaru/Python.Pyxel.Minimum.Window.border_width.20200330194841 | 9ea98aa336b0ff7b5ed2e10d0c5bc8c8841ac8af | [
"CC0-1.0"
] | null | null | null | src/window.py | ytyaru/Python.Pyxel.Minimum.Window.border_width.20200330194841 | 9ea98aa336b0ff7b5ed2e10d0c5bc8c8841ac8af | [
"CC0-1.0"
] | null | null | null | src/window.py | ytyaru/Python.Pyxel.Minimum.Window.border_width.20200330194841 | 9ea98aa336b0ff7b5ed2e10d0c5bc8c8841ac8af | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf8
import pyxel
pyxel.init(256, 256, border_width=0)
pyxel.run(lambda: 0, lambda: pyxel.cls(8))
| 21.833333 | 42 | 0.725191 |
b5d684aff236b52be1ed0835a42881859da1a318 | 4,188 | py | Python | fastdocx/ui/ui.py | SOVLOOKUP/FastDocx | 9e7d9a2bed77fc7ebd8eb7f0a49ec9bbacaeb02d | [
"MIT"
] | 3 | 2021-02-05T08:46:26.000Z | 2021-05-12T13:00:01.000Z | fastdocx/ui/ui.py | SOVLOOKUP/FastDocx | 9e7d9a2bed77fc7ebd8eb7f0a49ec9bbacaeb02d | [
"MIT"
] | 4 | 2020-10-21T03:04:28.000Z | 2021-05-26T04:06:01.000Z | fastdocx/ui/ui.py | SOVLOOKUP/FastDocx | 9e7d9a2bed77fc7ebd8eb7f0a49ec9bbacaeb02d | [
"MIT"
] | 2 | 2021-05-12T09:46:01.000Z | 2021-11-05T01:36:06.000Z | from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QDesktopServices, QIcon, QIconEngine
from PyQt5.QtWidgets import QMessageBox, QMainWindow, QApplication, QListWidgetItem, QInputDialog, QFileDialog
from .form import Ui_MainWindow
import httpx, json, os
from fastdocx import WordCore
from .style import stype
#... | 31.969466 | 148 | 0.621538 |
42d7884f5f24dfc4f4ba3076fc7266b945bd3d3b | 15,027 | py | Python | grr/server/grr_response_server/file_store_test.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/file_store_test.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/file_store_test.py | ahmednofal/grr | 08a57f6873ee13f425d0106e4143663bc6dbdd60 | [
"Apache-2.0"
] | 2 | 2020-08-24T00:22:03.000Z | 2020-11-14T08:34:43.000Z | #!/usr/bin/env python
"""Tests for REL_DB-based file store."""
from __future__ import absolute_import
from __future__ import unicode_literals
from grr_response_core.lib import flags
from grr_response_core.lib import rdfvalue
from grr_response_server import data_store
from grr_response_server import db
from grr_respons... | 39.031169 | 80 | 0.717176 |
108317dac2e68f6eaa6d3a5260825679b69baccd | 146 | py | Python | notebooks/paths.py | JoaoCarabetta/bovespa_fun | febd24d5af54ad32b383afb154a0154c12aa8a6f | [
"MIT"
] | 2 | 2019-11-22T05:31:24.000Z | 2019-11-25T04:03:17.000Z | notebooks/paths.py | JoaoCarabetta/distancia_escolas_sp | 22ac35e4577b40fff5d44feac53e56799e649f5f | [
"MIT"
] | 1 | 2020-03-21T19:56:34.000Z | 2020-03-21T19:56:34.000Z | notebooks/paths.py | JoaoCarabetta/distancia_escolas_sp | 22ac35e4577b40fff5d44feac53e56799e649f5f | [
"MIT"
] | 1 | 2019-11-22T05:31:36.000Z | 2019-11-22T05:31:36.000Z | import os
import sys
sys.path.insert(0, '../')
sys.path.insert(0, '../scripts')
from config import RAW_PATH, TREAT_PATH, OUTPUT_PATH, FIGURES_PATH | 29.2 | 66 | 0.746575 |
7fd9e8e192970115641be927828ccb673fc03d87 | 6,189 | py | Python | research/recommend/autodis/infer/utils/preprocess_txt.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/recommend/autodis/infer/utils/preprocess_txt.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/recommend/autodis/infer/utils/preprocess_txt.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 44.207143 | 120 | 0.621587 |
40d22245bd4d9be1a6e29e176df88be485584970 | 3,257 | py | Python | CDSB_series/kfingerprinting/random-evaluate-script.py | WFDetector/WFDetection | b16d35b3a3a5de62de9e0bac83eccd21b6358b53 | [
"Apache-2.0"
] | null | null | null | CDSB_series/kfingerprinting/random-evaluate-script.py | WFDetector/WFDetection | b16d35b3a3a5de62de9e0bac83eccd21b6358b53 | [
"Apache-2.0"
] | null | null | null | CDSB_series/kfingerprinting/random-evaluate-script.py | WFDetector/WFDetection | b16d35b3a3a5de62de9e0bac83eccd21b6358b53 | [
"Apache-2.0"
] | null | null | null | import subprocess
from os.path import join
import argparse
from os.path import abspath, dirname
# Directories
BASE_DIR = abspath(join(dirname(__file__)))
# prefix = "../split/results/"
# targets = [ #glue
# "ranpad2_0706_0829/",
# "ranpad2_0706_0830/",
# "ranpad2_0706_0831/",
# "ranpad2_0706_0832/",
# "ranpad2_0706_0... | 36.595506 | 183 | 0.624501 |
bcec56ea40e0aa8cee040630613047eafa8c22ca | 7,596 | py | Python | git_profile_manager/utils.py | MeNsaaH/git-profile-manager | b084224b5947878a272258031780453c90a97525 | [
"MIT"
] | 26 | 2020-06-02T11:17:23.000Z | 2021-09-10T19:59:28.000Z | git_profile_manager/utils.py | MeNsaaH/git-profile-manager | b084224b5947878a272258031780453c90a97525 | [
"MIT"
] | 4 | 2020-06-02T23:45:41.000Z | 2020-06-06T12:00:06.000Z | git_profile_manager/utils.py | MeNsaaH/git-profile-manager | b084224b5947878a272258031780453c90a97525 | [
"MIT"
] | 1 | 2020-08-17T23:34:34.000Z | 2020-08-17T23:34:34.000Z | """ Utility functions """
import os
import re
import shutil
import sys
import subprocess
from git_profile_manager import configparser
HOME = os.path.expanduser("~")
# Directory to store all git-profile-manager config
GIT_PROFILE_DIR = os.path.join(HOME, ".gitprofiles")
GLOBAL_GITCONFIG = os.path.join(GIT_PROFILE_D... | 32.323404 | 142 | 0.671669 |
6417fe46c67b5042dce7ca478004a867bfe9607c | 5,967 | py | Python | insights/parsers/samba.py | haithcockce/insights-core | b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5 | [
"Apache-2.0"
] | null | null | null | insights/parsers/samba.py | haithcockce/insights-core | b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5 | [
"Apache-2.0"
] | null | null | null | insights/parsers/samba.py | haithcockce/insights-core | b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5 | [
"Apache-2.0"
] | null | null | null | """
SambaConfig - file ``/etc/samba/smb.conf``
==========================================
This parser reads the Samba configuration file ``/etc/samba/smb.conf``, which
is in standard .ini format, with a couple of notable features:
* Samba ignores spaces at the start of options, which the ConfigParser class
normally... | 36.163636 | 100 | 0.657952 |
54155eff8e26b16ff5303d8d279e81b4bf8a90f4 | 5,475 | py | Python | demo/model_zoo/embedding/paraconvert.py | lzhao4ever/Paddle-master | 5c0eb23d1c021fed88416df9eae8511d36df4372 | [
"Apache-2.0"
] | 1 | 2018-12-20T12:15:39.000Z | 2018-12-20T12:15:39.000Z | demo/model_zoo/embedding/paraconvert.py | lzhao4ever/Paddle-master | 5c0eb23d1c021fed88416df9eae8511d36df4372 | [
"Apache-2.0"
] | null | null | null | demo/model_zoo/embedding/paraconvert.py | lzhao4ever/Paddle-master | 5c0eb23d1c021fed88416df9eae8511d36df4372 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
# Copyright (c) 2016 Baidu, 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 b... | 34.21875 | 79 | 0.61242 |
c3561981de76a5cb01d50e5e5596c6750564031e | 20,544 | py | Python | flux_combined_high_binding/model_42.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_42.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_combined_high_binding/model_42.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.111111 | 798 | 0.804079 |
b8b8010c109230e151b8e1e595edc1a3fa572be9 | 2,154 | py | Python | tests/test_ner.py | vishalbelsare/ner-d | 0231f8b14ab1e75fa4b7238ac8a237d9d9fa23f2 | [
"MIT"
] | 16 | 2019-06-24T09:00:23.000Z | 2021-09-02T14:13:18.000Z | tests/test_ner.py | vishalbelsare/ner-d | 0231f8b14ab1e75fa4b7238ac8a237d9d9fa23f2 | [
"MIT"
] | 1 | 2019-07-09T13:52:24.000Z | 2020-01-13T14:11:31.000Z | tests/test_ner.py | vishalbelsare/ner-d | 0231f8b14ab1e75fa4b7238ac8a237d9d9fa23f2 | [
"MIT"
] | 3 | 2019-10-20T20:02:24.000Z | 2020-09-06T13:08:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nerd import ner
class NerTest(unittest.TestCase):
def test_load_model(self):
nlp = ner.load_model()
self.assertIsNotNone(nlp)
def test_name(self):
doc = ner.name(
"""GitHub launched April 10, 2008, a subs... | 34.741935 | 174 | 0.522748 |
f962d14b86c6fcd702805c8b4ff8a1073dc44a24 | 8,630 | py | Python | mcwpy/datapack.py | vianneyveremme/minecraft_with_python | 25edded44dd56348068758bc78eb71a3ce546583 | [
"MIT"
] | 1 | 2021-07-29T14:22:15.000Z | 2021-07-29T14:22:15.000Z | mcwpy/datapack.py | vianneyveremme/minecraft_with_python | 25edded44dd56348068758bc78eb71a3ce546583 | [
"MIT"
] | 2 | 2021-11-04T18:44:12.000Z | 2021-11-08T03:29:43.000Z | mcwpy/datapack.py | vianneyveremme/minecraft_with_python | 25edded44dd56348068758bc78eb71a3ce546583 | [
"MIT"
] | null | null | null | # -*- coding: ascii -*-
from datetime import date
from PIL import Image
from time import time
from typing import Any, Dict, List, Union
from .pack_meta import Pack_Meta
from .workspace import Workspace
from .utility import Minecraft_Pack_Version, create_file, Font, make_directory, remove_directory
import os
import shut... | 47.15847 | 171 | 0.631866 |
bae6cfb199ec25253bfb67f75433cd0920fd7a70 | 435 | py | Python | common/kafka/kakfa.py | reejit/Zorobot | d7adb58f47a4c6dc0a324f3a9ecfcfc54c473b73 | [
"Apache-2.0"
] | null | null | null | common/kafka/kakfa.py | reejit/Zorobot | d7adb58f47a4c6dc0a324f3a9ecfcfc54c473b73 | [
"Apache-2.0"
] | null | null | null | common/kafka/kakfa.py | reejit/Zorobot | d7adb58f47a4c6dc0a324f3a9ecfcfc54c473b73 | [
"Apache-2.0"
] | 1 | 2021-03-25T16:56:51.000Z | 2021-03-25T16:56:51.000Z | from logging import StreamHandler
from kafka_producer import KafkaSend
class KafkaHandler(StreamHandler):
def __init__(self, broker, topic):
StreamHandler.__init__(self)
self.broker = broker
self.topic = topic
# Kafka Broker Configuration
self.kafka_broker = KafkaSend(brok... | 25.588235 | 47 | 0.682759 |
c69df0fb087fb7fa908eb0c8bca3a760e34fae59 | 574 | py | Python | ipython/start.py | matherm/rootrepo | f1b432018f685c3a3d8d28588c064002983c863a | [
"BSD-3-Clause"
] | 2 | 2020-10-23T18:47:48.000Z | 2021-07-12T22:49:08.000Z | ipython/start.py | matherm/rootrepo | f1b432018f685c3a3d8d28588c064002983c863a | [
"BSD-3-Clause"
] | null | null | null | ipython/start.py | matherm/rootrepo | f1b432018f685c3a3d8d28588c064002983c863a | [
"BSD-3-Clause"
] | 1 | 2021-07-12T22:49:11.000Z | 2021-07-12T22:49:11.000Z | import os
import pathlib
import os.path as osp
import sys
import re
from collections import Counter, defaultdict, namedtuple
import itertools
import json
import numpy as np
import gzip
import pandas as pd
import pickle
import random
import matplotlib.pyplot as plt
import types
def imports():
for _, val in globals()... | 19.793103 | 56 | 0.695122 |
9237d2feb4dca1af72775e23e5f72bf9611d1236 | 3,327 | py | Python | bin/ADFRsuite/CCSBpckgs/AutoSite/clusterNode.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/AutoSite/clusterNode.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | null | null | null | bin/ADFRsuite/CCSBpckgs/AutoSite/clusterNode.py | AngelRuizMoreno/Jupyter_Dock_devel | 6d23bc174d5294d1e9909a0a1f9da0713042339e | [
"MIT"
] | 1 | 2021-11-04T21:48:14.000Z | 2021-11-04T21:48:14.000Z | import numpy,os
class clusterNode(object):
def __init__(self, id, size, gen=0, rg=100.0, buriedness=0.0, score=0.0, totalE=0.0, children=None):
self.id=id
self.size = size
self.children = []
self.rg=rg
self.score=score
self.totalE=totalE
self.buriedness=burie... | 32.617647 | 136 | 0.571386 |
d8c346c4368556a9517b27c44f5a63a3099a4219 | 6,698 | py | Python | cvrminer/google.py | nemobis/cvrminer | 0a8223d98a766d54b60e3f3ab1eb637678ca8730 | [
"Apache-2.0"
] | null | null | null | cvrminer/google.py | nemobis/cvrminer | 0a8223d98a766d54b60e3f3ab1eb637678ca8730 | [
"Apache-2.0"
] | null | null | null | cvrminer/google.py | nemobis/cvrminer | 0a8223d98a766d54b60e3f3ab1eb637678ca8730 | [
"Apache-2.0"
] | null | null | null | """google.
Usage:
cvrminer.google get-archive-texts
cvrminer.google get-archive-websites
cvrminer.google interactive-query-and-save
References
----------
.. [1] https://developers.google.com/places/web-service/details
"""
from __future__ import print_function
from builtins import input
import configparser
... | 27.008065 | 79 | 0.574052 |
befe30d641e4b65ddc5628fb5cb79c0d3769907d | 7,592 | py | Python | sympy/physics/units/quantities.py | V1krant/sympy | f8e7019feded4e4d0852f49fe0ccfa777f0e8744 | [
"BSD-3-Clause"
] | 1 | 2021-05-11T22:20:21.000Z | 2021-05-11T22:20:21.000Z | sympy/physics/units/quantities.py | V1krant/sympy | f8e7019feded4e4d0852f49fe0ccfa777f0e8744 | [
"BSD-3-Clause"
] | null | null | null | sympy/physics/units/quantities.py | V1krant/sympy | f8e7019feded4e4d0852f49fe0ccfa777f0e8744 | [
"BSD-3-Clause"
] | null | null | null | """
Physical quantities.
"""
from __future__ import division
from sympy import AtomicExpr, Symbol, sympify
from sympy.core.compatibility import string_types
from sympy.physics.units.dimensions import _QuantityMapper
from sympy.physics.units.prefixes import Prefix
from sympy.utilities.exceptions import SymPyDeprecatio... | 34.986175 | 115 | 0.647392 |
7fe5382b3449fd2093edb7f083119869fcec4c49 | 6,654 | py | Python | tests/test_strategy.py | agoragames/limits | 13be116196bd7d44d691793fdb1cfcf3970b3281 | [
"MIT"
] | null | null | null | tests/test_strategy.py | agoragames/limits | 13be116196bd7d44d691793fdb1cfcf3970b3281 | [
"MIT"
] | null | null | null | tests/test_strategy.py | agoragames/limits | 13be116196bd7d44d691793fdb1cfcf3970b3281 | [
"MIT"
] | null | null | null | """
"""
import threading
import time
import unittest
import hiro
import redis
import pymemcache.client
from limits.limits import RateLimitItemPerSecond, RateLimitItemPerMinute
from limits.storage import (
MemoryStorage, RedisStorage,MemcachedStorage
)
from limits.strategies import (
MovingWindowRateLimiter,
... | 41.074074 | 87 | 0.643222 |
f20a5cedd7d28b0af175ae9e6c6f3bee1e3ae92e | 4,478 | py | Python | python_module/stomp/test/s12_test.py | GeneralizedLearningUtilities/SuperGLU | 1c373d1358431fb96dd70b324b26a14fc8ed1fcb | [
"MIT"
] | 8 | 2015-07-13T23:07:20.000Z | 2020-11-13T21:09:55.000Z | python_module/stomp/test/s12_test.py | GeneralizedLearningUtilities/SuperGLU | 1c373d1358431fb96dd70b324b26a14fc8ed1fcb | [
"MIT"
] | 7 | 2016-01-13T12:13:56.000Z | 2021-12-14T21:12:28.000Z | python_module/stomp/test/s12_test.py | GeneralizedLearningUtilities/SuperGLU | 1c373d1358431fb96dd70b324b26a14fc8ed1fcb | [
"MIT"
] | 6 | 2015-09-23T17:53:32.000Z | 2020-04-30T07:27:01.000Z | import time
import unittest
from unittest.mock import Mock
import stomp
from stomp import exception
from stomp.listener import TestListener
from stomp.test.testutils import *
class Test12Connect(unittest.TestCase):
def setUp(self):
conn = stomp.Connection12(get_default_host())
list... | 35.824 | 109 | 0.617686 |
fd2b9ab150efc287d3806ec58beb94671c8b0254 | 12,117 | py | Python | infusionsoft/infusionsoft.py | LazyAfternoons/infusionsoft-im | 80a5942fd0bd82e2d9e290b58cd049b8e0b07989 | [
"MIT"
] | 1 | 2022-03-23T11:23:23.000Z | 2022-03-23T11:23:23.000Z | infusionsoft/infusionsoft.py | LazyAfternoons/infusionsoft-im | 80a5942fd0bd82e2d9e290b58cd049b8e0b07989 | [
"MIT"
] | null | null | null | infusionsoft/infusionsoft.py | LazyAfternoons/infusionsoft-im | 80a5942fd0bd82e2d9e290b58cd049b8e0b07989 | [
"MIT"
] | null | null | null | import http
import json
import pickle
import time
from os.path import exists
import requests
from requests import RequestException
import base64
import logging
import http.client as http_client
import importlib
from infusionsoft.token import Token
class Infusionsoft:
"""Infusionsoft object for using their `REST ... | 30.521411 | 115 | 0.598498 |
da1ec9f421590151c9468fd9cd24c4c7008813d2 | 801 | py | Python | scripts/followers.py | rbowen/centos-community-tools | 46aa66be854d1de5c334c8918991879fb08865c2 | [
"Apache-2.0"
] | 16 | 2020-03-23T15:06:11.000Z | 2021-07-18T14:33:23.000Z | followers.py | rbowen/community-tools | f93d49e80ea96ccb4541c21eb97c042685bddee9 | [
"Apache-2.0"
] | null | null | null | followers.py | rbowen/community-tools | f93d49e80ea96ccb4541c21eb97c042685bddee9 | [
"Apache-2.0"
] | 4 | 2020-03-25T07:00:26.000Z | 2021-09-06T18:21:31.000Z | #!/usr/bin/python
# How many followers do you have?
import urllib.request
import re
print ("This doesn't work any more because Twitter is actively preventing it. Sorry.")
quit()
feeds = [
'rbowen','centosproject','centos'
];
for feed in feeds:
req = urllib.request.Request( 'https://twitter.com/' ... | 27.62069 | 139 | 0.563046 |
7006eb68c46d5ab2e3a6d58aa04dd14069f96a47 | 13,764 | py | Python | kws_streaming/train/model_train_eval.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-01-19T23:35:59.000Z | 2022-01-19T23:35:59.000Z | kws_streaming/train/model_train_eval.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | kws_streaming/train/model_train_eval.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 36.125984 | 86 | 0.735106 |
1fca9afba8d48cdecca99015602540e53f5b3848 | 34,935 | py | Python | bert4keras/optimizers.py | EthanChen1234/bert4keras | 149b8abe4f5696f7762f49547533873b935f85b9 | [
"Apache-2.0"
] | 1 | 2020-05-13T05:56:14.000Z | 2020-05-13T05:56:14.000Z | bert4keras/optimizers.py | ZhenHengDong/bert4keras | de66f9b66a57152816920a6b068a3f28648dd547 | [
"Apache-2.0"
] | null | null | null | bert4keras/optimizers.py | ZhenHengDong/bert4keras | de66f9b66a57152816920a6b068a3f28648dd547 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 优化相关
import numpy as np
import tensorflow as tf
from bert4keras.backend import keras, K, is_tf_keras
from bert4keras.snippets import is_string, string_matching
from bert4keras.snippets import is_one_of, insert_arguments
from bert4keras.backend import piecewise_linear
import re
class Adam(ke... | 35.359312 | 83 | 0.571404 |
d1673ba767e34189800fabe08c9ddc36b30924f9 | 4,232 | py | Python | bot/jobs/other_nodes_jobs.py | aasw0ng/thornode-telegram-bot | 5f73b882381548f45fc9e690c6e4845def9600b7 | [
"MIT"
] | 15 | 2020-04-21T07:51:26.000Z | 2021-11-02T05:45:48.000Z | bot/jobs/other_nodes_jobs.py | aasw0ng/thornode-telegram-bot | 5f73b882381548f45fc9e690c6e4845def9600b7 | [
"MIT"
] | 78 | 2020-04-13T23:01:16.000Z | 2021-05-09T11:46:25.000Z | bot/jobs/other_nodes_jobs.py | aasw0ng/thornode-telegram-bot | 5f73b882381548f45fc9e690c6e4845def9600b7 | [
"MIT"
] | 5 | 2020-09-03T21:19:16.000Z | 2021-11-20T00:17:56.000Z | from data.other_nodes_dao import OtherNodesDao
from handlers.chat_helpers import *
from models.nodes import *
def check_other_nodes_health(context):
for node in OtherNodesDao().get_all_nodes():
message = check_health(node, context)
if message:
try_message_to_all_users(context, text=mes... | 33.856 | 109 | 0.664461 |
d7cac83d5639a6437b9aaf5c4a599c81a3904cda | 14,906 | py | Python | gym_energyplus/envs/energyplus_env.py | tatsubori/rl-testbed-for-energyplus | 5ea6580a7a45a12c341f5ce85f9945a016c65708 | [
"MIT"
] | null | null | null | gym_energyplus/envs/energyplus_env.py | tatsubori/rl-testbed-for-energyplus | 5ea6580a7a45a12c341f5ce85f9945a016c65708 | [
"MIT"
] | null | null | null | gym_energyplus/envs/energyplus_env.py | tatsubori/rl-testbed-for-energyplus | 5ea6580a7a45a12c341f5ce85f9945a016c65708 | [
"MIT"
] | null | null | null | # Copyright (c) IBM Corp. 2018. All Rights Reserved.
# Project name: Reinforcement Learning Testbed for Power Consumption Optimization
# This project is licensed under the MIT License, see LICENSE
from gym import Env
from gym import spaces
from gym.utils import seeding
import sys, os, subprocess, time, signal, stat
fr... | 40.395664 | 148 | 0.580035 |
cc2461ab8788f6531bd924d7f338d5dfd0d8d25d | 1,650 | py | Python | wagtail_localize/test/migrations/0011_testmodelwithinvalidforeignkey.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 6 | 2019-09-10T19:53:55.000Z | 2019-11-14T16:57:07.000Z | wagtail_localize/test/migrations/0011_testmodelwithinvalidforeignkey.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 17 | 2019-07-11T11:17:37.000Z | 2019-11-19T16:40:31.000Z | wagtail_localize/test/migrations/0011_testmodelwithinvalidforeignkey.py | th3hamm0r/wagtail-localize | e9e0ba9245060c65e3247b62739abbed71bc2516 | [
"BSD-3-Clause"
] | 2 | 2019-09-30T20:23:39.000Z | 2019-10-31T14:09:31.000Z | # Generated by Django 3.1.3 on 2020-11-30 20:41
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
("wagtailcore", "0059_apply_collection_ordering"),
("wagtail_localize_test", "0010_testoverridetranslatabl... | 30 | 77 | 0.418788 |
8a258262e455109304caf1e67879b046459ff1bf | 5,066 | py | Python | aws-regions.py | groorj/cloud-regions | f085491c71440d99000ad29a885e6090dfc9332a | [
"MIT"
] | null | null | null | aws-regions.py | groorj/cloud-regions | f085491c71440d99000ad29a885e6090dfc9332a | [
"MIT"
] | 1 | 2021-07-22T01:25:14.000Z | 2021-07-22T17:29:09.000Z | aws-regions.py | groorj/cloud-regions | f085491c71440d99000ad29a885e6090dfc9332a | [
"MIT"
] | null | null | null | import json
import logging
import os
import inspect
import urllib
import urllib.request
from urllib.error import HTTPError
# logger
logger = logging.getLogger()
logger_level = logging.getLevelName(os.environ['LOGGER_LEVEL'])
logger.setLevel(logger_level)
# validate access
def validate_access(event, context):
logg... | 41.867769 | 161 | 0.66443 |
c64112f23899e7a6d539388dc97ab9b46be3c03e | 331 | py | Python | setup.py | sonvt1710/bigjson | b562d7be1e8de689cfaf44fdca7a636a8d21ca20 | [
"MIT"
] | null | null | null | setup.py | sonvt1710/bigjson | b562d7be1e8de689cfaf44fdca7a636a8d21ca20 | [
"MIT"
] | null | null | null | setup.py | sonvt1710/bigjson | b562d7be1e8de689cfaf44fdca7a636a8d21ca20 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from setuptools import setup
setup(
name='bigjson',
version='1.0.9',
packages=['bigjson'],
description='Python library that reads JSON files of any size.',
author='Henrik Heino',
author_email='henrik.heino@gmail.com',
url='https://henu.fi/bigjson',
licens... | 22.066667 | 68 | 0.661631 |
8ac023e24dc3c11e8e67a36be232463c6c0a72d2 | 12,394 | py | Python | python/ray/data/datasource/file_based_datasource.py | Phirefly9/ray | bbfb86c5130a1a6a11ba3cd6f928a7c4078788e1 | [
"Apache-2.0"
] | null | null | null | python/ray/data/datasource/file_based_datasource.py | Phirefly9/ray | bbfb86c5130a1a6a11ba3cd6f928a7c4078788e1 | [
"Apache-2.0"
] | null | null | null | python/ray/data/datasource/file_based_datasource.py | Phirefly9/ray | bbfb86c5130a1a6a11ba3cd6f928a7c4078788e1 | [
"Apache-2.0"
] | null | null | null | import logging
import os
from typing import Callable, Optional, List, Tuple, Union, Any, TYPE_CHECKING
from urllib.parse import urlparse
if TYPE_CHECKING:
import pyarrow
from ray.types import ObjectRef
from ray.data.block import Block, BlockAccessor
from ray.data.impl.arrow_block import (ArrowRow, DelegatingArrow... | 37.671733 | 79 | 0.638373 |
ec97c5894237fe8526984e5b816a7b1dc3e80ce2 | 546 | py | Python | exercicios/ExerciciosCursoEmVideo/ex009.py | mylenacferreira/Exercicios-python | 6df83590e73d0ac1fe183bbf514ff56963ea4d5b | [
"MIT"
] | null | null | null | exercicios/ExerciciosCursoEmVideo/ex009.py | mylenacferreira/Exercicios-python | 6df83590e73d0ac1fe183bbf514ff56963ea4d5b | [
"MIT"
] | null | null | null | exercicios/ExerciciosCursoEmVideo/ex009.py | mylenacferreira/Exercicios-python | 6df83590e73d0ac1fe183bbf514ff56963ea4d5b | [
"MIT"
] | null | null | null | # Faça um programa que leia um numero inteiro qualquer e mostre na tela a sua tabuada
num = int(input('Digite um numero de 1 a 10 para calcular sua tabuada: '))
print(f' {num} x 0 = 0\n {num} x 1 = {num}\n {num} x 2 = {num * 2}\n {num} x 3 = {num * 3}\n {num} x 4 = {num * 4}\n {num} x 5 = {num * 5}\n {num} x 6 = {num ... | 54.6 | 264 | 0.534799 |
64411077ba30b7ed49a9d0a75b79d506c489e8b6 | 3,131 | py | Python | egs/ofuton_p_utagoe_db/voc1/local/dataset_split.py | A-Quarter-Mile/ParallelWaveGAN | f4724870afcdb92f70cb489dc9e9930dcc7d4957 | [
"MIT"
] | 1 | 2022-02-19T10:59:00.000Z | 2022-02-19T10:59:00.000Z | egs/ofuton_p_utagoe_db/voc1/local/dataset_split.py | A-Quarter-Mile/ParallelWaveGAN | f4724870afcdb92f70cb489dc9e9930dcc7d4957 | [
"MIT"
] | null | null | null | egs/ofuton_p_utagoe_db/voc1/local/dataset_split.py | A-Quarter-Mile/ParallelWaveGAN | f4724870afcdb92f70cb489dc9e9930dcc7d4957 | [
"MIT"
] | null | null | null | import argparse
import os
import shutil
UTT_PREFIX = "ofuton"
DEV_LIST = ["chatsumi", "my_grandfathers_clock_3_2", "haruyo_koi", "momiji", "tetsudou_shouka"]
TEST_LIST = ["usagito_kame", "my_grandfathers_clock_1_2", "antagata_dokosa", "momotarou", "furusato"]
def train_check(song):
return (song not in DEV_LIST)... | 32.614583 | 148 | 0.630789 |
cc15581d796e9d79019a46dc019544d6f08ee56d | 9,358 | py | Python | docs/conf.py | SteelBall/StrutSkinn | 0a2204140c5ca0658382c832c9fe3459a24846c1 | [
"MIT"
] | null | null | null | docs/conf.py | SteelBall/StrutSkinn | 0a2204140c5ca0658382c832c9fe3459a24846c1 | [
"MIT"
] | null | null | null | docs/conf.py | SteelBall/StrutSkinn | 0a2204140c5ca0658382c832c9fe3459a24846c1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Server Listing documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 26 19:22:58 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | 32.268966 | 148 | 0.716927 |
a17dd4cfc4fb9aa9f17d722da2124be638a8e7b1 | 20,206 | py | Python | mypython/Lib/site-packages/pandas/core/computation/pytables.py | lilianatang/data-modelling-with-postgresql | 4b5d057d23c346cc36695dc0548f11908aeb5431 | [
"Apache-2.0"
] | null | null | null | mypython/Lib/site-packages/pandas/core/computation/pytables.py | lilianatang/data-modelling-with-postgresql | 4b5d057d23c346cc36695dc0548f11908aeb5431 | [
"Apache-2.0"
] | null | null | null | mypython/Lib/site-packages/pandas/core/computation/pytables.py | lilianatang/data-modelling-with-postgresql | 4b5d057d23c346cc36695dc0548f11908aeb5431 | [
"Apache-2.0"
] | 1 | 2021-04-26T22:41:56.000Z | 2021-04-26T22:41:56.000Z | """ manage PyTables query interface via Expressions """
import ast
from functools import partial
from typing import Any, Dict, Optional, Tuple
import numpy as np
from pandas._libs.tslibs import Timedelta, Timestamp
from pandas.compat.chainmap import DeepChainMap
from pandas.core.dtypes.common import is_l... | 31.670846 | 89 | 0.550035 |
831cfdda40a62b4bad89121b9d0092ad7b268999 | 9,119 | py | Python | myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/azure/azure_rm_resourcegroup.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/azure/azure_rm_resourcegroup.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/modules/cloud/azure/azure_rm_resourcegroup.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# This file is part of Ansible
#
# Ansible 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 Soft... | 33.774074 | 119 | 0.586358 |
25dafc922adb2fd1a20bc7d87d02dbaa309a7ec2 | 464 | py | Python | article/migrations/0004_article_article_image.py | kingbaberre/Study-buddy | 808f96ef7cd08cd535154de6bcaadede0c36157a | [
"MIT",
"Unlicense"
] | null | null | null | article/migrations/0004_article_article_image.py | kingbaberre/Study-buddy | 808f96ef7cd08cd535154de6bcaadede0c36157a | [
"MIT",
"Unlicense"
] | 10 | 2020-02-12T01:26:33.000Z | 2022-02-10T12:29:37.000Z | article/migrations/0004_article_article_image.py | vendari12/akwasite | 27a0e5fca498e8711daa912ab6697d032d90d8d4 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2018-03-27 12:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('article', '0003_remove_article_article_image'),
]
operations = [
migrations.AddField(
model_name='article',
name='arti... | 24.421053 | 114 | 0.635776 |
dfff4de08f47e562ab986dcedae482d63b61a9ca | 9,466 | py | Python | pycle/bicycle-scrapes/chainreacton-v2/modelParser.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | pycle/bicycle-scrapes/chainreacton-v2/modelParser.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | pycle/bicycle-scrapes/chainreacton-v2/modelParser.py | fusuyfusuy/School-Projects | 8e38f19da90f63ac9c9ec91e550fc5aaab3d0234 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import os
import csv
bicycles = []
save = open('bicycleSave2.py','a')
types = os.listdir('modelDownload/modelPages')
for t in types:
bType = '------'
if str(t)=='bmx':
bType = 'BMX'
elif str(t)=='cross':
bType = 'Cyclo Cross'
elif str(t)=='electric':
... | 116.864198 | 6,549 | 0.414431 |
3c3bc11d6eceb2dec5fd79775c4f6ed794d50016 | 32,603 | py | Python | sim-k227-quant/jmMC3.py | jrminter/dtsa2scripts | a7a4f3a63f47f0a8abe7ee13c72f5a27196c3a1b | [
"MIT"
] | 2 | 2018-04-19T12:25:29.000Z | 2018-11-24T12:55:46.000Z | sim-k227-quant/jmMC3.py | jrminter/dtsa2Scripts | a7a4f3a63f47f0a8abe7ee13c72f5a27196c3a1b | [
"MIT"
] | null | null | null | sim-k227-quant/jmMC3.py | jrminter/dtsa2Scripts | a7a4f3a63f47f0a8abe7ee13c72f5a27196c3a1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# 1 2 3 4 5 6 7 |
# 3456789012345678901234567890123456789012345678901234567890123456789012
#
# jmMC3.py
#
# Wrapper scripts for MC3 Monte Carlo simulations with DTSA-II
# Developed for Iona version 2015-07-01
#
# Modifications
# Dat... | 48.15805 | 287 | 0.648069 |
17346ae17b624cebe10b617a49e3e56ee067e916 | 758 | py | Python | korean/__main__.py | sublee/korean | 99c7808300bcd90d9fb183c99b925f525df0fd79 | [
"BSD-3-Clause"
] | 74 | 2015-01-24T16:39:51.000Z | 2022-03-22T03:16:28.000Z | korean/__main__.py | lqez/korean | 7e626d4b9dec181420e80c06bfce1a99fb098180 | [
"BSD-3-Clause"
] | 6 | 2016-08-03T09:50:08.000Z | 2021-02-13T16:24:14.000Z | korean/__main__.py | lqez/korean | 7e626d4b9dec181420e80c06bfce1a99fb098180 | [
"BSD-3-Clause"
] | 13 | 2015-03-10T18:52:44.000Z | 2018-11-10T14:52:06.000Z | # -*- coding: utf-8 -*-
"""
korean.__main__
~~~~~~~~~~~~~~~
Command-line tools.
:copyright: (c) 2012-2013 by Heungsub Lee
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import contextlib
import sys
from baker import Baker
from . import l10n
baker = Bake... | 17.227273 | 55 | 0.653034 |
484ddb0bd4ca3ac1a4b3813351829a9b131c6392 | 5,042 | py | Python | google/cloud/compute_v1/services/zones/transports/base.py | igor-solomatov/python-compute | 16e7294cd536af9a8bf8e4e99219a883339aa955 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/zones/transports/base.py | igor-solomatov/python-compute | 16e7294cd536af9a8bf8e4e99219a883339aa955 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/zones/transports/base.py | igor-solomatov/python-compute | 16e7294cd536af9a8bf8e4e99219a883339aa955 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 36.273381 | 86 | 0.653114 |
d6cd0357b3aa6c8d47c6abac2d99d3ea2afbdd62 | 37,251 | py | Python | dcm/route.py | joshy/dcm | 7ee44b93f2d3c3f3638244791da9fdf9c331a9bb | [
"MIT"
] | 11 | 2021-05-07T08:37:56.000Z | 2022-03-23T17:05:08.000Z | dcm/route.py | joshy/dcm | 7ee44b93f2d3c3f3638244791da9fdf9c331a9bb | [
"MIT"
] | 4 | 2021-08-05T02:18:09.000Z | 2022-03-17T00:24:13.000Z | dcm/route.py | joshy/dcm | 7ee44b93f2d3c3f3638244791da9fdf9c331a9bb | [
"MIT"
] | 2 | 2021-08-04T06:33:42.000Z | 2022-01-12T12:09:22.000Z | """Define static/dynamic routes for copying DICOM data between storage abstractions"""
from __future__ import annotations
import asyncio, logging
from copy import copy, deepcopy
from datetime import datetime
from dataclasses import dataclass, field
from typing import (
Optional,
Tuple,
Callable,
Dict,
... | 37.818274 | 106 | 0.603259 |
dbad52d0aff2477d9d512f8f9e1a028a2159b08f | 517 | py | Python | project/urls.py | aschokking/angular_django_template | 50e92155a0e6c3e9926ee65d41bf8cbc0a7cc4cf | [
"MIT"
] | null | null | null | project/urls.py | aschokking/angular_django_template | 50e92155a0e6c3e9926ee65d41bf8cbc0a7cc4cf | [
"MIT"
] | null | null | null | project/urls.py | aschokking/angular_django_template | 50e92155a0e6c3e9926ee65d41bf8cbc0a7cc4cf | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers, serializers, viewsets
from django.views.generic import TemplateView
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
url(r'^$', Tem... | 34.466667 | 83 | 0.746615 |
f993b64db1cfa67346a49dbe23b818504ab2b326 | 13,817 | py | Python | specutils/tests/test_template_comparison.py | olebole/specutils | 566de5cec00bd1198f1275ce74b1e261b61813af | [
"BSD-3-Clause"
] | null | null | null | specutils/tests/test_template_comparison.py | olebole/specutils | 566de5cec00bd1198f1275ce74b1e261b61813af | [
"BSD-3-Clause"
] | null | null | null | specutils/tests/test_template_comparison.py | olebole/specutils | 566de5cec00bd1198f1275ce74b1e261b61813af | [
"BSD-3-Clause"
] | null | null | null | import astropy.units as u
import numpy as np
from astropy.nddata import StdDevUncertainty
from ..spectra.spectrum1d import Spectrum1D
from ..spectra.spectrum_collection import SpectrumCollection
from ..analysis import template_comparison
from astropy.tests.helper import quantity_allclose
def test_template_match_no_o... | 38.168508 | 113 | 0.650141 |
269f596da5d47509857efb6af229c1dc34c2ec22 | 2,853 | py | Python | tests/test_ast_api.py | Ma233/olo | 54eb3bd4e1330a0467159f9c968557d471537621 | [
"Apache-2.0"
] | null | null | null | tests/test_ast_api.py | Ma233/olo | 54eb3bd4e1330a0467159f9c968557d471537621 | [
"Apache-2.0"
] | null | null | null | tests/test_ast_api.py | Ma233/olo | 54eb3bd4e1330a0467159f9c968557d471537621 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from olo import select, select_, funcs
from .base import TestCase, Foo, Bar
class TestASTAPI(TestCase):
def is_same_q(self, q1, q2):
sql1, _ = q1.get_sql_and_params()
sql2, _ = q2.get_sql_and_params()
self.assertEqual(sql1, sql2)
def test_no_condition(self):
... | 29.71875 | 67 | 0.48966 |
e699baf9ca2c13d83d4a7f030715f2de0a1a7fab | 1,297 | py | Python | Class Work/Testing-Homework/books_app/main/forms.py | Pondorasti/BEW-1.2 | 079d771f9c5e27a3b7871a689b3431bdab33af5e | [
"MIT"
] | null | null | null | Class Work/Testing-Homework/books_app/main/forms.py | Pondorasti/BEW-1.2 | 079d771f9c5e27a3b7871a689b3431bdab33af5e | [
"MIT"
] | null | null | null | Class Work/Testing-Homework/books_app/main/forms.py | Pondorasti/BEW-1.2 | 079d771f9c5e27a3b7871a689b3431bdab33af5e | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, DateField, SelectField, SubmitField, TextAreaField
from wtforms.ext.sqlalchemy.fields import QuerySelectField, QuerySelectMultipleField
from wtforms.validators import DataRequired, Length, ValidationError
from books_app.models import Audien... | 40.53125 | 98 | 0.723207 |
56689751ffd7455cb9a846e9ed85ea9750eda0d6 | 940 | py | Python | API/PDPAPI/migrations/0002_auto_20181001_2019.py | almahdiy/IT_PDP_Conference | 3470a1492899af3ebdd43837e361c247236180d1 | [
"MIT"
] | null | null | null | API/PDPAPI/migrations/0002_auto_20181001_2019.py | almahdiy/IT_PDP_Conference | 3470a1492899af3ebdd43837e361c247236180d1 | [
"MIT"
] | null | null | null | API/PDPAPI/migrations/0002_auto_20181001_2019.py | almahdiy/IT_PDP_Conference | 3470a1492899af3ebdd43837e361c247236180d1 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.1 on 2018-10-01 17:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('PDPAPI', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='question',
name='question_text',
... | 24.736842 | 52 | 0.531915 |
8af4ff1ab77c7f2e8ed4ef3ca98c4210758ae56b | 2,830 | py | Python | demo/settings.py | acdha/django-queryset-transform | 33eafc124b74ee83e19211e2860ac2010a447977 | [
"BSD-3-Clause"
] | 18 | 2015-02-09T09:22:36.000Z | 2021-05-26T07:06:10.000Z | demo/settings.py | acdha/django-queryset-transform | 33eafc124b74ee83e19211e2860ac2010a447977 | [
"BSD-3-Clause"
] | null | null | null | demo/settings.py | acdha/django-queryset-transform | 33eafc124b74ee83e19211e2860ac2010a447977 | [
"BSD-3-Clause"
] | 2 | 2015-06-02T13:41:08.000Z | 2017-07-27T12:12:21.000Z | # Django settings for demo project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'data.db' # Or path to databas... | 34.512195 | 108 | 0.718021 |
007d21cbaf732e81d432a7f7f04f17cae065c9f2 | 4,562 | py | Python | program_driver.py | comlor/Senior_Design_Movie_Project | f04b3d98c8d74c9399361dcc4b5f50ca7ac191c9 | [
"Unlicense"
] | null | null | null | program_driver.py | comlor/Senior_Design_Movie_Project | f04b3d98c8d74c9399361dcc4b5f50ca7ac191c9 | [
"Unlicense"
] | null | null | null | program_driver.py | comlor/Senior_Design_Movie_Project | f04b3d98c8d74c9399361dcc4b5f50ca7ac191c9 | [
"Unlicense"
] | null | null | null | import subprocess
import os
import sys
import time
from jpl_conf import FilePaths
import requests
def timing(f):
def wrap(*args):
time1 = time.time()
ret = f(*args)
time2 = time.time()
FilePaths().log_events('TIMING------: %s function took %0.3f ms' % (f.__name__, (time2 - time1)*1... | 32.35461 | 119 | 0.621438 |
8c451afe513bca9a828aaa04ebdd972270747210 | 4,231 | py | Python | isi_sdk/models/cloud_job.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | isi_sdk/models/cloud_job.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | isi_sdk/models/cloud_job.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | 27.296774 | 95 | 0.548334 |
fb3709a072d24607c0931a43b41b70827b81655e | 2,792 | py | Python | examples/python/reactor/count-randomly.py | stewnorriss/https-github.com-apache-qpid-proton | 4d25d88f5c96165c7c6aa24c28d214ad599caff8 | [
"Apache-2.0"
] | 2 | 2020-04-28T13:33:06.000Z | 2020-06-01T14:51:05.000Z | examples/python/reactor/count-randomly.py | stewnorriss/https-github.com-apache-qpid-proton | 4d25d88f5c96165c7c6aa24c28d214ad599caff8 | [
"Apache-2.0"
] | null | null | null | examples/python/reactor/count-randomly.py | stewnorriss/https-github.com-apache-qpid-proton | 4d25d88f5c96165c7c6aa24c28d214ad599caff8 | [
"Apache-2.0"
] | 4 | 2015-10-17T20:44:45.000Z | 2021-06-08T19:00:56.000Z | #!/usr/bin/python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Lice... | 35.341772 | 85 | 0.698782 |
cf4818ae08e1e8776acd5a98b7a278c82f7f18b0 | 625 | py | Python | lucky.py | terrameijar/useful_scripts | 3395068009f98c16a0c762a74383b4aed97c0a40 | [
"MIT"
] | 1 | 2017-04-19T11:27:08.000Z | 2017-04-19T11:27:08.000Z | lucky.py | terrameijar/useful_scripts | 3395068009f98c16a0c762a74383b4aed97c0a40 | [
"MIT"
] | 2 | 2017-01-25T08:17:11.000Z | 2017-01-26T09:14:15.000Z | lucky.py | terrameijar/useful_scripts | 3395068009f98c16a0c762a74383b4aed97c0a40 | [
"MIT"
] | 3 | 2017-10-02T16:00:58.000Z | 2019-10-12T13:23:29.000Z | #! /usr/bin/env python
# lucky.py -- Opens several Google search results.
import sys
import requests
import webbrowser
from bs4 import BeautifulSoup
print "Googling....." # Display text while searching
res = requests.get('http://google.com/search?q=' + ' '.join(sys.argv[1:]))
res.raise_for_status()
# Retrieve top ... | 31.25 | 74 | 0.7184 |
0843899d9e30aab698ad2551c5379b7b302e53bc | 666 | py | Python | pyglet4.py | diallog/GCPpy | dabd55ece1c12c1a390a228cd04cb7eb110e564b | [
"Unlicense"
] | null | null | null | pyglet4.py | diallog/GCPpy | dabd55ece1c12c1a390a228cd04cb7eb110e564b | [
"Unlicense"
] | null | null | null | pyglet4.py | diallog/GCPpy | dabd55ece1c12c1a390a228cd04cb7eb110e564b | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# PURPOSE: inital forray into windowed applications / event-driven programming
import pyglet
window = pyglet.window.Window(width=400, height=300, caption='Test Window')
label = pyglet.text.Label('Nothing pressed yet.', font_name='Times New Roman',
font_size=18, x=50,... | 26.64 | 78 | 0.629129 |
896f9d80e504a36fedb86d46bc8c9b2f217c82f6 | 70,864 | py | Python | parsimony/functions/penalties.py | nguigs/pylearn-parsimony | f712d2828823d6d55a2470ce060bcaeda2d0589a | [
"BSD-3-Clause"
] | null | null | null | parsimony/functions/penalties.py | nguigs/pylearn-parsimony | f712d2828823d6d55a2470ce060bcaeda2d0589a | [
"BSD-3-Clause"
] | null | null | null | parsimony/functions/penalties.py | nguigs/pylearn-parsimony | f712d2828823d6d55a2470ce060bcaeda2d0589a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The :mod:`parsimony.functions.penalties` module contains the penalties used to
constrain the loss functions. These represent mathematical functions and
should thus have properties used by the corresponding algorithms. These
properties are defined in :mod:`parsimony.functions.properties`.
Pe... | 30.999125 | 80 | 0.507423 |
e197bd0ba3e1b16c9dbe492d194b0b5faff388a8 | 4,104 | py | Python | purity_fb/purity_fb_1dot6/models/array_response.py | unixtreme/purity_fb_python_client | e836afe9804ffa99f74bf4b5202f181c3c04d9df | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot6/models/array_response.py | unixtreme/purity_fb_python_client | e836afe9804ffa99f74bf4b5202f181c3c04d9df | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot6/models/array_response.py | unixtreme/purity_fb_python_client | e836afe9804ffa99f74bf4b5202f181c3c04d9df | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Purity//FB REST Client
Client for Purity//FB REST API (1.0 - 1.6), developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.6
Contact: info@purestorage.com
... | 26.649351 | 203 | 0.56847 |
6157065b8203f67e23f1148cfedff2871ac963ca | 137 | py | Python | Mundo 1_Fundamentos/Desafio_16.py | VictorOliveira02/Desafios-Python3-Curso-em-Video | 53ee8bd814b816f3a21936677ef3f155b582843f | [
"MIT"
] | null | null | null | Mundo 1_Fundamentos/Desafio_16.py | VictorOliveira02/Desafios-Python3-Curso-em-Video | 53ee8bd814b816f3a21936677ef3f155b582843f | [
"MIT"
] | null | null | null | Mundo 1_Fundamentos/Desafio_16.py | VictorOliveira02/Desafios-Python3-Curso-em-Video | 53ee8bd814b816f3a21936677ef3f155b582843f | [
"MIT"
] | null | null | null | from math import trunc
n = float(input('Digite um numero com virgula: '))
print(f'O numero {n} tem a parte inteira igual a {trunc(n)}')
| 27.4 | 61 | 0.70073 |
998b62851b6a5a0ec83a35ebc2c6bae6e74d3f8e | 2,244 | py | Python | catalyst/contrib/models/cv/segmentation/encoder/unet.py | stjordanis/catalyst-1 | 93eedf0b9520bf1f83f63b13d6818df2a1e85b33 | [
"Apache-2.0"
] | 4 | 2019-12-14T07:27:09.000Z | 2021-03-23T14:34:37.000Z | catalyst/contrib/models/cv/segmentation/encoder/unet.py | Ran485/catalyst | 84bc7576c981278f389279d87dda85dd66a758b6 | [
"Apache-2.0"
] | null | null | null | catalyst/contrib/models/cv/segmentation/encoder/unet.py | Ran485/catalyst | 84bc7576c981278f389279d87dda85dd66a758b6 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# @TODO: code formatting issue for 20.07 release
from typing import List
import torch
from torch import nn
from catalyst.contrib.models.cv.segmentation.blocks.unet import EncoderDownsampleBlock
from catalyst.contrib.models.cv.segmentation.encoder.core import _take, EncoderSpec # noqa: E501
class Une... | 33 | 97 | 0.607398 |
cc18450ad8570f5ccb8a091de6a58e219e1897b1 | 5,266 | py | Python | pymongo/server_selectors.py | ldennis/mongo-python-driver | cc029a1e6208863eaab453777363d3935b927f32 | [
"Apache-2.0"
] | 2,593 | 2015-01-02T10:53:55.000Z | 2022-03-28T15:42:47.000Z | pymongo/server_selectors.py | ldennis/mongo-python-driver | cc029a1e6208863eaab453777363d3935b927f32 | [
"Apache-2.0"
] | 356 | 2015-02-05T15:57:18.000Z | 2022-03-31T19:12:30.000Z | pymongo/server_selectors.py | ldennis/mongo-python-driver | cc029a1e6208863eaab453777363d3935b927f32 | [
"Apache-2.0"
] | 774 | 2015-01-05T09:30:07.000Z | 2022-03-30T03:36:25.000Z | # Copyright 2014-2016 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 33.974194 | 76 | 0.695404 |
008214753749e467da3f3482027bdf00e79b4049 | 7,296 | py | Python | fairmodels/plotnine/geoms/geom_text.py | Locust2520/python-fairmodels | 0572f7c205b67c148bdc83b8dc4eaf70c06468a5 | [
"MIT"
] | null | null | null | fairmodels/plotnine/geoms/geom_text.py | Locust2520/python-fairmodels | 0572f7c205b67c148bdc83b8dc4eaf70c06468a5 | [
"MIT"
] | 1 | 2020-10-02T21:43:06.000Z | 2020-10-15T22:52:39.000Z | fairmodels/plotnine/geoms/geom_text.py | Locust2520/python-fairmodels | 0572f7c205b67c148bdc83b8dc4eaf70c06468a5 | [
"MIT"
] | null | null | null | from contextlib import suppress
from matplotlib.text import Text
try:
from adjustText import adjust_text
except ImportError:
HAS_ADJUST_TEXT = False
else:
HAS_ADJUST_TEXT = True
from ..utils import to_rgba
from ..doctools import document
from ..positions import position_nudge
from ..exceptions import Plo... | 33.013575 | 76 | 0.538514 |
08ab0ba72b9a466a09ba03242e5864993a00dfc7 | 2,504 | py | Python | andinopy/__main__.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/__main__.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | andinopy/__main__.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | import logging
import multiprocessing
import resource
import threading
import time
import andinopy
import gpiozero
import sys
from gpiozero.pins.mock import MockFactory
from andinopy.tcp.andino_tcp import andino_tcp
if len(sys.argv) == 1:
andinopy.initialize_cfg("default.cfg")
elif len(sys.argv) == ... | 36.289855 | 118 | 0.613419 |
3f2acbb295cf3c18d638e61cc3e162ba99711b52 | 6,406 | py | Python | xblobs/blob.py | gregordecristoforo/xblobs | 961beb1df5ce237a7e99c35b5dfffc1cf8312062 | [
"MIT"
] | null | null | null | xblobs/blob.py | gregordecristoforo/xblobs | 961beb1df5ce237a7e99c35b5dfffc1cf8312062 | [
"MIT"
] | null | null | null | xblobs/blob.py | gregordecristoforo/xblobs | 961beb1df5ce237a7e99c35b5dfffc1cf8312062 | [
"MIT"
] | null | null | null | import numpy as np
class Blob():
"""
A single blob.
"""
def __init__(self, variable, id, n_var = 'n', t_dim = 'time', rad_dim = 'radial',
pol_dim = 'binormal', allow_length_one=True,
):
"""
variable : xbout Dataset containing blob_labels
id : integer betwee... | 36.816092 | 181 | 0.589135 |
8b6a02295c184c3caa83cf73ff28418dc9d57851 | 1,720 | py | Python | openpathsampling/tests/analysis/conftest.py | sroet/openpathsampling | 97c2d51ada941b952189da3deb61cd71b0e5e4a3 | [
"MIT"
] | 64 | 2016-07-06T13:38:51.000Z | 2022-03-30T15:58:01.000Z | openpathsampling/tests/analysis/conftest.py | sroet/openpathsampling | 97c2d51ada941b952189da3deb61cd71b0e5e4a3 | [
"MIT"
] | 601 | 2016-06-13T10:22:01.000Z | 2022-03-25T00:10:40.000Z | openpathsampling/tests/analysis/conftest.py | dwhswenson/openpathsampling | 72fedad9ba8bc60d17c7cc73c641129898d5d530 | [
"MIT"
] | 45 | 2016-11-10T11:17:53.000Z | 2022-02-13T11:50:26.000Z | # TODO: Currently this is located in tests/analysis/conftest.py. However,
# this might be more suitable for a higher-level conftest.py, or perhaps it
# should be moved into `fixtures` subdirectory of tests with the necessary
# objects imported into the main tests/conftest.py, for use across the test
# suite.
import ope... | 35.102041 | 75 | 0.725 |
74d7e6a904d4122a24494458ae9a9b7df1f66474 | 726 | py | Python | jsonschema_extractor/__init__.py | toumorokoshi/attrs-jsonschema | 8c6de53d4dad192a1a2cbd826762a8eeeb442ad0 | [
"MIT"
] | null | null | null | jsonschema_extractor/__init__.py | toumorokoshi/attrs-jsonschema | 8c6de53d4dad192a1a2cbd826762a8eeeb442ad0 | [
"MIT"
] | null | null | null | jsonschema_extractor/__init__.py | toumorokoshi/attrs-jsonschema | 8c6de53d4dad192a1a2cbd826762a8eeeb442ad0 | [
"MIT"
] | null | null | null | from .extractor_set import SchemaExtractorSet
from .typing_extractor import TypingExtractor
DEFAULT_EXTRACTOR_LIST = [TypingExtractor()]
try:
from .attrs_extractor import AttrsExtractor
DEFAULT_EXTRACTOR_LIST.insert(0, AttrsExtractor())
except ImportError: # pragma: no cover
pass # pragma: no cover
d... | 22.6875 | 64 | 0.775482 |
395369f6fc3957d23c3252646d69074c96d91aff | 1,304 | py | Python | https/server.py | bridgesign/Mini-tweet | 97e13afda73b816c953bd93baba31c4686621fdd | [
"Apache-2.0"
] | null | null | null | https/server.py | bridgesign/Mini-tweet | 97e13afda73b816c953bd93baba31c4686621fdd | [
"Apache-2.0"
] | null | null | null | https/server.py | bridgesign/Mini-tweet | 97e13afda73b816c953bd93baba31c4686621fdd | [
"Apache-2.0"
] | null | null | null | import socket
from concurrent.futures import ThreadPoolExecutor
from . import handler
from . import views
import re
from .settings import NOT_FOUND_TEMPLATE
class server:
"""docstring for ClassName"""
def __init__(self, host:str ='', port:int =8080, timeout:int =60, threads:int =10):
self.port = port
self.host =... | 25.076923 | 84 | 0.705521 |
6447b1c91c0cd691d47e9a790e2d21c4b16ba494 | 29,946 | py | Python | PS5 Price Collector.py | Realsaleh/PS5-Price-Collector | 797234a5f36656a3ba5a3ab2fd2d49d7144082a8 | [
"MIT"
] | null | null | null | PS5 Price Collector.py | Realsaleh/PS5-Price-Collector | 797234a5f36656a3ba5a3ab2fd2d49d7144082a8 | [
"MIT"
] | null | null | null | PS5 Price Collector.py | Realsaleh/PS5-Price-Collector | 797234a5f36656a3ba5a3ab2fd2d49d7144082a8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import re
import os
import time
from unidecode import unidecode
def start():
print ("[+] PS5 Price Collector v1.0.0")
print ("[-] Coded By RealSalehn ")
print ("[-] https://salehn.ir")
global headers
headers = {'User... | 49.091803 | 303 | 0.575837 |
3384ba3998bc75178b9d06dd2f885f23e7045b23 | 4,578 | py | Python | configs/gdrn/lmPbrSingleObj/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_lm_pbr_100e_SO/resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_lm_pbr_100e_holepuncher.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | configs/gdrn/lmPbrSingleObj/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_lm_pbr_100e_SO/resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_lm_pbr_100e_holepuncher.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | configs/gdrn/lmPbrSingleObj/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_lm_pbr_100e_SO/resnest50d_a6_AugCosyAAEGary_BG05_mlBCE_lm_pbr_100e_holepuncher.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | _base_ = ["../../../_base_/gdrn_base.py"]
OUTPUT_DIR = "output/gdrn/lm_pbr/resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_lm_pbr_100e/holepuncher"
INPUT = dict(
DZI_PAD_SCALE=1.5,
TRUNCATE_FG=False,
CHANGE_BG_PROB=0.5,
COLOR_AUG_PROB=0.8,
COLOR_AUG_TYPE="code",
COLOR_AUG_CODE=(
"Sequential(["
... | 33.661765 | 118 | 0.526212 |
d668fe7e346d2ebf2aa0125bd33eab9e4ab0b1e5 | 29 | py | Python | solution/retrieval/elastic_engine/__init__.py | taeukkkim/temp | 91c90fe5da4678424d8aacacbf15773dc624021d | [
"MIT"
] | 5 | 2021-11-10T09:44:42.000Z | 2022-03-20T06:14:42.000Z | solution/retrieval/elastic_engine/__init__.py | taeukkkim/temp | 91c90fe5da4678424d8aacacbf15773dc624021d | [
"MIT"
] | null | null | null | solution/retrieval/elastic_engine/__init__.py | taeukkkim/temp | 91c90fe5da4678424d8aacacbf15773dc624021d | [
"MIT"
] | 7 | 2021-11-10T23:54:03.000Z | 2022-01-03T02:55:50.000Z | from .api import ESRetrieval
| 14.5 | 28 | 0.827586 |
92434c73eaea77520ca2c2cab5d762518af7020f | 2,080 | py | Python | notifications/telegram/posts.py | dubadub/vas3k.club | 45e8e7e198f7b139dadd50d877205463e64e1fb8 | [
"MIT"
] | 1 | 2022-01-10T14:19:17.000Z | 2022-01-10T14:19:17.000Z | notifications/telegram/posts.py | dubadub/vas3k.club | 45e8e7e198f7b139dadd50d877205463e64e1fb8 | [
"MIT"
] | 6 | 2021-09-22T18:55:27.000Z | 2022-03-12T01:04:53.000Z | notifications/telegram/posts.py | dubadub/vas3k.club | 45e8e7e198f7b139dadd50d877205463e64e1fb8 | [
"MIT"
] | 2 | 2022-01-10T20:01:58.000Z | 2022-01-11T09:42:41.000Z | import telegram
from django.template import TemplateDoesNotExist
from notifications.telegram.common import Chat, CLUB_CHANNEL, send_telegram_message, render_html_message, send_telegram_image, CLUB_CHAT
def announce_in_club_channel(post, announce_text=None, image=None):
if not announce_text:
announce_text... | 31.515152 | 136 | 0.658654 |
0bf58a279a34695f1f373e75c219a2894ff48fa6 | 1,645 | py | Python | 10-Logical_Vulnerabilities/q4/q4.py | galtoubul/Introduction_to_Information_Security | 565181ef2ec9530de8e4af43d97da454ddcc77be | [
"MIT"
] | null | null | null | 10-Logical_Vulnerabilities/q4/q4.py | galtoubul/Introduction_to_Information_Security | 565181ef2ec9530de8e4af43d97da454ddcc77be | [
"MIT"
] | null | null | null | 10-Logical_Vulnerabilities/q4/q4.py | galtoubul/Introduction_to_Information_Security | 565181ef2ec9530de8e4af43d97da454ddcc77be | [
"MIT"
] | null | null | null | import json
def generate_example():
# WARNING: DON'T EDIT THIS FUNCTION!
return json.dumps({'command': 'echo cool', 'signature': '007152ab1a65e9e864928d0f5cc6f47e8ce6217c09f7e7518d3d15f901e33df7e4bd760e2538929bdf2c5bf710b2babbcb2f268f458551ecbee78df22f3bb039696a2fccf58ccdeeb0c235e36593aa4b8be3d62e4ae6a59f6aeb... | 35.76087 | 338 | 0.717933 |
6d475ef1f98906b7d95066881c51a7f18a09f2a9 | 1,758 | py | Python | tfx/experimental/templates/taxi/models/estimator/model_test.py | nex3z/tfx | 1b6a36c223db79e2acb9c85da398746f9f7888be | [
"Apache-2.0"
] | null | null | null | tfx/experimental/templates/taxi/models/estimator/model_test.py | nex3z/tfx | 1b6a36c223db79e2acb9c85da398746f9f7888be | [
"Apache-2.0"
] | null | null | null | tfx/experimental/templates/taxi/models/estimator/model_test.py | nex3z/tfx | 1b6a36c223db79e2acb9c85da398746f9f7888be | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2020 Google LLC. 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 req... | 36.625 | 74 | 0.754835 |
3d691cf0a2774c588ea4ee749ebc44fc210a49cc | 1,346 | py | Python | actions/is_valid_ip_port.py | StackStorm-Exchange/stackstorm-networking_utils | 88a691c0bd4509355710cf5c36b438c7fdf9c2a6 | [
"Apache-2.0"
] | 3 | 2019-08-26T02:39:04.000Z | 2020-03-13T13:51:57.000Z | actions/is_valid_ip_port.py | StackStorm-Exchange/stackstorm-networking_utils | 88a691c0bd4509355710cf5c36b438c7fdf9c2a6 | [
"Apache-2.0"
] | 11 | 2017-02-24T12:47:47.000Z | 2021-10-01T13:46:40.000Z | actions/is_valid_ip_port.py | StackStorm-Exchange/stackstorm-networking_utils | 88a691c0bd4509355710cf5c36b438c7fdf9c2a6 | [
"Apache-2.0"
] | 8 | 2017-02-23T16:36:16.000Z | 2021-01-28T17:45:51.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 35.421053 | 84 | 0.681278 |
836f38b4ae21a2677ec9bdc4152bb7b0ea1c77b5 | 11,946 | py | Python | tests/functional/test_routes.py | ropable/archivy | 3fcd8032825a6b475c12cfa32637084240e30414 | [
"MIT"
] | null | null | null | tests/functional/test_routes.py | ropable/archivy | 3fcd8032825a6b475c12cfa32637084240e30414 | [
"MIT"
] | null | null | null | tests/functional/test_routes.py | ropable/archivy | 3fcd8032825a6b475c12cfa32637084240e30414 | [
"MIT"
] | null | null | null | import os
import re
from flask.testing import FlaskClient
from flask import request
from flask_login import current_user
from responses import RequestsMock, GET
from werkzeug.security import generate_password_hash
from archivy.helpers import get_max_id, get_db
from archivy.data import get_dirs, create_dir, get_items,... | 30.55243 | 88 | 0.663904 |
a7325b49f0b2774b889c10e24335441dcb3e7ac8 | 469 | py | Python | infra/bots/recipe_modules/build/__init__.py | pospx/external_skia | 7a135275c9fc2a4b3cbdcf9a96e7102724752234 | [
"BSD-3-Clause"
] | 8 | 2019-04-20T09:12:17.000Z | 2019-09-06T20:04:22.000Z | infra/bots/recipe_modules/build/__init__.py | pospx/external_skia | 7a135275c9fc2a4b3cbdcf9a96e7102724752234 | [
"BSD-3-Clause"
] | 3 | 2019-04-29T06:34:00.000Z | 2019-08-18T11:56:32.000Z | infra/bots/recipe_modules/build/__init__.py | pospx/external_skia | 7a135275c9fc2a4b3cbdcf9a96e7102724752234 | [
"BSD-3-Clause"
] | 57 | 2016-12-29T02:00:25.000Z | 2021-11-16T01:22:50.000Z | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'depot_tools/gclient',
'env',
'infra',
'recipe_engine/context',
'recipe_engine/file',
'recipe_engine/path',
'recipe_engine/python',
... | 20.391304 | 72 | 0.710021 |
71a933a13987b674871af6c00436440807f4898f | 331 | py | Python | tests/test_pandas.py | JessvLS/project_spring_2020 | ae5387afce3faabba1d8ab579de2dd8c80f6ffa7 | [
"Apache-2.0"
] | null | null | null | tests/test_pandas.py | JessvLS/project_spring_2020 | ae5387afce3faabba1d8ab579de2dd8c80f6ffa7 | [
"Apache-2.0"
] | null | null | null | tests/test_pandas.py | JessvLS/project_spring_2020 | ae5387afce3faabba1d8ab579de2dd8c80f6ffa7 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import patch, Mock
@patch("path.to.file.pandas.read_sql")
def test_get_df(read_sql_mock: Mock):
read_sql_mock.return_value = pd.DataFrame({"foo_id": [1, 2, 3]})
results = get_df()
read_sql_mock.assert_called_once()
pd.testing.assert_frame_equal(results, pd.DataFrame({"bar_id": [... | 33.1 | 78 | 0.70997 |
b1703074a3c56637efdbbe50573ed45ca7569a2d | 7,649 | py | Python | trulioo_sdk/model/business_search_response.py | Trulioo/sdk-python | 3bf0530e2ba1a3ec93d89b967b2e257e7401d5c2 | [
"RSA-MD"
] | 1 | 2022-01-11T12:08:45.000Z | 2022-01-11T12:08:45.000Z | trulioo_sdk/model/business_search_response.py | Trulioo/sdk-python | 3bf0530e2ba1a3ec93d89b967b2e257e7401d5c2 | [
"RSA-MD"
] | null | null | null | trulioo_sdk/model/business_search_response.py | Trulioo/sdk-python | 3bf0530e2ba1a3ec93d89b967b2e257e7401d5c2 | [
"RSA-MD"
] | 1 | 2021-05-17T08:33:15.000Z | 2021-05-17T08:33:15.000Z | """
Trulioo Python SDK
Package version: 1.0.4
Trulioo OpenAPI version: v1
Generated by OpenAPI Generator version: 5.0.1
"""
import re # noqa: F401
import sys # noqa: F401
from trulioo_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
... | 40.903743 | 116 | 0.588966 |
e4e7640d1b2a7c42fbd4bda3554e9d92485d1c8d | 593 | py | Python | torchcmh/dataset/base/__init__.py | chrisbyd/deep-cross-modal-hashing | b67bed412a499fdb619769d5132d897f5910c433 | [
"MIT"
] | 65 | 2019-12-08T12:11:53.000Z | 2022-03-10T09:25:45.000Z | torchcmh/dataset/base/__init__.py | silencelzx/deep-cross-modal-hashing | 9784397c1076c81b43ebd856cb24b8a67cf8f41e | [
"MIT"
] | 17 | 2020-05-07T09:22:20.000Z | 2022-03-02T02:05:18.000Z | torchcmh/dataset/base/__init__.py | silencelzx/deep-cross-modal-hashing | 9784397c1076c81b43ebd856cb24b8a67cf8f41e | [
"MIT"
] | 17 | 2020-04-02T06:38:49.000Z | 2022-01-11T12:41:49.000Z | # coding: utf-8
# @Time :
# @Author : Godder
# @Github : https://github.com/WangGodder
from __future__ import absolute_import
from __future__ import print_function
from .base import CrossModalTrainBase, CrossModalValidBase
from .pairwise import CrossModalPairwiseTrain
from .single import CrossModalSingleTrain... | 32.944444 | 92 | 0.801012 |
9e1fea5d2d0682da5e87db620f0ff4a7cd2a11c7 | 13,445 | py | Python | src/pretix/control/views/main.py | NorDULaN/pretix | e2b9fe8e71f3852721a42c594047d88f5181fd29 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-25T00:11:00.000Z | 2020-04-25T00:11:00.000Z | src/pretix/control/views/main.py | NorDULaN/pretix | e2b9fe8e71f3852721a42c594047d88f5181fd29 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/control/views/main.py | NorDULaN/pretix | e2b9fe8e71f3852721a42c594047d88f5181fd29 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from django.conf import settings
from django.contrib import messages
from django.db import transaction
from django.db.models import (
F, IntegerField, Max, Min, OuterRef, Prefetch, Subquery, Sum,
)
from django.db.models.functions import Coalesce, Greatest
from django.http import JsonResponse
from django.shortcuts i... | 42.279874 | 125 | 0.587802 |
6c583d0385401de72251fdd260c4f81acc7033bd | 2,598 | py | Python | src/orqviz/scans/evals.py | n17/orqviz | 76a3f9855515583d9a59ed3f11cef506b4f993af | [
"Apache-2.0"
] | 57 | 2021-11-09T03:21:36.000Z | 2022-03-29T08:48:00.000Z | src/orqviz/scans/evals.py | n17/orqviz | 76a3f9855515583d9a59ed3f11cef506b4f993af | [
"Apache-2.0"
] | 18 | 2021-11-09T10:58:40.000Z | 2022-03-09T16:19:22.000Z | src/orqviz/scans/evals.py | n17/orqviz | 76a3f9855515583d9a59ed3f11cef506b4f993af | [
"Apache-2.0"
] | 8 | 2021-11-09T11:55:52.000Z | 2022-02-07T20:35:37.000Z | from typing import Callable, List, Optional
import numpy as np
from ..aliases import (
ArrayOfParameterVectors,
GridOfParameterVectors,
LossFunction,
ParameterVector,
)
def eval_points_on_path(
all_points: ArrayOfParameterVectors,
loss_function: LossFunction,
n_reps: int = 1,
verbose... | 34.64 | 85 | 0.676674 |
5af98f890810fb8a8f3430cd13240fd3a4500857 | 1,243 | py | Python | roomai/common/AbstractActionChance.py | 1696012928/RoomAI | 37be09590489ab5f7c85083173e83ea31c40b76c | [
"MIT"
] | 1 | 2018-03-02T00:49:31.000Z | 2018-03-02T00:49:31.000Z | roomai/common/AbstractActionChance.py | 1696012928/RoomAI | 37be09590489ab5f7c85083173e83ea31c40b76c | [
"MIT"
] | null | null | null | roomai/common/AbstractActionChance.py | 1696012928/RoomAI | 37be09590489ab5f7c85083173e83ea31c40b76c | [
"MIT"
] | null | null | null | #!/bin/python
#coding=utf8
import roomai
import roomai.common
logger = roomai.get_logger()
class AbstractActionChance(object):
'''
The abstract class of an chance action. The chance action is used by the chance player.
'''
def __init__(self, key):
self.__key__ = key
def __get_key__(sel... | 31.075 | 145 | 0.662108 |
c7bf488bca71058618f9c9d64cada4b56b1805ca | 54,146 | py | Python | main/export/sbml.py | TeselaGen/jbei-edd | 92792fb30bbd504143b2f75bf08d05b141a7ef6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | main/export/sbml.py | TeselaGen/jbei-edd | 92792fb30bbd504143b2f75bf08d05b141a7ef6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | main/export/sbml.py | TeselaGen/jbei-edd | 92792fb30bbd504143b2f75bf08d05b141a7ef6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | # -*- coding: utf-8 -*-
""" Backend for exporting SBML files. """
# FIXME need to track intracellular and extracellular measurements separately
# (and assign to SBML species differently)
import libsbml
import logging
import math
import re
import sys
from bisect import bisect
from collections import defaultdict, named... | 45.046589 | 99 | 0.606471 |
d18cd6e6385708901c4cd46ebfd3610f6292b8e5 | 18,870 | py | Python | falcon_mcmc/falcon.py | samuelgoh1525/falcon-blockchain | 1480c1e71b624a147dc0a18aa043f1101435ba85 | [
"MIT"
] | 2 | 2021-06-19T16:57:09.000Z | 2021-06-22T08:04:17.000Z | falcon_mcmc/falcon.py | samuelgoh1525/falcon-blockchain | 1480c1e71b624a147dc0a18aa043f1101435ba85 | [
"MIT"
] | null | null | null | falcon_mcmc/falcon.py | samuelgoh1525/falcon-blockchain | 1480c1e71b624a147dc0a18aa043f1101435ba85 | [
"MIT"
] | null | null | null | """
Python implementation of Falcon:
https://falcon-sign.info/.
"""
from common import q
from numpy import set_printoptions
from math import sqrt, exp, floor, ceil, log
from fft import fft, ifft, sub, neg, add_fft, mul_fft
from ntt import sub_zq, mul_zq, div_zq
from ffsampling import gram, ffldl_fft, ffsamplin... | 33.39823 | 124 | 0.519396 |
6cb7648cf150c3f9e94b351f2b9af86fbe790b1e | 175 | py | Python | KenyaDelivers/wsgi.py | Sajeyks/Kenya-Delivers-1 | 9ef176603ea8f312e00b7ec061c5d2cc4e7db7e0 | [
"MIT"
] | null | null | null | KenyaDelivers/wsgi.py | Sajeyks/Kenya-Delivers-1 | 9ef176603ea8f312e00b7ec061c5d2cc4e7db7e0 | [
"MIT"
] | null | null | null | KenyaDelivers/wsgi.py | Sajeyks/Kenya-Delivers-1 | 9ef176603ea8f312e00b7ec061c5d2cc4e7db7e0 | [
"MIT"
] | null | null | null |
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'KenyaDelivers.settings')
application = get_wsgi_application()
| 19.444444 | 73 | 0.828571 |
55358eef2e9b56e9349dff7fa86ee6773bf84c73 | 4,362 | py | Python | nchs_mortality/delphi_nchs_mortality/pull.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 8 | 2020-10-12T04:27:04.000Z | 2022-03-08T16:56:57.000Z | nchs_mortality/delphi_nchs_mortality/pull.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 666 | 2020-09-30T21:18:41.000Z | 2022-03-31T22:37:12.000Z | nchs_mortality/delphi_nchs_mortality/pull.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 13 | 2020-10-01T14:25:06.000Z | 2022-02-12T08:31:19.000Z | # -*- coding: utf-8 -*-
"""Functions for pulling NCHS mortality data API."""
from typing import Optional
import numpy as np
import pandas as pd
from sodapy import Socrata
from delphi_utils.geomap import GeoMapper
from .constants import METRICS, RENAME, NEWLINE
def standardize_columns(df):
"""Rename columns to ... | 35.754098 | 91 | 0.653599 |
d047c1c84f9453f40b944e51c087ecd45443b00b | 4,919 | py | Python | clip/simple_tokenizer.py | mapmeld/CLIP | 0848ed71e5bb5b4eaaa4048364001877630345dc | [
"MIT"
] | null | null | null | clip/simple_tokenizer.py | mapmeld/CLIP | 0848ed71e5bb5b4eaaa4048364001877630345dc | [
"MIT"
] | null | null | null | clip/simple_tokenizer.py | mapmeld/CLIP | 0848ed71e5bb5b4eaaa4048364001877630345dc | [
"MIT"
] | null | null | null | import gzip
import html
import os
from functools import lru_cache
import ftfy
import regex as re
@lru_cache()
def default_bpe():
return os.path.join(os.path.dirname(os.path.abspath(__file__)), "bpe_simple_vocab_16e6.txt.gz")
@lru_cache()
def bytes_to_unicode():
"""
Returns list of utf-8 byte and a corr... | 34.886525 | 144 | 0.560683 |
60bdd1d81837b78b24485fc3d5e07d475013091a | 217 | py | Python | saleor/userprofile/urls.py | mscharm/saleor_heroku | 2b16901978c94d9444eb97526c21a6d6d25d54a1 | [
"BSD-3-Clause"
] | null | null | null | saleor/userprofile/urls.py | mscharm/saleor_heroku | 2b16901978c94d9444eb97526c21a6d6d25d54a1 | [
"BSD-3-Clause"
] | 1 | 2022-02-10T10:40:41.000Z | 2022-02-10T10:40:41.000Z | saleor/userprofile/urls.py | mscharm/saleor_heroku | 2b16901978c94d9444eb97526c21a6d6d25d54a1 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.details, name='details'),
url(r'^address/(?P<pk>\d+)/delete/$',
views.address_delete, name='address-delete'),
]
| 19.727273 | 53 | 0.631336 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.