blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 777
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0b9a88c391878412fc429f3a75e2414c760997cf | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /flask__webservers/get_size_upload_file_with_progress/main.py | 35ae0b78ba57d5a84ea62acf77d081e6e19a12bf | [
"CC-BY-4.0"
] | permissive | gil9red/SimplePyScripts | bd2733372728bf9b9f00570e90316fa12116516b | 773c2c9724edd8827a1dbd91694d780e03fcb05a | refs/heads/master | 2023-08-31T04:26:09.120173 | 2023-08-30T17:22:59 | 2023-08-30T17:22:59 | 22,650,442 | 157 | 46 | null | 2023-09-08T17:51:33 | 2014-08-05T16:19:52 | Python | UTF-8 | Python | false | false | 4,527 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
import logging
from flask import Flask, request, redirect, render_template_string, jsonify
# pip install humanize
from humanize import naturalsize as sizeof_fmt
app = Flask(__name__)
logging.basicConfig(level=logging.DEBUG)
@app.route("/")... | [
"ilya.petrash@inbox.ru"
] | ilya.petrash@inbox.ru |
d9febf29c060feccd2c30acdf80550e51cdf5573 | 6a32cba18ed153b7a7611804223c74dbc923c761 | /5.py | aea6c3c163bf391016e8706b78860f5c4fd2bb65 | [] | no_license | Mrhairui/leetcode | 8cfea60868c37f2a7d0675c4ee1f6d431c75dd37 | a0884db8fe70e63707cc0fa06c6367e42857e4de | refs/heads/master | 2022-03-29T16:18:42.827912 | 2019-11-13T14:48:36 | 2019-11-13T14:48:36 | 197,877,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 973 | py | class Solution:
def longestPalindrome(self, s: str) -> str:
size = len(s)
if size <= 1:
return s
longest_l = 1
curlen = 0
res = s[0]
dp = [[False for _ in range(size)] for _ in range(size)] # 存储用的表
for r in range(1, size):
for l in ran... | [
"chenwentao_622@163.com"
] | chenwentao_622@163.com |
267fa3c0d0f216b97c4faa8db8e6ac57b8ec92c9 | 3a4fbde06794da1ec4c778055dcc5586eec4b7d2 | /_google_app_engine-projects/django-gae2django/django/dispatch/dispatcher.py | eb183786df321fede1a3d546f0c5e5ba1822fede | [
"Apache-2.0"
] | permissive | raychorn/svn_python-django-projects | 27b3f367303d6254af55c645ea003276a5807798 | df0d90c72d482b8a1e1b87e484d7ad991248ecc8 | refs/heads/main | 2022-12-30T20:36:25.884400 | 2020-10-15T21:52:32 | 2020-10-15T21:52:32 | 304,455,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,639 | py | import weakref
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
from django.dispatch import saferef
WEAKREF_TYPES = (weakref.ReferenceType, saferef.BoundMethodWeakref)
def _make_id(target):
if hasattr(target, 'im_func'):
return (id(target.im_self), id(targe... | [
"raychorn@gmail.com"
] | raychorn@gmail.com |
99a157c10331ba134de0da50bb8c9272687b2a54 | c6eee54ffef7f99f2825cc332a649d9a6e9e181d | /matrixscreener/imagej.py | 944d1b559197f620ac9c63be68652944f0c5ee99 | [
"MIT"
] | permissive | imcf/matrixscreener | 5d3fa6040e62c14ff504dfcbb3818e405d9e9254 | 727711654269d93e528ae9a604ce5ac5b24fa816 | refs/heads/master | 2021-01-17T04:25:14.575654 | 2015-02-08T15:23:39 | 2015-02-08T16:11:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,754 | py | # encoding: utf-8
"""
Stitch images with ImageJ.
* ``matrixscreener.imagej._bin`` should be set if you are on Windows or Linux.
"""
import pydebug, subprocess, os, fijibin
from tempfile import NamedTemporaryFile
# debug with DEBUG=matrixscreener python script.py
debug = pydebug.debug('matrixscreener')
_bin = fijibin... | [
"arve.seljebu@gmail.com"
] | arve.seljebu@gmail.com |
1eabae2d19ec646f5caa21ad2542291a6db58275 | 5c842a91854b0061bdec96a36e30860fb1e1321e | /Chapter3_MCMC/github_pull.py | dff8070e7791d77ff97664dc4e3c8ebedbf3adc3 | [
"MIT"
] | permissive | bzillins/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers | fe2be77b9859566e2a923c8022a85925aa190d1d | c08a6344b8d0e39fcdb9702913b46e1b4e33fb9a | refs/heads/master | 2020-12-30T22:09:05.936082 | 2013-02-27T04:21:05 | 2013-02-27T04:21:05 | 19,747,037 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,348 | py | #github data scrapper
"""
variables of interest:
indp. variables
- language, given as a binary variable. Need 4 positions for 5 langagues
- #number of days created ago, 1 position
- has wiki? Boolean, 1 position
- followers, 1 position
- following, 1 position
- constant
dep. variab... | [
"cam.davidson.pilon@gmail.com"
] | cam.davidson.pilon@gmail.com |
cca8d7bb1e4c795995e6db7675bd3f7bfad39018 | e9d139f5108ca115d6254763438dd8855fc4454d | /view/__init__.py | fc9912fe0a91e8e2066ec8e866c29d702fb6cd05 | [] | no_license | Letractively/simulation-modeling | 119d1376a75ff825903a0dd4bbbbc161e1d19e05 | aca18bf1f50b1083bbc9cbd97b87d3df1c71000b | refs/heads/master | 2016-08-12T18:44:07.605687 | 2011-12-14T11:04:29 | 2011-12-14T11:04:29 | 45,956,671 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,531 | py | # -*- coding: utf-8 -*-
# Импорт и настройка Jinja2
from jinja2 import Environment, PackageLoader
templates = Environment(loader=PackageLoader('view', 'templates'), extensions = ['jinja2.ext.with_'])
from GChartWrapper import Pie, Line, LineXY
from settings import app
def index(names):
'Главная страница'
te... | [
"altaisoft@gmail.com"
] | altaisoft@gmail.com |
a0d3c2bd42f70d32b9c784462fa44007a8f0adf7 | 10dcfd809f342fd822b6df198f4045f92b157124 | /bin/po2ini | 1a43bcf93206ef9589e290b07fe2adcdcf2ee58f | [] | no_license | mozilla/affiliates-lib | c731c910c8d9fe04e211541e54f304a127a0b829 | 1000f98d9df217ed66a0ecd07e1e0a1d822a712a | refs/heads/master | 2023-07-03T17:18:49.841809 | 2016-02-01T10:49:47 | 2016-02-01T10:49:47 | 2,291,186 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 989 | #!/Users/fred/.virtualenvs/playdoh/bin/python2.6
#
# Copyright 2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 2... | [
"fwenzel@mozilla.com"
] | fwenzel@mozilla.com | |
313c33cbac5a657dac8e135d547bd7a34207608b | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_1532+522/sdB_pg_1532+522_lc.py | 8187be807799c8b0ee1f61b7c1dc1a03cbbd8db0 | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | from gPhoton.gAperture import gAperture
def main():
gAperture(band="NUV", skypos=[233.374333,52.113889], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_pg_1532+522/sdB_pg_1532+522_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
if __name_... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
c977864e64c62b6e7d106375290362fa31ff27ed | da55b6cb2b7356f589c56bb647e49f79aedfc4f1 | /python-fabric/interface.test/example2_app/app/DemoComponent.py | b1b8f58cdd0340fe06bec5703129b2ed628bc745 | [] | no_license | eiselesr/sandbox | 2d0cbb16e2601dfda9d9e5ea5a5e96a053fdf72f | 0b3fc878a613600c6071019c820ba79e2d2a9a2d | refs/heads/master | 2023-09-01T00:40:37.222840 | 2023-08-24T19:20:27 | 2023-08-24T19:20:27 | 151,609,265 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | # riaps:keep_import:begin
from riaps.run.comp import Component
# riaps:keep_import:end
class DemoComponent(Component):
# riaps:keep_constr:begin
def __init__(self):
super().__init__()
# riaps:keep_constr:end
# riaps:keep_tick:begin
def on_tick(self):
now = self.tick.recv_pyobj()
... | [
"eiselesr@gmail.com"
] | eiselesr@gmail.com |
a4ddf2709fce33cd5aab0418f9028ac97efa25d6 | fab39aa4d1317bb43bc11ce39a3bb53295ad92da | /tools/clip_dot.py | e0123db1d5a9fae276ffc01267f7a1be6649f5f5 | [
"Apache-2.0"
] | permissive | dupeljan/nncf | 8cdce27f25f01ce8e611f15e1dc3036fb8548d6e | 0abfd7103ca212888a946ba4d0fbdb9d436fdaff | refs/heads/develop | 2023-06-22T00:10:46.611884 | 2021-07-22T10:32:11 | 2021-07-22T10:32:11 | 388,719,455 | 0 | 0 | Apache-2.0 | 2021-07-23T07:46:15 | 2021-07-23T07:43:43 | null | UTF-8 | Python | false | false | 2,144 | py | #pylint:skip-file
import sys
from argparse import ArgumentParser
import networkx as nx
def main(argv):
parser = ArgumentParser()
parser.add_argument('-i', '--input_file', help='Input .dot file',
required=True)
parser.add_argument('-s', '--start_id', help='Start ID (inclusive)',
... | [
"noreply@github.com"
] | dupeljan.noreply@github.com |
997cfed7e90d02a247f84a51c5934988fa32ac75 | d3cfa86c22ab3bd6f2dcbbd72f9cf5f6bf574cd1 | /gridappsd/utils.py | b455a1f97896802d08297150dfac9078f62c104b | [] | no_license | ariwoolar/gridappsd-python | 30fbc9a36b0d7be43f6fb0ff8b0f39d76fa6f4ed | 1e8ddc88de7fc9cabb17b1ab34f2756e8c37127c | refs/heads/master | 2023-02-02T20:09:46.491618 | 2020-09-10T20:09:34 | 2020-09-10T20:09:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,691 | py | import datetime, time
from dateutil import parser
import os
try: # python2.7
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
__GRIDAPPSD_URI__ = os.environ.get("GRIDAPPSD_URI", "localhost:61613")
__GRIDAPPSD_USER__ = os.environ.get("GRIDAPPSD_USER", "system")
__GRIDAPPSD_PA... | [
"craig.allwardt@pnnl.gov"
] | craig.allwardt@pnnl.gov |
d4244e67b3754369184180c6aee3052921518a90 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_315/ch40_2020_09_19_02_31_10_320887.py | 4062bfd4d8115f73c346ece53c0c8d84dafed63f | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | def soma_valores(a):
soma = 0
for x in range(a):
soma += x[a]
return soma | [
"you@example.com"
] | you@example.com |
73f77c0541a623faed3445fd42c78e95a3f43de3 | b7a98a761007cf8b913b75152a278c1693f2d00d | /code/ortools/simple.py | a22169600415ebac07b2a7f71ee7fba972372f13 | [] | no_license | VuHoangvn/descrete_optimize | be18fcfc230a9d1133ec94a49b1fc5cfcb50b449 | 7a17d472af7d54624860aeff590db423a7e47d59 | refs/heads/master | 2022-10-14T00:22:50.368095 | 2020-06-05T09:48:31 | 2020-06-05T09:48:31 | 261,913,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 829 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ortools.sat.python import cp_model
def SimpleSatProgram():
"""Minimal CP-SAT example to showcase calling the solver."""
# Creates the model
model = cp_model.CpModel()
# Creates the variab... | [
"20161728@student.hust.edu.vn"
] | 20161728@student.hust.edu.vn |
0657eee5800ac668b250193a08ebbb5b92cfbdb1 | 62e58c051128baef9452e7e0eb0b5a83367add26 | /edifact/D09B/SANCRTD09BUN.py | b94d0510dd191e38d7227ae909cae41f4e766c11 | [] | no_license | dougvanhorn/bots-grammars | 2eb6c0a6b5231c14a6faf194b932aa614809076c | 09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d | refs/heads/master | 2021-05-16T12:55:58.022904 | 2019-05-17T15:22:23 | 2019-05-17T15:22:23 | 105,274,633 | 0 | 0 | null | 2017-09-29T13:21:21 | 2017-09-29T13:21:21 | null | UTF-8 | Python | false | false | 4,024 | py | #Generated by bots open source edi translator from UN-docs.
from bots.botsconfig import *
from edifact import syntax
from recordsD09BUN import recorddefs
structure = [
{ID: 'UNH', MIN: 1, MAX: 1, LEVEL: [
{ID: 'BGM', MIN: 1, MAX: 1},
{ID: 'DTM', MIN: 0, MAX: 99},
{ID: 'STS', MIN: 0, MAX: 99},
{ID: 'LO... | [
"jason.capriotti@gmail.com"
] | jason.capriotti@gmail.com |
d1c16ded968ad2ed9bdec10b3979d2cc493cc4d1 | e835059c8084d3bd92d8f24a748136617cf8a2a3 | /8/radd_test.py | 87352539fc8175af3eeab0c1c908d923ecdf9d3a | [] | no_license | Carlzkh/CrazyPythonNotes | 7141b062722e2b8354ce3566f0b8d086bbfad9b1 | 04a8648ac2150e07520252d882c5cbc81cc3b9f9 | refs/heads/master | 2021-07-11T22:57:06.610728 | 2021-06-29T07:37:16 | 2021-06-29T07:37:16 | 247,253,027 | 0 | 0 | null | 2021-01-05T08:48:45 | 2020-03-14T10:08:34 | Python | UTF-8 | Python | false | false | 2,076 | py | """
object.__radd__(self, other):当y提供该方法时,可执行 x + y
object.__rsub__(se f, other):当y提供该方法时,可执行 x - y
object.__rmul__(self, other):当y提供该方法时,可执行 x * y
object.__rmatmul__(self other):当y提供该方法时,可执行 x @ y
object.__rtruediv__( If, other :当y提供该方法时,可执行 x / y
object.__rfloordiv__ (self, other ): 当y提供该方法时,可执行 x // y
object.__rmod_... | [
"291747808@qq.com"
] | 291747808@qq.com |
efa0e5ddb6154a7a27511647626b98da91f3bf51 | 1b57d1ce3baa5484cb517e916e2b3c7b66196672 | /tests/test_config.py | fe63aa3f70ced5c38ca198ca7e118ae12d80d2b3 | [
"MIT"
] | permissive | cfhamlet/os-config | 84e3b03456c554408148b448ee934a74a50b0bb0 | 5a875ac07972ef9e4d1d6887ea48c974363f2438 | refs/heads/master | 2020-04-09T07:43:36.575488 | 2019-01-08T04:43:20 | 2019-01-08T04:43:20 | 160,168,165 | 3 | 0 | MIT | 2019-01-08T04:43:21 | 2018-12-03T09:47:25 | Python | UTF-8 | Python | false | false | 4,513 | py | import pytest
from os_config import Config
def test_create():
with pytest.raises(TypeError):
c = Config()
c = Config.create(a=1, b=2)
assert c.a == 1
assert c.b == 2
def test_create_from_dict():
d = {'a': 3, 'b': 4}
c = Config.from_dict(d)
assert c.a == 3
assert c.b == 4
... | [
"cfhamlet@gmail.com"
] | cfhamlet@gmail.com |
ccfe4b8ffb05eaba3eeba44922978edf51809bda | 3aab11d445011f4a0de1376886dd3899aba44e68 | /opps/db/conf.py | eedef8cb2db0ef10333332563c15c6b0d5c6b5ca | [
"MIT"
] | permissive | opps/opps | 4ba6a08ac5aa31be48c245b2e8f9d9a714a5e473 | 5552924fa34ea40d24febeac5046bd59f62e0e4f | refs/heads/master | 2023-08-24T21:09:23.489540 | 2023-05-22T20:07:33 | 2023-05-22T20:07:33 | 7,712,379 | 166 | 76 | MIT | 2022-01-06T22:53:23 | 2013-01-20T03:56:15 | Python | UTF-8 | Python | false | false | 572 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf import settings
from appconf import AppConf
class OppsDataBaseConf(AppConf):
HOST = getattr(settings, 'OPPS_DB_HOSR', None)
USER = getattr(settings, 'OPPS_DB_USER', None)
PASSWORD = getattr(settings, 'OPPS_DB_PASSWORD', None)
PORT = geta... | [
"thiagoavelinoster@gmail.com"
] | thiagoavelinoster@gmail.com |
c618f6eb814a4c418adb0624e5c2dc54c47b4cc3 | 542c040b9b2150d789096f031dcf7a4362b034fe | /training/migrations/0003_auto_20210501_1721.py | bb92ba559a946476499ee525d0edc0012c29ba25 | [
"Unlicense"
] | permissive | rafimuhammad01/mtf-hackathon | 3115412f673774cc3991bd2a67854bfa645966d1 | 83ab410239a93ff04e57d7ceb2d1d292ba365866 | refs/heads/main | 2023-04-12T15:28:41.506450 | 2021-05-22T11:27:05 | 2021-05-22T11:27:05 | 360,573,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 765 | py | # Generated by Django 3.2 on 2021-05-01 10:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('training', '0002_auto_20210501_1607'),
]
operations = [
migrations.AddField(
model_name='training',
name='linkUrl',
... | [
"rafi10muhammad@gmail.com"
] | rafi10muhammad@gmail.com |
abeb6300b115c2987444589968634de355eca323 | 16819f2d2a924a8df8c24754241f94247d202141 | /backend/advyon_24955/wsgi.py | 02ac84499c7199934b67c6b4cab2b07b0c264618 | [] | no_license | crowdbotics-apps/advyon-24955 | 922dea646dc87c5bd786ff01aa2a8ed4d19636a5 | a153d936b8cba32003c66bccf95d617c1a63d869 | refs/heads/master | 2023-03-16T07:40:45.604601 | 2021-03-10T20:47:22 | 2021-03-10T20:47:22 | 346,487,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | """
WSGI config for advyon_24955 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
a5fe8e2a5902cb702f9b7dbe2ca631eb86704b49 | da459e1380b18fbac9d8868dc26b3b791547ed63 | /replacesum.py | 46904922d98a9b9badbe13c6aae58249985478b7 | [] | no_license | tchelmella/dictionary | a2cc50cacf61bcb3d6af15b1125e90fd5abd1982 | ef95e559142944c3d067991ad9a521e11bb6d0cd | refs/heads/master | 2020-07-20T18:58:24.100373 | 2019-09-06T02:20:16 | 2019-09-06T02:20:16 | 206,695,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 94 | py | d = {'a': [3, 4, 5], 'b': [1, 2, 3]}
for k, v in d.items():
d[k] = sum(v) / len(v)
print(d)
| [
"tulsi.das1404@gmail.com"
] | tulsi.das1404@gmail.com |
7ec138bc879d91a44e191223ca877c75087340d8 | 232fc2c14942d3e7e28877b502841e6f88696c1a | /dizoo/pomdp/entry/pomdp_ppo_default_config.py | 8b4bbde7287f6f31890d1be86bf31692489890e4 | [
"Apache-2.0"
] | permissive | shengxuesun/DI-engine | ebf84221b115b38b4b3fdf3079c66fe81d42d0f7 | eb483fa6e46602d58c8e7d2ca1e566adca28e703 | refs/heads/main | 2023-06-14T23:27:06.606334 | 2021-07-12T12:36:18 | 2021-07-12T12:36:18 | 385,454,483 | 1 | 0 | Apache-2.0 | 2021-07-13T02:56:27 | 2021-07-13T02:56:27 | null | UTF-8 | Python | false | false | 2,413 | py | from ding.entry import serial_pipeline
from easydict import EasyDict
pong_ppo_config = dict(
env=dict(
collector_env_num=16,
evaluator_env_num=4,
n_evaluator_episode=8,
stop_value=20,
env_id='Pong-ramNoFrameskip-v4',
frame_stack=4,
warp_frame=False,
u... | [
"niuyazhe@sensetime.com"
] | niuyazhe@sensetime.com |
e257465739f45cb8c41e0db62fca6e5c5961ffa1 | adbf09a31415e6cf692ff349bd908ea25ded42a8 | /revision/imports/at_decorators.py | 2aabeeb6b8c5d049d7838859f8ed33c4e323cd5f | [] | no_license | cmulliss/gui_python | 53a569f301cc82b58880c3c0b2b415fad1ecc3f8 | 6c83d8c2e834464b99024ffd8cf46ac4e734e7a4 | refs/heads/main | 2023-08-12T22:33:01.596005 | 2021-10-11T12:35:41 | 2021-10-11T12:35:41 | 408,176,101 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | import functools
user = {"username": "jose", "access_level": "guest"}
def make_secure(func):
@functools.wraps(func)
def secure_function():
if user["access_level"] == "admin":
return func()
else:
return f"No admin permissions for {user['username']}."
return secure_... | [
"cmulliss@gmail.com"
] | cmulliss@gmail.com |
8ecbea64502b0476e4dd3ec28e53802d98d8344c | 5945903ff7b3c0be799d8b228aa96309e8d6b68a | /LeetCode_Offer_II_004.py | 3d9937377035c818327328a19057cccb76588d80 | [] | no_license | freesan44/LeetCode | 44fd01fa37e2d7e729ae947da2350b1649c163ae | 2ed9f1955c527d43fe1a02e5bebf5a6f981ef388 | refs/heads/master | 2021-12-07T20:07:02.308097 | 2021-11-01T23:58:11 | 2021-11-01T23:58:11 | 245,178,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 360 | py | class Solution:
def singleNumber(self, nums: List[int]) -> int:
from collections import Counter
counter = Counter(nums).most_common()
x,y = counter[-1]
# print(x,y)
return x
if __name__ == '__main__':
# nums = [2,2,3,2]
nums = [0, 1, 0, 1, 0, 1, 100]
ret = Solu... | [
"freesan44@163.com"
] | freesan44@163.com |
cf6a17b5b27c54829138ed5b6d13c654a57a13d9 | 03869888260ab1b28c5912f6019a44b1fcbb6c19 | /acrylamid/templates/jinja2.py | 95c8c1f7f305e42f346aaed4e42d7d357029850f | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | kenkeiras/acrylamid | 515971b5385a554f310683d993eb34e38611d50a | 792298eb32daa0e703afdb2894ee121dc3861d43 | refs/heads/master | 2020-03-27T12:33:54.176728 | 2013-03-26T11:35:09 | 2013-03-26T11:35:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,374 | py | # -*- encoding: utf-8 -*-
#
# Copyright 2012 Martin Zimmermann <info@posativ.org>. All rights reserved.
# License: BSD Style, 2 clauses -- see LICENSE.
from __future__ import absolute_import
from io import StringIO
from os.path import exists, getmtime
from jinja2 import Environment as J2Environemnt, FileSystemByteco... | [
"info@posativ.org"
] | info@posativ.org |
48a2ca87abfdda05840e297a3a45819b20ef60d0 | c3a84a07539c33040376f2c1e140b1a1041f719e | /wagtail-stubs/contrib/postgres_search/models.pyi | c9990209da1b7ca59c1ff89fcdab8dbd624dd3d4 | [] | no_license | tm-kn/tmp-wagtail-stubs | cc1a4434b7142cb91bf42efb7daad006c4a7dbf4 | 23ac96406610b87b2e7751bc18f0ccd27f17eb44 | refs/heads/master | 2023-01-20T14:41:33.962460 | 2020-11-30T23:15:38 | 2020-11-30T23:15:38 | 317,332,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 943 | pyi | from .utils import get_descendants_content_types_pks as get_descendants_content_types_pks
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from typing import Any
from wagtail.search.index import class_is_indexed as class_is_indexed
class TextIDGenericRelation(GenericRelation)... | [
"hi@tmkn.org"
] | hi@tmkn.org |
4526c6ad6240b783d55680571665a34fb0c9ab6b | c934e7c27f0e72385218a14b4e2a7e94a747a360 | /google-cloud-sdk/lib/surface/workspace_add_ons/deployments/__init__.py | c882b0f970690ca156c971efa50fc7708fcc45e7 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | PrateekKhatri/gcloud_cli | 5f74b97494df4f61816026af9460b9c4d8e89431 | 849d09dd7863efecbdf4072a504e1554e119f6ae | refs/heads/master | 2023-03-27T05:53:53.796695 | 2021-03-10T04:08:14 | 2021-03-10T04:08:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 965 | py | # -*- coding: utf-8 -*- #
# Copyright 2020 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 requir... | [
"actions@github.com"
] | actions@github.com |
df1c8a26e0becbc5ddede3a5087948f61aaf7f2e | d3efc82dfa61fb82e47c82d52c838b38b076084c | /crossmarketetf_bak/crossmarket_creation_HA/YW_CETFSS_SHSG_020.py | 5d28365fc63ea90b37a0dd3fec3d52f5c0307129 | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,323 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
sys.path.append("/home/yhl2/workspace/xtp_test")
from crossmarketetf.cetfservice.cetf_main_service import *
from crossmarketetf.cetfservice.cetf_get_components_asset import *
from crossmarketetf.cetfservice.cetf_utils import *
from mysql.QueryOrderErrorMsg import q... | [
"418033945@qq.com"
] | 418033945@qq.com |
09920af61b71677948e7bed9fa77cabae508c78f | 87e62af4768c0f594e675551f4c7c1c81ce7f7d9 | /lawyer/spiders/legislation/caipan_wenshu_spider.py | 09b385d1e6eb1bcee041a82c399db8cb43aa3e79 | [] | no_license | dulei001/Spider | 78d12adbef1d865da6978704fe146cc21a8d2d3e | 628d468501c6502763ce453a58a09813b2a46b8c | refs/heads/master | 2021-01-18T17:27:11.771434 | 2019-05-14T02:14:33 | 2019-05-14T02:14:33 | 86,802,130 | 12 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,078 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import json
import scrapy
import re
#聚法网裁判文书
class CaipanInfoSpider(scrapy.spiders.Spider):
name = "jufa"
allowed_domains = ['www.jufaanli.com']
start_urls = [
"http://www.jufaanli.com/search2?TypeKey=1%253A%25E6%25A1%2588"
]
pagesize = 20
# 爬虫... | [
"280680441@qq.com"
] | 280680441@qq.com |
60c1b6630661e4beab1e47ea2c1e71f35603c745 | cb1f4f794b9efe7fcf90726cfff12e0051af7702 | /timeserio/batches/single/base.py | ad6fa65aebf095a5aaffce294cf272284456bceb | [
"MIT"
] | permissive | valeman/timeserio | 67cd4e9da977decbfe99a7a5324f08ab3d88e75a | b52576b24a5643a2a21490b9f7ca63f8566a88ce | refs/heads/master | 2022-04-12T00:52:26.368003 | 2020-03-11T10:53:37 | 2020-03-11T10:53:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 97 | py | import abc
from keras.utils import Sequence
class BatchGenerator(Sequence, abc.ABC):
pass
| [
"igor.gotlibovych@gmail.com"
] | igor.gotlibovych@gmail.com |
fbd1a036d4757c1093524dbb514fd4f26baeb738 | 3ee747ca63eb16997401ef88fadf0a646af2ca1e | /tests/test_utils.py | 95e397b43d9ba94716bf110b1fe3e00138d65602 | [
"MIT",
"Python-2.0"
] | permissive | riverflowo/NURBS-Python | 5f382f7a24b34f7b09e26ce4d64136fbba95481f | b564eaceef72f00b385981dac3c7b93b5490f4fe | refs/heads/master | 2020-03-29T13:57:39.647404 | 2018-09-12T02:05:34 | 2018-09-12T02:05:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,580 | py | """
Tests for the NURBS-Python package
Released under The MIT License. See LICENSE file for details.
Copyright (c) 2018 Onur Rauf Bingol
Tests geomdl.utilities module. Requires "pytest" to run.
"""
import pytest
from geomdl import utilities
GEOMDL_DELTA = 10e-8
def test_generate_knot_vector1():
... | [
"orbingol@gmail.com"
] | orbingol@gmail.com |
fa41413edc689db57f3afe37347b2bb07b49f3a1 | b9e4bf5c00ac0d6c1a6e6038e8dc18041819ff99 | /Python3/0716_Max_Stack.py | 45a35d6d09c45a3a9630134e1a1c123ef683ea60 | [] | no_license | kiranani/playground | 98fdb70a3ca651436cc1eede0d2ba1b1ea9aba1d | 12f62a218e827e6be2578b206dee9ce256da8d3d | refs/heads/master | 2021-06-03T12:43:29.388589 | 2020-06-12T15:43:45 | 2020-06-12T15:43:45 | 149,614,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 884 | py | class MaxStack:
def __init__(self):
"""
initialize your data structure here.
"""
self.l = [(float("inf"), -float("inf"))]
def push(self, x: int) -> None:
self.l.append((x, max(x, self.l[-1][1])))
def pop(self) -> int:
return self.l.pop()[0... | [
"noreply@github.com"
] | kiranani.noreply@github.com |
4386d9bd629660635a27a3b219d035be73a9ac41 | 79babd1502ea1bd701ce021cfa75dc25ca35a700 | /python/rootTools/Utils.py | a4e4d3433c4ff2b0999a0502997f62013d960800 | [] | no_license | RazorCMS/RazorAnalyzer | 99b89b33d2ec2be1d42e3705569d49cd3346d40a | 2e2adff5ba5d2306c9f0b40c2a5297782fae3158 | refs/heads/master | 2021-01-23T21:18:53.534772 | 2019-03-22T14:21:41 | 2019-03-22T14:21:41 | 24,916,087 | 1 | 9 | null | 2017-09-11T15:51:28 | 2014-10-07T23:27:09 | C++ | UTF-8 | Python | false | false | 3,724 | py | #$Revision:$
#the following is from http://stackoverflow.com/questions/1006289/how-to-find-out-the-number-of-cpus-in-python
def determineNumberOfCPUs():
""" Number of virtual or physical CPUs on this system, i.e.
user/real as output by time(1) when called with an optimally scaling userspace-only program"""
... | [
"jduarte@caltech.edu"
] | jduarte@caltech.edu |
a2aa0983b8a49972d004006dd2709b75fd1ab70d | 7c15f211adc9e9eb9f66ccdd570c9f38dff7ea8d | /packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/subscriptionidapiversionversiontolerant/operations/__init__.py | c58de146570db0acc07d6828002cccd80c37cc94 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/autorest.python | cc4bfbf91ae11535731cad37cedd6b733edf1ebd | a00d7aaa3753ef05cb5a0d38c664a90869478d44 | refs/heads/main | 2023-09-03T06:58:44.246200 | 2023-08-31T20:11:51 | 2023-08-31T20:11:51 | 100,315,955 | 47 | 40 | MIT | 2023-09-14T21:00:21 | 2017-08-14T22:58:33 | Python | UTF-8 | Python | false | false | 771 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | Azure.noreply@github.com |
bdcbaa97c7e2dc4010390b06ac580bfda23aa946 | 71c331e4b1e00fa3be03b7f711fcb05a793cf2af | /QA-System-master/SpeechToText_test/google-cloud-sdk/lib/surface/run/deploy.py | 32cd25c00b8387be0cb01911f797495b0301f3b6 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | iofh/QA-System | 568228bb0c0adf9ec23b45cd144d61049e720002 | af4a8f1b5f442ddf4905740ae49ed23d69afb0f6 | refs/heads/master | 2022-11-27T23:04:16.385021 | 2020-08-12T10:11:44 | 2020-08-12T10:11:44 | 286,980,492 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,853 | py | # -*- coding: utf-8 -*- #
# Copyright 2018 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 requir... | [
"ige-public@hotmail.com"
] | ige-public@hotmail.com |
67e504ae45a28ad46c3633d6603215e04e77ce66 | 1cb0cc435061b6a0156b37813343ae46b1f7346e | /1_learn_step/try_second/glorot_normal-RMSprop-16.py | eb6e65fdeee43652b530579008e195c2f09d190b | [] | no_license | youthliuxi/keras | 6370a9de11e152d8ba96e68e9ff02337203b7e66 | 60a367442f74313d0bd9af01f76068d56e23bec0 | refs/heads/master | 2020-04-30T19:54:16.628943 | 2019-08-21T09:47:13 | 2019-08-21T09:47:13 | 177,051,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,677 | py | # -*- coding:utf-8 -*-
from keras import backend as K
K.set_image_dim_ordering('th')
import numpy as np
np.random.seed(123)
from keras.layers import *
from keras.models import Sequential
from keras.utils import np_utils
from keras.datasets import mnist
# (X_train, y_train), (X_test, y_test) = mnist.load_data()
path = "... | [
"lx_einstein@sina.com"
] | lx_einstein@sina.com |
5257553d3c163205f228efbd85550aedd5fa8e8e | 6adf334dd2a074686447e15898ed3fff793aab48 | /03_Fast_and_Slow_Pointers/08_circular_array_loop_exists.py | a679195ddcea8fbbc7f8af0248a3d958cd5cb1c4 | [] | no_license | satyapatibandla/Patterns-for-Coding-Interviews | 29ac1a15d5505293b83a8fb4acf12080851fe8d6 | b3eb2ac82fd640ecbdf3654a91a57a013be1806f | refs/heads/main | 2023-05-07T07:56:01.824272 | 2021-06-01T04:02:50 | 2021-06-01T04:02:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,136 | py | # Time O(N) | Space O(1)
def circular_array_loop_exists(nums):
for i in range(len(nums)):
if nums[i] == 0:
continue
direction = nums[i] > 0
slow = fast = i
while True:
slow = get_next_idx(nums, slow, direction)
fast = get_next_idx(nums, get_next_... | [
"shash873@gmail.com"
] | shash873@gmail.com |
8b8498e424f3ba6a5662bd3a5d6401e4d2ca6e12 | 81adc22ee20698506397135b916903936837db3b | /examples/cuda-c++/vector_add.py | e5a70e49b2240c3b90135d9c9c037d7034622217 | [
"Apache-2.0"
] | permissive | KernelTuner/kernel_tuner | 6c25ca551795cc49a7754f2957de4e59aa98578c | b3ff4cdecb12655009b356e3b1840e25b1dd1421 | refs/heads/master | 2023-08-10T00:34:53.984541 | 2023-06-01T16:31:47 | 2023-06-01T16:31:47 | 54,894,320 | 59 | 6 | Apache-2.0 | 2023-09-08T19:28:24 | 2016-03-28T13:32:17 | Python | UTF-8 | Python | false | false | 904 | py | #!/usr/bin/env python
"""This is the minimal example from the README converted to C++11"""
import json
import numpy
from kernel_tuner import tune_kernel
def tune():
kernel_string = """
template<typename T>
__global__ void vector_add(T *c, T *a, T *b, int n) {
auto i = blockIdx.x * block_size_x + threadIdx.x;... | [
"b.vanwerkhoven@esciencecenter.nl"
] | b.vanwerkhoven@esciencecenter.nl |
9316183ffc05549b868b860274aaaebaf7e4fa7d | cfe18377cf7823658f38a9ffd832a2026004fc98 | /swav/vissl/vissl/models/model_helpers.py | bb4445a792adc7257124b8c269a177e1489c0275 | [
"CC-BY-NC-4.0",
"Apache-2.0"
] | permissive | yhn112/DeDLOC | ec26d28a0bfcdb4fc33db730e87f669adc8568ee | 0dc65b6eed8b3f842303fe00601335b3b9e2d7c5 | refs/heads/main | 2023-07-14T06:04:03.676662 | 2021-07-15T11:10:32 | 2021-07-15T11:10:32 | 379,111,549 | 0 | 0 | Apache-2.0 | 2021-06-22T01:50:47 | 2021-06-22T01:50:46 | null | UTF-8 | Python | false | false | 19,952 | py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import logging
import math
import warnings
from enum import Enum
from typing import Dict, List, Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.utils import _ntuple
from torch.utils.checkpoint import ... | [
"mryabinin0@gmail.com"
] | mryabinin0@gmail.com |
6496385a65adfdf5d6dd2990cf9ca6dc390ce0a4 | e3ec5f1898ae491fa0afcdcc154fb306fd694f83 | /src/components/opPicker/onFilterTextEvent.py | 4e4fb7d55e5df26b7e2595dd237d87b347bae0e8 | [
"CC-BY-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | phoebezhung/raytk | 42397559a76a9ba39308ac03344b4446f64ea04d | b91483ce88b2956d7b23717b11e223d332ca8395 | refs/heads/master | 2023-08-27T05:20:38.062360 | 2021-10-21T04:33:18 | 2021-10-21T04:33:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | py | # noinspection PyUnreachableCode
if False:
# noinspection PyUnresolvedReferences
from _stubs import *
from .opPicker import OpPicker
ext.opPicker = OpPicker(COMP())
def onValueChange(panelValue: 'PanelValue', prev):
ext.opPicker.setFilterText(panelValue.val)
| [
"tekt@immerse.studio"
] | tekt@immerse.studio |
5d7ecd12aac912be773a379df1d6f109317b84c0 | de392462a549be77e5b3372fbd9ea6d7556f0282 | /operations_9001/migrations/0011_auto_20200806_1350.py | 5305a4a2d7c547e06c938388a8dbfece7f2c931d | [] | no_license | amutebe/AMMS_General | 2830770b276e995eca97e37f50a7c51f482b2405 | 57b9b85ea2bdd272b44c59f222da8202d3173382 | refs/heads/main | 2023-07-17T02:06:36.862081 | 2021-08-28T19:07:17 | 2021-08-28T19:07:17 | 400,064,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,147 | py | # Generated by Django 3.0.2 on 2020-08-06 10:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('operations_9001', '0010_auto_20200806_1252'),
]
operations = [
migrations.AlterField(
model_name='maintenance',
name... | [
"mutebe2@gmail.com"
] | mutebe2@gmail.com |
01f324c6bcbb1c9a274932a8fafb8cbc266973f2 | e384f5467d8bcfd70845997bcbd68d950e874a61 | /example/python/mesh/mesh_007_cube_color_per_triangle_Tex1D/cube.py | f445866308c763ea6d3dbaf04fc7e72b93a6e0b5 | [] | no_license | Rabbid76/graphics-snippets | ee642f1ed9ceafc6d320e467d3a084d2446d22c2 | fa187afeabb9630bc1d988304fb5787e95a91385 | refs/heads/master | 2023-08-04T04:32:06.884318 | 2023-07-21T09:15:43 | 2023-07-21T09:15:43 | 109,126,544 | 177 | 12 | null | 2023-04-11T20:05:52 | 2017-11-01T12:05:56 | C++ | UTF-8 | Python | false | false | 3,947 | py | import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir))
os.chdir(os.path.dirname(os.path.abspath(__file__)))
import numpy
# PyOpenGL import
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
# MyLibOGL import
from MyLibOGL.math im... | [
"Gernot.Steinegger@gmail.com"
] | Gernot.Steinegger@gmail.com |
a75c23d732db2e10115e15e929fd78eef4a1c8ab | 26c02b95916f8766a3c0c10d8c8552982b110332 | /auto_process_ngs/qc/utils.py | 7617de2f9d99aca028b7d5f4084464114a5818bf | [
"AFL-3.0",
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1"
] | permissive | fls-bioinformatics-core/auto_process_ngs | 410a4226375b76ede239b9564527199a8fdc734a | d3da61b858560d87ff070c34d906ec12717bd81d | refs/heads/devel | 2023-08-17T11:59:09.603274 | 2023-08-11T11:47:57 | 2023-08-11T11:47:57 | 40,700,431 | 8 | 7 | NOASSERTION | 2023-08-24T10:12:47 | 2015-08-14T06:53:01 | Python | UTF-8 | Python | false | false | 19,605 | py | #!/usr/bin/env python
#
# utils: utility classes and functions for QC
# Copyright (C) University of Manchester 2018-2022 Peter Briggs
#
"""
Provides utility classes and functions for analysis project QC.
Provides the following functions:
- verify_qc: verify the QC run for a project
- report_qc: generate repor... | [
"peter.briggs@manchester.ac.uk"
] | peter.briggs@manchester.ac.uk |
cb3b99330dec69408592872eba11b0a5f54912fe | e82d49a32b843d02019fe770824d10bbdfc16c1b | /Misc/args.py | 219c767f303ffbf718eb0d407394684e9b33f549 | [] | no_license | deesaw/PythonD-005 | 142bfdfd6515aa4d570509cab5e6b6008ccae999 | 65b7423b5251b12d06cd64a5135dd0afabde60a1 | refs/heads/master | 2023-03-10T02:51:05.967446 | 2021-03-02T14:09:33 | 2021-03-02T14:09:33 | 343,795,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | #This program adds two numbers given on the command line.
#At the OS command prompt call this program as follows
#args.py 3 4
#It should return 7
########################################
import sys
print ("You have entered ",len(sys.argv)-1," arguments")
print (sys.argv[0])
sum=0
for x in sys.argv[1:]:
sum=sum+int(x)
... | [
"69420960+deesaw@users.noreply.github.com"
] | 69420960+deesaw@users.noreply.github.com |
598e7e1951f92af159f2e76bc02bd394360df3cd | be0a3aa7b83b87c5d2c257b538545bdded39c051 | /Chatbot_Web/impl/view/sp_view.py | 48c5784591afdbd8ef823393a0b3a239e1eeeb6b | [
"Apache-2.0"
] | permissive | water123li/Chatbot_CN | 480e3bc6d6c0d8b6b0823452556acef14df1c2c3 | e63808030c6cc516020075cdcd0c332120a998fc | refs/heads/master | 2022-01-25T10:34:34.726243 | 2019-06-13T10:44:44 | 2019-06-13T10:44:44 | 192,504,292 | 1 | 0 | Apache-2.0 | 2019-06-18T09:01:55 | 2019-06-18T09:01:55 | null | UTF-8 | Python | false | false | 557 | py | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: sp_view.py
Description : 语义分析视图跳转
Author : charl
date: 2018/11/2
-------------------------------------------------
Change Activity: 2018/11/2:
-------------------------------------------------
"... | [
"charlesxu86@163.com"
] | charlesxu86@163.com |
0719c05250e74207d69b6469b6281bd629a2d5d8 | 8f1996c1b5a0211474c7fa287be7dc20a517f5f0 | /hail/python/hail/vds/combiner/__init__.py | 66f14a1f2905d37375d28189b406329ce94c335f | [
"MIT"
] | permissive | johnc1231/hail | 9568d6effe05e68dcc7bf398cb32df11bec061be | 3dcaa0e31c297e8452ebfcbeda5db859cd3f6dc7 | refs/heads/main | 2022-04-27T10:51:09.554544 | 2022-02-08T20:05:49 | 2022-02-08T20:05:49 | 78,463,138 | 0 | 0 | MIT | 2022-03-01T15:55:25 | 2017-01-09T19:52:45 | Python | UTF-8 | Python | false | false | 238 | py | from .combine import transform_gvcf, combine_variant_datasets
from .variant_dataset_combiner import new_combiner, load_combiner
__all__ = [
'combine_variant_datasets',
'transform_gvcf',
'new_combiner',
'load_combiner',
]
| [
"noreply@github.com"
] | johnc1231.noreply@github.com |
e76ae7afc9085bd4469750939c331cf04a22eae6 | 61ff94d2987b3bc95f82c5a58897f50d1efa1db8 | /hive/db/adapter.py | 88c60225e4070ae7cd7f3e645bf073894c30e7e3 | [
"MIT"
] | permissive | arpwv/hivemind | ee77c9805731fda2bb95e1127a56152fe53b707a | a87e5578f9020be02c867021a8acdfff41f06777 | refs/heads/master | 2021-01-24T03:43:46.507207 | 2018-02-23T22:18:56 | 2018-02-23T22:18:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,292 | py | import logging
import collections
from funcy.seqs import first
import sqlalchemy
from sqlalchemy import text
from hive.conf import Conf
from hive.db.query_stats import QueryStats
logger = logging.getLogger(__name__)
class Db:
_instance = None
@classmethod
def instance(cls):
if not cls._instance:... | [
"roadscape@users.noreply.github.com"
] | roadscape@users.noreply.github.com |
1dad10d4f022b45a885361c1ef7cad694f8b1ae6 | 4099891546014e49b74f28987d26f93e77559471 | /app/models.py | 2b60aa9f5ce76532d09b9a3ed3443348f9d2b2da | [
"MIT"
] | permissive | leezichanga/Newshighlights | 519ecac73341adcf90b364024d335fe3574a12c6 | abaca8891fe0d62e624e8c83ca4ba65f5ad6fe0f | refs/heads/master | 2020-03-08T21:12:27.616700 | 2018-04-10T13:24:19 | 2018-04-10T13:24:19 | 128,401,925 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | class Source:
'''
News class to define news objects
'''
def __init__(self,id,name,description,url,category,language,country):
self.id = id
self.name = name
self.description = description
self.url = url
self.category = category
self.language = language
... | [
"elizabbethichanga@yahoo.com"
] | elizabbethichanga@yahoo.com |
3b876b254779a8a51c619573dd173dba1daf235b | fcf870abec4a3fe936668ed14afcded9c10e4aa3 | /featureselection/CHI2.py | 3dbd1809a6a48214769cfd116f2e38f093ac09ef | [] | no_license | sirpan/iLearn | f8d81523720245cc1ab8368aeb609511fc93af5a | 507aae17d9fea3d74a7c77984f1f1750eb734f53 | refs/heads/master | 2023-03-22T06:55:48.791894 | 2021-03-17T07:23:15 | 2021-03-17T07:23:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,092 | py | #!/usr/bin/env python
# _*_coding:utf-8_*_
import numpy as np
import pandas as pd
binBox = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
def CHI2(encodings, labels):
features = encodings[0][1:]
encodings = np.array(encodings)[1:]
data = encodings[:, 1:]
shape = data.shape
data = np.reshape(data, shape[0] * sh... | [
"noreply@github.com"
] | sirpan.noreply@github.com |
8f611b94b68f4bdb69f9435b97e40be3767a17b3 | dcd3f61b47de7cc3e27be76c54c38de1d1fb4261 | /leap_year.py | 1bbe42a169cec9b725a81d7b699fd257a872cf28 | [] | no_license | Somi-Singh/if-else | 853b06b8f64ba1ac4ae879783cd749a5081aac34 | 05422c0a508b377a01f2851899c204ff350099d2 | refs/heads/main | 2023-06-08T12:37:55.160487 | 2021-07-01T09:34:36 | 2021-07-01T09:34:36 | 381,979,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 103 | py | user=int(input("enter the year"))
if user%4==0:
print("leap year")
else:
print("leap year nhi") | [
"noreply@github.com"
] | Somi-Singh.noreply@github.com |
c72949e7eb1456018af8dbaec4339fb7adc37b26 | 0a3322707e58aae8abe27c92f63164f53dc6a4ac | /ecogdata/expconfig/exp_descr/__init__.py | 1a21126ca584798ebde2f8ce3a0579e69b67891e | [
"BSD-3-Clause"
] | permissive | miketrumpis/ecogdata | 740f9a61cad7c3fea380ac3670f2b513cfd407f8 | 2b6af886ae1dfbcd0640661138a3ed2f927fba57 | refs/heads/master | 2022-11-05T06:27:22.497965 | 2022-10-13T21:31:52 | 2022-10-13T21:31:52 | 133,874,922 | 0 | 0 | BSD-3-Clause | 2021-11-03T21:58:04 | 2018-05-17T22:32:17 | Python | UTF-8 | Python | false | false | 97 | py | from .base_exp import *
from .audio_exp import *
from .expo_exp import *
from .builders import *
| [
"mtrumpis@gmail.com"
] | mtrumpis@gmail.com |
7b77ba86eb35c3ed786fe7a7e707898bd1163f50 | 45e49a395fe58783cdc662ba6cf3805ef499190e | /raiden/tests/unit/test_notifyingqueue.py | 24caa4ff4e423841f70bbc59687e829245155fe6 | [
"MIT"
] | permissive | mat7ias/raiden | 862708d7e2f1f84ade6623c626daf3578a948c10 | 7463479ffde4f48577b74421f3c47a097e95a36f | refs/heads/master | 2020-03-28T06:17:30.899834 | 2018-09-07T10:24:37 | 2018-09-07T11:44:18 | 146,172,440 | 0 | 0 | MIT | 2018-08-26T10:50:17 | 2018-08-26T10:50:17 | null | UTF-8 | Python | false | false | 925 | py | import gevent
from gevent.event import Event
from raiden.utils.notifying_queue import NotifyingQueue
from raiden.network.transport.udp.udp_utils import event_first_of
def add_element_to_queue(queue, element):
queue.put(element)
def test_copy():
queue = NotifyingQueue()
assert queue.copy() == []
qu... | [
"lefteris@refu.co"
] | lefteris@refu.co |
ebb258466ca8a94b44c533eca60e68a2ab3edd10 | 2347a00aa41c023924de6bc4ffe0e8bc244a0f3f | /application_form/migrations/0030_auto_20150908_1132.py | 937d76c617b12ba3080d51e9f999a4d0ef15307c | [] | no_license | Dean-Christian-Armada/prod-people | 2ac20d16aecb0cf1ae50a08e456060eee270b518 | fb8d99394d78bbf4d1831223fce2d7ac4a04f34d | refs/heads/master | 2021-01-01T16:19:36.904967 | 2016-01-26T09:20:36 | 2016-01-26T09:20:36 | 42,503,579 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('application_form', '0029_applicationformflagdocuments'),
]
operations = [
migrations.AlterField(
model_name='app... | [
"deanarmada@gmail.com"
] | deanarmada@gmail.com |
0458b01249ba1787f2bee6dbad3d2c2a9e97c9d8 | 32eeb97dff5b1bf18cf5be2926b70bb322e5c1bd | /benchmark/smsdroid/testcase/firstcases/testcase2_012.py | 700a6ce30d93469cae97356efa5d69b55ac3671f | [] | no_license | Prefest2018/Prefest | c374d0441d714fb90fca40226fe2875b41cf37fc | ac236987512889e822ea6686c5d2e5b66b295648 | refs/heads/master | 2021-12-09T19:36:24.554864 | 2021-12-06T12:46:14 | 2021-12-06T12:46:14 | 173,225,161 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,924 | py | #coding=utf-8
import os
import subprocess
import time
import traceback
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, WebDriverException
desired_caps = {
'platformName' : 'Android',
'deviceName' : 'Android Emulat... | [
"prefest2018@gmail.com"
] | prefest2018@gmail.com |
c39e5331ecbec1272a0f70f65618ae44e1ef8ff4 | 86c5360e5a98088c76bbbcf93e3180b825744708 | /yolo_v3/video_test.py | 31082b2b1f160853466a29120a891091b9470756 | [] | no_license | FenHua/yolo | 586b154f77f6855c2b8f731f101c92dd07840b39 | 6da4aa7c2ad2656182b6694b44d3c8e7cd6f3aa8 | refs/heads/master | 2020-04-26T11:37:37.092504 | 2019-03-03T02:51:23 | 2019-03-03T02:51:23 | 173,523,090 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,823 | py | # coding: utf-8
from __future__ import division, print_function
import tensorflow as tf
import numpy as np
import argparse
import cv2
import time
from utils.misc_utils import parse_anchors, read_class_names
from utils.nms_utils import gpu_nms
from utils.plot_utils import get_color_table, plot_one_box
from model imp... | [
"1556711031@qq.com"
] | 1556711031@qq.com |
6f539cd8fba94c719c7cdbc20951e989a1caeba5 | 279a141a3d4451b53f24bd369d80ac471da6fd95 | /helloworld.py | fac8390bc075e79093fe9d45c734a6dca7cea8bc | [] | no_license | emilyjennings/python-practice | 4f010878263174487ab9ed5ae8c30c3b9ae2e1ca | b98b9ed354999fe3d2286bdd27e83ffd43807f20 | refs/heads/master | 2020-05-24T23:31:43.645103 | 2019-05-20T21:33:45 | 2019-05-20T21:33:45 | 187,516,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | #My first python code - in a while, anyway
print("Hello World")
if 5 > 2:
print("good work")
x = "me"
y = 10
print(x)
print(y)
# Codewars
def xo(s):
array = s.split()
xs = 0
os = 0
x = "x"
o = "o"
for item in array:
if item == o:
os += 1
elif item == x:
... | [
"github email address"
] | github email address |
f7ff1126916a332306e7385b85ada97ec2c7f820 | e32ee307e4c59cc18f9dea18d797784a1b23148f | /Quinton-t a single line, the minimum subarray sum..py | f1c7da01a7b41f0859e383b1d01ebc66770c9e60 | [] | no_license | GuhanSGCIT/SGCIT | f4ab44346186d45129c74cbad466c6614f9f0f08 | 8b2e5ccf693384aa22aa9d57f39b63e4659f6261 | refs/heads/master | 2020-07-11T05:47:54.033120 | 2020-07-07T05:02:41 | 2020-07-07T05:02:41 | 204,459,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | n = int(input())
l = [int(x) for x in input().split()]
lst = []
for i in range(n):
for j in range(i, n):
lst.append(l[i:j+1])
sm = sum(lst[0])
for i in range(1, len(lst)):
if sm > sum(lst[i]): sm = sum(lst[i])
print(sm)
| [
"noreply@github.com"
] | GuhanSGCIT.noreply@github.com |
874d3a461033beb96e17976e837e5e249cbfeb4b | 935672cfefee4a8fe861f3247a6e27b7d1d0669a | /hoer/models/cifar/rezero/preactresnet.py | f79f59dd0a14b959453c3f9f64789b35d6ffefdf | [] | no_license | sbl1996/hoer | 533b10f047a4175a95f8a7cb94430002aef9a39d | 8ced31d49ebe627eb0932f896484a8b2b2c223ce | refs/heads/main | 2023-02-02T00:43:42.716916 | 2020-12-13T08:14:12 | 2020-12-13T08:14:12 | 321,008,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,583 | py | import tensorflow as tf
from tensorflow.keras import Sequential, Model
from tensorflow.keras.initializers import Constant
from tensorflow.keras.layers import Layer
from hanser.models.layers import Act, Conv2d, Norm, GlobalAvgPool, Linear, Identity
class PreActResBlock(Layer):
def __init__(self, in_channels, out_... | [
"sbl1996@126.com"
] | sbl1996@126.com |
1c56c4804e9cce72cdbf8787317d9f8f9609f5de | f445450ac693b466ca20b42f1ac82071d32dd991 | /generated_tempdir_2019_09_15_163300/generated_part003278.py | 27bfeab472a10b41ed9fe95e81801cbb8866f1db | [] | no_license | Upabjojr/rubi_generated | 76e43cbafe70b4e1516fb761cabd9e5257691374 | cd35e9e51722b04fb159ada3d5811d62a423e429 | refs/heads/master | 2020-07-25T17:26:19.227918 | 2019-09-15T15:41:48 | 2019-09-15T15:41:48 | 208,357,412 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,655 | py | from sympy.abc import *
from matchpy.matching.many_to_one import CommutativeMatcher
from matchpy import *
from matchpy.utils import VariableWithCount
from collections import deque
from multiset import Multiset
from sympy.integrals.rubi.constraints import *
from sympy.integrals.rubi.utility_function import *
from sympy.... | [
"franz.bonazzi@gmail.com"
] | franz.bonazzi@gmail.com |
8367a3278f4af2f004b3b831acb7ec551b603b1f | 053ad96d19c562c44e3fad53db37b24f4ec7134d | /torchelastic/tsm/driver/test/standalone_session_test.py | 5e48f14e4a023c1330e6c9a25758fa33a742de50 | [
"BSD-3-Clause"
] | permissive | kuikuikuizzZ/elastic | 7ef0ab7b1a4a3510e91eeb6b91b6f94f863940c2 | cf2fb9c153cc371e6d6b341f15122c26965b7461 | refs/heads/master | 2022-12-31T20:11:38.957121 | 2020-09-23T18:38:11 | 2020-09-23T18:39:31 | 298,498,639 | 0 | 0 | BSD-3-Clause | 2020-09-25T07:20:59 | 2020-09-25T07:20:58 | null | UTF-8 | Python | false | false | 6,924 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import os
import shutil
import tempfile
import unittest
from unittest.mock import MagicMoc... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
48f6aa788d0e6b6bd8bc7a621ccc3b855d38bbdc | 31ba27461d50fcd85027318eacefa04d828feb4b | /addons/app-trobz-hr/it_equipment_bonus/security/post_object_security.py | 1075bbfb89ee07b0ebcb2d990bff159c5f43d26d | [] | no_license | TinPlusIT05/tms | 5f258cec903d5bf43c26b93fc112fce0b32de828 | 673dd0f2a7c0b69a984342b20f55164a97a00529 | refs/heads/master | 2022-12-04T02:11:54.770745 | 2019-09-23T07:18:11 | 2019-09-23T07:18:11 | 210,278,672 | 0 | 0 | null | 2022-11-22T00:30:37 | 2019-09-23T06:18:48 | Python | UTF-8 | Python | false | false | 1,091 | py | # -*- encoding: utf-8 -*-
from openerp import models, api
group_user = 'Human Resources / Employee'
group_hr_manager = 'Human Resources / Manager'
class it_equipment_bonus_post_object_security(models.TransientModel):
_name = "it.equipment.bonus.post.object.security"
@api.model
def start(self):
... | [
"Tinplusit05@gmail.com"
] | Tinplusit05@gmail.com |
432097dea145bd35db9bfcab0f20d4ad2f970c45 | fc8137f6a4df69640657a0af5d7201de3c6eb261 | /accepted/Valid Palindrome.py | e791233777023d30d7f38d6a0df11bc4c02b9fd2 | [] | no_license | hustlrr/leetcode | 68df72b49ee3bbb9f0755028e024cc9fea2c21aa | 56e33dff3918e371f14d6f7ef03f8951056cc273 | refs/heads/master | 2020-04-12T08:14:25.371761 | 2017-01-01T12:19:34 | 2017-01-01T12:19:34 | 77,119,341 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | # coding=utf-8
class Solution(object):
def isPalindrome(self, s):
"""
:type s: str
:rtype: bool
"""
leftcnt,rightcnt=0,0
leftidx,rightidx=0,len(s)-1
s=s.lower()
while leftidx<rightidx:
while not s[leftidx].isalnum() and leftidx<rightidx:
... | [
"823729390@qq.com"
] | 823729390@qq.com |
c01a223e3df44056ff29c6a04a6b554b73afe3f5 | 89c6895a0d71d4ce1fa6ca9e415649625ba2d1c6 | /babybuddy/__init__.py | a0ff099532963b2e40c164385a3203065ae80f3e | [
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | bry-c/babybuddy | 18f72a3f6480abaafe34250bf82828567fe05a23 | 49156c1d80568a8c052a6788af9a63ea658b7452 | refs/heads/master | 2020-12-20T18:24:29.053433 | 2020-01-25T05:24:43 | 2020-01-25T05:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,979 | py | """
.----------------.
| .--------------. |
| | ______ | |
| | |_ _ \ | |
| | | |_) | | |
| | | __'. | |
... | [
"chris@chrxs.net"
] | chris@chrxs.net |
66ee5476b811b7932d971e889a6b0e8fa585e838 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /jozLzME3YptxydiQm_24.py | 8b1f7fcb54f2b79c2a1a818e7a9f5e7adc43b9b8 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 784 | py | """
Create a function that takes in a word and determines whether or not it is
plural. A plural word is one that ends in "s".
### Examples
is_plural("changes") ➞ True
is_plural("change") ➞ False
is_plural("dudes") ➞ True
is_plural("magic") ➞ False
### Notes
* Don't forget to `ret... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
1c847a515d2da1b0eab37823f7addbb578edaf55 | 0359f840efdaa2849594dd1f498cb1533a61b17e | /pretrain_visual.py | 521ad2edcdd8c9444b49c590e519ca2cdcb7e9f6 | [] | no_license | qiuchili/MMSentiReader | e21026b2a8333c921dbaa29933069c6444117bd4 | ecda45099159d47cb488961d4b5ed7b8f6b494cd | refs/heads/master | 2023-02-04T12:44:06.330910 | 2020-12-26T03:41:46 | 2020-12-26T03:41:46 | 281,270,212 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,401 | py | # -*- coding: utf-8 -*-
import torch.nn as nn
import pickle
import os
import numpy as np
import torch.nn.functional as F
import cv2
import torch
import time
from tqdm import tqdm
from torch.utils.data import DataLoader, TensorDataset,random_split
from torch.utils.data import Dataset
from torch.nn.utils.rnn import pad_s... | [
"qiuchi.li@studenti.unipd.it"
] | qiuchi.li@studenti.unipd.it |
2fa0f6f2d17f04b73bcf80ec13cb4906693bb7f3 | a56623649791b945ae07d407533511902b67ebad | /src/installer/src/tortuga/db/dbManager.py | 1f81e2d146ecdf6855c4d2f51897b0247a325ef2 | [
"Apache-2.0"
] | permissive | joedborg/tortuga | 9792bc0ff1a9d7fa335ac41df9324dc502b80e0b | 5690e41c0c78602c195f699bf314c6c94ca7b619 | refs/heads/master | 2021-04-26T22:56:05.646538 | 2018-11-14T16:33:00 | 2018-11-14T16:33:00 | 123,898,555 | 0 | 0 | null | 2018-03-05T09:48:11 | 2018-03-05T09:48:11 | null | UTF-8 | Python | false | false | 7,768 | py | # Copyright 2008-2018 Univa Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | [
"mfrisch@univa.com"
] | mfrisch@univa.com |
ab958f2bbc272631ae086eaa0bf5cfab4ad7ed6b | 747755833862b8e9d0f58ebc62879d6ef47c23c8 | /python-master (5)/python-master/test/tree.py | 2b41e05f60a4593aa20574d59fedcd8f65037cf4 | [] | no_license | tangsong41/stu_py | 98a06730dbca6e158cf81c18d98fe1317c1ae512 | d41507cd8dd9e8a54084872dfa15c36da443c02b | refs/heads/master | 2022-12-11T23:53:57.530946 | 2019-01-15T18:29:19 | 2019-01-15T18:29:19 | 163,953,100 | 3 | 0 | null | 2022-12-07T23:24:01 | 2019-01-03T09:41:29 | Jupyter Notebook | UTF-8 | Python | false | false | 2,287 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: tree.py
@time: 2017/5/22 下午6:57
"""
import json
from collections import defaultdict
def tree():
"""
定义一棵树
python 字典的特性,赋值操作必须事先声明,所以这里使用 collections 很方便的为字典设置初始值
:return:
"""
return defaultdict(tree)
de... | [
"369223985@qq.com"
] | 369223985@qq.com |
2660bada0256d0536dc0fda5e7fc399b226a73b2 | f360c6fe06fb9859039a5d39fad5815fd4aff372 | /community/community/urls.py | 12350ffdfa3f3e2714b7b85462baef166ec94221 | [] | no_license | gwjczwy/Django-CMS | d6297055957548997e86d383d54ae051062c8854 | f1a00d637c65809d606df3d4b96bcc594af09bd8 | refs/heads/master | 2020-04-24T21:57:44.818864 | 2019-03-03T08:41:50 | 2019-03-03T08:41:50 | 172,295,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 871 | py | """community URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | [
"zwy053@163.com"
] | zwy053@163.com |
a83ace36cf0328a163b1d22f951b524039dc30db | db1b327c4913c453b2fdd9dda661938c4abc5c0e | /abc/89/C.py | 1dad6e66a1695248dab6a8d662bbaa2d771d8383 | [] | no_license | oamam/atcoder | 0c129aab72e3c7090c9799fdf52f6e8119ef5238 | 658054b69b7586eed896484535dcfa1fef498e43 | refs/heads/master | 2021-06-26T09:01:12.389266 | 2020-10-30T02:01:11 | 2020-10-30T02:01:11 | 165,225,322 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 323 | py | import itertools
def main():
N = int(input())
d = {'M': 0, 'A': 0, 'R': 0, 'C': 0, 'H': 0}
for _ in range(N):
S = input()
if S[0] in d:
d[S[0]] += 1
ans = 0
for a, b, c in list(itertools.combinations(d.keys(), 3)):
ans += d[a] * d[b] * d[c]
print(ans)
main... | [
"chapa0106@gmail.com"
] | chapa0106@gmail.com |
a2921655da4108ff25537002abd8ac828267b205 | 461bb1cd322c381be77cafdd2deb78223abfe79b | /tests/test_config_locator.py | 82611972aa5315bb85e8d38d511aa66e7c601536 | [
"MIT"
] | permissive | ryankanno/py-configurator | 7a3b205cae2d424b4671c1154ba97d5afa8809a6 | 749a4dc329d23d976712d241da13c1d942ad3d01 | refs/heads/master | 2020-06-02T10:38:51.554795 | 2015-03-16T22:45:56 | 2015-03-16T22:45:56 | 17,777,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,435 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from nose.tools import eq_
from nose.tools import ok_
import os
from py_configurator import Locator
import unittest
class TestLocator(unittest.TestCase):
def test_locator_construction(self):
config_name = 'foo.bar'
local_dir = './'
system_dir... | [
"ryankanno@localkinegrinds.com"
] | ryankanno@localkinegrinds.com |
bdffbc8830f8b59e9e1ff61aa4da2822cdd77638 | a1c5e68d93cd7d7a5620c34c0567b006fa33cd38 | /.eggs/PyScaffold-3.0.3-py3.6.egg/pyscaffold/extensions/travis.py | 3d97d584f36aa204824901ac55d8ded1f6778621 | [
"MIT"
] | permissive | csm-adapt/citrine_converters | 4f4e3e57379460f0e1205bf643e6251b36ade772 | 32eef5f5e733e7ab9031b2f129bb23b90cedc6bf | refs/heads/master | 2021-01-21T19:13:50.156881 | 2020-01-05T05:48:07 | 2020-01-05T05:48:07 | 92,125,603 | 0 | 2 | BSD-2-Clause | 2018-08-13T22:39:56 | 2017-05-23T03:36:09 | Python | UTF-8 | Python | false | false | 1,367 | py | # -*- coding: utf-8 -*-
"""
Extension that generates configuration and script files for Travis CI.
"""
from __future__ import absolute_import
from ..templates import travis, travis_install
from ..api import Extension
from ..api import helpers
class Travis(Extension):
"""Generate Travis CI configuration files"""
... | [
"bkappes@mines.edu"
] | bkappes@mines.edu |
d8bdb2f6559ca6362e0ef57c900953ab34883af0 | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/ThirteenTeV/GluGluSpin0/GluGluSpin0ToZGamma_ZToLL_W_0p014_M_750_TuneCUEP8M1_13TeV_pythia8_cfi.py | f60fb1b53fc8fc0548de2a77ed013835f321393b | [] | no_license | cms-sw/genproductions | f308ffaf3586c19b29853db40e6d662e937940ff | dd3d3a3826343d4f75ec36b4662b6e9ff1f270f4 | refs/heads/master | 2023-08-30T17:26:02.581596 | 2023-08-29T14:53:43 | 2023-08-29T14:53:43 | 11,424,867 | 69 | 987 | null | 2023-09-14T12:41:28 | 2013-07-15T14:18:33 | Python | UTF-8 | Python | false | false | 1,393 | py |
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
comEnergy = cms.double(13000.0),
crossSection = cms.untracked.double(1.095e-3),... | [
"sheffield@physics.rutgers.edu"
] | sheffield@physics.rutgers.edu |
4a2a7043ddff842f7ad9b18905ebc72ba0379d26 | 9975b2681a079b46d901b994d2bb50609d62791a | /StringSplitAndJoin.py | 5a97e7a31950412b8579f1742aeb40604a4a44f8 | [] | no_license | elvinyeka/Hakker_Rank | 1b0d4aae7a6f4c9ac08f8948be4e5740950057c9 | ab8c42a3e373d4e4460a6c261b77bde65cf56bfb | refs/heads/master | 2022-12-17T00:32:41.279518 | 2020-09-14T12:09:31 | 2020-09-14T12:09:31 | 294,422,920 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | def split_and_join(line):
result = ""
for i in line:
if i == " ":
result += "-"
else:
result += i
return result
if __name__ == '__main__':
line = input()
result = split_and_join(line)
print(result)
# https://www.hackerrank.com/challenges/python-string-... | [
"elvinyeka@gmail.com"
] | elvinyeka@gmail.com |
a1e65e5164610be033d72ac8d03ab0a25093dbfa | 3851d5eafcc5fd240a06a7d95a925518412cafa0 | /Django_Code/gs129/gs129/asgi.py | eba9818d2ad8b07e93af3c77180c5cc2d4df5d63 | [] | no_license | Ikshansaleem/DjangoandRest | c0fafaecde13570ffd1d5f08019e04e1212cc2f3 | 0ccc620ca609b4ab99a9efa650b5893ba65de3c5 | refs/heads/master | 2023-01-31T04:37:57.746016 | 2020-12-10T06:27:24 | 2020-12-10T06:27:24 | 320,180,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | """
ASGI config for gs129 project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('D... | [
"ikshan3108@gmail.com"
] | ikshan3108@gmail.com |
e46bc6e3189a1504a348b21db1fec3ed510eeda1 | ab1d659a36a7af22bd65b8a91f5059cc24eb7a01 | /bigfish_functions/Lowest.py | a19bab32e7d4762357a0df46ccca153cec09d610 | [] | no_license | xingetouzi/Bigfish | e1afc23c59dc139418678611bf44d00e2e67a09d | 7b18192149f0e2c42c8491f9bc7ea5dede11398b | refs/heads/master | 2021-01-21T04:55:34.255633 | 2016-06-06T03:18:15 | 2016-06-06T03:18:15 | 48,084,560 | 4 | 3 | null | 2016-06-06T03:18:15 | 2015-12-16T03:18:38 | Python | UTF-8 | Python | false | false | 730 | py | # -*- coding:utf-8 -*-
# 计算一组时间序列数据(如开盘价、收盘价、最高价、最低价、收益率等)的最低值
# 输入参数:
# length 时间长度 int
# price 时间序列数据 序列数组 默认为最低价数据
# offset 位移数(从前多少根bar开始) int 默认为0
# 若当前K线总数不足以支持计算,(BarNum>length+offset时才能支持计算)返回None
def Lowest(length, price=None, offset=0):
if length <= 0:
return None
if price is None:
p... | [
"541795600@qq.com"
] | 541795600@qq.com |
bb38a9043b0745fa075e2646e3f8c1a003e7c6a5 | 50948d4cb10dcb1cc9bc0355918478fb2841322a | /azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/ddos_protection_plan_py3.py | b29926c6d258440a7323c347d31c5c0c172bfb8d | [
"MIT"
] | permissive | xiafu-msft/azure-sdk-for-python | de9cd680b39962702b629a8e94726bb4ab261594 | 4d9560cfd519ee60667f3cc2f5295a58c18625db | refs/heads/master | 2023-08-12T20:36:24.284497 | 2019-05-22T00:55:16 | 2019-05-22T00:55:16 | 187,986,993 | 1 | 0 | MIT | 2020-10-02T01:17:02 | 2019-05-22T07:33:46 | Python | UTF-8 | Python | false | false | 3,110 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
80a431819c1316ffedc32848b1ea33f987e580a9 | ba54ce473e9748f9c85e88142e749efe36e2a858 | /otp/ai/Original_MagicWordManager.py | b4667724caadf42390baafe5433d9cd7ea299046 | [
"BSD-3-Clause"
] | permissive | C0MPU73R/pirates-online-classic | 8256747a464160bd138a09d54b3d5ec6aee930a1 | 2a0b69e2b0d2eb83643f9ff0fbeccca28fdd2e5c | refs/heads/master | 2023-03-24T07:45:41.722943 | 2021-03-21T01:49:10 | 2021-03-21T01:49:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 29,114 | py | # THIS IS DISNEYS MAGICWORDMANAGER.
# DO NOT DELETE.
from pandac.PandaModules import *
from direct.showbase import GarbageReport, ContainerReport, MessengerLeakDetector
from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
from direct.showbase.InputStateGlobal import input... | [
"mlgrainbowluna@gmail.com"
] | mlgrainbowluna@gmail.com |
baa63fd29bd69bce20182d81ba8ea10fc20aeaef | 55c24645dd63a1c41037dcfb9fb45bc7bcdea4be | /venv/lib/python3.7/site-packages/dotenv/__init__.py | d412cb7ab9ae9061a2a73220df6a6d545add030c | [] | no_license | abdullah-nawaz/flask-boilerplate | 7c42801a21ee3e6a647cc8a7d92e0285f8e86cad | 01bc7fe1140e8ec613de4a38546a07ddfbdbd254 | refs/heads/master | 2022-12-02T05:06:08.297759 | 2020-06-24T21:36:32 | 2020-06-24T21:36:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,298 | py | from .compat import IS_TYPE_CHECKING
from .main import load_dotenv, get_key, set_key, unset_key, find_dotenv, dotenv_values
if IS_TYPE_CHECKING:
from typing import Any, Optional
def load_ipython_extension(ipython):
# type: (Any) -> None
from .ipython import load_ipython_extension
load_ipython_extens... | [
"muhammadabdullah@wanclouds.net"
] | muhammadabdullah@wanclouds.net |
3074414644d1dd7e52c820a7a85ceea77e7b7715 | c137d7fb6eaa1c1900a63b8dae6b027176a98b6f | /MxShop/MxShop/settings.py | 9006c19e5c0acd8bbeaca3301b28ae570a00c216 | [] | no_license | LasterSmithKim/vuedjango | 22220414ad2f928f0a0df1a0e68c9083e90c1cc7 | 4a5b7fee4dd3f2d31255d7dc9188ea977a75db29 | refs/heads/master | 2022-12-10T19:52:25.014956 | 2019-12-23T16:23:01 | 2019-12-23T16:23:01 | 225,315,491 | 0 | 0 | null | 2022-11-22T04:52:05 | 2019-12-02T07:47:12 | JavaScript | UTF-8 | Python | false | false | 4,922 | py | """
Django settings for MxShop project.
Generated by 'django-admin startproject' using Django 2.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
imp... | [
"kingone@yeah.net"
] | kingone@yeah.net |
2275f0288c637137c69388bc3029ea244a9b7fb4 | 0b53826167ae4337a92360ef0a8b37f0a30e1aef | /plan_b.py | 2e84b654e6fd23e18e9a743260ff6e065227906e | [] | no_license | nyghtowl/Evergreen_Competition | 712ac2c885e1622e12bce178e868c00aefd6fa2d | 456c6342cab250f61e2c02ee9d1199864342d375 | refs/heads/master | 2021-01-20T00:41:23.141388 | 2014-07-19T21:48:55 | 2014-07-19T21:48:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,678 | py | """
beating the benchmark @StumbleUpon Evergreen Challenge
__author__ : Abhishek Thakur
"""
# -*- coding: utf-8 -*-
import numpy as np
from sklearn import metrics,preprocessing,cross_validation
from sklearn.feature_extraction.text import TfidfVectorizer
import sklearn.linear_model as lm
import pandas as p
loadData =... | [
"warrick.melanie@gmail.com"
] | warrick.melanie@gmail.com |
5af284d0fe6592007bb1978462f2154dfd926980 | 9673935b03b25683b79e2e28a4584ebccd74cda9 | /closed/QCT/code/dlrm/tensorrt/infer.py | ae0dbe685a2d63f1e731a74d0cc78e3da802a9ec | [
"Apache-2.0"
] | permissive | wilderfield/inference_results_v0.7 | 7e737acec72ab0e79cf95a63987184f86c2cb0a2 | d63bb28a2919c79b69460005e686688f3fa033f1 | refs/heads/master | 2023-01-03T03:24:28.608820 | 2020-10-29T18:08:46 | 2020-10-29T18:08:46 | 306,124,077 | 0 | 0 | Apache-2.0 | 2020-10-21T19:15:17 | 2020-10-21T19:15:12 | null | UTF-8 | Python | false | false | 4,431 | py | #! /usr/bin/env python3
# Copyright (c) 2020, NVIDIA CORPORATION. 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
#
# ... | [
"guschmue@microsoft.com"
] | guschmue@microsoft.com |
497cc3f06a4891c34917d8b345fd83fd16cc7af6 | 5d0d3cfac10e144468cc25d948e7994c5f968fd0 | /src/T2D23D.py | 930dfe4b34f879e793ca67eeaa01c43a64b3839b | [
"BSD-3-Clause",
"MIT"
] | permissive | WYGNG/USTC_SSE_Project | 1aff71631fd14dc26a0dd9190b76f97c5367d306 | 1c0cd4056f40445aed13ec1ae584608d625b9127 | refs/heads/master | 2022-12-26T13:53:48.543988 | 2020-09-27T08:02:08 | 2020-09-27T08:02:08 | 298,983,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,229 | py | import numpy as np
import matplotlib.pyplot as plt
import xlrd
import math
from scipy import optimize
# 计算角度,(x1, y1, z1)为顶点
def get_angle1(x1,y1,z1,x2,y2,z2,x3,y3,z3):
a=math.sqrt((x2-x3)**2+(y2-y3)**2+(z2-z3)**2)
b=math.sqrt((x1-x3)**2+(y1-y3)**2+(z1-z3)**2)
c=math.sqrt((x2-x1)**2+(y2-y1)**2+(z2-z1)**2)
... | [
"321699849@qq.com"
] | 321699849@qq.com |
12f5298b94e2213e4c9b120eec42f9982a07c04b | 96328f51c177bd53ca1d89199684af04008b0ba9 | /wiki_graph/util.py | c48945b102b570f0b07df5e5f23f8b6aa844ca7a | [
"MIT"
] | permissive | mvwicky/wiki-graph | b4045bf8200d579e99f9f58e77672d4dfac93c50 | a88e2f37e7d5b5ba93bcca67544746d682936f41 | refs/heads/master | 2020-03-11T16:52:19.213832 | 2018-05-14T16:23:00 | 2018-05-14T16:23:00 | 130,130,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,511 | py | import collections
import itertools
import sys
def rec_sizeof(o, handlers={}, verbose=False):
"""Returns the approximate memory footprint an object and all of its contents.
Automatically finds the contents of the following builtin containers and
their subclasses: tuple, list, deque, dict, set and frozen... | [
"mvanwickle@gmail.com"
] | mvanwickle@gmail.com |
98a07a8d052ae1d745b923459e18cd64001ebadb | d5a576c0b766124bd756922f818226d20867c6ef | /setup.py | a9c0a67377aef18bfcf1a11ca854655ec32fcda9 | [
"CC0-1.0",
"BSD-3-Clause"
] | permissive | fflewddur/python-phash | f6b32d4493858c2e9658d6b843dd816a5dcbfeb5 | 27152fd3c8b7a2cd032a33c25abeb423c582df65 | refs/heads/master | 2021-01-15T18:15:01.264905 | 2014-06-30T03:44:39 | 2014-06-30T03:44:39 | 21,335,530 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
histo... | [
"chris@improbable.org"
] | chris@improbable.org |
946673c401ad39509fd4681ff3e7bc0ff420ce49 | 3eacb8aa1e5e92dc354e61e3140009065257d643 | /tests/test__order.py | 0bb6ab3f4dddaf55af7934eafe1350d07e2e7f4b | [
"BSD-3-Clause"
] | permissive | dask-image/dask-ndfilters | d0db13802185ad719b07752074e57bd8d8dd8529 | 3e947e791e2b3dd3a59de04b9cb70987a75f2446 | refs/heads/master | 2021-01-20T00:45:51.188492 | 2018-08-30T21:59:18 | 2018-08-30T21:59:18 | 89,183,177 | 5 | 2 | BSD-3-Clause | 2018-08-30T21:36:20 | 2017-04-24T00:56:22 | Python | UTF-8 | Python | false | false | 5,669 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import pytest
import numpy as np
import scipy.ndimage.filters as sp_ndf
import dask
import dask.array as da
import dask.array.utils as dau
import dask_ndfilters as da_ndf
assert dask
@pytest.mark.parametrize(
"da_func, ext... | [
"kirkhamj@janelia.hhmi.org"
] | kirkhamj@janelia.hhmi.org |
f8b4ee7a035e6157e5582a93bf49c3a9b6ad803d | f1e11f9e50d061d05d581efa8805ab28b25d7b24 | /climi/pppp/hw_spatial_pattern_check___ | c14cab5e65815e0ec1c3c88f260e677acf70a59b | [
"MIT"
] | permissive | ahheo/climi | bdccb5116046dfbf0aa6e38e7400447e427eeae0 | 2043a23876a9e620d44b2e9dd34d487ee3e0fc4b | refs/heads/main | 2023-07-09T01:24:17.514954 | 2023-07-07T05:13:16 | 2023-07-07T05:13:16 | 302,750,076 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,876 | #!/usr/bin/env python3
from climi.uuuu import *
from climi.pppp import *
import os
import warnings
import matplotlib as mpl
mpl.use('pdf', force=True)
import matplotlib.pyplot as plt
import numpy as np
import iris
_here_ = get_path_(__file__)
sites = dict(
SE = (19, 45),
W1 = (7, 51.5),
W2 = (-1.5, 53... | [
"mapulynn@gmail.com"
] | mapulynn@gmail.com | |
b4a8594c676f389559ad8b7b703c3698c7687ed2 | 7e157b3bffb170ff87e29880611be9b040d61a27 | /purano/annotator/processors/tfidf.py | a941fe233977a850b27bd0b8b8c0de80ed1d253d | [
"Apache-2.0"
] | permissive | IlyaGusev/purano | 8906d5e35e8a4f0f31144d874721d4e9e5f76359 | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | refs/heads/master | 2022-06-21T09:57:45.624005 | 2021-07-27T18:41:37 | 2021-07-27T18:41:37 | 212,185,927 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,588 | py | from typing import List, Optional
import numpy as np
import torch
from purano.annotator.processors import Processor
from purano.models import Document
from purano.proto.info_pb2 import Info as InfoPb
from purano.training.models.tfidf import load_idfs, get_tfidf_vector, SVDEmbedder
@Processor.register("tfidf")
class... | [
"phoenixilya@gmail.com"
] | phoenixilya@gmail.com |
0d339371d555fa7f40da404b5092acbd841c381b | 08cfc4fb5f0d2f11e4e226f12520a17c5160f0a2 | /kubernetes/test/test_v1_namespace_list.py | eecef48f123f70650b3c855d6413abfa52021b87 | [
"Apache-2.0"
] | permissive | ex3cv/client-python | 5c6ee93dff2424828d064b5a2cdbed3f80b74868 | 2c0bed9c4f653472289324914a8f0ad4cbb3a1cb | refs/heads/master | 2021-07-12T13:37:26.049372 | 2017-10-16T20:19:01 | 2017-10-16T20:19:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 953 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | [
"mehdy@google.com"
] | mehdy@google.com |
4fa7a1d1958a21a196156bb7fb162e220b5a4c42 | 157d2a2f4031c58e5504bcbac5348ff53883facc | /rDj63/rDj63/urls.py | c4a78403fddc9db36bfb4f94aefa067e840b972c | [] | no_license | optirg-39/Django_gekSh | d78b635fd3ee88addd084b68ec35c6284adfb55c | 1129a6df35c110dfeeeaaf1a76b2ebc192a5f1ce | refs/heads/master | 2023-04-15T13:09:03.067099 | 2021-04-26T12:15:35 | 2021-04-26T12:15:35 | 352,018,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | """rDj63 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based v... | [
"opti39rg@gmail.com"
] | opti39rg@gmail.com |
ba7c90fd43394d63878f354d584a396087cd06f9 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/R2/benchmark/startPyquil122.py | 3fd855f9728d33e5489e4eb157beb0e6dabf2e1b | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,136 | py | # qubit number=2
# total number=10
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pr... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
270375ee24a54029cec52788cd572a47ddcc8f30 | 0804c9f4d46e15a93a4322808b487eb00c28da95 | /Chapter 10/BPApp/HiTech/engg/routes.py | 0a37098872ecb6b648d051b9c3b2fa6c8071f0b3 | [
"MIT"
] | permissive | bpbpublications/Building-Web-Apps-with-Python-and-Flask | 99b6e9312a41bea1ba6c6c5dce70f958b86ad768 | 4fbbe75fad9629f16ff5bf8bd603aa09dd04f9eb | refs/heads/main | 2023-03-27T05:55:23.170813 | 2021-03-23T10:27:59 | 2021-03-23T10:27:59 | 339,637,598 | 3 | 3 | null | null | null | null | UTF-8 | Python | false | false | 608 | py | from flask import Blueprint, render_template
engg=Blueprint('engg', __name__,template_folder='templates',static_folder='static')
@engg.route('/')
def index():
return render_template('engindex.html')
@engg.route('/courses')
def courses():
return '<h1>list of courses in Enginnering</h1>'
@engg.route('/fac... | [
"41231825+bpbpublications@users.noreply.github.com"
] | 41231825+bpbpublications@users.noreply.github.com |
e62d95154c55d2a4f3766e12e5274d5f6283c5f7 | 213682d70d45739b8a4fd7c0fcf05437a0704c4d | /pipeline/ve/share/radical.pilot/examples/00_getting_started.py | f4a0df0d42b456b1edfef3b2a02e65281648c08e | [] | no_license | ATLAS-Titan/misc | d272adfe13fcbbea1562ca98c718bc1465032421 | 0a20d158d0d9a95ef72b6a8d0bccbb68193e98c0 | refs/heads/master | 2020-12-24T06:31:10.696708 | 2017-07-18T14:55:41 | 2017-07-18T14:55:41 | 73,486,659 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,381 | py | #!/usr/bin/env python
__copyright__ = 'Copyright 2013-2014, http://radical.rutgers.edu'
__license__ = 'MIT'
import os
import sys
import radical.pilot as rp
import radical.utils as ru
# ------------------------------------------------------------------------------
#
# READ the RADICAL-Pilot documentation: http://... | [
"alessio.angius.research@gmail.com"
] | alessio.angius.research@gmail.com |
a6abb9c81b02af705e611a0bfd48a2fb56fa2acd | 3784495ba55d26e22302a803861c4ba197fd82c7 | /venv/lib/python3.6/site-packages/markdown/extensions/toc.py | dc80c7e8ecd3ee4e9f5d7702a9b13082a83e0314 | [
"MIT"
] | permissive | databill86/HyperFoods | cf7c31f5a6eb5c0d0ddb250fd045ca68eb5e0789 | 9267937c8c70fd84017c0f153c241d2686a356dd | refs/heads/master | 2021-01-06T17:08:48.736498 | 2020-02-11T05:02:18 | 2020-02-11T05:02:18 | 241,407,659 | 3 | 0 | MIT | 2020-02-18T16:15:48 | 2020-02-18T16:15:47 | null | UTF-8 | Python | false | false | 13,174 | py | """
Table of Contents Extension for Python-Markdown
===============================================
See <https://Python-Markdown.github.io/extensions/toc>
for documentation.
Oringinal code Copyright 2008 [Jack Miller](https://codezen.org/)
All changes Copyright 2008-2014 The Python Markdown Project
License: [BSD](h... | [
"luis20dr@gmail.com"
] | luis20dr@gmail.com |
644fab70a5b3af9bb5dfa778fe89ab854f219ed8 | 63d3a6255f2677f9d92205d62163b9d22a74c5c7 | /modules/dynadb/migrations/0058_auto_20161124_1741.py | 89a757a370f4bc40d44bddae34790dc82e409e84 | [
"Apache-2.0"
] | permissive | GPCRmd/GPCRmd | 9204f39b1bfbc800b13512b316e05e54ddd8af23 | 47d7a4e71025b70e15a0f752760873249932c54e | refs/heads/main | 2023-09-04T11:13:44.285629 | 2023-08-29T13:43:01 | 2023-08-29T13:43:01 | 260,036,875 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-11-24 16:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dynadb', '0057_auto_20161116_2004'),
]
operations = [
migrations.AlterField(... | [
"adrian.garcia.recio@gmail.com"
] | adrian.garcia.recio@gmail.com |
03c962b553ec91380beb9b3231464bb8fae29bc0 | fccb35b69307ae4848aeee484995100de624dedf | /toolbox/bulk_processing/invalid_address_processor.py | b00f886d424ecf8dbac31af077a0420d5a05d53a | [] | no_license | ONSdigital/census-rm-toolbox | 468d1cb8e901bc8ae87a693495b85080c9d85e9f | 17eeae06f859091805e3fd3d5f8e620500af6741 | refs/heads/master | 2023-08-21T13:23:55.614636 | 2021-05-18T07:44:31 | 2021-05-18T07:44:31 | 207,325,373 | 0 | 1 | null | 2023-07-25T17:05:59 | 2019-09-09T14:12:11 | Python | UTF-8 | Python | false | false | 1,827 | py | import logging
import uuid
from datetime import datetime
from structlog import wrap_logger
from toolbox.bulk_processing.bulk_processor import BulkProcessor
from toolbox.bulk_processing.processor_interface import Processor
from toolbox.bulk_processing.validators import case_exists_by_id, is_uuid, max_length, mandatory... | [
"noreply@github.com"
] | ONSdigital.noreply@github.com |
29a6f8130b12ecd4a5d0cc05a93f14e402d00970 | fb8c10b50bd42db139330a8ed596e864bb8ae440 | /Tkinter_GUI_Python/7941OT_8_code/8.03 validation mode demo.py | 34ce49915abce5b3c1d9238126e6942966dd0de9 | [] | no_license | masb01/test | 628c9bc4297e6c1b745503e297682258553d87cf | 7e402d5744d4395ebd660f3c05044bf3df16ce7c | refs/heads/master | 2020-03-18T20:59:38.142095 | 2018-06-10T15:15:16 | 2018-06-10T15:15:16 | 135,251,526 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,876 | py | """
Code illustration: 8.03
Validation Modes Demo
Tkinter GUI Application Development Hotshot
"""
import Tkinter as tk
class ValidateModeDemo():
def __init__(self):
self.root = tk.Tk()
vcmd = (self.root.register(self.validate), '%V')
# validate = none mode - wil... | [
"masb160119672gmail.com"
] | masb160119672gmail.com |
173c766edb003276de453cf1019773545a9f23ff | 4832856f115ef30fb9f611e92d7e473d531f6c4d | /setup.py | 19d11a618feed45d888db08e66dea88ba2d3197c | [
"Apache-2.0"
] | permissive | nycto-hackerone/OWASP-Nettacker | 9c2a227eaf5175ce42181650911ae795846637a3 | 33f7e4a53b4773c91be57bfb535baec3478ca85c | refs/heads/master | 2021-01-24T00:04:33.864977 | 2018-02-24T11:34:45 | 2018-02-24T11:34:45 | 122,752,364 | 1 | 1 | Apache-2.0 | 2018-02-24T15:26:53 | 2018-02-24T15:26:53 | null | UTF-8 | Python | false | false | 2,347 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from setuptools import find_packages
def package_files(directory):
"""
This function was created to crawl the directory and find files (none python files) using os.walk
Args:
directory: path to crawl
... | [
"ali.razmjoo@owasp.org"
] | ali.razmjoo@owasp.org |
1c94ccbfa89e4eb8af6b2127e6d3be14f1a2962c | 3b1c660676da8459bc5587c7a2fb5b4df3446c8f | /arch2.py | 8b3b597a8c1441b21af7326f504bf1b19e335c49 | [] | no_license | mariogeiger/galaxy_zoo | b28930295023d2f0cb61c266e48438b8d1782875 | 2cda9c15fe29b982fcb754b29b9427400d647859 | refs/heads/master | 2021-06-14T17:47:43.431834 | 2017-03-09T07:44:15 | 2017-03-09T07:44:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,771 | py | # pylint: disable=C,R,no-member
import tensorflow as tf
import numpy as np
import math
def dihedral_fullyconnected(x, f_out=None, std=None):
f_in = x.get_shape().as_list()[1]
assert f_in % 8 == 0
if f_out is None:
f_out = f_in
assert f_out % 8 == 0
if std is None:
std = math.sqrt(2.... | [
"geiger.mario@gmail.com"
] | geiger.mario@gmail.com |
db9f504a531a4656b87987f9b9f0af2db5399ace | 7896baeb297e131bab53cfbff712d1fd77bccede | /gombru/style_images_COCO.py | a633bfa3a8ce2a1b81682b5d1c45eaa1fa8824bc | [
"Apache-2.0"
] | permissive | gombru/magenta_styleTransfer | 599b85b24dd406a82df271bb769fe3dc1fa19f0b | bd41b0bf3bb18988653e4a355d95dac8632e814f | refs/heads/master | 2020-04-11T23:11:47.133793 | 2019-02-12T12:12:50 | 2019-02-12T12:12:50 | 162,159,299 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,049 | py | from magenta.models.image_stylization import image_stylization_transform
from PIL import Image
import os
import warnings
import random
warnings.filterwarnings("ignore")
results_path = "/home/Imatge/ssd2/ICDAR_2015_IndidentalSceneText/train/img_styled_icdar/"
num_styles = 96 # 9, 32, 34
# checkpoint = "/home/raulgome... | [
"raulgombru@gmail.com"
] | raulgombru@gmail.com |
42e9fb0e23fdf748d185ab5a38dff35ff23cb749 | 83048ab1abb6941ed0b19fb5e5ff4a9d14b48e8c | /CODEFORCES/park_light.py | 880f197a915fce16db419ae24c4356fa190e9c66 | [] | no_license | harshitalpha/Algorithms | ebad07cc77516ab5c35ae414462d10a38d5ef97e | 2f7dcf4c3bb4390267231c7c96f7e76399c0166e | refs/heads/master | 2021-07-14T17:34:02.546583 | 2020-06-25T06:38:39 | 2020-06-25T06:38:39 | 178,813,562 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | import math
for _ in range(int(input())):
r, c = [int(s) for s in input().split()]
if r%2 == 0:
ans = (r/2)*c
else:
ans = (r-1)/2 * c
ans = ans + math.ceil(c/2)
print(int(ans)) | [
"harshitsinghal1103@gmail.com"
] | harshitsinghal1103@gmail.com |
02ead0e966188d8db902b52401360de29dc3478e | d94b6845aeeb412aac6850b70e22628bc84d1d6d | /smurf/smurf_end_to_end_test.py | f50fb3e7c366d7a6b332c231de7d1e830aa81c90 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | ishine/google-research | 541aea114a68ced68736340e037fc0f8257d1ea2 | c1ae273841592fce4c993bf35cdd0a6424e73da4 | refs/heads/master | 2023-06-08T23:02:25.502203 | 2023-05-31T01:00:56 | 2023-05-31T01:06:45 | 242,478,569 | 0 | 0 | Apache-2.0 | 2020-06-23T01:55:11 | 2020-02-23T07:59:42 | Jupyter Notebook | UTF-8 | Python | false | false | 2,453 | py | # coding=utf-8
# Copyright 2023 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... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.