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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10a57f45023bd99e590058c70fed50cd5dbdabde | d6d20681f41102df3feb2b438ef80569bd73730f | /Uge4-numpy/.history/exercises_20200218211509.py | 721a35c816eab099a775532e7a3d12f563a27947 | [] | no_license | MukHansen/pythonAfleveringer | d0ad2629da5ba2b6011c9e92212949e385443789 | 4107c3c378f757733961812dd124efc99623ff2e | refs/heads/master | 2020-12-22T13:27:19.135138 | 2020-05-22T11:35:52 | 2020-05-22T11:35:52 | 236,796,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,051 | py | import numpy as np
import matplotlib.pyplot as plt
from collections import OrderedDict
filename = './befkbhalderstatkode.csv'
data = np.genfromtxt(filename, delimiter=',', dtype=np.uint, skip_header=1)
neighb = {1: 'Indre By', 2: 'Østerbro', 3: 'Nørrebro', 4: 'Vesterbro/Kgs. Enghave',
5: 'Valby', 6: 'Vanløse',... | [
"[email protected]"
] | |
ab5f5aaf705c61d6d3a52fe6a016b2045c35009c | 099256b28df65fb7c90c077b060dca16b8655235 | /math/0x00-linear_algebra/100-slice_like_a_ninja.py | e1589c7bf3ddf30431df2717bebb8ee713b0f971 | [] | no_license | Immaannn2222/holbertonschool-machine_learning | 1cebb9a889b363669bed7645d102dc56ab943c08 | 80bf8d3354702f7fb9f79bbb5ed7e00fc19f788d | refs/heads/master | 2023-08-01T05:35:00.180472 | 2021-09-22T20:28:17 | 2021-09-22T20:28:17 | 317,624,526 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | #!/usr/bin/env python3
""" advanced task """
def np_slice(matrix, axes={}):
""" slices a matrix along specific axes """
new = []
for x in range(len(matrix.shape)):
if x in axes:
new.append(slice(*axes[x]))
else:
new.append(slice(None))
return(matrix[tuple(new)])... | [
"[email protected]"
] | |
bd4930323e802b96035529be61f106d64f693e9e | b92e187f60b1bc8bd74eaa0ffc6e1ac50911a08e | /django/dataset/detailsAPI/admin.py | 32e817d5754f1a5fc95bf212913daa6c3b9565d0 | [] | no_license | code-xD/codefundo-hack | ad5b149726188bd15be7476f14adf90f08ff33d7 | f4883015d2d5f4b1b6a493ffa58249c46fc544a1 | refs/heads/master | 2022-12-10T10:41:30.388439 | 2019-08-20T12:06:19 | 2019-08-20T12:06:19 | 195,676,080 | 0 | 1 | null | 2022-05-25T03:12:11 | 2019-07-07T16:56:28 | CSS | UTF-8 | Python | false | false | 127 | py | from django.contrib import admin
from .models import VoterDetail
# Register your models here.
admin.site.register(VoterDetail)
| [
"[email protected]"
] | |
1f2e6da575054c5f9539d0a9dfc2ceecc2f7f8ae | bfe6c95fa8a2aae3c3998bd59555583fed72900a | /findMaxValueOfEquation.py | 44e49a562e323596044cf7ecbec22a3e97ebfb8e | [] | no_license | zzz136454872/leetcode | f9534016388a1ba010599f4771c08a55748694b2 | b5ea6c21bff317884bdb3d7e873aa159b8c30215 | refs/heads/master | 2023-09-01T17:26:57.624117 | 2023-08-29T03:18:56 | 2023-08-29T03:18:56 | 240,464,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 933 | py | from typing import List
class Solution:
def findMaxValueOfEquation(self, points: List[List[int]], k: int) -> int:
stack = []
j = 0
out = -12345678901234
for i in range(len(points) - 1):
while j < len(points) and points[j][0] - points[i][0] <= k:
tmp = p... | [
"[email protected]"
] | |
de469789154588023215e0a3a02a630ce008e14b | 22029865c571f7f5ba18de77f8eea6b3e77b3bbb | /phiface/context.py | b995768e6a32eadfac7ff45dc5d059a29a2a5afd | [
"BSD-2-Clause"
] | permissive | mikejs/phiface | cfc100421afa4bef9c4afa6eb4ac8f7ae8d74163 | 2a2a5f8e1e555784cb2f2a27cecdf9c25a1c6044 | refs/heads/master | 2021-01-18T10:31:48.989712 | 2010-04-21T04:13:45 | 2010-04-21T04:13:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,456 | py | import cairo
from shapely.geometry import *
PDFOutput = True
# flatten from:
# http://rightfootin.blogspot.com/2006/09/more-on-python-flatten.html
def flatten(l, ltypes=(list, tuple)):
ltype = type(l)
l = list(l)
i = 0
while i < len(l):
while isinstance(l[i], ltypes):
if not l[i]:
... | [
"[email protected]"
] | |
48c3f72ee6abaa8cbb830bcb382ccfefdb237956 | c36fc8f9bbc3e5891474bbbf17de09711cc9d0af | /alvi/client/scenes/merge_sort.py | 38997dcfec013867d20041a4f1f348d5d766e843 | [
"MIT"
] | permissive | alviproject/alvi | f527043c1ecaf4557188c312db7e8a8065ec054d | ec77919a546c11c46b178a21236792f8b0d95cbd | refs/heads/master | 2021-01-19T01:45:51.157037 | 2016-06-17T19:44:09 | 2016-06-17T19:44:09 | 13,392,604 | 10 | 5 | null | 2014-03-02T14:05:54 | 2013-10-07T18:54:09 | JavaScript | UTF-8 | Python | false | false | 1,116 | py | from alvi.client.scenes.sort import Sort
class MergeSort(Sort):
def merge(self, array, left, mid, right):
temp = []
for i in range(left, right):
temp.append(array[i])
i = 0
j = right - mid
k = 0
while k < len(temp):
if i >= mid - left:
... | [
"[email protected]"
] | |
74abd35dc7be54c8af5452993644678fe289aae8 | 8fc9520d7224e6179f63f19e668b4b3b6a7d76c5 | /apps/catalogue/migrations/0006_auto__add_field_product_is_discountable.py | 35581eb19b16340bf4e806e466cfd03e6678e23f | [] | no_license | quantm/custom_django_oscar | 352ef2fd95e7da932958d4aa80d77dff5b6c1e70 | 9205807030ab360884283810e94177440c228a23 | refs/heads/master | 2016-08-09T12:23:39.413677 | 2016-02-08T22:16:53 | 2016-02-08T22:16:53 | 51,326,524 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,063 | py | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Product.is_discountable'
db.add_column('catalogue_product', 'is_discountable', ... | [
"[email protected]"
] | |
311eac1a6c280507906e8cf7a87844607ff9fddf | 04c7295ce65a623dc62454aa46ae4ae4ce51ca36 | /Lecture/Lecture_3/three_special_perfect_squares_v1_v3.6.py | 8f5b2aa24f0c1e10d1bad0df764379d50125baab | [] | no_license | hty-unsw/COMP9021-Python | 38373378162a314a82bf14453d026e641963e1b9 | 97be6dfa730247b59e608ec6d464ac16b4cf1968 | refs/heads/master | 2020-07-03T00:51:23.540099 | 2018-10-30T14:23:15 | 2018-10-30T14:23:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,398 | py | # Describes all sets of positive integers {x, y, z} such that
# x, y and z have no occurrence of 0,
# every nonzero digit occurs exactly once in one of x, y or z,
# and x, y and z are perfect squares.
#
# Written by Eric Martin for COMP9021
from math import sqrt
def digits_if_ok(number, digits_seen_so_far):
... | [
"[email protected]"
] | |
bd2567eb7e348826d18e2bd1cca6275f0f0602e8 | 9cd180fc7594eb018c41f0bf0b54548741fd33ba | /sdk/python/pulumi_azure_nextgen/network/v20180201/security_rule.py | fa3d42ca6372ba696deef9c4135a4eef42ff5c3b | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | MisinformedDNA/pulumi-azure-nextgen | c71971359450d03f13a53645171f621e200fe82d | f0022686b655c2b0744a9f47915aadaa183eed3b | refs/heads/master | 2022-12-17T22:27:37.916546 | 2020-09-28T16:03:59 | 2020-09-28T16:03:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,117 | 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! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | [
"[email protected]"
] | |
86106338bded9ea79b22a0ead788c9f19d612858 | d227fb26e33128afe868bef60e3042f7c6576643 | /editor/Welder/src/Core/Database/Dialogs/ChooseGraphic_Dialog.py | fe49fe21d0ebcf6b5fedbd48ed36524feb53e61d | [] | no_license | boisei0/arcreator | 1e57b9cc61d5b38bfd0d62237592cfd9f371eca9 | 555739cafdeeed19d3c25c4948416a6ecb7697d5 | refs/heads/master | 2020-12-02T05:02:36.242572 | 2014-08-05T19:25:41 | 2014-08-05T19:25:41 | 22,642,617 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,223 | py | import os
import wx
import PIL
from Boot import WelderImport
Kernel = WelderImport('Kernel')
Core = WelderImport('Core')
Templates = Core.Database.Welder_Templates
RTPFunctions = Core.Cache.RTPFunctions
PILCache = Core.Cache.PILCache
class ChooseGraphic_Dialog( Templates.ChooseGraphic_Dialog ):
def __init__( self... | [
"[email protected]"
] | |
d9eae03071430ffe4305fbd6afc9dc79c2905f78 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03795/s062323227.py | 74243f5eea190a8c47dde198e5a4b21d6edf84c9 | [] | 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 | 50 | py | N = int(input())
print(int(800*N-200*(N-N%15)/15)) | [
"[email protected]"
] | |
c3d2c4d91f89382b08790e31e8951c7bb047b615 | c369443df5ff98eccc0eee7f63bb8947f2943605 | /api_shop/urls.py | faef15fce178629654a49b9494cf03b6b004d406 | [] | no_license | erllan/shop-test | d2934f484b25d141a60caa5aca31a61eec48f055 | 1f77de177192ce6a1f8c5ccf1d7ca93ec026acf5 | refs/heads/master | 2023-03-06T01:04:38.785383 | 2021-02-27T18:02:07 | 2021-02-27T18:02:07 | 341,929,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | from django.urls import path
from rest_framework_simplejwt import views as jwt_views
from . import views
urlpatterns = [
path('token/', jwt_views.TokenObtainPairView.as_view(), name='api.get_token'),
path('token/refresh/', jwt_views.TokenRefreshView.as_view(), name='api.token_refresh'),
path('user/change/'... | [
"[email protected]"
] | |
f611ff278e26d20dff934778c3c730b2b4e310bf | e8a48749014f372633de65d79bfa26a3ad743d89 | /src/transformers/models/marian/modeling_tf_marian.py | d356b4f8424008f518c2100b56668730cd548012 | [
"Apache-2.0"
] | permissive | pvcastro/pytorch-pretrained-BERT | 183b7291972c8d8c66c995647df66c1fe439a763 | 49cd736a288a315d741e5c337790effa4c9fa689 | refs/heads/master | 2022-08-19T08:55:16.332585 | 2022-06-30T16:11:08 | 2022-06-30T16:11:08 | 168,367,637 | 1 | 0 | Apache-2.0 | 2019-01-30T15:39:42 | 2019-01-30T15:39:41 | null | UTF-8 | Python | false | false | 67,868 | py | # coding=utf-8
# Copyright 2021 The Marian Team Authors and The HuggingFace Inc. team. 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/licen... | [
"[email protected]"
] | |
b874247bc7250254be315256308819b4f715e819 | 9153b0679889a64dd9a0dae12d9e3e22a749bc69 | /webserver/app/main/controller/testresult_controller.py | 369d8b4c5ba239aee147559fbc2453f66115012a | [
"MIT"
] | permissive | Remoterwls/Auto-Test-System | 9e0a6c96a5222a7374e5755c518d7a10bb96f6bd | e865758241beee3bd0c56a120f3986b0c4aa7253 | refs/heads/master | 2022-12-03T01:55:37.158529 | 2020-07-30T10:17:19 | 2020-07-30T10:17:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,394 | py | import json
import os
from datetime import date, datetime, timedelta, timezone
from dateutil import parser, tz
from pathlib import Path
from bson.objectid import ObjectId
from flask import request, send_from_directory, url_for, current_app
from flask_restx import Resource
from mongoengine import DoesNotExist, Validati... | [
"[email protected]"
] | |
06a3ccc9647df2d8be805513e54fa0479aa7d101 | 20674c17d815214bf66b75be686bb8a45c0f5914 | /version1/910_Smallest_Range_II.py | 3c29c134342ecfaaf96e139eb9e1f848e33f07ef | [] | no_license | moontree/leetcode | e7b670969fe20785b15aae82996875fd66de1b08 | f2bf9b13508cd01c8f383789569e55a438f77202 | refs/heads/master | 2021-05-20T20:36:45.615420 | 2020-04-02T09:15:26 | 2020-04-02T09:15:26 | 252,408,563 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,314 | py | """
Given an array A of integers,
for each integer A[i] we need to choose either x = -K or x = K,
and add x to A[i] (only once).
After this process, we have some array B.
Return the smallest possible difference between the maximum value of B and the minimum value of B.
Example 1:
Input:
A = [1], K = 0
Output:
... | [
"[email protected]"
] | |
53a36dfdacc99125a08b041494733bbc5773b5f3 | 60b1f668808de2b82c2fcb62b07b45bb165219f2 | /egoi-api/models/campaign_push_content_template.py | 5715e23678e0f22dc440f87b2c4e513c0561e029 | [] | no_license | andersonmiguel/Egoi | 6d37bf7a3a7555e764f7a6e792b3ef1c68fe8e20 | b5f59f9b33ea94e170f4e7e26c6a37a78d2874c2 | refs/heads/master | 2022-06-21T07:18:44.920786 | 2020-05-04T17:29:02 | 2020-05-04T17:29:02 | 261,250,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,703 | py | # coding: utf-8
"""
APIv3 (Beta)
# Introduction Just a quick peek!!! This is our new version of API. Remember, it is not stable yet!!! But we invite you play with it and give us your feedback ;) # Getting Started E-goi can be integrated with many environments and programming languages via our REST API. We'v... | [
"[email protected]"
] | |
a0756500f16eb446c0c1b5acdb3013ffd5fb367a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02675/s466664784.py | 78be685e40ac4a6f27ae611368839fa6f0052292 | [] | 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 | 173 | py | N = int(input())
judge = N%10
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if judge in hon:
print("hon")
elif judge in pon:
print("pon")
elif judge in bon:
print("bon") | [
"[email protected]"
] | |
b14c8bc236b026f60a14731df9d445ec1900f808 | 55d36c0d471b5799838330cab64229947f10c99c | /Snake_lib/worm.py | d76fd6210da79d34edc4f885085c215d5744f396 | [] | no_license | hammadhaleem/Snake-game | 6fb601201686068cd7129317d42b498de886b1df | 2553cdcde641f4658d985ac5c3709ad786a57143 | refs/heads/master | 2021-01-22T09:41:42.787725 | 2013-04-21T16:52:30 | 2013-04-21T16:52:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,474 | py | # WORM Class #
import pygame
from globalvar import *
class Worm(object):
def __init__(self,surface,x,y,len=50):
self.player_name=" "
self.x=x
self.y=y
self.lag=1
self.first_x=self.x
self.first_y=self.y
self.surface=surface
self.color=worm_color
... | [
"[email protected]"
] | |
027b9caef0850dcdd1dc4783426b6900fa67eaee | 2e58532464f58b27de68297b0348f0c460448474 | /Assignment-7/How_to_Write_Match/main_3.py | c7984212e0a63d3735236561dff194507a3e9578 | [] | no_license | RidaATariq/ITMD_413 | 969a2ebe48746b3269493027daef666bd7a26997 | ee1676419e2a09ce4d52cfca3c3e02f00b24f74f | refs/heads/main | 2023-04-20T19:15:12.864852 | 2021-05-09T18:41:46 | 2021-05-09T18:41:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | import re
# pattern = re.compile(r'\d\d\d.\d\d\d.\d\d\d\d')
pattern = re.compile(r'\d{3}.\d{3}.\d{4}') # same pattern as above but number specifies the no. of /d
# matches = pattern.finditer(text_to_search)
# for match in matches:
# print(match)
with open('data.txt', 'r') as f:
contents = f.read()
matc... | [
"[email protected]"
] | |
bcbac824d74d96140a3d7c8bf90485d3a39c8eb8 | bf0aa689b92be1df24100e8581caab59a74e31db | /src/loaders/npzpck.py | c689dda4e06a1adf307df646cef07b6ad420aa1b | [
"MIT"
] | permissive | shmilee/gdpy3 | d7c689a70557534baa98595092cee0d737ea93cc | cdebb80dbb4a4d84ffa7115d8f18b5589fd40fb2 | refs/heads/master | 2023-08-19T22:42:40.305085 | 2023-08-15T02:11:15 | 2023-08-15T03:11:04 | 88,051,033 | 9 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,405 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2020 shmilee
'''
Contains Npz pickled file loader class.
'''
import numpy
import zipfile
from ..glogger import getGLogger
from ..utils import inherit_docstring
from .base import BasePckLoader, _pck_copydoc_func
__all__ = ['NpzPckLoader']
log = getGLogger('L')
@inherit... | [
"[email protected]"
] | |
15fa7543b47b6784593debfdb2a8c0b909735180 | 4cef505611a04383310ce6556fac7acb02dbc8a1 | /No ingestion test script/No_ingestion_test_showtime_anytime.py | 3e7aaccddd9211ae1241a17fa2b57af461c79aeb | [] | no_license | Sayan8981/Projectx | 9d8727eec144da35f2acffc787f3c769beef02e1 | bcf93fe885e4cd68bb2c30c408a3b03e785965c3 | refs/heads/master | 2022-03-26T18:13:02.831185 | 2020-01-16T06:52:31 | 2020-01-16T06:52:31 | 187,637,492 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,357 | py |
"""Writer: Saayan"""
import MySQLdb
import collections
from pprint import pprint
import sys
import csv
import os
import pymysql
import pymongo
import datetime
import sys
import urllib2
import json
import os
from urllib2 import HTTPError
import httplib
import socket
def ingestion():
conn1=pymysql.connect(use... | [
"[email protected]"
] | |
32104a52bb1ffb03bb96243e4787ce2b62d3e161 | a5c57d60e11d6194ab590b43ee61c21dbe9d3675 | /src/bio2bel_drugbank/constants.py | 6fdc1f9a930062c372375cee9a62179b39b507e3 | [
"MIT"
] | permissive | sailfish009/drugbank_bio2bel | 5779365d02b85eecddda5e87358abf3b424464c4 | ccab91aacfa70e362ed25a9343d7dd47d619a26c | refs/heads/master | 2022-02-23T06:20:12.643593 | 2019-10-15T10:28:06 | 2019-10-15T10:28:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 378 | py | # -*- coding: utf-8 -*-
"""Constants for Bio2BEL DrugBank."""
import os
from bio2bel.utils import get_connection, get_data_dir
VERSION = '0.1.2-dev'
MODULE_NAME = 'drugbank'
DATA_DIR = get_data_dir(MODULE_NAME)
DRUGBANK_URL = 'https://www.drugbank.ca/releases/5-1-4/downloads/all-full-database'
DRUGBANK_PATH = os.... | [
"[email protected]"
] | |
29c705cad1edefde7a3423ca8e3cb007bcdd5fe8 | 67954fee55a838d3c14ea5758b178f7fddb7d5f7 | /teacher/migrations/0001_initial.py | 3867ed4443a95746325d5ff6c2661d334d11b7ac | [] | no_license | Abel-Fan/student_admin | 899ce1130273fec0905ca4de1fe3c37e6e456b05 | e3c1b96f048273dda20b975917a66dabe97b8851 | refs/heads/master | 2020-06-06T10:17:44.563845 | 2019-06-20T09:54:24 | 2019-06-20T09:54:24 | 192,711,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 720 | py | # Generated by Django 2.1.1 on 2019-06-20 06:55
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('student', '0002_auto_20190620_1451'),
]
operations = [
migrations.CreateModel(
name='Teacher',
f... | [
"[email protected]"
] | |
980f6bbb5dc5a2a639e07f041266478030497e29 | 11ada50b47a245278a41b1f2cdae60bc387937da | /gala/potential/potential/builtin/pybuiltin.py | d2a6888e172a89a36bb718859afae3aa8bd2bd42 | [
"MPL-1.1",
"MIT"
] | permissive | ltlancas/gala | 7ec9111e3bf9f49823f393ad08f04aa4c34cf0df | 2621bb599d67e74a85446abf72d5930ef70ca181 | refs/heads/master | 2020-03-25T21:03:56.114744 | 2018-05-12T16:24:46 | 2018-05-12T16:24:46 | 144,157,811 | 1 | 0 | MIT | 2018-08-09T13:40:53 | 2018-08-09T13:40:53 | null | UTF-8 | Python | false | false | 4,211 | py | # coding: utf-8
from __future__ import division, print_function
# Standard library
from collections import OrderedDict
# Third-party
import numpy as np
from ..core import PotentialBase
from ....util import atleast_2d
__all__ = ["HarmonicOscillatorPotential", "KuzminPotential"]
class HarmonicOscillatorPotential(P... | [
"[email protected]"
] | |
d86d4bc54409db664185d5391f137bd863fcb162 | 0872e3dc1d71ffc8c6426f77c7d1409fc523e088 | /rlb/main.py | 36d133417ff2b0941b040cf4147dc3629f603b20 | [] | no_license | mpenkov/reddit-liveleak-bot | c0a367f15609e58227f661c99ab6ea17808e0b99 | 4ec35c0a941f269257b6a431cc6de1de8827b3ed | refs/heads/master | 2020-07-21T11:42:21.192096 | 2015-02-07T08:17:48 | 2015-02-07T08:17:48 | 21,909,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,730 | py | import praw
from praw.errors import APIException
import datetime as dt
import os
import os.path as P
import yaml
import logging
import time
#
# http://blog.tplus1.com/blog/2007/09/28/the-python-logging-module-is-much-better-than-print-statements/
#
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__n... | [
"[email protected]"
] | |
abd0e4369ed4686d8a57e4903580a0d3336d78b0 | 7e98a8b31cc2fecf8384f4590f27540f7280659a | /v1/LinkedLists/mirror_subtraction.py | b9bf4ac6f787e73961c467e99aa83d9e78408879 | [] | no_license | darraes/coding_questions | 62a07a6ede884fd0e3596f3dac8f50e11fd8676e | 70dcc3b859db673c39c3cf55aeb463d2bd822ed9 | refs/heads/master | 2021-01-21T07:21:18.033321 | 2020-06-15T16:25:11 | 2020-06-15T16:25:11 | 91,611,595 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,274 | py | # http://www.careercup.com/question?id=5657550909341696
class Node:
def __init__(self, next, value):
self._next = next
self._value = value
def revert(node):
if node == None: raise
elif node._next == None:
return (node, node)
else:
tail, head = revert(node._n... | [
"[email protected]"
] | |
b006e071b4eedcdff17cc409c2ad17895603ea12 | 4342ef8afa6a0790690f711d28c0ce2c78711c67 | /seed_database.py | 921aa0c13ce449678e4383c184f066f8bd5a1fa0 | [] | no_license | christinababaya/ratings-v2 | fe03413af9042942204aa69980a3ce2415411c14 | 2812bc1493607fb4f04b62c1e84b4d9efb396937 | refs/heads/master | 2023-03-25T20:39:38.191009 | 2021-03-26T16:00:14 | 2021-03-26T16:00:14 | 351,493,197 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | import os
import json
from random import choice, randint
from datetime import datetime
import crud
import model
import server
os.system('dropdb ratings')
os.system('createdb ratings')
model.connect_to_db(server.app)
model.db.create_all()
with open('data/movies.json') as f:
movie_data = json.loads(... | [
"[email protected]"
] | |
44019f8e0054c62342b61280690b6ff62aac80ff | 8b576f16cfd9202f756611001e684657dde3e812 | /03_TryExcept/venv/Scripts/pip3.7-script.py | 68fc52157e004291293a7e15bf0d026173449d4c | [] | no_license | WenhaoChen0907/Python_Demo | 26cc4d120aaa990c2d26fd518dfe6bcb622b1d77 | 136b8ced40623b0970c2a5bd47852425dcac3e86 | refs/heads/master | 2023-02-23T23:58:09.584321 | 2021-01-30T11:49:50 | 2021-01-30T11:49:50 | 334,374,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | py | #!E:\python-pycharm\03_TryExcept\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3.7'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
... | [
"[email protected]"
] | |
92ec7ed041e603e068af5792813e85378c4cca01 | 9d454ae0d5dd1d7e96e904ced80ca502019bb659 | /1720_decode.py | 8f1c93438180b711a3300877bb9f7e9cc36a7969 | [] | no_license | zzz686970/leetcode-2018 | dad2c3db3b6360662a90ea709e58d7facec5c797 | 16e4343922041929bc3021e152093425066620bb | refs/heads/master | 2021-08-18T08:11:10.153394 | 2021-07-22T15:58:52 | 2021-07-22T15:58:52 | 135,581,395 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 266 | py | class Solution:
def decode(self, encoded: List[int], first: int) -> List[int]:
# ans = [first]
# for el in encoded:
# ans.append(el ^ ans[-1])
# return ans
return list(accumulate([first] + encoded, lambda x, y: x ^ y)) | [
"[email protected]"
] | |
280e83ef0782347a3afd107ead0084773b84c6ae | aa8af4dc70c14339a05489b0c4c4925d7a00e319 | /starbox_custom/starbox_custom/doctype/store/test_store.py | 908d6e2311d2d1c252d713c5f8fb6e7b22ab9769 | [
"MIT"
] | permissive | vhrspvl/starbox-custom | 925768540b318ee923dd6587291fbece003fd17e | 0d1143e64119cff66ad52fbe8453fa7281b62998 | refs/heads/master | 2021-05-13T21:35:17.327744 | 2019-07-24T16:11:50 | 2019-07-24T16:11:50 | 116,466,334 | 0 | 2 | null | 2018-08-13T15:05:27 | 2018-01-06T08:15:26 | Python | UTF-8 | Python | false | false | 217 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Starboxes India and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestStoreKeeper(unittest.TestCase):
pass
| [
"[email protected]"
] | |
01040de6b5d4ea3274ea3ea17e71b4643c1b4001 | b483c598fa375e9af02348960f210b9f482bd655 | /cursoemvideo/desafios/Desafio075.py | 48338306d4a75934c3af6b61e07b9ea8b5210c04 | [
"MIT"
] | permissive | brunofonsousa/python | 6f766d08bf193180ea9a4903cb93ffd167db588d | 8f2f26c77015c0baaa76174e004406b4115272c7 | refs/heads/master | 2022-09-30T14:58:01.080749 | 2020-06-08T09:55:35 | 2020-06-08T09:55:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,504 | py | '''
Exercício Python 075: Desenvolva um programa que leia quatro valores pelo teclado e guarde-os em uma tupla. No final, mostre:
A) Quantas vezes apareceu o valor 9.
B) Em que posição foi digitado o primeiro valor 3.
C) Quais foram os números pares.
'''
## VERSÃO GUANABARA:
num = (int(input("Digite um número: ")),
... | [
"[email protected]"
] | |
42578ba3422cde2aa409b7883dec36b75c62a800 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/leap/f8586ba81c1349918117ff21ab2d5b5e.py | 48a969f886f37d77fddd9072875bff7e3adeb896 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 95 | py | #!/usr/bin/env python
def is_leap_year(y):
return y%400 == 0 or (y%4 == 0 and y%100 != 0)
| [
"[email protected]"
] | |
e966f04e9525fb6b367303324e44fbcbcfcfae94 | 221b2221703f9cddeee7054c5dc426b81a3f53bd | /venv/lib/python3.9/site-packages/pyrogram/raw/functions/langpack/get_language.py | e88bc93e119755902d6020efd7ffc9cf8d817575 | [] | no_license | ch3p4ll3/Royal-Racing-Bot | 37c998a650078e4b5f5c3b34b8c081d52b018944 | eab5baf61a9782fbedd42ddf35b7e11cbae9ec22 | refs/heads/main | 2023-06-26T03:34:58.104068 | 2021-07-30T17:36:14 | 2021-07-30T17:36:14 | 348,089,837 | 1 | 0 | null | 2021-03-20T11:32:46 | 2021-03-15T18:59:39 | Python | UTF-8 | Python | false | false | 2,400 | py | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | [
"[email protected]"
] | |
8bcd712f4be349d7fe2b89d4ff19355202af1010 | b2ba670818623f8ab18162382f7394baed97b7cb | /test-data/AndroidSlicer/Chart/DD/8.py | 09e5ae21e49aeca31e6e629fd56dbf73b0e2b860 | [
"MIT"
] | permissive | hsumyatwin/ESDroid-artifact | 012c26c40537a79b255da033e7b36d78086b743a | bff082c4daeeed62ceda3d715c07643203a0b44b | refs/heads/main | 2023-04-11T19:17:33.711133 | 2022-09-30T13:40:23 | 2022-09-30T13:40:23 | 303,378,286 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | #start monkey test
import os;
from subprocess import Popen
from subprocess import PIPE
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage
from com.android.monkeyrunner.MonkeyDevice import takeSnapshot
from com.android.monkeyrunner.easy import EasyMonkeyDevice
from com.android.monkeyrunner.easy... | [
"[email protected]"
] | |
4a2c91451796f219d51b74f12ba3c8156185b68d | 79041f273c057b2fbb115b35494b13250ac7a42c | /bel/lang/migrate_1_2.py | a33ee3c88896e423a30211e7b124513032101612 | [
"Apache-2.0"
] | permissive | belbio/bel | 3786b65a10d44735407b0e79c8489bea1df58863 | 14ff8e543a679e7dfff3f38f31c0f91ffd55e4d8 | refs/heads/master | 2022-12-08T23:02:28.242510 | 2020-12-21T16:17:47 | 2020-12-21T16:17:47 | 116,027,945 | 6 | 2 | Apache-2.0 | 2022-06-01T23:58:52 | 2018-01-02T15:14:32 | Python | UTF-8 | Python | false | false | 6,958 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Migrate BEL from 1 to 2.0.0
#
# Standard Library
import json
# Third Party
from loguru import logger
# Local
import bel.belspec.crud
import bel.core.settings as settings
from bel.belspec.crud import get_enhanced_belspec
from bel.lang.ast import BELAst, Function, NSAr... | [
"[email protected]"
] | |
206146ddffedd60bf477a416ab75b3c14e9f720f | 758bf41e46a3093f4923af603f1f7f8063408b9c | /website/testFromRemoteRepo/_bsch3398/museum/python/django/utils/timesince.py | 55e53c65cfc601a4fa7399ed0b4d33d81b8588c3 | [] | no_license | mpetyx/mpetyx.com | 4033d97b21c9227a6ba505980fd0c1b57254e8fb | d50c379b4fe09e0135656573f7049225fc90ae36 | refs/heads/master | 2021-01-10T19:50:15.488371 | 2014-01-22T09:04:14 | 2014-01-22T09:04:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,698 | py | import datetime
from django.utils.tzinfo import LocalTimezone
from django.utils.translation import ungettext, ugettext
def timesince(d, now=None):
"""
Takes two datetime objects and returns the time between d and now
as a nicely formatted string, e.g. "10 minutes". If d occurs after now,
then "0 min... | [
"[email protected]"
] | |
df004da63a64bed312c2d45ad9d337333d93d167 | 2160b580f64693eb8a27afc58dbdff9363247e3f | /doc2dash/parsers/__init__.py | 164faf6c4ec769dfc84c4a88ad42ba11ba703c48 | [
"MIT"
] | permissive | pombredanne/doc2dash | fa65fc4428d03c1be9dbdfdb5b311d37c439c3ae | c2f342a74b596d3e0470f9ac69f73c9aef1fc7bd | refs/heads/master | 2021-01-16T19:30:41.265173 | 2014-08-14T08:12:10 | 2014-08-14T08:13:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | from __future__ import absolute_import, division, print_function
from . import pydoctor, sphinx, intersphinx
DOCTYPES = [
intersphinx.InterSphinxParser,
sphinx.SphinxParser,
pydoctor.PyDoctorParser,
]
def get_doctype(path):
"""
Gets the apropriate doctype for *path*.
"""
for dt in DOCTY... | [
"[email protected]"
] | |
6cd48226c2b5daa5312ca2232f47327b3926aa63 | 7e6864c5c48317a590ed6cc9b2acb85754bcda3b | /app/bin/back_end_scripts/minimax.py | 7a7839692657faffc8427321758349942d25078c | [
"MIT"
] | permissive | michaelneuder/connect_four | f83d8c1adf03af14632ab1acb23cc79ea5a3f035 | de2a1d7296ffddaee4282b722775225cdfbe6304 | refs/heads/master | 2021-01-20T10:06:56.505978 | 2017-06-05T23:04:34 | 2017-06-05T23:04:34 | 83,929,928 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,084 | py | #!/usr/bin/env python3
import numpy as np
import random as rand
class minimax(object):
def __init__(self, current_board, move_number):
self.board = current_board
self.number_rows = 6
self.number_cols = 7
self.move_number = move_number
self.right_diag_1 = []
self.righ... | [
"[email protected]"
] | |
f69504729af79407f2cc3c37688aedfdbe190a0d | 1719920a92f7194766624474b98d59ef8d6eddaf | /models/device_enrollment_configuration.py | 9e22612e3cb2ffb4bf77a9608e129ccf5936870e | [
"MIT"
] | permissive | MIchaelMainer/msgraph-v10-models-python | cfa5e3a65ba675383975a99779763211ed9fa0a9 | adad66363ebe151be2332f3ef74a664584385748 | refs/heads/master | 2020-03-19T12:51:06.370673 | 2018-06-08T00:16:12 | 2018-06-08T00:16:12 | 136,544,573 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,747 | py | # -*- coding: utf-8 -*-
'''
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
'''
from __future__ import unicode_literals
from ..model.enrollment_con... | [
"[email protected]"
] | |
e15ab783b8524095dfce9416304b9b29b70fb815 | f9357dc6ebe6ae1af0b03a9afc5f765706b8d31f | /cv2_functions/cv2_minbox.py | 9614fc7f0d142f6072a8812d1af97c5d594b277c | [] | no_license | cilame/any-whim | 660acd966048655aa36886047fbc232539807881 | 1520accbe1506a133989a6c2be17572e7fb4693e | refs/heads/master | 2023-08-17T05:10:56.348200 | 2023-08-13T16:45:11 | 2023-08-13T16:45:11 | 110,548,292 | 125 | 64 | null | null | null | null | UTF-8 | Python | false | false | 913 | py | import cv2
s = cv2.createBackgroundSubtractorMOG2(varThreshold=100)
f = cv2.VideoCapture(0)
while(1):
a,v = f.read()
g = s.apply(v)
g = cv2.morphologyEx(g,cv2.MORPH_DILATE,(7,7),iterations=7)
a,b,c = cv2.findContours(g,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
for i in b:
#print cv2.minAreaR... | [
"[email protected]"
] | |
b58e705deed2f0b8a2254709321b6101b634b952 | fcc6fa7905b6045a68b992c74e5301e00d5dd3d3 | /users/tasks.py | bf40dc7db3c53264f1f01878dcefd90681f297b2 | [] | no_license | alinzel/BookStore | cc394c9935155c7fda29aa105edd1e9914bd94aa | 5dfbf13182ce19dfae4d7f8b443cd8e7a54d1204 | refs/heads/master | 2020-03-07T03:22:18.771701 | 2018-03-29T08:00:19 | 2018-03-29T08:00:19 | 127,233,714 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | from __future__ import absolute_import,unicode_literals
from celery import shared_task
from django.conf import settings
from django.core.mail import send_mail
# 发送激活邮件
@shared_task # 共享任务 返回一个总是使用current_app中的任务实例的代理
def send_active_email(token, username, email):
subject = '尚硅谷书城用户激活链接' # 标题
message = '你好' + userna... | [
"[email protected]"
] | |
230d26e5c2b5c4bc19665857dfe972ec6b36874b | b15d2787a1eeb56dfa700480364337216d2b1eb9 | /accelbyte_py_sdk/api/platform/models/client_request_parameter.py | 9f7b1f469cdc712522fbd02313e75c9d9297b6f3 | [
"MIT"
] | permissive | AccelByte/accelbyte-python-sdk | dedf3b8a592beef5fcf86b4245678ee3277f953d | 539c617c7e6938892fa49f95585b2a45c97a59e0 | refs/heads/main | 2023-08-24T14:38:04.370340 | 2023-08-22T01:08:03 | 2023-08-22T01:08:03 | 410,735,805 | 2 | 1 | MIT | 2022-08-02T03:54:11 | 2021-09-27T04:00:10 | Python | UTF-8 | Python | false | false | 6,030 | py | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: ags_py_codegen
# AccelByte Gaming Services Platform Service (4.32.1)
# pylint: disable=d... | [
"[email protected]"
] | |
5a8d87c8871f4b5879836b466e7049fd661da1ea | ca23b411c8a046e98f64b81f6cba9e47783d2584 | /ncsnv3/main.py | d7a89ddfc89627cb854f233719729e3382012dce | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | pdybczak/google-research | 1fb370a6aa4820a42a5d417a1915687a00613f9c | 0714e9a5a3934d922c0b9dd017943a8e511eb5bc | refs/heads/master | 2023-03-05T23:16:11.246574 | 2021-01-04T11:30:28 | 2021-01-04T11:30:28 | 326,629,357 | 1 | 0 | Apache-2.0 | 2021-02-01T12:39:09 | 2021-01-04T09:17:36 | Jupyter Notebook | UTF-8 | Python | false | false | 1,580 | py | # coding=utf-8
# Copyright 2020 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... | [
"[email protected]"
] | |
20947ccf802631ec01474e52ab2310cf9b617690 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_redoubtable.py | 8645cb26ee8dbbcd8fcdc345eeb5befad16d369c | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py |
#calss header
class _REDOUBTABLE():
def __init__(self,):
self.name = "REDOUBTABLE"
self.definitions = [u'very strong, especially in character; producing respect and a little fear in others: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'adjectives'
... | [
"[email protected]"
] | |
3f96d8878c3bb4206095f84b4f67f59194a2984b | 4af65b44b39816c7037ff928da1ae153f4d970e5 | /mud/thing.py | 37a9732599722b87d944c6e390898be6dba87f1c | [] | no_license | Cloudxtreme/mud-14 | 0745eda694ffeee79120fcfc82aab2da8b7a9655 | f02d4ca0e8360b0924b86a3da99e5230c3028642 | refs/heads/master | 2021-05-28T06:14:37.121028 | 2014-12-01T08:00:27 | 2014-12-01T08:00:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | import mudclasses as mc
import event as evt
import english
from types import TupleType
# bug: permanence (sp?) is not yet handled
| [
"[email protected]"
] | |
948cfd26f6231d12a4463589a8d9322ffb687ebf | be5e5aebd753ed1f376dc18ce411f0fac6d2f762 | /natuurpunt_purchase_search/__init__.py | 1503b4c0ebedce5264569792216f47998b67fa9c | [] | no_license | smart-solution/natuurpunt-purchase | 7d9fcfdde769b6294d8dc705cecc99a177b4573c | 0ac94cb68cee4ef464158720e04007ee12036179 | refs/heads/master | 2021-05-22T04:43:21.594422 | 2020-11-02T13:32:27 | 2020-11-02T13:32:27 | 39,186,322 | 0 | 2 | null | 2020-11-02T13:32:28 | 2015-07-16T08:42:31 | Python | UTF-8 | Python | false | false | 926 | py | # -*- coding: utf-8 -*-
##############################################################################
#
# 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 version 3 of ... | [
"[email protected]"
] | |
cc8a8453dcbfc50cc508c0fffb18ca9c01acbe54 | 827b7ad1cdf882824bf13717bd0baa08cc852eaf | /src/python/pants/backend/python/dependency_inference/module_mapper.py | 868969ac95364e4b502388856523007bee7f3316 | [
"Apache-2.0"
] | permissive | cclauss/pants | e4be17df24c9a962a123b94c0782d0941862220a | 4f39186f780310e73a708b3b589635dfa2e09696 | refs/heads/main | 2023-03-31T10:07:13.165248 | 2021-04-02T19:04:58 | 2021-04-02T19:04:58 | 354,131,355 | 0 | 0 | Apache-2.0 | 2021-04-02T20:56:27 | 2021-04-02T20:56:26 | null | UTF-8 | Python | false | false | 17,912 | py | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import logging
from collections import defaultdict
from dataclasses import dataclass
from pathlib import PurePath
from typing import DefaultDict
from p... | [
"[email protected]"
] | |
8ee2d7c7cfec8a059e6c4f84dfb4a253e1464a52 | 89a90707983bdd1ae253f7c59cd4b7543c9eda7e | /python_cookbook/10/monkeypatching_modules_on_import1.py | 89edccaa9b169b1d124990a2c3e05dd183a7d93b | [] | no_license | timothyshull/python_reference_code | 692a7c29608cadfd46a6cc409a000023e95b9458 | f3e2205dd070fd3210316f5f470d371950945028 | refs/heads/master | 2021-01-22T20:44:07.018811 | 2017-03-17T19:17:22 | 2017-03-17T19:17:22 | 85,346,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | from postimport import when_imported
@when_imported('threading')
def warn_threads(mod):
print('Threads? Are you crazy?')
if __name__ == '__main__':
pass
| [
"[email protected]"
] | |
8fb6bfee4530acca0b7936e56a0c29ede098296b | 2be5b2a6f5172b37fde90b076504fa9fe4f93784 | /nosmsd/management/commands/nosmsd_incoming.py | a31a1677e93343f07145d84bad79c89cede66b3e | [] | no_license | pedrokiefer/nosmsd | 74b73e959b8482744531caf4f81e7515791a5ff3 | e69d7f55d54f0f5e85eec16cde6da0cb64d63b5c | refs/heads/master | 2021-01-14T13:17:11.680061 | 2014-11-25T13:34:31 | 2014-11-25T13:34:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | #!/usr/bin/env python
# encoding=utf-8
# maintainer: rgaudin
import sys
from django.conf import settings
from django.core.management.base import BaseCommand
from django.utils import translation
from nosmsd.nosmsd_incoming import handle as nohandle
class Command(BaseCommand):
def handle(self, *args, **options):... | [
"[email protected]"
] | |
28ef3309ea1c0af7d7c199ff4dfdcf9e68caf048 | 4254c7f88b95c7aec20979691aecf63053c97570 | /cfdm/core/bounds.py | b3d70390051fcf096b1fe5d9ae2ad1b2f42f5528 | [
"MIT"
] | permissive | cofinoa/cfdm | 2a1fc2069ef253c6eb4a71a4d1fa252295d9be1d | 1e074dbc28054780a9ec667d61b9098b94956ea6 | refs/heads/master | 2020-05-07T08:39:24.996138 | 2019-04-08T14:34:56 | 2019-04-08T14:34:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,016 | py | from builtins import super
from . import abstract
class Bounds(abstract.PropertiesData):
'''A cell bounds component of a coordinate or domain ancillary
construct of the CF data model.
An array of cell bounds spans the same domain axes as its coordinate
array, with the addition of an extra dimension whose size i... | [
"[email protected]"
] | |
aaf0fcdaee70b39287fea8239def89eee1d419c9 | ba54b70f93fe7f9d114623d76b1ad3f88309d66f | /uvideo/forms.py | 99e3e96d880007e37a2d6a8887d3860983e0d765 | [] | no_license | loobinsk/newprj | 9769b2f26092ce7dd8612fce37adebb307b01b8b | c6aa6a46973fb46375f4b05a86fe76207a8ae16d | refs/heads/master | 2023-05-07T00:28:44.242163 | 2021-05-25T08:22:05 | 2021-05-25T08:22:05 | 370,617,690 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py | #-*- coding: utf-8 -*-
from django import forms
from uvideo.models import UserVideo
from django.template import loader, Context
from gutils.forms import BootstrapFormMixin
class UploadVideoWidget(forms.HiddenInput):
def render(self, name, value, attrs=None):
tmpl = loader.get_template('uvideo/video-upload... | [
"[email protected]"
] | |
736e9e1a22663053a31a445dbb2ce7cecb2841c3 | 232fc2c14942d3e7e28877b502841e6f88696c1a | /ding/interaction/config/base.py | 446e260203ff8119d34f20748b6d29698b85da7d | [
"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 | 432 | py | # System configs
GLOBAL_HOST = '0.0.0.0'
LOCAL_HOST = '127.0.0.1'
# General request
DEFAULT_REQUEST_RETRIES = 5
DEFAULT_REQUEST_RETRY_WAITING = 1.0
# Slave configs
MIN_HEARTBEAT_SPAN = 0.2
DEFAULT_HEARTBEAT_SPAN = 3.0
DEFAULT_SLAVE_PORT = 7236
# Master configs
MIN_HEARTBEAT_CHECK_SPAN = 0.1
DEFAULT_HEARTBEAT_CHECK_S... | [
"[email protected]"
] | |
b2e4985b6430b407be3fe3d835729ebeb8aa2e69 | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/era5_scripts/02_preprocessing/combine82/502-tideGauge.py | 658865e7aebe194e5247d2a059242aa96349e091 | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,117 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 16 16:11:00 2020
--------------------------------------------
Load predictors for each TG and combine them
--------------------------------------------
@author: Michael Tadesse
"""
import os
import pandas as pd
#define directories
dir_in = '/lustre/fs0/home/mtadesse/er... | [
"[email protected]"
] | |
eb5d81611f58b26a2fceac11bd14ca8653373c86 | 18aee5d93a63eab684fe69e3aa0abd1372dd5d08 | /python/paddle/optimizer/optimizer.py | 5187a651b97830ab24fe04e8fa4ce452fea65510 | [
"Apache-2.0"
] | permissive | Shixiaowei02/Paddle | 8d049f4f29e281de2fb1ffcd143997c88078eadb | 3d4d995f26c48f7792b325806ec3d110fc59f6fc | refs/heads/develop | 2023-06-26T06:25:48.074273 | 2023-06-14T06:40:21 | 2023-06-14T06:40:21 | 174,320,213 | 2 | 1 | Apache-2.0 | 2022-12-28T05:14:30 | 2019-03-07T10:09:34 | C++ | UTF-8 | Python | false | false | 66,327 | py | # Copyright (c) 2019 PaddlePaddle 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 appli... | [
"[email protected]"
] | |
5590c83b21209475b9f2d74cbf0f4aa8bc06fdf7 | 88023c9a62994e91291c67088156a2894cc26e9e | /corral/exceptions.py | 6b957a785fc63342e2236f36930ddf95e737b7a0 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | toros-astro/corral | 41e9d0224d734c4268bf5161d472b3c0375842f0 | 75474b38ff366330d33644461a902d07374a5bbc | refs/heads/master | 2023-06-10T15:56:12.264725 | 2018-09-03T17:59:41 | 2018-09-03T17:59:41 | 44,282,921 | 6 | 5 | BSD-3-Clause | 2023-03-24T12:03:17 | 2015-10-14T23:56:40 | Python | UTF-8 | Python | false | false | 1,745 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017, Cabral, Juan; Sanchez, Bruno & Berois, Martín
# 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 sourc... | [
"[email protected]"
] | |
3314310b124324421bdc948e97abc2584f9cc2e0 | 30268e3918f8dc079a757e985fee374605c931b2 | /api/tacticalrmm/winupdate/tasks.py | 487b171e5b0bfbde2f2bdf9fc3fb94be0d93781c | [
"MIT"
] | permissive | doytsujin/tacticalrmm | e1be7ad7950bb95c4b37dd63ac03eb323115d866 | 7fb79e0bcce62dbb892fb36665ff6d7135d7bebf | refs/heads/master | 2021-03-21T14:02:24.858487 | 2020-02-24T07:11:15 | 2020-02-24T07:11:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,999 | py | from time import sleep
from agents.models import Agent
from .models import WinUpdate
from tacticalrmm.celery import app
@app.task
def check_for_updates_task(pk, wait=False):
if wait:
sleep(60)
agent = Agent.objects.get(pk=pk)
resp = agent.salt_api_cmd(
hostname=agent.salt_id,
... | [
"[email protected]"
] | |
494aff1c24d6117476f11ab965437fac14f43806 | 20c80f722c451b64d05cc027b66a81e1976c3253 | /commons/libs/pyblish/version.py | c978ffa548ff2ad57bbaba63dc1da19b5ff66f43 | [] | no_license | flypotatojun/Barbarian | 2d3fcb6fcb1b4495b6d62fc5e32634abf4638312 | efe14dd24c65b4852997dad1290e503211bcc419 | refs/heads/master | 2021-07-18T01:43:14.443911 | 2017-10-24T03:37:43 | 2017-10-24T03:37:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 229 | py |
VERSION_MAJOR = 1
VERSION_MINOR = 4
VERSION_PATCH = 3
version_info = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
version = '%i.%i.%i' % version_info
__version__ = version
__all__ = ['version', 'version_info', '__version__']
| [
"[email protected]"
] | |
7003acb4f3816d60e19ac4b06f49d305dda66cfb | 2cb120360192dfdf9afa233c8585232cb3df6e8c | /samples/tf_study/prettytensor/funcs/register.py | 4d06d359b79901fe2eaade7d27002d9a528b7ee5 | [] | no_license | CosmosShadow/MLPythonLib | 6323583bca8c6ff5757465fb1a0d5c4f23deb56c | 3a2da2601330a032b737ff0addf71f679eeee94b | refs/heads/master | 2020-05-21T15:08:58.082575 | 2017-04-30T17:03:15 | 2017-04-30T17:03:15 | 44,087,820 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | # coding: utf-8
import tensorflow as tf
import prettytensor as pt
import numpy as np
import cmtf.data.data_mnist as data_mnist
@pt.Register
def leaky_relu(input_pt):
return tf.select(tf.greater(input_pt, 0.0), input_pt, 0.01*input_pt)
x = tf.Variable([1, 2, 3, -3, -2, -1], dtype=tf.float32)
x_pretty = pt.wrap(x)
y =... | [
"[email protected]"
] | |
9a9896bbf00e4f6f26308c7699d8939dd2d12b92 | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/ThirteenTeV/LongLivedChi0/LongLivedChi0ToNuLL_MSquark_1000_MChi_700_CTau1mm_to_1000mm_TuneCUETP8M1_13TeV_pythia8_cff.py | 989f40b6f2ad7b491251cf3a1f09bb503852f142 | [] | 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 | 41,743 | py | COM_ENERGY = 13000 # GeV
SQUARK_MASS = 1000 # GeV
CHIZERO_MASS = 700 # GeV
GLUINO_MASS = 5000 # GeV
CROSS_SECTION = 0.02296 # pb
CHIZERO1_CTAU = 1 # mm
CHIZERO2_CTAU = 10 # mm
CHIZERO3_CTAU = 100 # mm
CHIZERO4_CTAU = 100 # mm
SLHA_TABLE = """
#
# ======================
# ... | [
"[email protected]"
] | |
d387d6b7108eb53681abf09eee7e082564d3f4cd | 90a3c3ecfab0425f520115e049dc6e8476b72b7c | /toph/Set Union.py | 6fdfa05cf4cd80906d7f77ed398ea2bb349d9a95 | [] | no_license | Manash-git/Competitive-Programming | f3e5f7a9bc202ec0a4667fe7f033f0013c8dfd83 | bf79517699285c135bc126c5fabfd724e586460f | refs/heads/master | 2022-12-05T19:37:11.814718 | 2020-08-24T19:16:30 | 2020-08-24T19:16:30 | 108,683,246 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 542 | py | # n = {1,2,5}
# print(type(n))
# l= [1,5,6]
# print(type(set(l)))
# print(n | set(l))
# res = n | set(l)
# for i in res:
# print(i,end=" ")
n,m = input().split()
x = [int(i) for i in str(input()).split()]
y = [int(i) for i in str(input()).split()]
x= set(x)
y= set(y)
# print( set(x)| set(y))
res = sorted(list(x.u... | [
"[email protected]"
] | |
52bfaf495d77c7025a801ef5061d4964459beaf2 | 1c6283303ceb883add8de4ee07c5ffcfc2e93fab | /Jinja2/lib/python3.7/site-packages/uhd_restpy/testplatform/sessions/ixnetwork/topology/rsvpteif_e2b2ecdbf1fa5e15d2f6d87dd1789f1c.py | cff9728ec94869fd282e2d1c193da41ec355c901 | [] | no_license | pdobrinskiy/devcore | 0f5b3dfc2f3bf1e44abd716f008a01c443e14f18 | 580c7df6f5db8c118990cf01bc2b986285b9718b | refs/heads/main | 2023-07-29T20:28:49.035475 | 2021-09-14T10:02:16 | 2021-09-14T10:02:16 | 405,919,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 58,370 | py | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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, ... | [
"[email protected]"
] | |
5b2cd57f8e2194ec3817a24a6915598c622ca1b2 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Projects/sphinx/sphinx/sphinx/search/nl.py | 485c32c00bfbebd3c13c6fc237cc638855547bc0 | [
"LicenseRef-scancode-other-permissive",
"BSD-3-Clause"
] | permissive | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:691f5261422e51d9e03272aae70ab30a0ad6712d65759be6a8f9a41bd904a565
size 21944
| [
"[email protected]"
] | |
ed8e7e07c105152f5bc9ba5fcc02fe65b2194e23 | b0b9f05bcfb0e366955f70753bcbd0b7fc997e7a | /pairsWithSpecificSum.py | de68f3bf37ad2534a22358946844b725ef7cd5cc | [] | no_license | mave5/pmarp | ae691e8fb3d7dc4cd51928ec240b077f09b27774 | 52aa9919e6384226ba10242144ceb5801a995071 | refs/heads/master | 2022-10-20T12:52:08.587884 | 2017-10-23T00:19:36 | 2017-10-23T00:19:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 698 | py |
# Merging 2 Packages
def get_indices_of_item_wights(arr, limit):
if len(arr)==1:
return []
#elif (len(arr)==2) and (arr[0]+arr[1]==limit):
#print arr[0],arr[1],arr[0]+arr[1]
#return []
comps={}
for i in range(0,len(arr)):
w=arr[i]
j=comps.get(lim-w)
if j is not None:
return [j,i]... | [
"[email protected]"
] | |
cbeac3af8c846564c43834c3869b02822384413f | 53b6b52a41ec415fec2a2d97cad524b8e9f8a4dc | /7_4_1/size.py | eb3ae38464d0a5f32857506357853e2ba0709ef4 | [] | no_license | xyalbino/pwk_exercises | 56b8aa359b19487733c0a9b98b9d9ed668723365 | c6af719381928164aee3c7ce8db685c7984269ec | refs/heads/master | 2020-06-14T22:21:34.571883 | 2019-03-11T22:07:44 | 2019-03-11T22:07:44 | 195,143,280 | 1 | 0 | null | 2019-07-04T00:30:30 | 2019-07-04T00:30:30 | null | UTF-8 | Python | false | false | 525 | py | #!/usr/bin/env python
import socket, sys
if __name__ == '__main__':
buff = "A" * 2606 + "B" * 4 + "C" * (3500 - 2606 - 4)
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock_conn = sock.connect(("10.11.21.97", 110))
data = sock.recv(1024)
print data
sock.send("USER test\r\n")
data = so... | [
"[email protected]"
] | |
e4b6e1cda54c6b2fd375df3d4a64e7a4eae646c4 | 808b96265c56807d9b1ddcbd93af00988bc3d5c1 | /main.py | 8aca8d644d250287044cfd44e73b7f42b8313317 | [] | no_license | shivamdattapurkayastha99/drs-system | b1af2d087d5ac04294dcad3fcdb921d22a4b4b27 | d35f347e6a8030c47dc0604490e360e4e63c1534 | refs/heads/master | 2023-07-06T18:35:33.594613 | 2021-08-10T20:20:20 | 2021-08-10T20:20:20 | 394,772,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,883 | py | import tkinter
import cv2
import PIL.Image,PIL.ImageTk
from functools import partial
import threading
import imutils
import time
stream=cv2.VideoCapture('clip.mp4')
def play(speed):
print(f"You clicked on play.Speed is {speed}")
frame1=stream.get(cv2.CAP_PROP_POS_FRAMES)
stream.set(cv2.CAP_PROP_POS_FRA... | [
"[email protected]"
] | |
f06b7547ea0124184f651ddac7e32fdb35e9020b | 43a38158517d5010cedc73e29b8b2342c29bdabe | /pythonpath/mytools_Mri/ui/info.py | 04290a487832b013870fbcdbf1384fae87643289 | [
"Apache-2.0"
] | permissive | billyoc/MRI | 31e14583b5de3fd6e5d770f60aaef25118c86c2b | 22cfd8bdd28cbca589b9796a6a191ce220db763d | refs/heads/master | 2021-01-17T06:47:11.945432 | 2013-03-27T05:49:37 | 2013-03-27T05:49:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,454 | py | # Copyright 2011 Tsutomu Uchino
#
# 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 ... | [
"[email protected]"
] | |
f30e390e9256b93999d1c3a66ed1a5ae6ada94e0 | e262e64415335060868e9f7f73ab8701e3be2f7b | /.history/demo_20201106173944.py | 6d65b718ae355669c834ddbbe48686434fa086b7 | [] | no_license | Allison001/developer_test | 6e211f1e2bd4287ee26fd2b33baf1c6a8d80fc63 | b8e04b4b248b0c10a35e93128a5323165990052c | refs/heads/master | 2023-06-18T08:46:40.202383 | 2021-07-23T03:31:54 | 2021-07-23T03:31:54 | 322,807,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,275 | py | # a = 1
# if a==0:
# print("a=0")
# else:
# print("a!0")
# """
# x>1 (3x-5)
# -1<=x<=1 (x+2)
# x < -1 (5x+3)
# """
# x = int(input("输入您的数字:"))
# if x > 1:
# print(3*x-5)
# else:
# if x >= -1:
# print(x + 2)
# else:
# print(5*x+3)
# 猜数字游戏
# import random
# computet_num = rando... | [
"[email protected]"
] | |
cec74534f2de9765f471aa6aae72fcbe7d53e3ac | 0085acce00bbd20658f312f30575632b6272090d | /leetcode_python2/lc917_reverse_only_letters.py | edd5790198b06f867191c4684a3f882a2b368ac8 | [] | no_license | garderobin/Leetcode | 52fce8279e4963bc7824a19aae903ca6aad83867 | ea10ce7fe465431399e444c6ecb0b7560b17e1e4 | refs/heads/master | 2021-01-17T14:43:49.423071 | 2018-11-12T00:55:47 | 2018-11-12T00:55:47 | 51,183,667 | 0 | 1 | null | 2018-11-12T00:55:48 | 2016-02-06T01:00:36 | Java | UTF-8 | Python | false | false | 580 | py | from abc import ABCMeta, abstractmethod
class ReverseOnlyLetters:
__metaclass__ = ABCMeta
@abstractmethod
def reverse_only_letters(self, S):
"""
:type S: str
:rtype: str
"""
class ReverseOnlyLettersImpl1(ReverseOnlyLetters):
"""
Time: O(n)
Space: O(n)
"""... | [
"[email protected]"
] | |
2ab64215e6c7985e26ab397ec6fe152920e75e0f | 01b6a10e92f3dae773f824065a5508b073fd6d62 | /baekjoon/1837.py | 8a5748cf6fa39529be2da4aa74086b2030da1c75 | [] | no_license | jihongeek/Algo | 213989dc86b5476939776c31b12b21fba48bff8d | 8dfc9db33f611ff76c4943be9868847c3c0501b4 | refs/heads/master | 2023-08-28T23:32:42.448354 | 2023-08-12T11:26:08 | 2023-08-12T11:26:08 | 188,658,216 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 80 | py | from sys import stdin
p,k = map(int,stdin.readline().strip())
for i in range() | [
"[email protected]"
] | |
b8466fc6eb726ee2342e5e499d2da3d64d0cb182 | 76938f270e6165514162856b2ed33c78e3c3bcb5 | /lib/coginvasion/battle/TurretGag.py | f6649cdc3a30755cf243d311c6153058e48d7e42 | [] | no_license | coginvasion/src | 9a5ec682845cc4c9c013fcc35e9b379bd4360b6c | 2d7fcdb0cd073050250cb51292ee48300a9fe19f | refs/heads/master | 2021-01-19T06:50:11.786112 | 2015-11-08T12:28:52 | 2015-11-08T12:28:52 | 61,545,543 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,296 | py | # Embedded file name: lib.coginvasion.battle.TurretGag
"""
Filename: TurretGag.py
Created by: DecodedLogic (10Aug15)
"""
from panda3d.core import CollisionSphere, CollisionNode, BitMask32, CollisionHandlerEvent, NodePath
from direct.showbase.DirectObject import DirectObject
from direct.interval.ProjectileInterval... | [
"[email protected]"
] | |
23abc26505d01fa5cea8932a4626c30f652939e6 | de6fb3a55196b6bd36a4fda0e08ad658679fb7a1 | /expedient/src/python/expedient/clearinghouse/geni/planetlab/sfa-models.py | 0b196d17769a39223a7fdf4a5aa52bdb1bd29381 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | dana-i2cat/felix | 4a87af639e4c7db686bfa03f1ae4ce62711615e3 | 059ed2b3308bda2af5e1942dc9967e6573dd6a53 | refs/heads/master | 2021-01-02T23:12:43.840754 | 2016-02-04T10:04:24 | 2016-02-04T10:04:24 | 17,132,912 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 16,040 | py | '''
Created on Jul 4, 2010
@author: jnaous
'''
from django.db import models
from expedient.clearinghouse.resources.models import Resource, Sliver
from expedient.clearinghouse.geni.models import GENIAggregate, GENISliceInfo
from xml.etree import cElementTree as et
import calendar
from exceptions import RSpecParsingExce... | [
"[email protected]"
] | |
96e2fee44e3bc7e5c5602c9a487d8a04b807a7a8 | c67f2d0677f8870bc1d970891bbe31345ea55ce2 | /zippy/benchmarks/src/micro/function-call2.py | 48b9f47030ccbdc325c255fd7103349718f10ba7 | [
"BSD-3-Clause"
] | permissive | securesystemslab/zippy | a5a1ecf5c688504d8d16128ce901406ffd6f32c2 | ff0e84ac99442c2c55fe1d285332cfd4e185e089 | refs/heads/master | 2022-07-05T23:45:36.330407 | 2018-07-10T22:17:32 | 2018-07-10T22:17:32 | 67,824,983 | 324 | 27 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | # zwei 10/10/13
# function calls
import time
def emptyFunction(arg):
return arg
def callFunctions(num):
count = 0
for i in xrange(num):
ret = emptyFunction(i)
count += 1
return count
def measure():
print("Start timing...")
start = time.time()
sum = callFunctions(1000000000) #1000000
print("Number of ... | [
"[email protected]"
] | |
c09bdad7664c65fe8d8e3cb86ec8865551e304a9 | 1c6e5c808c1a3e6242e40b15ae711574e670c3b6 | /food_management/constants/enums.py | 82bfebbb5237fed3541c3c18fdce86151e5b05c3 | [] | no_license | KatakamVedaVandhana/smart_food_management-vandhana | dbe195994c110471d0ae7a5a53adef1441e86466 | 19e410a2aa792b22889a2dfed599312ba6b5a7ad | refs/heads/master | 2023-07-09T05:43:17.491313 | 2020-06-15T06:44:00 | 2020-06-15T06:44:00 | 269,609,923 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,043 | py | import enum
from ib_common.constants import BaseEnumClass
class CodeLanguage(BaseEnumClass, enum.Enum):
python = "PYTHON"
c_language = "C"
c_plus_plus = "CPP"
python36 = "PYTHON36"
python37 = "PYTHON37"
python38 = "PYTHON38"
python38_datascience = "PYTHON38_DATASCIENCE"
python38_aiml ... | [
"[email protected]"
] | |
b16fadb21431c33e8e177f4b007b85063c3e167a | 9f52ac141023dcddb4fbe88b881feaca5be6328f | /ros/build/styx_msgs/catkin_generated/pkg.develspace.context.pc.py | 18610254de217a4132dbf9fb576247ad636a13ec | [
"MIT"
] | permissive | uniquetrij/CarND-T3-P4-Capstone | 9b6613339eb33421112130e7b37f46aaaa88a298 | 82f85af8c5554b51afca3c282f6230d3733a376a | refs/heads/master | 2020-03-18T11:53:58.175809 | 2018-06-08T05:54:29 | 2018-06-08T05:54:29 | 134,696,861 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/anupam/Desktop/CarND-T3-P4-Capstone/ros/devel/include".split(';') if "/home/anupam/Desktop/CarND-T3-P4-Capstone/ros/devel/include" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_... | [
"[email protected]"
] | |
1300873c8a24b12df81df6006a135fe297dab299 | 7095bd6c7df3e36beeaf6f2fff321c1994778817 | /try_django/src/blog/migrations/0003_auto_20190609_1303.py | 8b419d2c612ca7e259bd41fb33966cc36ccff5fd | [] | no_license | bajpaiNikhil/dev-blog | 4c6f0b5d6a96cc2552acd91b44e3fe74629bdaed | b2a3823931520292cabaeba94bd8161265f143b0 | refs/heads/master | 2020-06-02T08:39:12.043844 | 2019-07-04T03:25:37 | 2019-07-04T03:25:37 | 191,102,800 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | # Generated by Django 2.2 on 2019-06-09 07:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_blogpost_slug'),
]
operations = [
migrations.AlterField(
model_name='blogpost',
name='slug',
... | [
"[email protected]"
] | |
3d325135422a83e7942d4164fb53d194a67e4d51 | f13acd0d707ea9ab0d2f2f010717b35adcee142f | /AtCoder_Virtual_Contest/20181228-AtCoder Run/abc060/a.py | e46e119bb58a491f4e1804883c6cc27488c5b02f | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | KATO-Hiro/AtCoder | 126b9fe89fa3a7cffcbd1c29d42394e7d02fa7c7 | bf43320bc1af606bfbd23c610b3432cddd1806b9 | refs/heads/master | 2023-08-18T20:06:42.876863 | 2023-08-17T23:45:21 | 2023-08-17T23:45:21 | 121,067,516 | 4 | 0 | CC0-1.0 | 2023-09-14T21:59:38 | 2018-02-11T00:32:45 | Python | UTF-8 | Python | false | false | 224 | py | # -*- coding: utf-8 -*-
def main():
a, b, c = map(str, input().split())
if a[-1] == b[0] and b[-1] == c[0]:
print('YES')
else:
print('NO')
if __name__ == '__main__':
main()
| [
"[email protected]"
] | |
27595488cbfbd204c5edd5aa32464d6815764993 | 4e67c2edd71493a98a3f13e5b2073c1d05b1b656 | /Semestre 01/LogicaProgramacao/Aula 04.08.2020/Decrescente.py | eb1b31d2b5274617cd7fd88602938f3541556159 | [] | no_license | felipellima83/UniCEUB | 05991d7a02b13cd4e236f3be3a34726af2dc1504 | dbc44866545b5247d1b5f76ec6e9b7778e54093e | refs/heads/master | 2023-07-08T19:04:19.830473 | 2021-08-12T12:33:49 | 2021-08-12T12:33:49 | 249,958,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | #Professor: Antônio Barbosa Junior
#Disciplina: Lógica de programação
#Aluno: Felipe Ferreira Lima e Lima
#Matrícula: 22001310
#Data: 08/04/2020
#Exercício 06
soma = 0
i = 0
lista = range(7, -1, -1)
# ou lista = [7,6,5,4,3,2,1,0]
for x in lista:
print(x, end=" ") | [
"[email protected]"
] | |
38c43c83964024b74479add7f0bcda934ea9529c | 6aa3c372bd2b058be406955768b3fc2047b580e6 | /modules/datastructures/TrainData_DelphesDomAda.py | fdfbc32b890f974127958ad46519ae415b4a7411 | [] | no_license | mverzett/DeepJet-1 | b1aa1491bba284adfa78208237c48ef37fbe4ab3 | 04efbac1a6e4bef97a7ca1bc64345cc048f7ce20 | refs/heads/master | 2021-03-30T15:35:20.059508 | 2018-02-20T17:28:07 | 2018-02-20T17:28:07 | 120,431,339 | 0 | 0 | null | 2018-02-06T09:25:49 | 2018-02-06T09:25:49 | null | UTF-8 | Python | false | false | 1,988 | py | '''
Created on 21 Feb 2017
@author: jkiesele
'''
from TrainDataDeepJetDelphes import TrainDataDeepJetDelphes, fileTimeOut
class TrainData_DelphesDomAda(TrainDataDeepJetDelphes):
'''
example data structure - basis for further developments
'''
def __init__(self):
'''
Constructor
... | [
"[email protected]"
] | |
f3acdac3cec7c99140af2bf68d17ebb3f6c47ebd | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03112/s044499237.py | d133af3812b23eda812e0e4e272d7974e8c817c9 | [] | 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,289 | py | # なぜかうまくいかない
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase... | [
"[email protected]"
] | |
813c88604e0dc63335d38bbdd5c9a2ca78a1b246 | 0ae8d4aa8171d46e3dab71adaa26127c01360b87 | /дом_школа_дом.py | 19d65a403b75da4c938d24ecbea83163a3581925 | [] | no_license | dasherinuk/classwork | f004f7587157171cdb1c65b1eb13a721feb6c00b | 8b2efc055409576c59da878d293d8df6fd9ffb8e | refs/heads/master | 2023-06-04T16:08:53.299460 | 2021-06-19T09:18:20 | 2021-06-19T09:18:20 | 297,706,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 101 | py | rides=int(input("Enter amount of rides"))
if rides%2==0:
print("school")
else:
print("home")
| [
"[email protected]"
] | |
41cc2e1bdbdc341bf991d5e4a6e225b13acba6cb | 6710c52d04e17facbc9fb35a7df313f7a2a7bd53 | /0234. Palindrome Linked List.py | 38f97dc46d5f45578be5aaebb55f90e98ad5532b | [] | no_license | pwang867/LeetCode-Solutions-Python | 535088fbe747a453360457728cc22cf336020bd2 | 188befbfb7080ba1053ee1f7187b177b64cf42d2 | refs/heads/master | 2022-11-13T16:20:28.211707 | 2020-06-28T06:01:14 | 2020-06-28T06:01:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,333 | py | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
# time O(n), space O(1) in place
class Solution(object):
def isPalindrome(self, head):
"""
:type head: ListNode
:rtype: bool
"""
if n... | [
"[email protected]"
] | |
029c81b549e9282b6f68c0739e2079610361cce5 | 72246a70e272dfc279b1b4945c232f16900bb963 | /To_write_in_the_txt_file.py | 8ea3d0ff35b684318fb43fac57e91870fad16a2e | [] | no_license | stheartsachu/Python_basics_and_data_base_operations | bb15f4b06e404b8c3456061478e1a86fcb541fed | 6441eb247336cf5a0e935efc43f48d12aa32affe | refs/heads/master | 2020-06-25T09:09:59.021325 | 2019-07-28T09:35:07 | 2019-07-28T09:35:07 | 199,268,012 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | # Let us simplify the code
# by using the "with" Keyword.
# write to a text file
with open('t.txt','w') as f :
f.write('HEllo World ! ')
f.close()
# It will be Closed automaticallly
# f = open('t.txt', mode = 'w')
# w = create and write
# r = read(default)
# a = append
# x = create if not exist
# with = wit... | [
"[email protected]"
] | |
9468f8e04cd8b22575a8e8a5cb5f2154b120d75d | be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1 | /Gauss_v45r10p1/Gen/DecFiles/options/12315011.py | 1eaf65a06d4accb4b62d4c0891406e399fbd51c4 | [] | no_license | Sally27/backup_cmtuser_full | 34782102ed23c6335c48650a6eaa901137355d00 | 8924bebb935b96d438ce85b384cfc132d9af90f6 | refs/heads/master | 2020-05-21T09:27:04.370765 | 2018-12-12T14:41:07 | 2018-12-12T14:41:07 | 185,989,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,789 | py | # file /home/hep/ss4314/cmtuser/Gauss_v45r10p1/Gen/DecFiles/options/12315011.py generated: Wed, 25 Jan 2017 15:25:15
#
# Event Type: 12315011
#
# ASCII decay Descriptor: {[B+ -> K+ pi+ pi- e+ mu-]cc,[B+ -> K+ pi+ pi- e- mu+]cc}
#
from Configurables import Generation
Generation().EventType = 12315011
Generation().Sample... | [
"[email protected]"
] | |
158692323da657d0cf8086a5b00d0b90d3d7c5a8 | bd4812ba7af196d2e866cbf2935b2e7308d95066 | /python/leetcode/024_swap_nodes_in_pairs.py | d79edba96ef1dc07ede242c6bafa8a371bfe4052 | [
"Apache-2.0"
] | permissive | yxun/notebook | f507201e15c4376f0655121724254c0d5275c3b1 | 00eb1953d872a9a93a13d7cf23d8e4ed641d1ce7 | refs/heads/master | 2023-09-01T03:50:48.142295 | 2023-08-17T12:11:25 | 2023-08-17T12:11:25 | 207,569,654 | 2 | 2 | Apache-2.0 | 2023-08-17T12:11:26 | 2019-09-10T13:38:49 | Java | UTF-8 | Python | false | false | 1,334 | py | #%%
"""
- Swap Nodes in Pairs
- https://leetcode.com/problems/swap-nodes-in-pairs/
- Medium
Given a linked list, swap every two adjacent nodes and return its head.
You may not modify the values in the list's nodes, only nodes itself may be changed.
Example:
Given 1->2->3->4, you should return the list as 2->1->4... | [
"[email protected]"
] | |
11887d383e22055fe0ed0193394c2562e3d244b0 | 48934047ac284e2a9a745f00b5ec84b3d72382bf | /nyasha/blog/migrations/0005_auto__add_tag.py | e8afe3b0236239eb264ac782548a67fad230695b | [
"WTFPL"
] | permissive | Apkawa/nyasha | e36f4281c33eb6135320391349e2dadee3c01666 | 0d126e93be273ba73b005a793340501377485c3e | refs/heads/master | 2020-04-28T20:53:47.312077 | 2012-06-12T21:49:20 | 2012-06-12T21:49:20 | 1,100,616 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,518 | py | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Tag'
db.create_table('blog_tag', (
('id', self.gf('django.db.models.fields.Aut... | [
"[email protected]"
] | |
85dcc5969e56bb08a2daeb27e23d432d34c58286 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02718/s147463629.py | e093f018cdb275a578db1fcc576e49cebc099eb6 | [] | 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 | 166 | py | # 161 B
N,M = list(map(int, input().split()))
A = list(map(int, input().split()))
list.sort(A, reverse=True)
print('Yes') if A[M-1] >= (sum(A)/(4*M)) else print('No') | [
"[email protected]"
] | |
1ebc38c9e5488846563e087b28f5172fb47bfd2c | fce15571b2b65769758d4885deb4365153672a47 | /task_queue/redis_impl.py | 280a7be2d96fe3b835fdcdecc0303fe4016e773c | [
"MIT"
] | permissive | xlui/eFuture | 239f66c698390af9d4c5b82b32eed81e36c177e8 | 9bb9e8faca561ca5ccfb16de5401b6acd2ec692d | refs/heads/py | 2021-06-02T23:52:08.224564 | 2019-08-24T04:57:24 | 2019-08-24T04:57:24 | 149,577,756 | 0 | 0 | MIT | 2021-03-20T00:10:07 | 2018-09-20T08:35:32 | Python | UTF-8 | Python | false | false | 1,624 | py | import datetime
import uuid
from log import logger
from task_queue import connection, QUEUE_KEY
def push(message: str, date: datetime.datetime):
"""Push a message into redis zset
:param message: message content
:param date: the date this message to be consumed
:return: None
"""
msg_id = str(... | [
"[email protected]"
] | |
cbbfba9bdb63e74a1c7c05035f325aa7f0d7af7e | c49e35bc834c259cc0d7ab2165dbd48e12f6d1b6 | /model/word_attn_classifier.py | c5ac2ca9a9d5b3b24f2e003883f3afb2027270a6 | [
"MIT"
] | permissive | kenchan0226/dual_view_review_sum | f18997bce101ee3ac70d96813d75c6cb29ac921c | 2ff1c7323b98f0a8ca1dfb0341806e05b87faf52 | refs/heads/master | 2023-03-02T10:00:26.315254 | 2021-02-03T02:13:27 | 2021-02-03T02:13:27 | 266,673,121 | 19 | 4 | null | null | null | null | UTF-8 | Python | false | false | 3,184 | py | import torch
import torch.nn as nn
from torch.nn import init
from model.attention import Attention
class WordAttnClassifier(nn.Module):
def __init__(self, query_hidden_size, memory_bank_size, num_classes, attn_mode, dropout=0.0, ordinal=False, hr_enc=False):
super(WordAttnClassifier, self).__init__()
... | [
"[email protected]"
] | |
257d9c5993e931be92ff8bd92ceacd54ed6c9727 | 3869cbd5ee40e2bab5ca08b80b48115a7b4c1d5a | /Python-3/basic_examples/strings/string_expandtabs.py | c31cbcf03990c262555129f083b6bf6e26bbd25b | [
"MIT"
] | permissive | Tecmax/journaldev | 0774c441078816f22edfd68286621493dd271803 | 322caa8e88d98cfe7c71393bcd2a67cf77368884 | refs/heads/master | 2020-07-08T04:05:03.028015 | 2019-08-12T09:17:48 | 2019-08-12T09:17:48 | 203,559,030 | 0 | 1 | MIT | 2019-08-21T10:13:47 | 2019-08-21T10:13:47 | null | UTF-8 | Python | false | false | 559 | py | s = 'A\tB\tC\tD'
print(s)
print(s.expandtabs())
s = 'ABCD\tE\tF'
print(s)
print(s.expandtabs())
s = 'ABCDEFGHIJK\tG'
print(s.expandtabs())
s = 'ABCDEFGHIJK\t\tG'
print(s.expandtabs())
s = 'ABC\tD'
print(s)
print(s.expandtabs())
print(s.expandtabs(tabsize=0))
print(s.expandtabs(tabsize=1))
print(s.expandtabs(tabsiz... | [
"[email protected]"
] | |
1e21acec2110266a609612328d221ff317740237 | fff80cdaf12712704f36038479f50418253f42f3 | /redex/tools/python/file_extract.py | 51555fbbeb5606571a2b01d6e5c97431b3c873f0 | [
"MIT"
] | permissive | rudolfkopriva/Facebook | 1ea0cfbc116f68ae0317332eeb9155461af5645a | 56e4c6a83f992bb01849ad353004b28409e53eef | refs/heads/master | 2023-02-14T01:54:36.519860 | 2021-01-05T02:09:26 | 2021-01-05T02:09:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 46,013 | py | #! /usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import binascii
import re
import string
import struct
import sys
from io import BytesIO, StringIO
SEEK_SET = 0
SEEK_... | [
"[email protected]"
] | |
63f26a8db8b11444b2c37dda05f8b04c536308c0 | 5fe709d0643394168dd919bbc721adabebe60a97 | /profiler/translation/seq2seq/models/gnmt.py | b3bc9147c44775f20a46b6cbce1d24d4ee9b4917 | [
"MIT"
] | permissive | vibhatha/pipedream | 8232b67366a0dd84e41fd496c9b2e8b86dbfdd89 | af6b811f5d01a68e9eb91065e5242fc1a075f279 | refs/heads/master | 2020-12-20T18:21:35.337352 | 2020-07-06T04:54:23 | 2020-07-06T04:54:23 | 236,167,878 | 0 | 0 | MIT | 2020-01-25T12:34:04 | 2020-01-25T12:34:03 | null | UTF-8 | Python | false | false | 2,830 | py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch.nn as nn
from mlperf_compliance import mlperf_log
from seq2seq.utils import gnmt_print
import seq2seq.data.config as config
from seq2seq.models.seq2seq_base import Seq2Seq
from seq2seq.models.encoder import ResidualRecurren... | [
"[email protected]"
] | |
b221ad4641f6d3b0f304e77820b72eeb21327c1a | f4bf81d4e80468331a09401dbaeef12465aca853 | /lib/python/helpers/profiler/run_profiler.py | d1054a5f28c84804105642bc0bdc2a81ea369adb | [] | no_license | nottyo/intellibot | 45c41d673608a0a1291c6387f9d33ef449f18837 | 0547d987deaad90260abe33db5284eae9704eb9b | refs/heads/master | 2020-12-30T23:59:29.795725 | 2017-04-10T07:53:59 | 2017-04-10T07:53:59 | 86,574,980 | 1 | 0 | null | 2017-03-29T11:37:54 | 2017-03-29T11:37:53 | null | UTF-8 | Python | false | false | 5,121 | py | import os
import sys
import time
import traceback
from socket import AF_INET
from socket import SOCK_STREAM
from socket import socket
from _prof_imports import ProfilerResponse
from prof_io import ProfWriter, ProfReader
from prof_util import generate_snapshot_filepath, stats_to_response, get_snapshot_basepat... | [
"[email protected]"
] | |
e54de02e976647aa74f068b06084f0e6aa09524f | 0e60ed9251cd6e2ccc9645c45783a53fdabc22aa | /backend/home/migrations/0003_auto_20200613_0652.py | 3f900f39b9ebe293952dd7350fd52cfd4ad1297b | [] | no_license | crowdbotics-apps/mobile-13-dev-5964 | 7b522691afd94b4e7662ba5244abb1a8ab6768a3 | dee9594b7a96748c4c729d77145a01c592339e01 | refs/heads/master | 2022-10-22T08:47:30.634185 | 2020-06-13T07:29:34 | 2020-06-13T07:29:34 | 271,942,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 972 | py | # Generated by Django 2.2.13 on 2020-06-13 06:52
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("home", "0002_load_initi... | [
"[email protected]"
] | |
a72bf1e2b39f2476cd8b658a62118d236cf164a7 | 4f026ddcf8f058d884f15259f0e42c2178eb2157 | /roomlistwatcher/common/messaging/filters.py | 787b395ad5017aa059aacbf980e915a82a2ffff0 | [
"MIT"
] | permissive | dnguyen0304/roomlistwatcher | afd95e5f601f77fc8d7c4cd4307e60f36b53162c | 7ac4d5172de22dd8906662da521995c8e06c2617 | refs/heads/master | 2021-01-20T22:55:04.289589 | 2017-11-16T04:09:49 | 2017-11-16T04:09:49 | 101,829,306 | 0 | 0 | null | 2017-11-16T04:09:49 | 2017-08-30T02:38:56 | Python | UTF-8 | Python | false | false | 382 | py | # -*- coding: utf-8 -*-
import abc
class StringFilter(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def filter(self, string):
"""
Parameters
----------
string : str
Returns
-------
str
If the data should not be filtered. O... | [
"[email protected]"
] | |
b23f2e5fe1e974e3f9b11f5b20f431a35ee516d3 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/nlp/FairSeq_Transformer_ID0496_for_PyTorch/fairseq/models/fconv.py | 3d524589bb9294a89f9681571921b19673ccb18c | [
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 29,338 | py | #
# BSD 3-Clause License
#
# Copyright (c) 2017 xxxx
# All rights reserved.
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 ... | [
"[email protected]"
] | |
76950567499f25a761480d17cfaa528a71dd1eda | 522f4b1b18416443062ec53157340fb2d6f43b1b | /ch4/automate_possible_keys.py | 028d5a70faf14dc5253f9c385bc41c6c444e2c5d | [] | no_license | thewchan/impractical_python | fd3f3d82c6f45d1fd0dea55611bc8d5369c8982c | 9963df374b7de5b3eb1faa58e45de7857c3fc792 | refs/heads/master | 2021-05-22T00:41:05.491349 | 2020-04-04T02:18:16 | 2020-04-04T02:18:16 | 252,884,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,151 | py | """
Pseudo-code
ask for length of key
initiate possible integers
get sum of positive integers
get negative integers
merge into 1 string
get permutation
loop through permutation and sum up abs values
eliminate those with sum not equal to sum of positive integers
print out list of tuples
"""
from itertools import permut... | [
"[email protected]"
] | |
a5846c31c6b2366554d3e964fe1fab8ed55f1bb7 | f228b0cbe141d23ad918f9fe7a40674ca8d7c963 | /First_project.py | c59b3f5d3eea312d6cae46c1d93c796c070a73e0 | [] | no_license | Vazimax/My_first_project | a990996e753a979f8bc0393ce97837be55e84418 | 36b8c61a9e05ed9b35b5364521f79c906036415d | refs/heads/main | 2023-01-23T06:04:43.082815 | 2020-11-24T18:47:02 | 2020-11-24T18:47:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | def odd_even_project() :
number = input("Enter a number :")
while number != "x":
try:
number = int(number)
if number%2 == 0 :
print("It's an even number =)")
else :
print("It's an odd number :)")
except ValueError:
... | [
"[email protected]"
] | |
416028c8780dd01160c0b6dd3d29eb7302eda7ca | 3b5ee9aa584bfca56dabc19d75717f6104c0dc95 | /gaia/compute_synthetic_decam_fluxes.py | c4888f1d885e08e3fbaada340ff8434fa33f40ce | [] | no_license | rongpu/desi-misc | 95690ca99962940fd4a793d523edf4d2ce68b4c3 | c700344ebf8f74391fcce69a47e4ca57fc4b34f8 | refs/heads/master | 2023-09-01T00:49:07.399914 | 2023-08-11T17:10:40 | 2023-08-11T17:10:40 | 173,173,912 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,939 | py | # Convert the files from .csv.gz to .fits
from __future__ import division, print_function
import sys, os, glob, time, warnings, gc
import numpy as np
import matplotlib.pyplot as plt
from astropy.table import Table, vstack, hstack, join
import fitsio
from multiprocessing import Pool
from gaiaxpy import generate, Photo... | [
"[email protected]"
] | |
76c636adc6a52dcef38e9fc2977e6afa5a920185 | a0de3a09c857fab7281e4ca4a70a256a4a3575cb | /als.py | b35a28e27cad3706c3bcf527164858c394b50fad | [] | no_license | poker-HuDL/machine-learning | 16fcda0ef7221f6d534b1fa929550894bc775c8a | 8cfae1e944faa67244f18d03d10ca7dd7323be19 | refs/heads/master | 2022-02-27T01:03:19.122602 | 2019-11-07T09:56:16 | 2019-11-07T09:56:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,658 | py | #coding=utf-8
from collections import defaultdict
from random import random
from itertools import product, chain
from time import time
def load_movie_ratings():
f = open("boston/movie_ratings.csv")
lines = iter(f)
col_names = ", ".join(next(lines)[:-1].split(",")[:-1])
print("The column names are: %s... | [
"[email protected]"
] | |
167e0aa64ce2767420af626e5aa6e2b676c439ca | 7c74e87d80ef98f9758eda322a00209e7cb493ae | /leader/src/main/market/utils/QuitContainer.py | 4aa38f2d1b09ec560235078f356e2f230a209832 | [] | no_license | rorymcstay/car | f95e8623b34e1f36078b1aa789d46d6fc0897c36 | b1640253d06b165b999af47b889a07b865b9809e | refs/heads/master | 2020-05-07T16:03:40.158430 | 2019-09-15T13:15:49 | 2019-09-15T13:15:49 | 180,664,010 | 1 | 0 | null | 2019-04-23T23:24:42 | 2019-04-10T21:07:06 | Python | UTF-8 | Python | false | false | 92 | py | """
Contains methods for cleaning up containers
"""
def quit_container(container):
pass | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.