blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | 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 684
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 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2b3fb5148bc615e510ac5806fb53f439f1f5535f | ef7a5e1445706482a0e20d2632f6cd3d0e279031 | /amy/workshops/tests/test_base_views.py | 631611b15b60c7ca34258c3fa63613829e91ba77 | [
"MIT"
] | permissive | pbanaszkiewicz/amy | 7bf054463f4ecfa217cc9e52a7927d22d32bcd84 | f97631b2f3dd8e8f502e90bdb04dd72f048d4837 | refs/heads/develop | 2022-11-17T18:56:18.975192 | 2022-11-03T23:19:41 | 2022-11-03T23:19:41 | 28,005,098 | 0 | 3 | MIT | 2018-03-20T18:48:55 | 2014-12-14T19:25:22 | Python | UTF-8 | Python | false | false | 1,987 | py | from unittest.mock import patch
from django.http.response import Http404
from django.test import TestCase
from workshops.base_views import ConditionallyEnabledMixin
class FakeView:
"""Used in the tests below."""
def dispatch(self, request, *args, **kwargs):
pass
class TestConditionallyEnabledView... | [
"piotr@banaszkiewicz.org"
] | piotr@banaszkiewicz.org |
4d9c31297a9410b76342dc05ce6e377c85c7e9a7 | 86227936c8cd8f026dd36e984dce550e4c66af54 | /glue/utils/qt/dialogs.py | 0e164c9fa2b49e6be102c6eac094a11cb9f990a2 | [
"BSD-3-Clause"
] | permissive | bmorris3/glue | 11c55c6947dcdec984c9b13c1b32aadac7e0f296 | 25620555cb909be9ea830b40a62bdf61e87dbf7c | refs/heads/master | 2023-08-17T08:36:24.359365 | 2016-04-06T00:08:07 | 2016-04-06T00:08:07 | 55,747,056 | 0 | 0 | null | 2016-04-08T03:25:26 | 2016-04-08T03:25:26 | null | UTF-8 | Python | false | false | 1,655 | py | from __future__ import absolute_import, division, print_function
from glue.external.qt import QtGui
__all__ = ['pick_item', 'pick_class', 'get_text']
# TODO: update docstrings
def pick_item(items, labels, title="Pick an item", label="Pick an item",
default=0):
""" Prompt the user to choose an ite... | [
"thomas.robitaille@gmail.com"
] | thomas.robitaille@gmail.com |
7fc7996b891c95af3d9426d2e2a37fd402dde649 | 8531bee5e42d82ffc09ef274ccb2333ca02f03cc | /python/boj/18870.py | f46af79da2e7e28e563e855f7b961842ea29479c | [] | no_license | ChoHyoungSeo/Algorithm_prac | 969f193f9ba349d0df3c1d7645fe3f42ec7581c4 | 02327623b5ea2211f4618e60b0bdcc61e16e1c5a | refs/heads/master | 2023-08-17T11:26:55.159895 | 2023-08-17T10:52:34 | 2023-08-17T10:52:34 | 210,917,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | #나보다 작은게 몇개인가?
#이게 시간초과라...
#index O(N), set O(N), sort O(nlogn)
#18870
# _ = int(input())
# nums = list(map(int, input().split()))
# tmp_nums = list(set(nums))
# ans = []
# tmp_nums.sort()
# for i in range(len(nums)):
# print(tmp_nums.index(nums[i]), end=' ')
# # ans.append(tmp_nums.index(nums[i]))
# # prin... | [
"francesco.johs@gmail.com"
] | francesco.johs@gmail.com |
9b743ec68c4ed329067ed0bbe8a3a6a2a6dd9c8d | d9b6de55af0b6e1493fc77abd28a9cab21ed5c36 | /src/python/scripts/prescriptions/modules/valgrind.py | 8a4f6fc64f8f92e9ffac76003baa911e423aca83 | [] | no_license | flow123d/flow123d | 016af7cd55b5a8ed9426d843aace62f12b01cbb1 | 1f02b2c851f0e6ec2f93321b623000381b558a0b | refs/heads/master | 2023-09-05T01:38:06.288200 | 2023-09-04T13:24:38 | 2023-09-04T13:24:38 | 13,628,170 | 17 | 16 | null | 2023-09-12T11:27:36 | 2013-10-16T18:56:28 | C++ | UTF-8 | Python | false | false | 1,008 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# author: Jan Hybs
from loggers import printf
from scripts.core.execution import BinExecutor, OutputMode
def massif_hook(pypy):
"""
Function will initialize ValgrindMassif and print result on success
:type pypy: scripts.core.pypy.PyPy
"""
vm = ValgrindMas... | [
"jan.hybs@tul.cz"
] | jan.hybs@tul.cz |
97a693d8550cb1e4d52547bf7b98c4c1803672fe | 4228c64e23fd8df2ce255bfaa96096b8f3d53b51 | /spikeinterface_gui/tests/debug_views.py | 883b02731d061e95643f801096b3ead1152683c5 | [
"MIT"
] | permissive | alejoe91/spikeinterface-gui | 67a6395aa5ca0acdef60036f8ba8626868824b01 | b573d9a8d0d0633d4fff6a1fccd3bb49fcd640fd | refs/heads/main | 2023-07-30T16:43:53.460239 | 2021-09-17T07:29:40 | 2021-09-17T07:29:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,327 | py | import PySide6
import spikeinterface_gui as sigui
from spikeinterface_gui.tests.testingtools import clean_all, make_one_folder
from spikeinterface import WaveformExtractor, extract_waveforms
from pathlib import Path
test_folder = Path('my_dataset')
def debug_one_view():
app = sigui.mkQApp()
we = Wavefor... | [
"sam.garcia.die@gmail.com"
] | sam.garcia.die@gmail.com |
f3116356f93d0462f01b30f855b6c956f0fdffa0 | 56e4c0ec8366585bffe6c61fcd8f167dec83c68a | /base_geoengine/tests/geoengine_test.py | 6af5f9f0a5776c24b5e3c12d50df8f9646364edb | [] | no_license | davidts-leathergoods/odoo7 | 837d2e4b493f75c3d65359a6c6ef994f0d2cb0bc | bb925edf7eaee44a96da12cbb86263ece0ae052c | refs/heads/master | 2020-03-16T02:25:39.403718 | 2018-04-17T13:32:11 | 2018-04-17T13:32:11 | 132,464,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,188 | py | # -*- coding: utf-8 -*-
#
#
# Authors: Laurent Mignon
# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either vers... | [
"lebrun.nya@bpso.biz"
] | lebrun.nya@bpso.biz |
e4172bc303326edb903e40077214bd774fa90952 | 45de7d905486934629730945619f49281ad19359 | /xlsxwriter/test/worksheet/test_write_dimension.py | 185793c94c7470039aa5787240f6d18271c1f932 | [
"BSD-2-Clause"
] | permissive | jmcnamara/XlsxWriter | 599e1d225d698120ef931a776a9d93a6f60186ed | ab13807a1be68652ffc512ae6f5791d113b94ee1 | refs/heads/main | 2023-09-04T04:21:04.559742 | 2023-08-31T19:30:52 | 2023-08-31T19:30:52 | 7,433,211 | 3,251 | 712 | BSD-2-Clause | 2023-08-28T18:52:14 | 2013-01-04T01:07:06 | Python | UTF-8 | Python | false | false | 779 | py | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2023, John McNamara, jmcnamara@cpan.org
#
import unittest
from io import StringIO
from ...worksheet import Worksheet
class TestWriteDimension(unitt... | [
"jmcnamara@cpan.org"
] | jmcnamara@cpan.org |
74e89938823bd6c54dd3e8b28835394ff8fb8a28 | cbafab192b5072b8e9150dcada8013503af40fca | /Scrapy/02.项目管道/utils/03.管道_04将筛选数据写入MongoDB.py | e76d2d17f93390f767b14d870e01ae7145941f50 | [] | no_license | lafitehhq/PythonProject | 928421b49ff0ea9fd536ca7769a04fe990848929 | d5d0352541a29ee070884263e7eb50160cd7b3b5 | refs/heads/master | 2021-09-06T01:48:42.971720 | 2018-02-01T11:56:50 | 2018-02-01T11:56:50 | 106,712,281 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 897 | py | # -*- coding: utf-8 -*-
"""
使用pymongo将项目写入MongoDB。
MongoDB地址和数据库名称在Scrapy设置中指定; MongoDB集合以item类命名
"""
import pymongo
class MongoPip2line(object):
collection_name = 'scrapy_items'
def __init__(self, mongo_uri, mongo_db):
self.mongo_uri = mongo_uri
self.mongo_db = mongo_db
@classmethod
... | [
"lafitehhq@126.com"
] | lafitehhq@126.com |
af75b99de008b4647584026a7c1ef748e4ed848a | 2e60017779c5c286629ab5a3a7aeb27a6b19a60b | /python/2015day18part1.py | cba40e3f40563752a8fa2515c9e40cf9d4a3bb79 | [] | no_license | jamesjiang52/10000-Lines-of-Code | f8c7cb4b8d5e441693f3e0f6919731ce4680f60d | 3b6c20b288bad1de5390ad672c73272d98e93ae0 | refs/heads/master | 2020-03-15T03:50:38.104917 | 2018-05-07T04:41:52 | 2018-05-07T04:41:52 | 131,952,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,236 | py | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 5 15:00:34 2018
@author: James Jiang
"""
all_lines = [line.rstrip('\n') for line in open('Data.txt')]
grid = [[i for i in line] for line in all_lines]
grid_num_neighbors = []
for i in range(100):
row = [0 for j in range(100)]
grid_num_neighbors.append(row)
def... | [
"jamesjiang52@gmail.com"
] | jamesjiang52@gmail.com |
60845b15c3fdd4fe091aae50c02f92581681df22 | 658d01288c61adfbf948996cd2accef8b6c722ed | /ecommerce/users/utils.py | 3580ee1f0bf078cd9670c871db46378e108648cd | [] | no_license | italoantonio0909/ecommerce_server_python | 81c85d8be4c12bf20285238db6151cf3f515c855 | b7b438303a5eb4044e826a87ce999c4effd3f4ab | refs/heads/master | 2023-04-13T17:50:51.096674 | 2021-04-23T17:21:24 | 2021-04-23T17:21:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | import django.contrib.auth.password_validation as validators
from django.core.exceptions import ValidationError
def validate_password(*, password: str, username:str):
errors = dict()
try:
# Validate the password and username and catch the exception
validators.validate_password(password=p... | [
"italobarzola18@gmail.com"
] | italobarzola18@gmail.com |
b52914088e636d859535d7e3f87079660f428251 | 73a0f661f1423d63e86489d4b2673f0103698aab | /python/oneflow/test/modules/test_global_min.py | 3ccd2e724aacbb28d0a2a41dee3d8d1cb5d5c582 | [
"Apache-2.0"
] | permissive | Oneflow-Inc/oneflow | 4fc3e081e45db0242a465c4330d8bcc8b21ee924 | 0aab78ea24d4b1c784c30c57d33ec69fe5605e4a | refs/heads/master | 2023-08-25T16:58:30.576596 | 2023-08-22T14:15:46 | 2023-08-22T14:15:46 | 81,634,683 | 5,495 | 786 | Apache-2.0 | 2023-09-14T09:44:31 | 2017-02-11T06:09:53 | C++ | UTF-8 | Python | false | false | 3,545 | py | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | [
"noreply@github.com"
] | Oneflow-Inc.noreply@github.com |
bb89a90b0e1234c5370c2e45676f68d96964beaa | 7e95c5e87a6cd198a65719dc8725f224cb31ae1f | /read/clipboard links.pyw | c033a5619313e216c9da764922b921ba3c137b75 | [] | no_license | boppreh/j | aa3b1b4f607cb3ddbec3fb626bec469129c24518 | ef60b55ed3c6f22e0b133b5c4e1b7e6f228833b6 | refs/heads/master | 2021-01-18T13:48:54.730105 | 2014-04-17T18:29:18 | 2014-04-17T18:29:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | pyw | import win32clipboard
win32clipboard.OpenClipboard()
try:
html = win32clipboard.GetClipboardData(win32clipboard.RegisterClipboardFormat("HTML Format"))
import re, webbrowser
for match in re.finditer('href="(.+?)"', html):
webbrowser.open(match.groups()[0])
except:
import os
try:
fo... | [
"boppreh@gmail.com"
] | boppreh@gmail.com |
321a0050747d327380c841250702a7c92067d288 | 4cc285b0c585241ff4404087e6fbb901195639be | /NeuralNetworkNumbers/venv/Lib/site-packages/sklearn/datasets/tests/test_base.py | 97847e7414903366524d526a03005f8c1bd70040 | [] | no_license | strazhg/NeuralNetworksPython | 815542f4ddbb86e918e657f783158f8c078de514 | 15038e44a5a6c342336c119cdd2abdeffd84b5b1 | refs/heads/main | 2023-04-16T18:51:29.602644 | 2021-04-27T14:46:55 | 2021-04-27T14:46:55 | 361,944,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:a698f7df411efbecc8b80e93dc0caa26bbf07f5f9b5313b66ef4b6020f5d5983
size 8288
| [
"golubstrazh@gmail.com"
] | golubstrazh@gmail.com |
730749ed2475ed2e5d3d9a00cc4049b3ffc7142c | 1ab9307becae3be4b150623017b25efdbf837b99 | /tests/async/test_dead_socket.py | 464dc8b93b41ec842a0a5da61778e2f873623fb2 | [
"Apache-2.0"
] | permissive | amarentis/watchman | 5ec160775ba417d61dce897ac2779cb4acf3e16e | 0b8bd8db3d174ea3c8ccc379179e11ba42706d38 | refs/heads/master | 2020-04-05T17:02:34.955372 | 2018-11-10T21:06:37 | 2018-11-10T21:08:22 | 157,041,581 | 1 | 0 | Apache-2.0 | 2018-11-11T02:48:34 | 2018-11-11T02:48:34 | null | UTF-8 | Python | false | false | 1,558 | py | #!/usr/bin/env python3
# vim:ts=4:sw=4:et:
import asyncio
import os
import unittest
import pywatchman_aio
import WatchmanInstance
# Note this does not extend AsyncWatchmanTestCase as it wants to start its
# own Watchman server instances per test.
class TestDeadSocket(unittest.TestCase):
def test_query_dead_sock... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
a6cdeb344b25b012d66aecbcc4663bd7574bed90 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/59b9c5f119dd02449b25020c136d7f9f855051c6-<_create_stack>-bug.py | 8805ff144e925476f3c51ebd97a794505391d007 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | def _create_stack(module, stack, cloud, shade):
try:
stack = cloud.create_stack(module.params['name'], tags=module.params['tag'], template_file=module.params['template'], environment_files=module.params['environment'], timeout=module.params['timeout'], wait=True, rollback=module.params['rollback'], **module... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
010113dd30c7336e0c513de8751bd3ba8f9d9b66 | d86c52f4098fd9c1a102c2d3f5630556e0610fa2 | /fitle/myenv/Lib/site-packages/django/core/management/commands/check.py | 6c6e6e4a1203308755b3055ef3b733aef9b3a6e2 | [] | no_license | makadama/bitbucket | 24f05c4946168ed15d4f56bfdc45fd6c0774e0f2 | cabfd551b92fe1af6d9d14ab9eb3d9974b64aa79 | refs/heads/master | 2023-06-19T19:04:03.894599 | 2021-07-15T12:10:39 | 2021-07-15T12:10:39 | 385,203,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:168ad45ee0e55435d6aedeb178ca3a6c2f04dd7a02f60d81933146f2582a5198
size 2460
| [
"adamamakhtarsow@gmail.com"
] | adamamakhtarsow@gmail.com |
5356438d6fc2aa011b7452e12b1fe38c319815e1 | 3821860187e15a4235d541e7db510732c18212b0 | /tasks/forms.py | 12f878e6df6e30b3880a4bf86fa5923365d3fdf7 | [] | no_license | memadd/todo | 15fb5901a87b162bb793c0b9f4c73674e38bab8f | 3ed0acc15596964c50eca863b01fdddff7f5586d | refs/heads/master | 2021-04-02T18:33:27.582092 | 2020-03-31T22:18:29 | 2020-03-31T22:18:29 | 248,308,247 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | from django import forms
from django.forms import ModelForm
from .models import *
class TaskForm (forms.ModelForm):
title= forms.CharField(widget= forms.TextInput(attrs={'placeholder':'Add new task...'}))
class Meta:
model = Task
fields = '__all__'
| [
"memad632@gmail.com"
] | memad632@gmail.com |
9c983bb77dff2ea93e7d9f241d6aacdf444b287d | 528f910908885c3ded4ecc6380b9603c8dcacbd6 | /tbapi/top/api/rest/SimbaCampaignAddRequest.py | 5f9018d5d3183a9452af675761c01e08a4741e6d | [] | no_license | Monica-ckd/data007 | 15fe9c4c898a51a58100138b6b064211199d2ed1 | 0e54ae57eb719b86ec14ce9f77b027882a3398a8 | refs/heads/master | 2023-03-16T05:26:14.257318 | 2016-05-25T06:57:05 | 2016-05-25T06:57:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 330 | py | '''
Created by auto_sdk on 2013-04-01 16:44:41
'''
from top.api.base import RestApi
class SimbaCampaignAddRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.nick = None
self.title = None
def getapiname(self):
return 'taobao.simba.campa... | [
"root@u16392468.onlinehome-server.com"
] | root@u16392468.onlinehome-server.com |
7d58235629bdaceb57f005dde6376976773e1189 | cdb875e2b5b01954d9e3e56147d088074a63464c | /Leetcode/FB/Trees and DFS/level_averages.py | fcb488a1023635ae0a20af647666850807e87b61 | [] | no_license | denemorhun/Python-Problems | e32fc2752be5071ac88db856a8a7c92fcb625f4c | 53bfd8aa8276a9baa5517781f3b436524b1af185 | refs/heads/master | 2023-04-26T01:16:52.801740 | 2021-05-13T20:14:41 | 2021-05-13T20:14:41 | 320,779,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,414 | py | '''
Task
Calculate the average of every level in a tree
4 -> 4
/ \
6 10 -> 16 / 2 = 8
\
2 -> 2
# calculate the average at every level.
'''
# This is the class of the input root. Do not edit it.
class BinaryTree:
def __init__(self, value):
... | [
"denemorhun@gmail.com"
] | denemorhun@gmail.com |
9fb84259510a4f067c9621179f999019aadb7445 | c325866c577343752f0d4394c3d96e599674df0e | /models/__init__.py | ea751255374e5a11ecbecc9d9baaa27598c035f7 | [] | no_license | levislibra/financiera_nosis | ff11f4f8417917d48220d40c1524f91d5f1a4d24 | 3227e9258e2f8519880081232070734e929af3f8 | refs/heads/master | 2023-01-05T20:23:01.509995 | 2022-12-22T18:33:05 | 2022-12-22T18:33:05 | 236,527,122 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py | # -*- coding: utf-8 -*-
from . import nosis_configuracion
from . import nosis_informe
from . import nosis_cuestionario
from . import nosis_cda
from . import extends_financiera_prestamo
from . import extends_res_partner | [
"levislibra@hotmail.com"
] | levislibra@hotmail.com |
dcb60707eda1b4dac2d88abe004f986aa5ddb718 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02813/s939408287.py | a879ad9c4dd9ada285625e2c359df34b0994ceff | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 449 | py | #!/usr/bin/env python3
def main():
from itertools import permutations
N = int(input())
P = tuple(int(x) for x in input().split())
Q = tuple(int(x) for x in input().split())
for i, p in enumerate(permutations(range(1, N + 1), N)):
if p == P:
a = i
for i, q in enumerate(permu... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
3761aab98ada59cbae2219ca9e15760b23be5b81 | 13edd8f1bc3b86fd881f85fbeafe94811392d7fc | /seventh_module/CRM/22.stark组件开发之列表页面定制列/luffy_stark/stark/service/v1.py | db8bfd76372853026e41291621b5fd1fc478aaec | [] | no_license | ryan-yang-2049/oldboy_python_study | f4c90c9d8aac499e1d810a797ab368217f664bb1 | 6e1ab7f217d9bf9aa7801266dee7ab4d7a602b9f | refs/heads/master | 2022-07-22T23:49:28.520668 | 2019-06-11T13:26:25 | 2019-06-11T13:26:25 | 129,877,980 | 0 | 1 | null | 2022-07-18T17:12:54 | 2018-04-17T09:12:48 | HTML | UTF-8 | Python | false | false | 5,452 | py | # -*- coding: utf-8 -*-
from types import FunctionType
from django.conf.urls import url
from django.shortcuts import HttpResponse, render
class StarkHandler(object):
list_display = []
def __init__(self, model_class, prev):
self.model_class = model_class # 此时的model_class 是一个对象
self.prev = prev # 表示别名
def ... | [
"11066986@qq.com"
] | 11066986@qq.com |
06a87bb4d76ac93b72b26e333d5439be142bcea8 | 79b6a2497953d6832670af4447d2bbb3bdf23965 | /stage1/old/notesuwsgi/runlocal.py | f9fe339576180ed921bfd561772dcc3545277a00 | [] | no_license | davidjsanders/studyWork | 07a0ec7d47324377a09b4a71e6186e374900255d | ba992c17def649a3b789930d7776cda68423e8ce | refs/heads/master | 2021-05-31T05:24:36.323939 | 2016-04-15T00:23:53 | 2016-04-15T00:23:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,757 | py | """
Application: notes
Overivew: A demonstration of a device, such as a smart phone, which
provides notifications and only changes the behaviour of the
notifications based on locked or unlocked status. The key
element of this demonstrator is to show that the... | [
"dsanders_can@outlook.com"
] | dsanders_can@outlook.com |
c6d98711d0107a4425f6c7ec0d1c06b3cc6304be | ad13583673551857615498b9605d9dcab63bb2c3 | /output/models/ibm_data/valid/s3_4_1/s3_4_1v10_xsd/__init__.py | 0934fd02f548993d78ca4cc1d7bc55f802e85e8a | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 145 | py | from output.models.ibm_data.valid.s3_4_1.s3_4_1v10_xsd.s3_4_1v10 import (
C,
D,
Root,
)
__all__ = [
"C",
"D",
"Root",
]
| [
"tsoulloftas@gmail.com"
] | tsoulloftas@gmail.com |
a9143dc7e83a3f243f649115df3ea321cf751aa6 | 235c4b3aa630737b379050a420923efadd432da8 | /DS-400/Medium/229-Majority Element II/Counter.py | 094c851a5a8386f74fb1a9dc3837c40361d3683a | [
"MIT"
] | permissive | ericchen12377/Leetcode-Algorithm-Python | 4e5dc20062280ef46194da5480600b2459fd89f8 | eb58cd4f01d9b8006b7d1a725fc48910aad7f192 | refs/heads/master | 2023-02-22T22:43:55.612650 | 2021-01-28T04:00:20 | 2021-01-28T04:00:20 | 258,058,468 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | class Solution(object):
def majorityElement(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
dic = collections.Counter(nums)
return [ list(dic.keys())[j] for j in [i for i in range(len(list(dic.values()))) if list(dic.values())[i] > len(nums)/3]] | [
"suiyaochen@mail.usf.edu"
] | suiyaochen@mail.usf.edu |
93a97102c05a1f3a0838c2cf43e520204c59dd72 | 2ad1116411d79d5bac26402ccac4f5785a0485e4 | /counter.py | b78e3d34911842bf19c69a221265902c1530506d | [] | no_license | slavkoBV/solved-tasks-SoftGroup-course | 0a879fcaeedd2b1d27b2970ea621eb2bdfab4ce4 | 12461d50a095764d5e237babaec466bc2d8dc672 | refs/heads/master | 2021-01-18T15:55:04.224872 | 2017-05-08T15:38:16 | 2017-05-08T15:38:16 | 86,691,843 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py | def some_func(a, b):
some_func.counter += 1 # Static variable Counter remember number of some_func() calls
return a + b
some_func.counter = 0
print(some_func(1, 3))
print('Call #',some_func.counter)
print(some_func(2, 4))
print('Call #', some_func.counter)
| [
"slav_b@ukr.net"
] | slav_b@ukr.net |
b8c803f29c550a40ca4ae33f015e7fffb9999746 | 2bcf18252fa9144ece3e824834ac0e117ad0bdf3 | /zpt/trunk/site-packages/zpt/_zope/schema/tests/test_floatfield.py | 1d6a009cae64a87c01fbbfd3be39e43c689146f1 | [
"ZPL-2.1"
] | permissive | chadwhitacre/public | 32f65ba8e35d38c69ed4d0edd333283a239c5e1d | 0c67fd7ec8bce1d8c56c7ff3506f31a99362b502 | refs/heads/master | 2021-05-10T14:32:03.016683 | 2010-05-13T18:24:20 | 2010-05-13T18:24:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,208 | py | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | [
"chad@zetaweb.com"
] | chad@zetaweb.com |
1280d5d6ea1f00fc7300abd981f6dd170da59c11 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_312/ch9_2019_04_04_16_41_56_665426.py | 759314ca3a2d438a497ea181c1e10e9db6443c73 | [] | 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 | 266 | py | def lista_sufixos(string):
lista=[]
if len(string)==1:
lista.append(string)
return lista
contador=1
tamanho=len(string)-1
while contador<=tamanho:
lista.append(string[contador:tamanho])
contador+=1
return lista | [
"you@example.com"
] | you@example.com |
21cdbffcc4d6a5aa0f87b5f81cc700c825c96b73 | cda43bf6a84f7e55fab26aa70cda934683a51fe5 | /GANsDevelopGANsPythonPy3/inception_score.py | 5fbc6729d62c0c1bd2432412543e4dca6c191bf0 | [] | no_license | nikolaosdionelis/NeuralNetworksNNs | abb55622882e31c8d130a8986868b3d19ede186f | 8a217490ad5bb3f7fccf4002c6b43a06c1e562fc | refs/heads/master | 2022-11-13T00:50:23.578197 | 2020-07-12T18:52:20 | 2020-07-12T18:52:20 | 279,042,013 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,595 | py | # From https://github.com/openai/improved-gan/blob/master/inception_score/model.py
# Code derived from tensorflow/tensorflow/models/image/imagenet/classify_image.py
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import sys
import tarfile
impo... | [
"noreply@github.com"
] | nikolaosdionelis.noreply@github.com |
cb1da8aeaf03a85e74866e7cfcdbdaba94ef3d3c | 130b75d66085e1c598ab6c0e11aa685ea4a476aa | /example/django_account_starter/forms.py | de45ec17a22ab13bb92137c161715fb344f13778 | [] | no_license | hypnopompicindex/django_account_starter | 9fe1bca18ed62d9d3c820012afadb188f78c720e | 28ac87147a8f1ead92b6e2d1f6754208f42a9195 | refs/heads/master | 2020-12-29T01:10:23.042916 | 2016-09-18T18:28:52 | 2016-09-18T18:28:52 | 68,318,654 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | from django import forms
from django.contrib.auth.models import User
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget=forms.PasswordInput)
class UserRegistrationForm(forms.ModelForm):
password = forms.CharField(label='Password', widget=forms.PasswordInput)
... | [
"hypnopompicindex@gmail.com"
] | hypnopompicindex@gmail.com |
b30a909362d8e140bded469e462867647d71d165 | 6659f860ddbb7550f66ea712753d3d2aab1cc6ff | /App/web/echo_server.py | 467a5b0e10a14b53459be9d8923e943ccb29bc99 | [] | no_license | ianhom/Python-Noob | adf077bee78727eac43da2804a90528ace6c38a6 | e12f0159d68d7c4962cafa3cb8b68a8761037f21 | refs/heads/master | 2020-12-08T12:06:01.909463 | 2018-07-03T00:42:41 | 2018-07-03T00:42:41 | 67,806,200 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,061 | py | #!/usr/bin/python
import socket
import sys
import argparse
host = 'localhost'
data_payload = 2048
backlog = 5
def echo_server(port):
""" A simple echo server """
# Create a TCP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,1)
... | [
"noreply@github.com"
] | ianhom.noreply@github.com |
3215691d24fbeff15214e407100c1c72833dd4d7 | 35e6598c8f07e686ef4ce431800ece28d2797568 | /tests/test_run.py | e6ab5eaa7eed758a1e5cb74dddff0ab76744d6c4 | [] | no_license | akuhnregnier/python-inferno | c7badbed505da602c98180e70aff05061dd1a199 | 424168231f553d0f872f1a2ec29c26bf3d114f08 | refs/heads/main | 2023-04-16T03:15:27.427407 | 2023-01-28T19:15:05 | 2023-01-28T19:15:05 | 368,221,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,607 | py | # -*- coding: utf-8 -*-
import sys
import threading
from pathlib import Path
from subprocess import check_call
from tempfile import TemporaryDirectory
from time import sleep
from python_inferno.cx1 import run
def get_cmd_args(dest="local", batch_size=-1, n_cores=1):
return type(
"cmd_args",
(obje... | [
"ahf.kuhnregnier@gmail.com"
] | ahf.kuhnregnier@gmail.com |
86f0d28d524f336cc11738fb13ca9b9f426ca7c7 | 0141361f7c4d276f471ac278580479fa15bc4296 | /Depth First Search/delNodesGetForest.py | 2a22856b674fc21b6d90e1072f5b6c9f37f16692 | [] | no_license | tr1503/LeetCode | a7f2f1801c9424aa96d3cde497290ac1f7992f58 | 6d361cad2821248350f1d8432fdfef86895ca281 | refs/heads/master | 2021-06-24T19:03:08.681432 | 2020-10-09T23:53:22 | 2020-10-09T23:53:22 | 146,689,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 750 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def delNodes(self, root: TreeNode, to_delete: List[int]) -> List[TreeNode]:
res = []
s = set(to_delete)
def helpe... | [
"noreply@github.com"
] | tr1503.noreply@github.com |
c3d9a88e645d3e7c9743df0c8bf5e10928dd658e | 141b42d9d72636c869ff2ce7a2a9f7b9b24f508b | /myvenv/Lib/site-packages/examples/starwars_relay/tests/snapshots/snap_test_mutation.py | 27c3f9bb46b2563ab5a4481eefe8bacf06bd1279 | [
"BSD-3-Clause"
] | permissive | Fa67/saleor-shop | 105e1147e60396ddab6f006337436dcbf18e8fe1 | 76110349162c54c8bfcae61983bb59ba8fb0f778 | refs/heads/master | 2021-06-08T23:51:12.251457 | 2018-07-24T08:14:33 | 2018-07-24T08:14:33 | 168,561,915 | 1 | 0 | BSD-3-Clause | 2021-04-18T07:59:12 | 2019-01-31T17:00:39 | Python | UTF-8 | Python | false | false | 1,891 | py | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_mutations 1'] = {
'data': {
'introduceShip': {
'ship': {
'id': 'U2hpcDo5',
'name... | [
"gruzdevasch@gmail.com"
] | gruzdevasch@gmail.com |
543cf71d2cdecadd0172471e579d30f54397750f | 06c9c01700c76a203aca4de342bf6f7cb11c3b36 | /python/rsyscall/tests/test_prctl.py | 3a7989026c9ef37bd82b6405b844c0493de97d07 | [] | no_license | catern/rsyscall | 76df9d8c1a63ccf60443c18311edc7c8203f62bc | 2a362099610a664caeb7f06dd805e5a0fb80cd08 | refs/heads/master | 2022-07-30T07:43:31.778335 | 2022-07-25T13:36:57 | 2022-07-25T13:42:48 | 137,142,228 | 68 | 8 | null | 2022-07-13T01:47:18 | 2018-06-13T00:31:25 | Python | UTF-8 | Python | false | false | 771 | py | import logging
from rsyscall.tests.trio_test_case import TrioTestCase
from rsyscall.sys.prctl import *
logger = logging.getLogger(__name__)
class TestUser(TrioTestCase):
async def asyncSetUp(self) -> None:
self.process = await self.process.fork()
async def asyncTearDown(self) -> None:
await se... | [
"sbaugh@catern.com"
] | sbaugh@catern.com |
d4bb69477bf1b32e0cd01546da40fba55fbf3e40 | 23514a0e2baf6da053690dd511f1eef75a573e6b | /log-mining/com/haodou/log-mining/tag/conceptClass.py | 8acd8c1f0343d076b0aacae749f0d610065a5365 | [] | no_license | rainly/scripts-1 | b5f31880a1a917df23e4c110bb7661685851eff5 | 3ef01a58162b94fb36cdd38581c899d8a118eda0 | refs/heads/master | 2020-07-12T01:41:31.491344 | 2019-08-27T08:50:10 | 2019-08-27T08:50:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,363 | py | #encoding=utf-8
import sys
sys.path.append("./")
import traceback
'''
#基于模板构建分类集合
#有几种类型的分类:一种包含的分类(这个不考虑界限问题),一种是精确的分类(要求描述的内容应该都包含在本概念之内)
#其中,精确的分类分两种情况,第一种是连续的精确包含,一种是非连续的精确包含。连续的精确包含要求所有内容是前后相接的,后者可以是内容分散在文中中的不同地方。
我们从包含的分类开始。对于包含的分类,由外部规则来切割文本,然后判定切割的部分是否具有某个概念属性。
我们可以对判定后的内容继续切割,看各个子部分是否具有某个概念。
这时候,我们就可以对于内部有哪些... | [
"zhaoweiguo@vxiaoke360.com"
] | zhaoweiguo@vxiaoke360.com |
192d963f2cd091540ede32b5d55a1c26b18dd8e2 | 24b1fa231f4e89f1a588c09ebee6fe4da6915c53 | /Easel/localToGlobal.py | 32879cea0aa8088c56362b690f7dfecad71d4191 | [] | no_license | cyrt63/demos | a429214154cf0e51b58710f67670e1d902bfcac6 | a4b54b862dba4ad33a707511896324829f4cc7b1 | refs/heads/master | 2020-04-08T13:51:40.823058 | 2015-04-21T14:01:41 | 2015-04-21T14:01:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,048 | py | from easel import *
from browser import *
from workbench import *
from math import pi
canvas = document.createElement("canvas")
stage = Stage(canvas)
target = stage.addChild(Shape())
target.graphics.beginFill("blue").drawCircle(0, 0, 50).endFill()
target.graphics.beginFill("white").drawCircle(0, 0, 30).endFill()
tar... | [
"geometryzen@gmail.com"
] | geometryzen@gmail.com |
c8bbe5f9ed646c1afe70a866ae47c98b46abf502 | de0ea898d18e4faf383d230cf2542335bfa166d5 | /library/settings.py | 358878850fd10aa175dd41195b4be9b5347278cb | [] | no_license | msadour/book_API | 86121341e66249b51835e5e1c842c8fdde26ba6c | 81477c242647c95897a05ad892bc3e11542defa7 | refs/heads/master | 2022-12-09T16:33:12.027427 | 2020-01-22T13:25:45 | 2020-01-22T13:25:45 | 231,387,598 | 0 | 0 | null | 2022-12-07T23:21:19 | 2020-01-02T13:28:36 | HTML | UTF-8 | Python | false | false | 3,953 | py | """
Django settings for library project.
Generated by 'django-admin startproject' using Django 1.11.27.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import o... | [
"sadour.mehdi@gmail.com"
] | sadour.mehdi@gmail.com |
edf0e9a4bac2f1ac04cbd0bac6b3ad5427ff6e07 | 51a7465d1fa50fc14d472759512c8ecbc7fe0b8d | /rlpyt/algos/pg/base.py | d0c5a733e7800d2c3c07e8af8cbe5a873e7ee713 | [
"MIT"
] | permissive | rk2900/rlpyt | 9717a088340fc441f3fc7fba505926316cbcc20d | 47176abebc3a19791e34564e4fa6b1b267a68a61 | refs/heads/master | 2020-07-26T17:25:03.549545 | 2019-09-09T23:48:59 | 2019-09-09T23:48:59 | 208,718,161 | 1 | 1 | null | 2019-09-16T05:38:55 | 2019-09-16T05:38:55 | null | UTF-8 | Python | false | false | 2,319 | py |
# import torch
from collections import namedtuple
from rlpyt.algos.base import RlAlgorithm
from rlpyt.algos.utils import (discount_return, generalized_advantage_estimation,
valid_from_done)
# Convention: traj_info fields CamelCase, opt_info fields lowerCamelCase
OptInfo = namedtuple("OptInfo", ["loss", "gradNorm... | [
"adam.stooke@gmail.com"
] | adam.stooke@gmail.com |
01b9c36559b505bb04ed85b9f10a7dfaece2b507 | b1c7a768f38e2e987a112da6170f49503b9db05f | /stockkeeping/migrations/0041_auto_20181208_1612.py | 14e53432db120afe4f2b5ae64d1fc60d245b1643 | [] | no_license | Niladrykar/bracketerp | 8b7491aa319f60ec3dcb5077258d75b0394db374 | ca4ee60c2254c6c132a38ce52410059cc6b19cae | refs/heads/master | 2022-12-11T04:23:07.504966 | 2019-03-18T06:58:13 | 2019-03-18T06:58:13 | 176,218,029 | 1 | 0 | null | 2022-12-08T03:01:46 | 2019-03-18T06:27:37 | JavaScript | UTF-8 | Python | false | false | 815 | py | # Generated by Django 2.0.6 on 2018-12-08 10:42
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stockkeeping', '0040_auto_20181206_1553'),
]
operations = [
migrations.AddField(
model_name='stockdata',
... | [
"niladry.kar85@gmail.com"
] | niladry.kar85@gmail.com |
c2ef28815867fa9e75b5c0a7c7ea03f20ecdf678 | d956866b2aa0e52372a7ee4cfb825012fdb088ed | /bluepyopt_ext/deap_ext/tools/varDE.py | 71a0e6a1a2b5a75335fe1409058db3214615e375 | [] | no_license | trumbell/RumbellKozloski2019 | e4683863f9ce7a7ed844ad2309c05c40694c1674 | ff01a520eb1c3df3ddf8aca66b1e4114a24edfea | refs/heads/master | 2023-03-18T03:31:26.022568 | 2020-07-29T23:27:59 | 2020-07-29T23:27:59 | 514,313,861 | 1 | 0 | null | 2022-07-15T15:14:26 | 2022-07-15T15:14:25 | null | UTF-8 | Python | false | false | 3,145 | py | """Differential Evolution Variator"""
import numpy
import random
from deap import tools
def varDE(population, toolbox, cxpb=1.0, mutpb=1.0, jitter=0, low=None, up=None):
"""Part of an evolutionary algorithm applying the variation part
of the differential evolution algorithm. The modified individuals have thei... | [
"tom.morse@yale.edu"
] | tom.morse@yale.edu |
65241bed19bfa34e30cf8d78ffaf90568cac3f98 | 3bafaed1d12e4e1fb221a11998a7b9a858b04644 | /App/migrations/0005_auto_20201229_1500.py | 76b907df1761d6d3493aae959be9d9b60f21ce2e | [] | no_license | nian-20/AtroBOM | 8c96e9247292b5f4a3a4f22b7d93a8749f7ed80c | 0370636238e722489b3fddc3a65d4e9ceb7cbfb0 | refs/heads/master | 2023-08-15T09:13:10.042024 | 2021-09-30T19:12:03 | 2021-09-30T19:12:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,528 | py | # Generated by Django 3.1.4 on 2020-12-29 11:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('App', '0004_auto_20201215_0920'),
]
operations = [
migrations.AlterField(
model_name='material',
name='box_descripti... | [
"nimadorostkar97@gmail.com"
] | nimadorostkar97@gmail.com |
c941e9442578df39566b2b5d3a842f1f2d64d2dc | 9dda81fb80905226b10e69d4c20f72533f2b68bd | /personalise/urls.py | 0327ada2e45294fd6160e4e4d9ba28f8e7632a18 | [] | no_license | SardarDawar/graphicStore-ecommerce | 2c610d6ef4e62d98659bf98d3d80af3d1926aa3f | 1d9208d27e4ba69bedf7a34b7e54bcc540d26438 | refs/heads/master | 2023-02-02T13:45:31.335032 | 2020-12-15T18:52:43 | 2020-12-15T18:52:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | from django.urls import path
from . import views
urlpatterns = [
path('personalise/<product_id>', views.personalise, name='personalise'),
]
| [
"dawarsardar786@gmail.com"
] | dawarsardar786@gmail.com |
3f2b95b67acc34a044aad8144d2993f4dc20d233 | 18f4332ccaccf7e0a3a36d701f84358516ee6562 | /test/tuples.py | d6f5bb01eb1a36c5198bdfc31308df2e7392099d | [] | no_license | anishLearnsToCode/python-workshop-1 | d4a4f04d635aae15ff7411e817863a50e877e51e | 524a329233ce1ae20d926fff53f46925cd9cba3e | refs/heads/master | 2022-11-22T09:10:42.674296 | 2020-07-15T18:38:26 | 2020-07-15T18:38:26 | 275,112,553 | 3 | 3 | null | null | null | null | UTF-8 | Python | false | false | 155 | py | t = (1, 2, 3)
print(t)
t = list(t)
t[1] = 100
t = tuple(t)
print(t)
for x in t:
print(x)
print(type(t))
x = ('apple', )
print(type(x))
print(t + x)
| [
"anish_bt2k16@dtu.ac.in"
] | anish_bt2k16@dtu.ac.in |
efdf7ca57d033346a0b1aec187e98da28e9abb61 | 6bd105edcca815c9a8da0f483c5a6f8193a62aec | /generate_tube.py | b48d166ae070e98eff8632aa93409f004365c4f6 | [] | no_license | AngledLuffa/stl-helix | 894832d9c1e9def6e1ece1cbc4d1a0d919415044 | c8959cde742351671dc4939b8afd0b4007cbec7b | refs/heads/master | 2021-07-12T07:47:27.369837 | 2021-02-13T17:53:44 | 2021-02-13T17:53:44 | 231,339,298 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,713 | py | import argparse
import math
import sys
import build_shape
import marble_path
def describe_curve(args):
if args.rotation == 0:
print("A basic tube of length {}".format(args.length))
else:
print("A basic tube of length {}, rotated {}".format(args.length, args.rotation))
def build_x_y_r_t(args):... | [
"horatio@gmail.com"
] | horatio@gmail.com |
d527d677917e63895d7e88d560059f127c520c0b | e47b8be7bb06376d0d9d28845aa453877ff3655f | /00. Choinka/venv/Scripts/easy_install-3.7-script.py | afd790e09eb69cfaaa1afbb1c87fca3e148580fa | [] | no_license | mrcszk/Python | eaf60ccfda4ebebdd67db3944e4ac248208f1a1e | 5e733b5bc1bd09904e48662c8542c8db60097ab5 | refs/heads/master | 2022-11-15T14:07:34.131042 | 2020-07-15T09:41:05 | 2020-07-15T09:41:05 | 169,444,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | #!"C:\Users\marci\Desktop\Programy w Pythonie\0.Choinka\venv\Scripts\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub... | [
"marcin.sawczuk99@gmail.com"
] | marcin.sawczuk99@gmail.com |
686ebd14d9e863f11e702e209cbfaeebeb2645bc | 17939372537b437dd52ee8426785108039df651c | /customer_cases/krugoreys/solving/genetic_runner.py | 914ce087b01c2741d9483941e56f22229a4b8ff5 | [] | no_license | Madrich-routes/routes_laboratory | d091abd2267c9765e5a7c66a80c87c94e95e6189 | 27c447c9fe8e36c5ae4596ab4cdf38cac8fca6ef | refs/heads/master | 2023-06-04T12:02:08.973183 | 2020-10-31T17:22:14 | 2020-10-31T17:22:14 | 295,661,142 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,321 | py | import ujson as json
import os
import uuid
from typing import List, Tuple
from autologging import logged, traced
from solving.models import Task, Vehicle, DistanceMatrix, Tour, Solution
@traced
def run_genetic_solver(
tasks: List[Task], vehicles: List[Tuple[int, Vehicle]], matrix: DistanceMatrix
):
proc... | [
"yampolskiydv@gmail.com"
] | yampolskiydv@gmail.com |
c2414773428ebdacff7024fad72490cb5d6c6cf7 | 0130c8b14927097663157846adc4b146d67d2fda | /tests/common/test_run/log_ad_run.py | 88030a554050c50841aedc5f7eacf3bf2f3efd4f | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"BSD-3-Clause",
"NCSA",
"LLVM-exception",
"Zlib",
"BSD-2-Clause",
"MIT"
] | permissive | Shigangli/akg | e8be3e0ee1eafe3e42b4cc4d424c28f08ef4c0bc | 3766c54e0b109541932d147a6b5643a334b82403 | refs/heads/master | 2023-09-06T05:13:40.571583 | 2021-11-23T03:44:54 | 2021-11-23T03:44:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,046 | py | # Copyright 2019 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... | [
"1027252281@qq.com"
] | 1027252281@qq.com |
c3d4b971073dde1a3ac985dedf8bb7bfa83d2864 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_5/lftnto002/question2.py | 98cc15fb931243965f2e7c3695e9e9a41bfe8e8f | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,977 | py | cost= eval(input("Enter the cost (in cents):\n"))
if cost:
deposit= eval(input("Deposit a coin or note (in cents):\n"))
while (deposit<cost):
deposit_added= eval(input("Deposit a coin or note (in cents):\n"))
deposit+=deposit_added
change= deposit-cost
cents=0
... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
86c3d045b6e4a572b74390c63ff128cdff3142dd | cf7b0ab779e273c3a553fa7e6ca4e98c524ec8f9 | /Buildings/apps.py | ae815ace614cd9072d87d76f945b1befcf672dba | [] | no_license | zenmeder/JKDatabaseSystem | 369a40172420eb1f783467b5884e6e94f6fa9a71 | 146a552e549c9a1ef131bb475ecf5e8947696a6c | refs/heads/master | 2020-03-19T09:12:41.774587 | 2018-06-12T03:04:56 | 2018-06-12T03:04:56 | 136,268,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class BuildingsConfig(AppConfig):
name = 'Buildings'
| [
"zenmeder@gmail.com"
] | zenmeder@gmail.com |
d1440459aa0d730a1ec383a73089632570832b39 | 23f85dfe9c748beff12300be50a32122f0187948 | /tests/unit/test_login.py | 0d165c49ae8d8acaf287e3f38978298f097df12e | [
"MIT"
] | permissive | MathiasTejs/betfair | e9e815459068047adbea9c42b9d3c2bf0d1cbdfd | a639787bee11e0cbd135bf0e7bfeb171217f78d7 | refs/heads/master | 2022-12-12T08:43:00.460054 | 2020-08-03T11:18:07 | 2020-08-03T11:18:07 | 278,915,333 | 0 | 0 | MIT | 2020-07-11T18:01:05 | 2020-07-11T18:01:05 | null | UTF-8 | Python | false | false | 3,449 | py | import unittest
from unittest import mock
from requests.exceptions import ConnectionError
from betfairlightweight import APIClient
from betfairlightweight.endpoints.login import Login
from betfairlightweight.exceptions import LoginError, APIError, InvalidResponse
from betfairlightweight.resources import LoginResource
... | [
"paulingliam@gmail.com"
] | paulingliam@gmail.com |
be2a26261fc488944f2f7777330588411053b33d | 6ab9a5dca4ba6897f1b101711fbda501a9ea62a6 | /Pacman/pacmanBFS.py | 7dabefd7c7082aebe3fadbc63fed68d96b53c326 | [
"MIT"
] | permissive | iamrakesh28/Games | 4631ac5d812d934a774bd3350deae6bc144d692f | 4fa22f0a6f609b0c8ebf94bc20a0aedd5a875fab | refs/heads/master | 2020-05-01T03:41:02.761242 | 2019-10-05T17:08:52 | 2019-10-05T17:08:52 | 177,251,466 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 945 | py | import queue
def cellNum(i,j,m):
return i*m+j
def cellInv(num,m):
return (num//m,num%m)
def valid(i,j,n,m):
if i >= 0 and i < n and j >= 0 and j < m:
return True
return False
def BFS(mat,ghost,n,m,pac):
visit = [m*[False] for i in range(n)]
par = [m*[0] for i in range(n)]
dr = [-1,1,0,0]
dc = [0,0,-1,1]
... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
a9a0cd836205c0dd7725b689164a4686b544e493 | 1cbb17203977f53a137857f0e296994006e9345c | /zhrtvc/melgan/hparams.py | a822d6aa05194547020422ef6417d1081d8908cc | [
"MIT"
] | permissive | tedrepo/zhrtvc | cb0275e27afd6f70fe169e5415e7aaac9b317755 | bafcbe327ead0fc40239e724828f810fd096b483 | refs/heads/master | 2022-11-06T12:29:42.144626 | 2020-06-28T11:12:06 | 2020-06-28T11:12:06 | 276,594,767 | 1 | 0 | null | 2020-07-02T08:43:56 | 2020-07-02T08:43:55 | null | UTF-8 | Python | false | false | 3,243 | py | #!usr/bin/env python
# -*- coding: utf-8 -*-
# author: kuangdd
# date: 2020/2/20
"""
"""
from tensorflow.contrib.training import HParams
one = 64
# Default hyperparameters
hparams = HParams(
# Audio
inv_mel_basis=None,
mel_basis=None,
center=False,
num_mels=80, # Number of mel-spectrogram channels... | [
"kqhyj@163.com"
] | kqhyj@163.com |
083cf199bdc974e6feac26f8bbf82518712cf110 | a5fdc429f54a0deccfe8efd4b9f17dd44e4427b5 | /0x0B-python-input_output/9-add_item.py | 23d03eaddd7278b43c2b4b8dad51fb924860df5b | [] | no_license | Jilroge7/holbertonschool-higher_level_programming | 19b7fcb4c69793a2714ad241e0cc4fc975d94694 | 743a352e42d447cd8e1b62d2533408c25003b078 | refs/heads/master | 2022-12-20T20:41:33.375351 | 2020-09-25T02:02:28 | 2020-09-25T02:02:28 | 259,471,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | #!/usr/bin/python3
"""module for task 9 script"""
import sys
save_to_json_file = __import__('7-save_to_json_file').save_to_json_file
load_from_json_file = __import__('8-load_from_json_file').load_from_json_file
my_list = []
try:
my_list = load_from_json_file("add_item.json")
except FileNotFoundError:
my_list = ... | [
"1672@holbertonschool.com"
] | 1672@holbertonschool.com |
5981507dc787a7cc1690673189ead63ff122b7f4 | 63b79c404d83e4980891c488f4d9592558ecda35 | /assets/src/ba_data/python/bastd/ui/settings/nettesting.py | d7ec72b038cbbb617dc90c7817529f3abaaa373e | [
"MIT"
] | permissive | kakekakeka/ballistica | 56e8879cd5b4b990e5e05da3dfd300d7cbb45446 | 3ffeff8ce401a00128363ff08b406471092adaa9 | refs/heads/master | 2022-11-14T08:11:57.160782 | 2020-07-01T05:43:13 | 2020-07-01T05:49:44 | 276,755,445 | 2 | 0 | MIT | 2020-07-02T22:18:37 | 2020-07-02T22:18:36 | null | UTF-8 | Python | false | false | 2,225 | py | # Copyright (c) 2011-2020 Eric Froemling
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... | [
"ericfroemling@gmail.com"
] | ericfroemling@gmail.com |
eb6c9eeb1839c0a856982a26b9290e9e3d31157b | b7d27246e728d42a965a40951524dbfd12e4df2a | /tests/test_lazy.py | 9ba8c92d832bf898d0d8f5bb7a9dcbee9b9dd207 | [] | no_license | bwhite/hadoopy_flow | dd4a0ba3434004fa2a4c9778785d595c667798e6 | c12ecf4609b3e3f33a42fe1d050e546281a24c48 | refs/heads/master | 2021-01-10T20:17:48.134587 | 2012-01-07T13:48:32 | 2012-01-07T13:48:32 | 1,933,570 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,188 | py | try:
import unittest2 as unittest
except ImportError:
import unittest
import hadoopy_flow
import gevent
# Cheat Sheet (method/test) <http://docs.python.org/library/unittest.html>
#
# assertEqual(a, b) a == b
# assertNotEqual(a, b) a != b
# assertTrue(x) bool(x) is True
# assertFalse(x) ... | [
"bwhite@dappervision.com"
] | bwhite@dappervision.com |
d0128221d613e65c6c850f6847ad84ba64ec9bdb | 2316702793f4d85a934a82328ca5e59e468d5b11 | /DaZhongDianPing/settings.py | 8400986254c005d44af0cfe1dc060bc837545acf | [] | no_license | jakejie/DaZhongDianPing | 8c094aea071a6a00f87c4a7b34b8ef66b260d4b2 | a08c53fc33ef1bb698beafbeb692d932f2096f5e | refs/heads/master | 2020-04-24T22:25:09.491171 | 2019-02-24T08:02:33 | 2019-02-24T08:02:33 | 172,311,437 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,342 | py | # -*- coding: utf-8 -*-
BOT_NAME = 'DaZhongDianPing'
SPIDER_MODULES = ['DaZhongDianPing.spiders']
NEWSPIDER_MODULE = 'DaZhongDianPing.spiders'
# 数据库连接信息
db_host = '****'
db_user = 'root'
db_pawd = '***'
db_name = 'dp'
db_port = 3306
# 代理ip配置
use_proxy = True
'''阿布云代理'''
abu_proxy_server = "http://http-dyn.abuyun.com:... | [
"jakejie@163.com"
] | jakejie@163.com |
f05182cae84bcd50878a0856e07f28039c9a3589 | f9b025c77bc7b3aad3bc70fe7fab489c13a54f14 | /training/forms.py | dce4b5c15ad4914ec02343089d4268e0c0cff0b3 | [] | no_license | maria-j-k/WatchDog | 1ba8f443a66eb1e63641884848c88fd2ace42ba5 | fe9453cb4d66981320a8b90d45f6400838285f1b | refs/heads/master | 2023-01-04T16:59:41.339641 | 2020-10-30T10:26:07 | 2020-10-30T10:26:07 | 300,861,010 | 0 | 1 | null | 2020-10-21T22:13:24 | 2020-10-03T11:10:17 | Python | UTF-8 | Python | false | false | 1,227 | py | from django import forms
from .models import Exercise
# from staff_only.models import Ascription, Composition
class ExerciseForm(forms.ModelForm):
when = forms.SplitDateTimeField(widget=forms.widgets.SplitDateTimeWidget())
class Meta:
model = Exercise
fields = ('when', 'remarques', 'rating'... | [
"maria77julia@gmail.com"
] | maria77julia@gmail.com |
c6ac9757a31759a1917498e17f370e0f0b61642f | 3898dc9aa5b2b1e414772fa25657931cdfa422e9 | /scs_analysis/sample_regression.py | d4ddcd047c97149a7a07c4257d53b0cd1d6b945a | [
"MIT"
] | permissive | ladyrassilon/scs_analysis | 7f02aa0a35b81a104707bd87aa9224314bb157e3 | 42d6203d37bfcb0dde1a5c3e099dde9aeeb26ac1 | refs/heads/master | 2021-06-29T13:11:05.607379 | 2017-09-24T07:32:54 | 2017-09-24T07:32:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,687 | py | #!/usr/bin/env python3
"""
Created on 23 Aug 2017
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
command line example:
./socket_receiver.py | ./sample_regression.py val.sht.tmp -t 4
"""
import sys
from scs_analysis.cmd.cmd_sample_aggregate import CmdSampleAggregate
from scs_core.data.json import JSON... | [
"bruno.beloff@southcoastscience.com"
] | bruno.beloff@southcoastscience.com |
d3eb7f4dc3043c6c1eb7402170d4b2c207e3aedd | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_142/578.py | 4e15bdf45edf6710615a54bb04c19087af116351 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,361 | py |
f=open("A-small-attempt1.in","r")
T=int(f.readline().strip())
answers=[]
for i in range(T):
N=int(f.readline().strip())
strings=[f.readline().strip() for j in range(N)]
rivers=[]
counts=[]
for k in range(N):
rivers.append([])
counts.append([])
for p in range(len(strings[k])):
if len(rivers[k])==0 or ri... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
eb009c6fb46cba4f3dbac69f58bcbfa4e864c078 | 828e58fff5f3779b6fddbc029f332345adb97c4f | /yoohalal/apps/customer/utils.py | b318edd40dc6bace39892c7f1b24adf6cd6ea066 | [] | no_license | sofyandamha/Django-Oscar-Marketplace-yoohalal | 5c33ac77834dcbc199d5f39971b0f527e9627167 | 8bc1f11b1fe301f1dc5f9f9edfd6c24402effeb3 | refs/heads/master | 2020-03-27T20:52:37.031477 | 2018-09-02T16:03:43 | 2018-09-02T16:03:43 | 147,099,611 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,367 | py | import logging
from django.conf import settings
from django.core.mail import EmailMessage, EmailMultiAlternatives
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six
from oscar.core.loading import get_class, get_model
from oscar.apps.customer.utils import *
class Dispatche... | [
"sofyandamha@gmail.com"
] | sofyandamha@gmail.com |
91cc59f9eef22bb28b3c95e146ea61d44498824b | 4c538430c1329455f2665d191b98b44cd3168b5f | /telemetry/telemetry/internal/platform/power_monitor/msr_power_monitor_unittest.py | fafb2fc9143f6179a5ea2370e16b100f7e6a4fff | [
"BSD-3-Clause"
] | permissive | isabella232/catapult-csm | a0d7492e1485ef95670cbf68a028e72c5c648e3c | 8f69b07e80198c1af0d5bd368d8ad8ced968884a | refs/heads/master | 2023-03-13T00:03:27.064808 | 2017-09-01T00:54:32 | 2017-09-01T00:54:32 | 320,805,993 | 0 | 0 | BSD-3-Clause | 2021-02-23T22:37:25 | 2020-12-12T10:40:09 | null | UTF-8 | Python | false | false | 1,128 | py | # Copyright 2014 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.
import logging
import time
import unittest
from telemetry import decorators
from telemetry.internal.platform.power_monitor import msr_power_monitor
from tel... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
22405d55d28a3c4fad7a4202f91dd76aebd581a0 | 7b34cecc88b257752af3682ce198adb529f22f52 | /tests/uri/test_uri_abspath.py | 765cf55425aa19b2b7aff88fbd4eb48b24014256 | [
"MIT"
] | permissive | spaceone/httoop | c6a3c61f6b01804fa004e3ea1d46c5417b110f08 | bd170d5de030ff855d76b688f3e9d9d4f717a30a | refs/heads/master | 2023-01-05T18:36:09.904939 | 2023-01-03T20:57:56 | 2023-01-03T20:57:56 | 9,329,173 | 17 | 10 | null | 2015-06-20T21:55:10 | 2013-04-09T19:02:18 | HTML | UTF-8 | Python | false | false | 870 | py | from __future__ import unicode_literals
import pytest
from httoop import URI
@pytest.mark.parametrize('url,expected', (
(b'http://..', (u'http', u'', u'', u'..', 80, u'', u'', u'')),
(b'http:///..', (u'http', u'', u'', u'', 80, u'/', u'', u'')),
(b'http://.', (u'http', u'', u'', u'.', 80, u'', u'', u'')),
(b'ht... | [
"space@wechall.net"
] | space@wechall.net |
935f584f50d0fcf6b62c1221a66d128ebcb10e20 | 36216b52f6d3c9b5d16e9d93c56540fe07bc5f5a | /migrate/migrations/0008_auto_20180717_1704.py | 04c29e8e9bd9474d5ac1583a4ff6256da5ec7e0a | [
"MIT"
] | permissive | zerolfx/eoj3 | 3984676d1e29ad5d04f06a41836ece3f1a452054 | 156060399d1c3e5f7bcdbf34eaffbe2be66e1b20 | refs/heads/master | 2020-08-10T19:55:36.278006 | 2019-10-11T10:26:20 | 2019-10-11T10:27:19 | 214,410,171 | 1 | 0 | MIT | 2019-10-11T10:39:12 | 2019-10-11T10:39:11 | null | UTF-8 | Python | false | false | 773 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-07-17 17:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('migrate', '0007_auto_20180716_0920'),
]
operations = [
migrations.AlterField(... | [
"scottyugochang@hotmail.com"
] | scottyugochang@hotmail.com |
1ae97d58d98fe6bf5c2a2860201cd69bf3324f4d | 8364e4d23191ee535c163debffafa8418d705843 | /test/test_authentication_v1beta1_api.py | d2ee802bfaaa54f002fb278684ae51f24cfb1a36 | [
"Apache-2.0"
] | permissive | olitheolix/aiokubernetes | 2bb6499030e2e6e9b7ca0db63c4441293d70a09b | 266718b210dff2a9b2212183261ea89adf89115e | refs/heads/master | 2020-03-21T23:02:30.484410 | 2018-10-20T19:33:01 | 2018-10-22T05:52:42 | 139,162,905 | 28 | 3 | Apache-2.0 | 2018-10-22T05:52:51 | 2018-06-29T15:02:59 | Python | UTF-8 | Python | false | false | 1,036 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import u... | [
"olitheolix@gmail.com"
] | olitheolix@gmail.com |
a9b418299b36e562e3fe1bd44661f44ed61a20e6 | bfc0a74a378d3692d5b033c21c29cf223d2668da | /unittests/libtests/feassemble/data/Quadrature3DQuadratic.py | 04d65bd8bc1dda76a9d81da4be4a4b9a6bfc1450 | [
"MIT"
] | permissive | rishabhdutta/pylith | b2ed9cd8039de33e337c5bc989e6d76d85fd4df1 | cb07c51b1942f7c6d60ceca595193c59a0faf3a5 | refs/heads/master | 2020-12-29T01:53:49.828328 | 2016-07-15T20:34:58 | 2016-07-15T20:34:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,187 | py | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... | [
"baagaard@usgs.gov"
] | baagaard@usgs.gov |
c8722b2b2432b31187e27a0440b4031805ed2cbf | 7f87ea9fe9d2ad9b179fa397671b3ccaa153e878 | /reports/urls.py | 721e6310d51aa6097bb31064a44332d0fb153b9a | [
"MIT"
] | permissive | openpodd/podd-api | 9a694763d3e872cad1ca890536eeee7bc39e793e | 19af68723cef092615f9b237d0439de9425fdaf6 | refs/heads/master | 2023-07-26T13:52:31.321523 | 2023-07-06T03:32:37 | 2023-07-06T03:32:37 | 72,618,952 | 3 | 5 | MIT | 2023-02-08T22:31:03 | 2016-11-02T08:23:55 | Python | UTF-8 | Python | false | false | 255 | py | from django.conf.urls import patterns, url
urlpatterns = patterns('reports.views',
url(r'^administration-areas/$', 'search_nearby_area', name='search_nearby_area'),
url(r'^(?P<report_id>[\w-]+)/share/$', 'report_share', name='report_share'),
)
| [
"lazym0m3nt@gmail.com"
] | lazym0m3nt@gmail.com |
e98e974d72533087adc067fd4c9430d768e7211d | f82e67dd5f496d9e6d42b4fad4fb92b6bfb7bf3e | /scripts/client/tutorial/data/__init__.py | c4e14371e28c822adc2dea702524db75e402c2bb | [] | no_license | webiumsk/WOT0.10.0 | 4e4413ed4e7b00e22fb85d25fdae9400cbb4e76b | a84f536c73f86d9e8fab559e97f88f99f2ad7e95 | refs/heads/master | 2021-01-09T21:55:00.662437 | 2015-10-23T20:46:45 | 2015-10-23T20:46:45 | 44,835,654 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 309 | py | # Embedded file name: scripts/client/tutorial/data/__init__.py
from tutorial.data import chapter
from tutorial.data import conditions
from tutorial.data import descriptor
from tutorial.data import effects
from tutorial.data import events
__all__ = ('chapter', 'conditions', 'descriptor', 'effects', 'events')
| [
"info@webium.sk"
] | info@webium.sk |
47c5abe7586b03c7622b3c57ab8bb99a5b838054 | deba5baa1a1c4995c378267116a45c39e6405e39 | /luthiertext/reweighting.py | 0b0aba92fb91784d4ca5234e32742038d6cbc478 | [
"MIT"
] | permissive | LautaroEst/LuthierText | bf1f3d7103d4ec43d0711608b1061b53ba71efaa | f1395fbfda1039bd19fd829cbe853e39ae91805d | refs/heads/main | 2023-01-28T10:50:34.464265 | 2020-12-07T22:29:09 | 2020-12-07T22:29:09 | 316,622,574 | 0 | 0 | MIT | 2020-12-07T22:29:10 | 2020-11-27T23:51:24 | Python | UTF-8 | Python | false | false | 1,125 | py | import numpy as np
# Reweight methods:
def observed_over_expected(df):
col_totals = df.sum(axis=0)
total = col_totals.sum()
row_totals = df.sum(axis=1)
expected = np.outer(row_totals, col_totals) / total
oe = np.zeros(df.shape)
mask = expected != 0
#np.putmask(oe, mask, df[mask] / expecte... | [
"lautaro.est@gmail.com"
] | lautaro.est@gmail.com |
6c94cebaee424ff24b3cb1fe4622d64cf6c72d73 | 05ad6d839ba95001c8f861a5b1cd619eef8ae9b1 | /tseo/Programmers/level2/12909_올바른 괄호-2.py | c58f2c8968d802508707093f2f6c8bab9efe3717 | [] | no_license | Raziel-JKM/ps_study | cdcacdabf14e3236af96d20276459e51a0c09100 | 07602a8af7e23ca3d406ee1db2a5deab01087268 | refs/heads/master | 2023-08-11T12:20:19.830183 | 2021-09-28T23:57:03 | 2021-09-28T23:57:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | def solution(s):
x = 0
for w in s:
if x < 0:
break
x = x + 1 if w == "(" else x - 1 if w == ")" else x
return x == 0
| [
"t1won.seo@gmail.com"
] | t1won.seo@gmail.com |
85ea706f70625034a78087e6c19446ad439edb2e | d092ed0767722cb95c10bfd1740c87e5e2c44502 | /lablackey/blog/migrations/0009_post__slug.py | c0262efc1da87d54f786ec3f4c7dbb662ac77a90 | [] | no_license | chriscauley/lablackey | 3c53be7ee32e8fc6966b8700ecf8226628560c25 | cb06b4630c99589b10314fb1bc43c33559cf1e7d | refs/heads/master | 2020-12-20T15:03:36.868759 | 2018-06-22T14:52:58 | 2018-06-22T14:52:58 | 42,156,848 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 443 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-08-12 20:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0008_post_extra'),
]
operations = [
migrations.AddField(
... | [
"chris@lablackey.com"
] | chris@lablackey.com |
a214aa5f9dc87b48dfd3d51b194bbc5012177388 | 3432efd194137e1d0cb05656eb547c9992229f02 | /web_test/unit4_auto-testmodel/data driven.py | 201aef87fa1f2fef9e73f2cd8e25de704a5b046b | [] | no_license | zhanganxia/other_code | 31747d7689ae1e91fcf3f9f758df130246e7d495 | 8d09d9d0b6d6a1a9b8755487f926ac6fafd761fa | refs/heads/master | 2021-09-04T02:22:38.632685 | 2018-01-14T15:37:14 | 2018-01-14T15:37:14 | 107,007,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 293 | py | #coding=utf-8
from selenium import webdriver
import time
values=['selenium','webdriver',u'虫师']
#执行循环
for serch in values:
driver = webdriver.Firefox()
driver.get("http://www.baidu.com")
driver.find_element_by_id("kw").send_keys(serch)
time.sleep(3)
#driver.quit() | [
"kk@kk.rhel.cc"
] | kk@kk.rhel.cc |
e831a2957e6e48e8996edd0ea54bcfe15a3af4bb | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03108/s642022231.py | 9e972a0495f78cbb288e4ee0e6e9bab9b39e9c24 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,713 | py |
class UnionFind():
def __init__(self, n):
self.n = n
self.parents = [-1] * n
def find(self, x):
if self.parents[x] < 0:
return x
else:
self.parents[x] = self.find(self.parents[x])
return self.parents[x]
def union(self, x, y):
x =... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
cef7b57fecd106cbc70dcd27bd2dc2b8b2615497 | b386e60d977bd7bde9cce680fc6844324f9f2e1c | /NYC_code/Shallow Learning/01-validation/ELM_validation.py | fb6280a02011f86ddfaf255ace46cab1197783af | [] | no_license | Eric-L-Manibardo/CaseStudy2020 | bb68b0568488558dabba7f71dd1b4a38462069b4 | 5c4f38139874939b1f5bbe73062d3419392a8358 | refs/heads/master | 2023-02-01T06:44:11.117241 | 2020-12-17T15:22:45 | 2020-12-17T15:22:45 | 298,256,971 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,830 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 12 10:47:33 2020
@author: eric
"""
import numpy as np
import pandas as pd
import pickle
from sklearn.metrics import r2_score
from hyperopt import hp, fmin, tpe, Trials
from sklearn.preprocessing import StandardScaler
from elm import ELMRegressor
... | [
"erasperiko@gmail.com"
] | erasperiko@gmail.com |
ce72d2f069fc7cefa946910c25a7002e5f4519d7 | d1f15554df2d5c0f74ddbcba6e870359841f682b | /wagtail/admin/views/pages/bulk_actions/__init__.py | d9f1815d34211b2a722d65b6f1194e08db5d065e | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | wagtail/wagtail | bd405f89b86e0c625fef0685fd6bfba41cf5cbfc | 06a7bc6124bf62675c09fbe0a4ed9bbac183e025 | refs/heads/main | 2023-09-04T06:22:51.601208 | 2023-09-01T15:22:00 | 2023-09-01T15:22:00 | 16,479,108 | 12,974 | 3,580 | BSD-3-Clause | 2023-09-14T10:45:04 | 2014-02-03T12:41:59 | Python | UTF-8 | Python | false | false | 265 | py | from .delete import DeleteBulkAction
from .move import MoveBulkAction
from .publish import PublishBulkAction
from .unpublish import UnpublishBulkAction
__all__ = [
"DeleteBulkAction",
"MoveBulkAction",
"PublishBulkAction",
"UnpublishBulkAction",
]
| [
"matthew@torchbox.com"
] | matthew@torchbox.com |
4f231c9a00394cc1d038d8713b8d69fc8cca218f | d2a2546165b3db6295a3f21972dda8ab9aab7846 | /src/vehicles/stagrun_mail.py | 7a35728a5126cbd59fb019e52e43de851176dd24 | [] | no_license | andythenorth/road-hog | bab12b133dd674f0e6d7ae87498675f8da96b982 | 1800d57d4ce904e7041f24646c393b37903d9466 | refs/heads/main | 2022-09-26T19:57:31.006800 | 2022-09-17T10:09:37 | 2022-09-17T10:09:37 | 214,848,659 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | from road_vehicle import MailHauler, ElectricRoadVehicle
consist = MailHauler(id='stagrun_mail',
base_numeric_id=840,
name='Stagrun',
tram_type='ELRL',
power=360, # custom power
vehicle_life=40,
... | [
"mail@andythenorth.co.uk"
] | mail@andythenorth.co.uk |
e74a95a7f9e63141241123df2ce7e3643c4c01c1 | ded5a6677afe4fb7832148a679ae12fc2861de8b | /src/qibo/tests/test_core_distcircuit.py | e235f1929a1ac657571d4ec50754ba7ae57c7570 | [
"Apache-2.0"
] | permissive | lghui970915/qibo | 3545462222629a3ff89e31d581523fd1b843cf3c | 7338ce724c05de17619c3abd800e3a89e3888153 | refs/heads/master | 2023-08-15T23:09:01.870038 | 2021-09-27T12:42:07 | 2021-09-27T12:42:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,163 | py | """Test functions defined in `qibo/core/distcircuit.py`."""
import pytest
import numpy as np
import qibo
from qibo import gates
from qibo.models import Circuit
from qibo.core.distcircuit import DistributedCircuit
from qibo.core.distutils import DistributedQubits
def check_device_queues(queues):
"""Asserts that gl... | [
"35475381+stavros11@users.noreply.github.com"
] | 35475381+stavros11@users.noreply.github.com |
611563cc3708220987d85648c4a21f205f596914 | 7f2efccdd6413eb658161c91d75da7c0fe941505 | /catnap/basic_auth.py | 8e630f17421fbb020e45a9887414ecec9ad06a90 | [
"BSD-2-Clause"
] | permissive | aehlke/django-catnap | 82b093b9ee07f9edd294dac3e9ff3784fb2ac5cb | 4272cff0de639a65f5cc0fe131370e1531fc2e11 | refs/heads/master | 2016-09-10T15:49:43.799102 | 2016-01-26T03:02:44 | 2016-01-26T03:02:44 | 1,428,424 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,366 | py | '''
Django middleware for HTTP authentication.
Copyright (c) 2007, Accense Technology, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above cop... | [
"alex.ehlke@gmail.com"
] | alex.ehlke@gmail.com |
c6cdf1041ff9fc7b0ff226ce972855094d64682d | 7a10bf8748c7ce9c24c5461c21b5ebf420f18109 | /machine_hack/Perfect_Beer/test.py | 9360866fdb52f722f76daa0ae5f2e77a11efc796 | [] | no_license | VishalChak/machine_learning | aced4b4bf65bbbd08c966a2f028f217a918186d5 | c6e29abe0509a43713f35ebf53da29cd1f0314c1 | refs/heads/master | 2021-06-15T07:13:56.583097 | 2019-10-05T06:01:58 | 2019-10-05T06:01:58 | 133,164,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 924 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 23 09:50:42 2018
@author: vishal
"""
import random
four_random = [random.random() for _ in range(5)]
random.seed(10)
random.random()
from matplotlib import pyplot as plt
years = [1950, 1960, 1970, 1980, 1990, 2000, 2010]
gdp = [300.2, 543.3, 107... | [
"vishalbabu.in@gmail.com"
] | vishalbabu.in@gmail.com |
b89fb93450cb6a891ae2ee12a766e6a5854b92cc | f07145d3064ab5283674f723981a09e2ff659c74 | /kubevirt/models/v1_http_header.py | 06d5aa61efb2fa8e9dd2fec4f14f8004c46507d4 | [] | no_license | pkliczewski/client-python | f9d9b6b2de87e8bf7590a81269f2ae65f6e01c9e | e7b976b4225ee06f5feac3041d5779bdd6485013 | refs/heads/master | 2020-03-26T22:01:57.381927 | 2019-02-26T08:46:52 | 2019-02-26T08:46:52 | 145,426,211 | 0 | 0 | null | 2018-08-20T14:08:45 | 2018-08-20T14:08:45 | null | UTF-8 | Python | false | false | 3,727 | py | # coding: utf-8
"""
KubeVirt API
This is KubeVirt API an add-on for Kubernetes.
OpenAPI spec version: 1.0.0
Contact: kubevirt-dev@googlegroups.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class V1HTTPHe... | [
"travis@travis-ci.org"
] | travis@travis-ci.org |
4203bdb9ae8e7505a4bde8f9af083588d85d86ea | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_41/57.py | e9845f9cfdd56a580c47fdc4adadbe849c016481 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,040 | py | #
# The Next Number
#
def get_next( n ) :
digits = [ int( x ) for x in str( n ) ]
is_max = True
for i in xrange( len( digits ) - 1 ) :
if digits[ i ] < digits[ i + 1 ] :
is_max = False
break
if is_max :
min_dig = 10
min_i = 0
for i i... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
c6b89d543271fd5c2901b6b2f61e815b57950fd8 | 90419da201cd4948a27d3612f0b482c68026c96f | /sdk/python/pulumi_azure_nextgen/virtualmachineimages/__init__.py | 25800157d3eb872a6b6c3e4b15459943e753f458 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | test-wiz-sec/pulumi-azure-nextgen | cd4bee5d70cb0d332c04f16bb54e17d016d2adaf | 20a695af0d020b34b0f1c336e1b69702755174cc | refs/heads/master | 2023-06-08T02:35:52.639773 | 2020-11-06T22:39:06 | 2020-11-06T22:39:06 | 312,993,761 | 0 | 0 | Apache-2.0 | 2023-06-02T06:47:28 | 2020-11-15T09:04:00 | null | UTF-8 | Python | false | false | 311 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Make subpackages available:
from . import (
latest,
v20180201preview,
v20190201preview,
v20190501preview,
v20200214,
)
| [
"public@paulstack.co.uk"
] | public@paulstack.co.uk |
227875271cc979322bc01403fd9de5770b57f9b1 | f3b233e5053e28fa95c549017bd75a30456eb50c | /bace_input/L7C/7C-7G_MD_NVT_rerun/set_6.py | b025678738081758a6fcfed7a9a649620a0566bb | [] | no_license | AnguseZhang/Input_TI | ddf2ed40ff1c0aa24eea3275b83d4d405b50b820 | 50ada0833890be9e261c967d00948f998313cb60 | refs/heads/master | 2021-05-25T15:02:38.858785 | 2020-02-18T16:57:04 | 2020-02-18T16:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 740 | py | import os
dir = '/mnt/scratch/songlin3/run/bace/L7C/MD_NVT_rerun/ti_one-step/7C_7G/'
filesdir = dir + 'files/'
temp_prodin = filesdir + 'temp_prod_6.in'
temp_pbs = filesdir + 'temp_6.pbs'
lambd = [ 0.00922, 0.04794, 0.11505, 0.20634, 0.31608, 0.43738, 0.56262, 0.68392, 0.79366, 0.88495, 0.95206, 0.99078]
for j in lam... | [
"songlin3@msu.edu"
] | songlin3@msu.edu |
88e9543bc5c42262c339e1e406e2fb38de68104a | 5a7e67c5272a52e04b8250ddb2e38fff99926f97 | /演讲目录/转盘.py | fe60943f101678e9c6102c7dcb8e9a611c3de5c2 | [] | no_license | gitshangxy/tutorial | b45dd7039b34d3a7c4ea7d223cb51ca28fc2f95c | 6259eabe9b863ddb0dc291387b4f0ae1ad5fa9a0 | refs/heads/master | 2022-12-12T21:10:15.180042 | 2019-02-27T13:32:59 | 2019-02-27T13:32:59 | 164,381,503 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,229 | py | import tkinter
# 导入线程模块
import threading
import time # 导入代码的sleep 代码休眠
root = tkinter.Tk()
root.title('大转盘')
root.minsize(300, 300)
# 摆放按钮,位置
btn1 = tkinter.Button(root, text='葡萄', bg='red')
btn1.place(x=20, y=20, width=50, height=50)
btn2 = tkinter.Button(root, text='鸭梨', bg='white')
btn2.place(x=90, y=20, width=5... | [
"2765970564@qq.com"
] | 2765970564@qq.com |
d1e7f5c0eb10facd934fec44d137c264508d157c | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2577/60593/255888.py | f83655fbb857b423a4c1c3660a2adf83d69629ac | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 604 | py | from typing import List
class Solution:
def jobScheduling(self, startTime: List[int], endTime: List[int], profit: List[int]) -> int:
H = sorted(zip(startTime, itertools.repeat(1), endTime, profit))
res = 0
while H:
t = heapq.heappop(H)
if t[1]:
heapq.h... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
537e9da86a363ea41cf913ef4a75e189d52ab84f | 08c8bf9ea15094eee96df1a42d1d222362b5dc7a | /src/dicom_parser/utils/plane.py | f3382da98b2bfad3d32770b774a7da31c31ce90d | [
"MIT"
] | permissive | open-dicom/dicom_parser | 51801fc9e86379e470308b28f05b9520315c82fc | 8f9224dfb1e12ee52aa17d520f10e169fe400391 | refs/heads/main | 2023-04-07T01:21:31.390019 | 2023-03-15T12:48:23 | 2023-03-15T12:48:23 | 241,392,223 | 12 | 9 | MIT | 2023-03-15T12:48:27 | 2020-02-18T15:09:51 | Python | UTF-8 | Python | false | false | 160 | py | """
Definition of the :class:`Plane` Enum.
"""
from enum import Enum
class Plane(Enum):
AXIAL = "Axial"
CORONAL = "Coronal"
SAGITTAL = "Sagittal"
| [
"z.baratz@gmail.com"
] | z.baratz@gmail.com |
39ce1a72c370aad883c0674029ade95549786733 | fb1b1c2d3964f5678c0e3a74d7339f6c4861526f | /weatherapi.py | b0937bce4464484c0176e7f4825063678fcd762b | [] | no_license | mabordon/seminarioitba | f10d4f60ef66972697732156e0d2b6bba97ec15e | 001379b2f3b8c8222cbe1859ebfdb36d29bc4b8b | refs/heads/main | 2023-03-02T18:53:40.281638 | 2021-02-08T18:18:02 | 2021-02-08T18:18:02 | 330,523,383 | 0 | 2 | null | 2021-01-30T22:02:25 | 2021-01-18T01:24:57 | Python | UTF-8 | Python | false | false | 622 | py | import requests
import json
from itbatools import get_api_property_hook
class WeatherApi:
def __init__(self):
self._propertyhook=get_api_property_hook()
def get_weather_info(self):
response = requests.request("GET", self._pr... | [
"maximiliano.bordon@gmail.com"
] | maximiliano.bordon@gmail.com |
5da6f76724892eb9efb0c2ffbb0821b3792bdd0e | 43e53df2f2bc1779c2896541940a235e66a02b02 | /day13/songdan_digui.py | 1819b3a4eadbe5ba0823a4b04f35a1a9a014654b | [] | no_license | songdanlee/python_code_basic | ddb3276b0473a261423c43d5d8e7a1ff038d5c51 | f32cd4dc9670e55ffa6abe04c9184bfa5d8bbc41 | refs/heads/master | 2020-07-14T21:05:30.471486 | 2019-08-30T14:55:51 | 2019-08-30T14:55:51 | 205,402,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | def digui(n):
print(n)
if n == 1:
return
digui(n - 1)
# digui(5)
def digui2(n, cur=1):
print(cur)
if cur == n:
return
digui2(n, cur + 1)
digui2(5)
| [
"2533636371@qq.com"
] | 2533636371@qq.com |
36b18576a92258fc9b4cbf8cb315bb2d9e86a5b7 | e43bb6ea66d02b573ae5a17f9b933082736718e3 | /backend/models/publisher.py | f4fc228decefa66b9bb4f17d37df1ad8cbe57c04 | [] | no_license | bhaveshAn/skoobe-task | 6c95b6791bca8ef143fa044e85a612f863ec885c | 60a04c8dc2519bc8d95983a97b040bb72eb47733 | refs/heads/master | 2020-03-12T02:13:23.548014 | 2018-04-20T18:04:35 | 2018-04-20T18:04:35 | 130,396,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | from db import db
class Publisher(db.Model):
__tablename__ = 'publisher'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(80))
weight = db.Column(db.Integer)
def __init__(self, name, weight):
self.name = name
self.weight = weight
def save(self)... | [
"bhaveshanand7@gmail.com"
] | bhaveshanand7@gmail.com |
956943316f9a35dc8efb1f58246ac1f29101ac0d | d833487ba7a78e900ce535d60c123986ab5ebfee | /Binary Trees/8. All Kinds Of Node Depths/Solution2.py | 09de6a404c52f1f137e3d3607146b18ad62ab3d2 | [] | no_license | ceteongvanness/Algorithm-Python | b71af3bca4d2573f4a0d18dc991012b996746d6a | 0151e7bac3f4032bbc76caa209bb63cdfa8a581e | refs/heads/master | 2023-01-31T04:17:22.425719 | 2020-12-14T05:21:15 | 2020-12-14T05:21:15 | 263,880,376 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | def allKindsOfNodeDepths(root):
if root is None:
return 0
return allKindsOfNodeDepths(root.left) + allKindsOfNodeDepths(root.right) + nodeDepths(root)
def nodeDepths(node, depth=0):
if node is None:
return 0
return depth + nodeDepths(node.left, depth + 1) + nodeDepths(node.right, depth + 1)
# This is the class... | [
"ceteongvanness@hotmail.com"
] | ceteongvanness@hotmail.com |
3eeff7fffd9e1435bec9df575bdb54259278f6e6 | 0cf3a74494ed92bcdeaf0220ad44475c1b6b2c1c | /airflow/providers/amazon/aws/transfers/dynamodb_to_s3.py | 051705321c88583349b087535eb2a60950a90e86 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | bolkedebruin/airflow | 064a0c32dff267f586c3fd4dc4beaae12273d180 | e1fe30c70d0fe9c033db9daf9d4420f7fa815b2d | refs/heads/master | 2023-06-09T11:37:57.734560 | 2022-02-23T12:38:27 | 2022-02-23T12:38:27 | 38,505,714 | 2 | 7 | Apache-2.0 | 2022-03-01T01:22:16 | 2015-07-03T18:27:44 | Python | UTF-8 | Python | false | false | 6,027 | py | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | [
"noreply@github.com"
] | bolkedebruin.noreply@github.com |
bd38a87c39a0b515aa0d06ae1154c6ee38789b46 | b54b6168ba35ce6ad34f5a26b5a4a3ab8afa124a | /kratos_2_2_0/applications/structural_application/test_examples/cantilever2d.gid/cantilever2dstatic_pardiso.py | 6d17a1f64523dfe2edfe0a93ce1444904a1186f9 | [] | no_license | svn2github/kratos | e2f3673db1d176896929b6e841c611932d6b9b63 | 96aa8004f145fff5ca6c521595cddf6585f9eccb | refs/heads/master | 2020-04-04T03:56:50.018938 | 2017-02-12T20:34:24 | 2017-02-12T20:34:24 | 54,662,269 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,423 | py | ##################################################################
##################################################################
#setting the domain size for the problem to be solved
domain_size = 2
##################################################################
################################################... | [
"pooyan@4358b7d9-91ec-4505-bf62-c3060f61107a"
] | pooyan@4358b7d9-91ec-4505-bf62-c3060f61107a |
fddad4d9aa4ddf78b4cdcc1ab3d03ae8f702f7c4 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02886/s977520988.py | 4909b2240f0be25cb4b63a8616d6594ac7f19fb3 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | import itertools
n = int(input())
Tako = list(map(int, input().split()))
ans = 0
for x,y in itertools.combinations(Tako,2):
ans += x*y
print(ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d26ec273370bfa28ec700b67a0376f44423aadfe | 8afb5afd38548c631f6f9536846039ef6cb297b9 | /_REPO/APRESS/practical-python-ai-projects/Apress-AI-master/test_blend_multi.py | 75cb7383086d7a5c525ddd69499ea452da34817f | [
"MIT"
] | permissive | bgoonz/UsefulResourceRepo2.0 | d87588ffd668bb498f7787b896cc7b20d83ce0ad | 2cb4b45dd14a230aa0e800042e893f8dfb23beda | refs/heads/master | 2023-03-17T01:22:05.254751 | 2022-08-11T03:18:22 | 2022-08-11T03:18:22 | 382,628,698 | 10 | 12 | MIT | 2022-10-10T14:13:54 | 2021-07-03T13:58:52 | null | UTF-8 | Python | false | false | 2,814 | py | from blend_multi import (
gen_data_content,
gen_data_target,
gen_data_cost,
gen_data_inventory,
solve_model,
)
def main():
import sys
import random
import tableutils
m = 9
n = 7
k = 5
if len(sys.argv) <= 1:
print("Usage is main [content|target|cost|inventory|ru... | [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
b15766821cdea5298e4f0dacccb8662796266fea | e7efae2b83216d9621bd93390959d652de779c3d | /weblogic/tests/test_check.py | 214a532c52564c9d0e08e20c3b76c25f2ff19dc6 | [
"BSD-3-Clause",
"MIT",
"BSD-3-Clause-Modification",
"Unlicense",
"Apache-2.0",
"LGPL-3.0-only",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | DataDog/integrations-core | ee1886cc7655972b2791e6ab8a1c62ab35afdb47 | 406072e4294edff5b46b513f0cdf7c2c00fac9d2 | refs/heads/master | 2023-08-31T04:08:06.243593 | 2023-08-30T18:22:10 | 2023-08-30T18:22:10 | 47,203,045 | 852 | 1,548 | BSD-3-Clause | 2023-09-14T16:39:54 | 2015-12-01T16:41:45 | Python | UTF-8 | Python | false | false | 625 | py | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
from datadog_checks.dev.jmx import JVM_E2E_METRICS_NEW
from datadog_checks.dev.utils import get_metadata_metrics
from .metrics import METRICS
@pytest.mark.e2e
def test(dd_agent_check):
... | [
"noreply@github.com"
] | DataDog.noreply@github.com |
8c810c73d5aebc5379e8a9178f1f180256e2afee | 57c8469273463fba71d8a826b968590fbd9c84a9 | /nbt/writefiles/writefiles.py | 4055624dc5dfec4bea7ea01fadeda930cf450006 | [
"MIT"
] | permissive | fcoolish/All4NLP | 69cc9e6d6cd8ceeca5f0c3022caeeca8951b48a0 | 061f5b062eb89b6fc2270d5c89bcaf3a1f3c9f98 | refs/heads/master | 2020-07-02T03:46:23.626256 | 2019-08-09T06:33:40 | 2019-08-09T06:33:40 | 201,406,639 | 1 | 0 | MIT | 2019-08-09T06:35:57 | 2019-08-09T06:35:57 | null | UTF-8 | Python | false | false | 462 | py | import jieba
def write2txt(file, datalist, lenneed=False, MIN=8, MAX=32, listlen=True):
with open(file, 'w') as f:
for line in datalist:
if lenneed:
if listlen:
lenline = len(jieba.lcut(line))
else:
lenline = len(line)
... | [
"haoshaochun@gmail.com"
] | haoshaochun@gmail.com |
7b09b6231855e34ff1c0ef936931f9d28033cd24 | 8ef8e6818c977c26d937d09b46be0d748022ea09 | /cv/pose/alphapose/pytorch/detector/tracker_cfg.py | b33c316dfecae0386b7b8afa8262dc4930502c75 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Deep-Spark/DeepSparkHub | eb5996607e63ccd2c706789f64b3cc0070e7f8ef | 9d643e88946fc4a24f2d4d073c08b05ea693f4c5 | refs/heads/master | 2023-09-01T11:26:49.648759 | 2023-08-25T01:50:18 | 2023-08-25T01:50:18 | 534,133,249 | 7 | 6 | Apache-2.0 | 2023-03-28T02:54:59 | 2022-09-08T09:07:01 | Python | UTF-8 | Python | false | false | 280 | py | from easydict import EasyDict as edict
cfg = edict()
cfg.CONFIG = 'detector/tracker/cfg/yolov3.cfg'
cfg.WEIGHTS = 'detector/tracker/data/jde.1088x608.uncertainty.pt'
cfg.IMG_SIZE = (1088, 608)
cfg.NMS_THRES = 0.6
cfg.CONFIDENCE = 0.4
cfg.BUFFER_SIZE = 30 # frame buffer | [
"mingjiang.li@iluvatar.ai"
] | mingjiang.li@iluvatar.ai |
3093dbb9b5d0b08e32d03e325f699f3b93d753d3 | 75dff087b6bec301193b2c145579d38b28249d22 | /Leetcode_Algorithm/Python3/437_Path_Sum_III.py | d6574dd72d6d889a4f64305297b93de84f4be463 | [] | no_license | ChihYunPai/Data-Structure-and-Algorithms | 2d3d930d8374b62287f7cc8c3741a1d7b3d227b6 | 27a85e20605393a5eca3f8bd7d42c389612493d5 | refs/heads/master | 2023-06-07T04:04:57.186920 | 2021-07-03T03:28:29 | 2021-07-03T03:28:29 | 119,465,269 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,540 | py | """
You are given a binary tree in which each node contains an integer value.
Find the number of paths that sum to a given value.
The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child nodes).
The tree has no more than 1,000 nodes and the val... | [
"tonypaiwhite@gmail.com"
] | tonypaiwhite@gmail.com |
e955e8dba4fa8b7c83876490dd570be188aa3522 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03151/s425619458.py | a50649e7c76f210d72664abd7fef814637b91342 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
diff = [0] * N
neg = []
pos = []
for i in range(N):
diff[i] = A[i] - B[i]
if diff[i] < 0:
neg.append(diff[i])
else:
pos.append(diff[i])
if sum(diff) < 0:
print(-1)
exit(0)
tobe_supplied = sum(... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f60d16497e0d9346c1c13a400dda2abc28b8d7a2 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2311/60763/319765.py | f8e65fbb87eb5fa9379a0e1a26775308f74d9ac2 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | #include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <iterator>
#include <algorithm>
#include <numeric>
using namespace std;
void sumtree(vector<int> &inorder, int left, int right){
int mid = (left + right)/2;
if(mid == left) {
inorder[mid] = 0;
return;
}
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.